[FFmpeg-user] Speed differences, was: The Magic Microsecond
Jan Ehrhardt
phpdev at ehrhardt.nl
Sun Jul 8 16:29:13 CEST 2012
Jan Ehrhardt in ffmpeg.user (Sat, 07 Jul 2012 22:54:47 +0200):
>3. Any explanation why the newest FFmpeg is slower than the
> r32754?
Talking to myself: I compiled the FFmpeg that came with MPlayer-1.1
and Zeranoe's 20120706 on Win7pro with the same configure options.
The speed differences are huge.
ffmpeg version 20120706-git-8293a21-0.11.1-zeranoe
Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 8 2012 15:33:59 with gcc 4.6.2
configuration: --prefix=/mingw --enable-static --disable-shared
--enable-nonfree --enable-nonfree --enable-libfaac --enable-gpl
--enable-libx264 --enable-libmp3lame
frame= 6012 fps=300 q=24.4 Lsize= 12813kB time=00:04:00.48 \
bitrate= 436.5kbits/s
ffmpeg version 0.10.2.git
Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 8 2012 05:46:11 with gcc 4.6.2
configuration: --prefix=/mingw --enable-static --disable-shared
--enable-nonfree --enable-libfaac --enable-gpl --enable-libx264
--enable-libmp3lame
frame= 6012 fps=363 q=24.4 Lsize= 12813kB time=00:04:00.48 \
bitrate= 436.5kbits/s
Same configure options, same commandline, fps 300 versus fps 363.
A 20% timing difference? Beats me.
Lenovo X220, Win7Pro, SP1, all updates applied.
E:\utils>cpuinfo.exe
vendor_id : GenuineIntel
cpu family : 6
model : 42
stepping : 7
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr
pdcm sse4_1 sse4_2 x2apic popcnt aes xsave osxsave avx nx rdtscp
lm lahf_lm
cpu MHz : 2362.207
model name : Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz
T:\> ffmpeg -i %input% -vf scale=384:288 -aspect 4:3 -sws_flags bicubic \
-vcodec flv -b:v 320k -strict -2 -acodec aac -ab 96k -ar 44100 \
output.flv
With input and output on a HDD, the speed difference is more or less
the same: 308 versus 373.
Input file: http://x32.elijst.nl/MOV001.MOD (50MB)
Can I provide more information to analyse the difference?
Jan
mediainfo input file \SD_VIDEO\MOV001.mod
General
Complete name : \SD_VIDEO\MOV001.mod
Format : MPEG-PS
File size : 49.7 MiB
Duration : 4mn 0s
Overall bit rate mode : Variable
Overall bit rate : 1 732 Kbps
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : Main at Main
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : M=3, N=12
Duration : 4mn 0s
Bit rate mode : Variable
Bit rate : 1 570 Kbps
Maximum bit rate : 3 000 Kbps
Width : 352 pixels
Height : 288 pixels
Display aspect ratio : 4:3
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.619
Stream size : 45.0 MiB (91%)
Audio
ID : 189 (0xBD)-128 (0x80)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Muxing mode : DVD-Video
Duration : 4mn 0s
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : -80ms
Stream size : 3.67 MiB (7%)
ffmpeg version 20120706-git-8293a21-0.11.1-zeranoe Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 8 2012 15:33:59 with gcc 4.6.2
configuration: --prefix=/mingw --enable-static --disable-shared --enable-nonfree --enable-nonfree --enable-libfaac --enable-gpl --enable-libx264
--enable-libmp3lame
libavutil 51. 64.100 / 51. 64.100
libavcodec 54. 33.100 / 54. 33.100
libavformat 54. 15.100 / 54. 15.100
libavdevice 54. 1.100 / 54. 1.100
libavfilter 3. 0.101 / 3. 0.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[mpeg @ 031ae860] max_analyze_duration 5000000 reached at 5000000
Input #0, mpeg, from '/SD_VIDEO/MOV001.MOD':
Duration: 00:04:00.44, start: 0.919744, bitrate: 1732 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 352x288 [SAR 12:11 DAR 4:3], 3000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 128 kb/s
[graph 0 input from stream 0:0 @ 031b5340] w:352 h:288 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:12/11 sws_param:flags=2
[output stream 0:0 @ 031b55c0] No opaque field provided
[Parsed_scale_0 @ 0328ffa0] w:352 h:288 fmt:yuv420p sar:12/11 -> w:384 h:288 fmt:yuv420p sar:1/1 flags:0x4
[graph 1 input from stream 0:1 @ 03279da0] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[auto-inserted resampler 0 @ 0327a040] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:flt r:44100Hz
Output #0, flv, to 'output.flv':
Metadata:
encoder : Lavf54.15.100
Stream #0:0: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 384x288 [SAR 1:1 DAR 4:3], q=2-31, 320 kb/s, 1k tbn, 25 tbc
Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, flt, 96 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> flv)
Stream #0:1 -> #0:1 (ac3 -> aac)
Press [q] to stop, [?] for help
[mpeg2video @ 031c1e20] warning: first frame is no keyframe
frame= 137 fps=0.0 q=9.6 size= 470kB time=00:00:05.31 bitrate= 724.0kbits/s
frame= 288 fps=185 q=6.3 size= 877kB time=00:00:11.35 bitrate= 632.9kbits/s
frame= 435 fps=210 q=12.1 size= 1258kB time=00:00:17.22 bitrate= 598.2kbits/s
frame= 587 fps=227 q=18.5 size= 1560kB time=00:00:23.35 bitrate= 547.1kbits/s
frame= 737 fps=237 q=12.2 size= 1879kB time=00:00:29.25 bitrate= 526.0kbits/s
frame= 886 fps=245 q=26.9 size= 2174kB time=00:00:35.27 bitrate= 504.9kbits/s
frame= 1037 fps=251 q=7.2 size= 2476kB time=00:00:41.21 bitrate= 492.2kbits/s
frame= 1181 fps=254 q=10.2 size= 2785kB time=00:00:47.06 bitrate= 484.8kbits/s
frame= 1325 fps=257 q=11.4 size= 3073kB time=00:00:52.77 bitrate= 476.9kbits/s
frame= 1471 fps=259 q=10.5 size= 3399kB time=00:00:58.60 bitrate= 475.1kbits/s
frame= 1633 fps=264 q=14.5 size= 3709kB time=00:01:05.13 bitrate= 466.5kbits/s
frame= 1799 fps=268 q=12.5 size= 4085kB time=00:01:11.74 bitrate= 466.4kbits/s
frame= 1959 fps=271 q=11.0 size= 4406kB time=00:01:18.08 bitrate= 462.3kbits/s
frame= 2124 fps=275 q=21.3 size= 4759kB time=00:01:24.79 bitrate= 459.8kbits/s
frame= 2299 fps=279 q=11.6 size= 5130kB time=00:01:31.78 bitrate= 457.9kbits/s
frame= 2470 fps=282 q=11.3 size= 5480kB time=00:01:38.52 bitrate= 455.7kbits/s
frame= 2635 fps=284 q=10.2 size= 5833kB time=00:01:45.25 bitrate= 454.0kbits/s
frame= 2800 fps=286 q=9.0 size= 6163kB time=00:01:51.78 bitrate= 451.7kbits/s
frame= 2965 fps=288 q=8.9 size= 6501kB time=00:01:58.39 bitrate= 449.8kbits/s
frame= 3121 fps=288 q=10.3 size= 6847kB time=00:02:04.64 bitrate= 450.0kbits/s
frame= 3269 fps=288 q=21.8 size= 7117kB time=00:02:10.49 bitrate= 446.8kbits/s
frame= 3422 fps=289 q=11.1 size= 7451kB time=00:02:16.71 bitrate= 446.4kbits/s
frame= 3588 fps=290 q=9.2 size= 7825kB time=00:02:23.36 bitrate= 447.1kbits/s
frame= 3761 fps=292 q=12.9 size= 8178kB time=00:02:30.21 bitrate= 446.0kbits/s
frame= 3928 fps=293 q=11.9 size= 8514kB time=00:02:36.89 bitrate= 444.5kbits/s
frame= 4087 fps=294 q=11.0 size= 8840kB time=00:02:43.32 bitrate= 443.4kbits/s
frame= 4246 fps=294 q=10.1 size= 9157kB time=00:02:49.59 bitrate= 442.3kbits/s
frame= 4397 fps=294 q=17.2 size= 9465kB time=00:02:55.68 bitrate= 441.4kbits/s
frame= 4543 fps=294 q=22.9 size= 9771kB time=00:03:01.51 bitrate= 441.0kbits/s
frame= 4711 fps=295 q=12.6 size= 10145kB time=00:03:08.22 bitrate= 441.5kbits/s
frame= 4877 fps=296 q=15.2 size= 10455kB time=00:03:14.88 bitrate= 439.5kbits/s
frame= 5044 fps=297 q=10.4 size= 10797kB time=00:03:21.54 bitrate= 438.9kbits/s
frame= 5206 fps=297 q=11.8 size= 11143kB time=00:03:28.00 bitrate= 438.9kbits/s
frame= 5374 fps=298 q=11.4 size= 11516kB time=00:03:34.78 bitrate= 439.2kbits/s
frame= 5543 fps=299 q=13.0 size= 11849kB time=00:03:41.61 bitrate= 438.0kbits/s
frame= 5711 fps=300 q=12.3 size= 12185kB time=00:03:48.25 bitrate= 437.3kbits/s
frame= 5873 fps=300 q=19.6 size= 12524kB time=00:03:54.75 bitrate= 437.0kbits/s
frame= 6012 fps=300 q=24.4 Lsize= 12813kB time=00:04:00.48 bitrate= 436.5kbits/s
video:9746kB audio:2802kB subtitle:0 global headers:0kB muxing overhead 2.121789%
ffmpeg version 0.10.2.git Copyright (c) 2000-2012 the FFmpeg developers
built on Jul 8 2012 05:46:11 with gcc 4.6.2
configuration: --prefix=/mingw --enable-static --disable-shared --enable-nonfree --enable-libfaac --enable-gpl --enable-libx264 --enable-libmp3lame
libavutil 51. 56.100 / 51. 56.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.101 / 54. 6.101
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
[mpeg @ 0322e860] max_analyze_duration 5000000 reached at 5000000
Input #0, mpeg, from '/SD_VIDEO/MOV001.MOD':
Duration: 00:04:00.44, start: 0.919744, bitrate: 1732 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 352x288 [SAR 12:11 DAR 4:3], 3000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 128 kb/s
[buffer @ 0330fe40] w:352 h:288 pixfmt:yuv420p tb:1/90000 sar:12/11 sws_param:flags=2
[buffersink @ 0330faa0] No opaque field provided
[scale @ 032e6a60] w:352 h:288 fmt:yuv420p sar:12/11 -> w:384 h:288 fmt:yuv420p sar:1/1 flags:0x4
[aformat @ 03af0320] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'aformat'
[aresample @ 03af0380] chl:stereo fmt:s16 r:48000Hz -> chl:stereo fmt:flt r:44100Hz
Output #0, flv, to 'output.flv':
Metadata:
encoder : Lavf54.6.101
Stream #0:0: Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 384x288 [SAR 1:1 DAR 4:3], q=2-31, 320 kb/s, 1k tbn, 25 tbc
Stream #0:1: Audio: aac ([10][0][0][0] / 0x000A), 44100 Hz, stereo, flt, 96 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> flv)
Stream #0:1 -> #0:1 (ac3 -> aac)
Press [q] to stop, [?] for help
[mpeg2video @ 03241e20] warning: first frame is no keyframe
frame= 147 fps=0.0 q=10.4 size= 478kB time=00:00:05.59 bitrate= 699.9kbits/s
frame= 338 fps=328 q=8.9 size= 1018kB time=00:00:13.28 bitrate= 628.0kbits/s
frame= 513 fps=332 q=12.2 size= 1423kB time=00:00:20.29 bitrate= 574.3kbits/s
frame= 699 fps=339 q=8.4 size= 1792kB time=00:00:27.72 bitrate= 529.6kbits/s
frame= 877 fps=341 q=21.3 size= 2155kB time=00:00:34.87 bitrate= 506.1kbits/s
frame= 947 fps=307 q=21.6 size= 2286kB time=00:00:37.75 bitrate= 496.1kbits/s
frame= 1131 fps=314 q=21.0 size= 2675kB time=00:00:45.00 bitrate= 486.9kbits/s
frame= 1301 fps=316 q=18.9 size= 3030kB time=00:00:51.85 bitrate= 478.8kbits/s
frame= 1483 fps=320 q=9.4 size= 3429kB time=00:00:59.11 bitrate= 475.1kbits/s
frame= 1679 fps=326 q=9.6 size= 3806kB time=00:01:06.94 bitrate= 465.8kbits/s
frame= 1871 fps=330 q=18.2 size= 4225kB time=00:01:14.69 bitrate= 463.3kbits/s
frame= 2071 fps=335 q=10.5 size= 4664kB time=00:01:22.66 bitrate= 462.2kbits/s
frame= 2278 fps=340 q=11.2 size= 5082kB time=00:01:30.95 bitrate= 457.7kbits/s
frame= 2486 fps=345 q=10.9 size= 5510kB time=00:01:39.26 bitrate= 454.7kbits/s
frame= 2683 fps=347 q=31.0 size= 5924kB time=00:01:47.18 bitrate= 452.8kbits/s
frame= 2879 fps=350 q=14.4 size= 6343kB time=00:01:55.00 bitrate= 451.8kbits/s
frame= 3074 fps=351 q=9.7 size= 6743kB time=00:02:02.71 bitrate= 450.2kbits/s
frame= 3251 fps=351 q=21.7 size= 7090kB time=00:02:09.82 bitrate= 447.4kbits/s
frame= 3431 fps=351 q=10.0 size= 7476kB time=00:02:17.09 bitrate= 446.7kbits/s
frame= 3629 fps=352 q=10.9 size= 7924kB time=00:02:25.00 bitrate= 447.7kbits/s
frame= 3830 fps=354 q=12.7 size= 8319kB time=00:02:32.97 bitrate= 445.5kbits/s
frame= 4033 fps=356 q=21.5 size= 8735kB time=00:02:41.12 bitrate= 444.1kbits/s
frame= 4217 fps=356 q=11.9 size= 9104kB time=00:02:48.50 bitrate= 442.6kbits/s
frame= 4402 fps=356 q=16.2 size= 9479kB time=00:02:55.84 bitrate= 441.6kbits/s
frame= 4574 fps=355 q=8.8 size= 9822kB time=00:03:02.71 bitrate= 440.4kbits/s
frame= 4776 fps=357 q=13.7 size= 10266kB time=00:03:10.89 bitrate= 440.6kbits/s
frame= 4976 fps=358 q=14.4 size= 10662kB time=00:03:18.85 bitrate= 439.2kbits/s
frame= 5174 fps=359 q=12.6 size= 11065kB time=00:03:26.72 bitrate= 438.5kbits/s
frame= 5374 fps=360 q=11.4 size= 11516kB time=00:03:34.76 bitrate= 439.3kbits/s
frame= 5579 fps=361 q=12.1 size= 11921kB time=00:03:42.95 bitrate= 438.0kbits/s
frame= 5781 fps=362 q=11.4 size= 12333kB time=00:03:51.01 bitrate= 437.4kbits/s
frame= 5974 fps=363 q=12.7 size= 12735kB time=00:03:58.79 bitrate= 436.9kbits/s
frame= 6012 fps=363 q=24.4 Lsize= 12813kB time=00:04:00.48 bitrate= 436.5kbits/s
video:9746kB audio:2802kB global headers:0kB muxing overhead 2.121781%
More information about the ffmpeg-user
mailing list