Log in

View Full Version : x264 as encoder or decoder?


suciR
7th June 2012, 13:11
Hi all,
I've final project about video stream using NS-2.29.
And my refrence tools is
http://www2.tkn.tu-berlin.de/research/evalvid/EvalVid/docevalvid.html

1. I'm using x264 as encoder to produce H.264/AVC. Can i use it as decoder too or i use the ffmpeg as decoder ?
2. Can i use ffmpeg as encoder and decoder to produce H.264/AVC?
3. What is the good bitrate for H.264/AVC?

Please, help me guys

Thnks all :) :helpful:

Atak_Snajpera
7th June 2012, 13:24
1. I'm using x264 as encoder to produce H.264/AVC. Can i use it as decoder too or i use the ffmpeg as decoder ?
yes.

2. Can i use ffmpeg as encoder and decoder to produce H.264/AVC?
yes.

3. What is the good bitrate for H.264/AVC?
High enough to avoid visible degradation in video quality

suciR
7th June 2012, 14:02
@atak_snajpera: in qstion no.
1. So, x264 can be use for decoder? can u give me the refrence for my final projct's reference?
2. What is the commndline to produce file AVC use ffmpeg as encoder and decoder?
3. How about 1024kbps?

:helpful:

sneaker_ger
7th June 2012, 16:16
1. So, x264 can be use for decoder? can u give me the refrence for my final projct's reference?

No, x264 does not have a decoder. Atak_Snajpera's "yes" was probably referring to the "ffmpeg" part of your question or he misread.
2. What is the commndline to produce file AVC use ffmpeg as encoder and decoder?

encode:
ffmpeg -i input -vcodec libx264 output

decoder:
Depends on your output format. Search for ffmpeg documentation.

3. How about 1024kbps?

That really depends on your resolution and your expectations.

pandy
7th June 2012, 16:18
For D1 video, interlaced - general practice is to use something between 2000 - 2500kbps at least - common concept in broadcast is that h.264 is twice efficient as h.262, usually for D1 h.262 there is something between 4000 - 5000kbps for regular channels, for higher quality h.262 (movies, sport) usually there is something up to 7000kbps.

Atak_Snajpera
7th June 2012, 16:54
No, x264 does not have a decoder. Atak_Snajpera's "yes" was probably referring to the "ffmpeg" part of your question or he misread.
X264 has built in ffms2 so it can decode almost any format.

Bloax
7th June 2012, 17:05
I actually had to decode the videos from here (http://media.xiph.org/video/derf/) with x264 to mess around with them a bit! :p
[/slightlyrelevantexperience]

sneaker_ger
7th June 2012, 17:12
Oh, you meant that.
Too bad you have to encode everything with x264 you "decode with x264[cli]" as well.

Bloax
7th June 2012, 18:37
There's always --preset ultrafast --qp 0 :)

sneaker_ger
7th June 2012, 18:43
Yes, a H.264 file. Which you can then decode with x264cli and then ...

Bloax
7th June 2012, 18:56
Well certainly better than a .y4m file, that I'll say. :p

suciR
8th June 2012, 06:10
i've read in VideoLAN site (http://www.videolan.org/developers/x264.html)
x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC format, and is released under the terms of the GNU GPL
but u said this
X264 has built in ffms2 so it can decode almost any format
i'm becoming confused

So, when i used x264.exe in NS2, i've got file .264 from .yuv
And as u said, i can use x264.exe as decoder from .264 to .yuv
am i true?

can u give to me the refrences? coz it's very needed for my final prjct using Network Simulator 2...


encode:
ffmpeg -i input -vcodec libx264 output

decoder:
Depends on your output format. Search for ffmpeg documentation.

When i use x264.exe as encoder in NS2, i've got file .264
if i use ffmpeg as encoder, what's file extantion output?
If i use it as decoder, and
1. i've got output format .264, what's the cmmndline?
2. i've got output format .mp4, wht is the cmmndline?

:helpful:

sneaker_ger
8th June 2012, 06:30
And as u said, i can use x264.exe as decoder from .264 to .yuv
am i true?

No, that is not true.

suciR
8th June 2012, 06:45
No, that is not true.
hmmm....so u said that x264.exe is only as encoder in CLI, wrong?

When i use x264.exe as encoder in NS2, i've got file .264
if i use ffmpeg as encoder, what's file extantion output?
If i use it as decoder, and
1. i've got output format .264, what's the cmmndline?
2. i've got output format .mp4, wht is the cmmndline?

sneaker_ger
8th June 2012, 06:51
hmmm....so u said that x264.exe is only as encoder in CLI, wrong?

There is the x264 library (which is only a h.264 encoder) and "x264cli" (alias "x264.exe"). The latter has decoders for several formats built-in, but they only serve as input for the x264 encoder. So you can not decode h.264 to yuv with x264.exe, but only re-encode h.264 to h.264. You need something different (like ffmpeg) if you want to decode h.264 to e.g yuv.

suciR
8th June 2012, 06:57
There is the x264 library (which is only a h.264 encoder) and "x264cli" (alias "x264.exe"). The latter has decoders for several formats built-in, but they only serve as input for the x264 encoder. So you can not decode h.264 to yuv with x264.exe, but only re-encode h.264 to h.264. You need something different (like ffmpeg) if you want to decode h.264 to e.g yuv.

So, u said that i can decode .264 to .yuv only use ffmpeg
Am i wrong?

sneaker_ger
8th June 2012, 06:57
Correct.

suciR
8th June 2012, 07:04
Correct.
I've done it, but when i decode 400 frame foreman_qcif with ffmpeg, it's only 14 frame :'(

I've got confused for the commndline

./ffmpeg.exe -s qcif -r 30 -b 284000 -bt 3200 -g 7 -bf 2 -i foreman_qcif.264 -vcodec h264 -f -vframes 400 foreman_qcif.yuv

Do u have any alterative?
:helpful: