Hello,
I have a source video mpeg4 9000kb/s
I try different convertion with ffmpeg 0.11.x (build of 7 sep 2012), but I wonder if there is a bug or for libx264 ffmpeg ignores the options.
Indeed, with this command
The dos shell outputs q=8, also if I use video codec h263p.ffmpeg -i "2012-03 01Praha.MP4" -acodec copy -vcodec wmv2 -q:v 8 out.avi
Now, the same command, but with video codec libx264, viz
The shell outputs q=29ffmpeg -i "2012-03 01Praha.MP4" -acodec copy -vcodec libx264 -q:v 8 out.avi
So does ffmpeg discard the quality option with video codec libx264 or libschroedinger ?
Well, there is a workaround with -b:v options, but I just want to understand.
P.S.ffmpeg -i "2012-03 01Praha.MP4" -acodec copy -vcodec libx264 -b:v 823K outVB.avidoes not give a clue for thatffmpeg -h encoder=libx264
+ Reply to Thread
Results 1 to 4 of 4
-
Last edited by feelart; 19th Sep 2012 at 05:00.
-
Hi
q:v is not used with FFmpeg x264.
crf is used instead.
Range 0-69
crf 0 is lossless.
crf 69 is worst.
Also use a preset...
ultrafast
superfast
veryfast
faster
fast
medium
slow
slower
veryslow
(veryslow makes smallest file size, ultrafast makes largest file size)
Not good to use avi with x264.
mp4 or mkv is preferred.
Code:ffmpeg -i "2012-03 01Praha.MP4" -c:v libx264 -crf 23 -preset medium -c:a copy output.mp4
Then change "crf" and "preset" values to suit.
Code:ffmpeg -i "2012-03 01Praha.MP4" -t 60 -c:v libx264 -crf 23 -preset medium -c:a copy output.mp4
-
The lower the CRF, the higher the bitrate, higher quality. The higher the CRF, the lower the bitrate, lower quality. The presets specify encoding speed and to some extent quality, not file size. CRF / bitrate value used determines file size.
-
RE: http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide
Thanks I made some test and I wonder the difference between -b:v and -cfr
It seems that there are equal at equivalent bit rate & same preset.
I tried the following on my Core5 2450M (2.5GHz) with the 64bits ffmpeg version:
ffmpeg -i "2012-03 01Praha.MP4" -c:v libx264 -crf 30 -preset veryslow -c:a copy ox264_veryslow30.mp4
encoding time 15min30 (492kps)
ffmpeg -i "2012-03 01Praha.MP4" -c:v libx264 -crf 30 -preset ultrafast -c:a copy ox264_ultrafast30.mp4
encoding time 30 sec (1290 kbps)
ffmpeg -i "2012-03 01Praha.MP4" -c:v libx264 -b:v 1290k -c:a copy ox264_bv1290.mp4
encoding time 3min56
ffmpeg -i "2012-03 01Praha.MP4" -c:v libx264 -b:v 1290k -preset ultrafast -c:a copy ox264_bv1290ultrafast.mp4
encoding time 30sec
Source : 243Mb, HD Ready, mpeg4 9000kb/s, 3min46
Output file size:
38.754.204 ox264_bv1290.mp4
38.830.130 ox264_bv1290ultrafast.mp4
38.420.954 ox264_ultrafast30.mp4
15.925.175 ox264_veryslow30.mp4
P.S. Regarding preset, no preset -> medium preset, indeed,
ffmpeg -i "2012-03 01Praha.MP4" -c:v libx264 -b:v 1290k -c:a copy ox264_bv1290.mp4
ffmpeg -i "2012-03 01Praha.MP4" -c:v libx264 -b:v 1290k -preset medium -c:a copy ox264_bv1290Medium.mp4Last edited by feelart; 20th Sep 2012 at 03:12.
Similar Threads
-
Update libx264 in ffmpeg
By NGage^ in forum Newbie / General discussionsReplies: 2Last Post: 11th Sep 2012, 10:25 -
ffmpeg/libx264 does not observe interlace field order!
By timmus in forum RestorationReplies: 13Last Post: 16th Dec 2010, 13:17 -
ffmpeg with libx264
By alfmarius in forum Video ConversionReplies: 2Last Post: 7th Apr 2010, 11:10 -
FFMPEG with libxvid libx264 and libfaac without root access
By banon in forum LinuxReplies: 1Last Post: 6th Oct 2008, 06:19 -
ffmpeg upgrade (includes h264 to libx264) ok with winff ?
By Verlager in forum LinuxReplies: 1Last Post: 10th Feb 2008, 17:23