[Ffmpeg-devel] Differences between mencoder and ffmpeg when encoding using x264
Erik Slagter
erik
Sun Feb 19 13:53:16 CET 2006
I've got this weird problem, it's probably something I overlooked, so
I'd appreciate some help.
This command line:
ffmpeg -bf 16 -deinterlace -t 24 -nr 800 -y -coder 1 -threads 2 -i $1 -qmin 1 -qmax 51 -lmin 1 -lmax 51 -aspect 4:3 -minrate 0 -maxrate 9000 -b 3000 -bufsize 8000 -vcodec h264 -f h264 "$video" -acodec aac -ab 128 "$audio"
and this command line:
mencoder -frames 610 -nosound -ovc x264 -of rawvideo -vf "lavcdeint" -mc 0 -x264encopts "bitrate=3000:nr=800:bframes=16:cabac:vbv_maxrate=9000:vbv_bufsize=8000:threads=2" -o $video $vob
Give very different results, although as far as I can see the relevant
options are the same. The mencoder command line gives much better
quality (visually) using the same bit rate, almost no blockyness, while
the ffmpeg output is full of blocks.
ffmpeg, mencoder and x264 are all cvs/svn from yesterday. I patched
ffmpeg to be able to use 16 b frames and noise reduction (see patches).
Thank you for your help.
P.S. I removed line breaks for readability, but maybe this doesn't work
well for some mailers?
FFmpeg output:
FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --extra-cflags=-mtune=athlon-mp -finline-functions --prefix=/usr --enable-mp3lame --enable-faad --enable-faadbin --enable-faac --enable-x264 --enable-a52 --enable-a52bin --enable-pp --enable-shared --enable-pthreads --disable-audio-oss --disable-v4l --disable-bktr --disable-dv1394 --disable-debug --enable-gpl
libavutil version: 49.0.0
libavcodec version: 51.7.0
libavformat version: 50.3.0
built on Feb 19 2006 12:08:32, gcc: 4.0.2 20051125 (Red Hat 4.0.2-8)
Input #0, mpeg, from 'bbc-corrs.vob':
Duration: 00:03:59.5, start: 0.264656, bitrate: 4055 kb/s
Stream #0.0[0x1e0], 25.00 fps(r): Video: mpeg2video, yuv420p, 720x576, 3473 kb/s
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 256 kb/s
Output #0, h264, to 'bbc-corrs.264':
Stream #0.0, 25.00 fps(c): Video: h264, yuv420p, 720x576, q=1-51, 3000 kb/s
Output #1, adts, to 'bbc-corrs.aac':
Stream #1.0: Audio: aac, 48000 Hz, stereo, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #1.0
[h264 @ 0xb7ed9568]using SAR=16/15
[h264 @ 0xb7ed9568]using cpu capabilities MMX MMXEXT SSE 3DNow!
Press [q] to stop encoding
frame= 610 q=27.0 Lsize= 8990kB time=23.7 bitrate=3104.8kbits/s
video:8990kB audio:375kB global headers:0kB muxing overhead -4.004150%
[h264 @ 0xb7ed9568]slice I:50 Avg QP:23.82 size: 26884
[h264 @ 0xb7ed9568]slice P:50 Avg QP:23.74 size: 32522
[h264 @ 0xb7ed9568]slice B:494 Avg QP:25.66 size: 12611
[h264 @ 0xb7ed9568]mb I I16..4: 49.0% 0.0% 51.0%
[h264 @ 0xb7ed9568]mb P I16..4: 79.9% 0.0% 0.0% P16..4: 19.4% 0.0% 0.0% 0.0% 0.0% skip: 0.7%
[h264 @ 0xb7ed9568]mb B I16..4: 26.7% 0.0% 0.0% B16..8: 64.1% 0.0% 0.0% direct: 4.3% skip: 4.9%
[h264 @ 0xb7ed9568]kb/s:3097.8
Mencoder output:
MEncoder dev-CVS-060218-21:44-4.0.2 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Sempron/Athlon MP/XP Thoroughbred; Duron Applebred (Family: 6, Stepping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE
success: format: 0 data: 0x0 - 0x73d0000
MPEG-PS file format detected.
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 3000.0 kbps (375.0 kbyte/s)
[V] filefmt:2 fourcc:0x10000002 size:720x576 fps:25.00 ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [lavcdeint]
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
SwScaler: using unscaled Planar YV12 -> Planar YV12 special converter
x264 [info]: using SAR=64/45
x264 [info]: using cpu capabilities MMX MMXEXT SSE 3DNow!
Pos: 0.0s 2f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos: 23.8s 612f (10%) 9.35fps Trem: 8min 77mb A-V:0.000 [3001:0]
Flushing video frames
Video stream: 3005.511 kbit/s (375688 B/s) size: 9181835 bytes 24.440 secs 612 frames
x264 [info]: slice I:6 Avg QP:19.50 size: 27227
x264 [info]: slice P:341 Avg QP:20.24 size: 18898
x264 [info]: slice B:263 Avg QP:23.05 size: 9773
x264 [info]: mb I I16..4: 46.5% 0.0% 53.5%
x264 [info]: mb P I16..4: 25.4% 0.0% 14.2% P16..4: 25.1% 20.1% 12.3% 0.0% 0.0% skip: 2.9%
x264 [info]: mb B I16..4: 4.6% 0.0% 2.1% B16..8: 45.4% 2.9% 9.6% direct:14.3% skip:21.0%
x264 [info]: kb/s:3009.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2771 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060219/6073be4c/attachment.bin>
More information about the ffmpeg-devel
mailing list