[FFmpeg-user] Performance issue/question (maybe my misunderstanding)
Frank Häfemeier
ffmpeg at frank.haefemeier.eu
Mon Aug 20 16:38:32 CEST 2012
Hi,
I am a little confused about, what kind of resources are needed to
transcode a video for example 'mpeg2video -> libx264', as in my case. It
can't be ruled out my understanding is wrong, but it confused me. But
let me explain from the beginning.
I have two computer. An older one with an 'Intel(R) Core(TM)2 Duo CPU
E8400 @ 3.00GHz' and a brand new 'Intel(R) Core(TM) i7-3930K CPU @
3.20GHz'. The first has two cores (2 threads, 6M cache), the second 6
cores (12 threads, 12M cache).
My thoughts are the second should be faster to transcode videos as the
first one. But it isn't! My new computer was <10% faster as the other.
It seems to me there are some parameter which are influent the process.
But I have no idea which?
To my background: I am not new to computer at all or there architecture
(> 20 year experience in linux environment and software development),
but started to undersand how video transcoding works.
You will find attached a textfile with a complete console output of a
transcoding the same video on both machines. If you need more, please
contact me.
Any hints, possible explanations or discussions are welcome.
Bye
Frank
P.S.: Please don't misunderstand me. It isn't the absolute time, it is
the small differences between them.
-------------- next part --------------
Mordor (Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz):
/home/frank/software/bin/ffmpeg -benchmark -i 00000.m2v -i 00000-02.mp2 -filter:v yadif -b:v 3000k -preset veryslow -b:a 192k ACDC-LiveatRiverPlate1.mp4
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Aug 9 2012 19:51:02 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5)
configuration: --prefix=/home/frank/software --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-openssl --enable-libfaac --enable-libpulse --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --enable-gpl --enable-nonfree --disable-shared --enable-postproc --extra-cflags=-I/home/frank/software/include --extra-ldflags=-L/home/frank/software/lib
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[mpegvideo @ 0x262ca80] max_analyze_duration 5000000 reached at 5000000
[mpegvideo @ 0x262ca80] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegvideo, from '00000.m2v':
Duration: 01:20:35.62, bitrate: 4139 kb/s
Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 4139 kb/s, 25 fps, 25 tbr, 1200k tbn, 50 tbc
[mp3 @ 0x2633ee0] max_analyze_duration 5000000 reached at 5016000
[mp3 @ 0x2633ee0] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from '00000-02.mp2':
Duration: 00:59:47.90, start: 0.000000, bitrate: 256 kb/s
Stream #1:0: Audio: mp2, 48000 Hz, stereo, s16, 256 kb/s
[buffer @ 0x2777680] w:720 h:576 pixfmt:yuv420p tb:1/1200000 sar:64/45 sws_param:flags=2
[buffersink @ 0x26c6600] No opaque field provided
[yadif @ 0x27353a0] mode:0 parity:-1 auto_enable:0
[libx264 @ 0x2611080] using SAR=64/45
[libx264 @ 0x2611080] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x2611080] profile High, level 4.0
[libx264 @ 0x2611080] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=abr mbtree=1 bitrate=3000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'ACDC-LiveatRiverPlate1.mp4':
Metadata:
encoder : Lavf54.6.100
Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 3000 kb/s, 25 tbn, 25 tbc
Stream #0:1: Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, stereo, s16, 192 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> libx264)
Stream #1:0 -> #0:1 (mp2 -> libfaac)
Press [q] to stop, [?] for help
Header missings=4.9 q=25.0 size= 1241394kB time=00:53:32.00 bitrate=3166.1kbits/s
Error while decoding stream #1:0
frame=89698 fps=4.9 q=-1.0 Lsize= 1394436kB time=00:59:47.84 bitrate=3183.9kbits/s
video:1319435kB audio:72450kB global headers:0kB muxing overhead 0.183261%
[libx264 @ 0x2611080] frame I:867 Avg QP:19.12 size: 50671
[libx264 @ 0x2611080] frame P:22154 Avg QP:22.81 size: 24420
[libx264 @ 0x2611080] frame B:66677 Avg QP:25.16 size: 11491
[libx264 @ 0x2611080] consecutive B-frames: 3.0% 4.1% 19.9% 17.7% 11.5% 42.1% 1.3% 0.2% 0.1%
[libx264 @ 0x2611080] mb I I16..4: 8.9% 71.9% 19.2%
[libx264 @ 0x2611080] mb P I16..4: 8.3% 32.6% 3.9% P16..4: 30.6% 15.0% 7.1% 0.7% 0.1% skip: 1.6%
[libx264 @ 0x2611080] mb B I16..4: 1.4% 4.4% 0.6% B16..8: 41.8% 13.5% 3.5% direct:15.2% skip:19.6% L0:42.3% L1:38.3% BI:19.4%
[libx264 @ 0x2611080] final ratefactor: 19.49
[libx264 @ 0x2611080] 8x8 transform intra:71.6% inter:78.6%
[libx264 @ 0x2611080] direct mvs spatial:100.0% temporal:0.0%
[libx264 @ 0x2611080] coded y,uvDC,uvAC intra: 69.5% 87.6% 50.8% inter: 41.5% 50.3% 8.4%
[libx264 @ 0x2611080] i16 v,h,dc,p: 40% 19% 12% 29%
[libx264 @ 0x2611080] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 9% 11% 7% 9% 13% 9% 13% 9%
[libx264 @ 0x2611080] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 7% 4% 8% 12% 16% 10% 13% 9%
[libx264 @ 0x2611080] i8c dc,h,v,p: 27% 24% 30% 20%
[libx264 @ 0x2611080] Weighted P-Frames: Y:18.8% UV:16.0%
[libx264 @ 0x2611080] ref P L0: 44.7% 11.8% 14.9% 6.8% 4.7% 3.6% 2.8% 2.0% 1.7% 1.5% 1.2% 1.1% 0.9% 0.8% 0.7% 0.6%
[libx264 @ 0x2611080] ref B L0: 78.7% 8.7% 3.8% 2.1% 1.5% 1.1% 0.9% 0.6% 0.6% 0.5% 0.4% 0.4% 0.3% 0.2% 0.1%
[libx264 @ 0x2611080] ref B L1: 94.9% 5.1%
[libx264 @ 0x2611080] kb/s:3012.55
bench: utime=197763.114s maxrss=361764kB
real 306m10.332s
user 3296m3.142s
sys 5m22.650s
Gondor (Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz):
/home/frank/software/bin/ffmpeg -benchmark -i 00000.m2v -i 00000-02.mp2 -filter:v yadif -b:v 3000k -preset veryslow -b:a 192k ACDC-LiveatRiverPlate1.mp4
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
built on Jun 13 2012 20:11:25 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2)
configuration: --prefix=/home/frank/software --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-openssl --enable-libfaac --enable-libpulse --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --enable-gpl --enable-nonfree --disable-shared --enable-postproc --extra-cflags=-I/home/frank/software/include --extra-ldflags=-L/home/frank/software/lib
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[mpegvideo @ 0x303ea80] max_analyze_duration 5000000 reached at 5000000
[mpegvideo @ 0x303ea80] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegvideo, from '00000.m2v':
Duration: 01:20:35.62, bitrate: 4139 kb/s
Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 4139 kb/s, 25 fps, 25 tbr, 1200k tbn, 50 tbc
[mp3 @ 0x3045ee0] max_analyze_duration 5000000 reached at 5016000
[mp3 @ 0x3045ee0] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from '00000-02.mp2':
Duration: 00:59:47.90, start: 0.000000, bitrate: 256 kb/s
Stream #1:0: Audio: mp2, 48000 Hz, stereo, s16, 256 kb/s
[buffer @ 0x3189680] w:720 h:576 pixfmt:yuv420p tb:1/1200000 sar:64/45 sws_param:flags=2
[buffersink @ 0x30d8600] No opaque field provided
[yadif @ 0x31473a0] mode:0 parity:-1 auto_enable:0
[libx264 @ 0x3023080] using SAR=64/45
[libx264 @ 0x3023080] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[libx264 @ 0x3023080] profile High, level 4.0
[libx264 @ 0x3023080] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=16 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=10 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=24 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=8 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=abr mbtree=1 bitrate=3000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'ACDC-LiveatRiverPlate1.mp4':
Metadata:
encoder : Lavf54.6.100
Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 3000 kb/s, 25 tbn, 25 tbc
Stream #0:1: Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, stereo, s16, 192 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> libx264)
Stream #1:0 -> #0:1 (mp2 -> libfaac)
Press [q] to stop, [?] for help
Header missings=4.2 q=25.0 size= 1241524kB time=00:53:32.80 bitrate=3165.6kbits/s
Error while decoding stream #1:0
frame=89698 fps=4.2 q=32766.0 Lsize= 1394067kB time=00:59:47.84 bitrate=3183.0kbits/s
video:1319073kB audio:72450kB global headers:0kB muxing overhead 0.182841%
[libx264 @ 0x3023080] frame I:880 Avg QP:19.10 size: 50643
[libx264 @ 0x3023080] frame P:21558 Avg QP:22.75 size: 24627
[libx264 @ 0x3023080] frame B:67260 Avg QP:25.13 size: 11526
[libx264 @ 0x3023080] consecutive B-frames: 2.8% 3.6% 18.5% 16.8% 11.7% 44.8% 1.5% 0.2% 0.1%
[libx264 @ 0x3023080] mb I I16..4: 8.8% 72.0% 19.2%
[libx264 @ 0x3023080] mb P I16..4: 8.2% 32.5% 3.9% P16..4: 30.5% 15.3% 7.2% 0.7% 0.1% skip: 1.6%
[libx264 @ 0x3023080] mb B I16..4: 1.4% 4.4% 0.6% B16..8: 41.9% 13.6% 3.5% direct:15.2% skip:19.5% L0:42.4% L1:38.2% BI:19.4%
[libx264 @ 0x3023080] final ratefactor: 19.48
[libx264 @ 0x3023080] 8x8 transform intra:71.5% inter:78.6%
[libx264 @ 0x3023080] direct mvs spatial:100.0% temporal:0.0%
[libx264 @ 0x3023080] coded y,uvDC,uvAC intra: 69.5% 87.6% 50.9% inter: 41.5% 50.4% 8.4%
[libx264 @ 0x3023080] i16 v,h,dc,p: 40% 19% 12% 29%
[libx264 @ 0x3023080] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 9% 11% 7% 9% 13% 8% 13% 9%
[libx264 @ 0x3023080] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 7% 4% 8% 12% 16% 10% 13% 9%
[libx264 @ 0x3023080] i8c dc,h,v,p: 27% 24% 30% 20%
[libx264 @ 0x3023080] Weighted P-Frames: Y:19.0% UV:16.2%
[libx264 @ 0x3023080] ref P L0: 44.4% 11.6% 14.8% 7.0% 4.8% 3.7% 2.9% 2.1% 1.7% 1.5% 1.2% 1.1% 0.9% 0.8% 0.7% 0.6%
[libx264 @ 0x3023080] ref B L0: 78.7% 8.5% 3.8% 2.1% 1.5% 1.2% 1.0% 0.7% 0.6% 0.5% 0.4% 0.4% 0.3% 0.2% 0.1%
[libx264 @ 0x3023080] ref B L1: 95.0% 5.0%
[libx264 @ 0x3023080] kb/s:3011.73
bench: utime=42209.772s maxrss=255656kB
real 355m8.107s
user 703m29.818s
sys 0m29.021s
More information about the ffmpeg-user
mailing list