[FFmpeg-trac] #5493(avfilter:open): incomplete x264 MB tree with framerate filter
FFmpeg
trac at avcodec.org
Wed Jun 15 15:11:05 CEST 2016
#5493: incomplete x264 MB tree with framerate filter
-------------------------------------+-------------------------------------
Reporter: blacktrash | Owner:
Type: defect | Status: open
Priority: important | Component: avfilter
Version: git-master | Resolution:
Keywords: framerate | Blocked By:
libx264 regression | Reproduced by developer: 1
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by blacktrash):
Replying to [comment:7 michael]:
> Here:
> {{{
> x264 0.146.2538 121396c
> (libswscale 3.1.101)
> (libavformat 56.30.100)
> built on May 27 2015, gcc: 4.6.3
> x264 configuration: --bit-depth=8 --chroma-format=all
> libx264 configuration: --bit-depth=8 --chroma-format=all
> x264 license: GPL version 2 or later
> libswscale/libavformat license: GPL version 2 or later
> }}}
I can't compile that x264 revision:
{{{
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I.
-I/sw/include -arch x86_64 -std=gnu99 -I/usr/local/include
-I/usr/local/include -fPIC -fomit-frame-pointer -fno-tree-vectorize -c
-o output/matroska_ebml.o output/matroska_ebml.c
warningwarningwarning: : : warningwarningunknown: : warning
unknownoptionunknownunknown unknown'-Wno-maybe-uninitialized';warning
warningwarningwarningdidwarning option option: '-Wno-maybe-
uninitialized'; option optionyou'-Wno-maybe-uninitialized'; did did
'-Wno-maybe-uninitialized';unknown you '-Wno-maybe-uninitialized';mean
warningdidyou '-Wno-uninitialized'? meandid
you '-Wno-uninitialized'?option
[-Wunknown-warning-option] youmean[-Wunknown-warning-option]
'-Wno-uninitialized'?meanmean
'-Wno-uninitialized'? '-Wno-uninitialized'?[-Wunknown-warning-
option]
[-Wunknown-warning-option]
[-Wunknown-warning-option]
'-Wno-maybe-uninitialized';
did you mean '-Wno-uninitialized'?
[-Wunknown-warning-option]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'?
[-Wunknown-warning-option]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'?
[-Wunknown-warning-option]
x264.c:445:27: error: variable has incomplete type 'enum PixelFormat'
for( enum PixelFormat i = AV_PIX_FMT_NONE+1; i < AV_PIX_FMT_NB; i++ )
^
x264.c:445:15: note: forward declaration of 'enum PixelFormat'
for( enum PixelFormat i = AV_PIX_FMT_NONE+1; i < AV_PIX_FMT_NB; i++ )
^
x264.c:445:15: error: declaration of non-local variable in 'for' loop
for( enum PixelFormat i = AV_PIX_FMT_NONE+1; i < AV_PIX_FMT_NB; i++ )
^
1 warning generated.
gcc -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math -m64 -Wall -I. -I.
-I/sw/include -arch x86_64 -std=gnu99 -I/usr/local/include
-I/usr/local/include -fPIC -fomit-frame-pointer -fno-tree-vectorize -c
-o output/flv.o output/flv.c
1 warning and 2 errors generated.
<builtin>: recipe for target 'x264.o' failed
make: *** [x264.o] Error 1
make: *** Waiting for unfinished jobs....
}}}
I'll try with x264 stable, and maybe other scenarios.
Here's with both ffmpeg git HEAD of yesterday and very latest x264 master
HEAD.
I have also changed the filter chain: `framerate=30,scale=640:360,fps=30`
for these reasons:
1. normally one would move `framerate` more to the beginning of the chain
2. while 1. avoids the error, imho it also covers it up: adding `fps` at
the end is the most compact way I found to simulate a more complex
production scenario, it should also prove that something's fishy happens
in the filter chain
Note that the x264 error has somewhat more details with its latest
version.
{{{
$ ffmpeg -i issue5493.mp4 -filter:v framerate=30,scale=640:360,fps=30 -b:v
500k -pass 1 -y test.mp4
ffmpeg version N-80335-gcb46b78 Copyright (c) 2000-2016 the FFmpeg
developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --enable-gpl --enable-nonfree --disable-ffserver
--enable-shared --enable-openssl --enable-libspeex --enable-libopus
--enable-libfdk-aac --enable-libx265 --enable-libx264 --enable-libxvid
--enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libvidstab --extra-cflags=-I/sw/include --extra-
libs=-L/sw/lib
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 46.100 / 57. 46.100
libavformat 57. 38.100 / 57. 38.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 46.101 / 6. 46.101
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'issue5493.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-04-24 09:48:33
location : +60.4916+022.2685/
location-eng : +60.4916+022.2685/
com.android.version: 6.0.1
Duration: 00:00:52.12, start: 0.000000, bitrate: 15880 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080, 15715 kb/s, SAR 1:1 DAR 16:9, 25.48 fps, 90k tbr, 90k tbn, 180k
tbc (default)
Metadata:
creation_time : 2016-04-24 09:48:33
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 196 kb/s (default)
Metadata:
creation_time : 2016-04-24 09:48:33
handler_name : SoundHandle
[Parsed_framerate_0 @ 0x7ff5b2d240a0] time base:1/90000 -> 1/90000 exact:1
[Parsed_framerate_0 @ 0x7ff5b2d240a0] fps -> fps:30/1 scene score:7.000000
interpolate start:15 end:240
[libx264 @ 0x7ff5b3009e00] using SAR=1/1
[libx264 @ 0x7ff5b3009e00] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 0x7ff5b3009e00] profile Main, level 3.0
[libx264 @ 0x7ff5b3009e00] 264 - core 148 r2705 3f5ed56 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options:
cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=11
lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=500
ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x7ff5b3008c00] Using AVStream.codec to pass codec parameters to
muxers is deprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, mp4, to 'test.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
com.android.version: 6.0.1
location : +60.4916+022.2685/
location-eng : +60.4916+022.2685/
encoder : Lavf57.38.100
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 500 kb/s, 30 fps, 15360 tbn,
30 tbc (default)
Metadata:
creation_time : 2016-04-24 09:48:33
handler_name : VideoHandle
encoder : Lavc57.46.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/500000 buffer size: 0 vbv_delay: -1
Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2016-04-24 09:48:33
handler_name : SoundHandle
encoder : Lavc57.46.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 60 fps=0.0 q=37.0 size= 10kB time=00:00:03.01 bitrate=
25.9kbits/s speed=5.96x
frame= 134 fps=133 q=31.0 size= 177kB time=00:00:05.01 bitrate=
289.1kbits/s speed=4.97x
frame= 207 fps=137 q=30.0 size= 361kB time=00:00:07.02 bitrate=
421.1kbits/s speed=4.65x
frame= 274 fps=136 q=28.0 size= 511kB time=00:00:10.03 bitrate=
417.4kbits/s speed=4.98x
frame= 346 fps=137 q=28.0 size= 701kB time=00:00:12.03 bitrate=
476.9kbits/s speed=4.77x
frame= 417 fps=138 q=31.0 size= 957kB time=00:00:14.04 bitrate=
558.0kbits/s speed=4.65x
frame= 486 fps=138 q=30.0 size= 1111kB time=00:00:17.05 bitrate=
533.7kbits/s speed=4.83x
frame= 558 fps=138 q=30.0 size= 1280kB time=00:00:19.05 bitrate=
550.2kbits/s speed=4.73x
frame= 631 fps=139 q=31.0 size= 1509kB time=00:00:21.06 bitrate=
586.7kbits/s speed=4.65x
frame= 699 fps=139 q=31.0 size= 1692kB time=00:00:24.06 bitrate=
575.9kbits/s speed=4.78x
frame= 770 fps=139 q=30.0 size= 1838kB time=00:00:26.07 bitrate=
577.4kbits/s speed=4.71x
frame= 843 fps=140 q=30.0 size= 1998kB time=00:00:28.08 bitrate=
582.8kbits/s speed=4.65x
frame= 908 fps=139 q=29.0 size= 2145kB time=00:00:30.10 bitrate=
583.5kbits/s speed= 4.6x
frame= 971 fps=138 q=30.0 size= 2347kB time=00:00:32.38 bitrate=
593.5kbits/s speed= 4.6x
frame= 1037 fps=137 q=30.0 size= 2514kB time=00:00:35.09 bitrate=
586.8kbits/s speed=4.65x
frame= 1102 fps=137 q=30.0 size= 2662kB time=00:00:37.10 bitrate=
587.7kbits/s speed=4.61x
frame= 1169 fps=137 q=30.0 size= 2837kB time=00:00:39.10 bitrate=
594.2kbits/s speed=4.57x
frame= 1235 fps=136 q=30.0 size= 3003kB time=00:00:41.11 bitrate=
598.4kbits/s speed=4.54x
frame= 1294 fps=135 q=29.0 size= 3120kB time=00:00:43.12 bitrate=
592.7kbits/s speed=4.51x
frame= 1367 fps=136 q=29.0 size= 3281kB time=00:00:45.12 bitrate=
595.6kbits/s speed=4.49x
frame= 1430 fps=135 q=29.0 size= 3433kB time=00:00:47.13 bitrate=
596.7kbits/s speed=4.46x
frame= 1493 fps=135 q=29.0 size= 3586kB time=00:00:49.86 bitrate=
589.2kbits/s speed=4.51x
frame= 1557 fps=135 q=28.0 size= 3729kB time=00:00:52.08 bitrate=
586.5kbits/s speed=4.51x
frame= 1559 fps=134 q=-1.0 Lsize= 3989kB time=00:00:52.12 bitrate=
627.0kbits/s speed=4.48x
video:3119kB audio:813kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.448805%
[libx264 @ 0x7ff5b3009e00] frame I:12 Avg QP:24.46 size: 8829
[libx264 @ 0x7ff5b3009e00] frame P:419 Avg QP:26.64 size: 4157
[libx264 @ 0x7ff5b3009e00] frame B:1128 Avg QP:29.56 size: 1193
[libx264 @ 0x7ff5b3009e00] consecutive B-frames: 1.9% 3.0% 6.2% 89.0%
[libx264 @ 0x7ff5b3009e00] mb I I16..4: 49.9% 0.0% 50.1%
[libx264 @ 0x7ff5b3009e00] mb P I16..4: 23.3% 0.0% 0.0% P16..4: 49.3%
0.0% 0.0% 0.0% 0.0% skip:27.3%
[libx264 @ 0x7ff5b3009e00] mb B I16..4: 3.4% 0.0% 0.0% B16..8: 19.2%
0.0% 0.0% direct: 7.1% skip:70.3% L0:35.8% L1:43.1% BI:21.2%
[libx264 @ 0x7ff5b3009e00] final ratefactor: 23.53
[libx264 @ 0x7ff5b3009e00] coded y,uvDC,uvAC intra: 45.2% 40.8% 10.6%
inter: 9.6% 8.2% 0.3%
[libx264 @ 0x7ff5b3009e00] i16 v,h,dc,p: 74% 13% 7% 6%
[libx264 @ 0x7ff5b3009e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 43% 27% 10% 3%
3% 4% 3% 3% 5%
[libx264 @ 0x7ff5b3009e00] i8c dc,h,v,p: 48% 16% 31% 6%
[libx264 @ 0x7ff5b3009e00] Weighted P-Frames: Y:14.6% UV:3.6%
[libx264 @ 0x7ff5b3009e00] kb/s:491.59
[aac @ 0x7ff5b300b600] Qavg: 1142.250
$ ffmpeg -i issue5493.mp4 -filter:v framerate=30,scale=640:360,fps=30 -b:v
500k -pass 2 -y test.mp4
ffmpeg version N-80335-gcb46b78 Copyright (c) 2000-2016 the FFmpeg
developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --enable-gpl --enable-nonfree --disable-ffserver
--enable-shared --enable-openssl --enable-libspeex --enable-libopus
--enable-libfdk-aac --enable-libx265 --enable-libx264 --enable-libxvid
--enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-libvidstab --extra-cflags=-I/sw/include --extra-
libs=-L/sw/lib
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 46.100 / 57. 46.100
libavformat 57. 38.100 / 57. 38.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 46.101 / 6. 46.101
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'issue5493.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-04-24 09:48:33
location : +60.4916+022.2685/
location-eng : +60.4916+022.2685/
com.android.version: 6.0.1
Duration: 00:00:52.12, start: 0.000000, bitrate: 15880 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080, 15715 kb/s, SAR 1:1 DAR 16:9, 25.48 fps, 90k tbr, 90k tbn, 180k
tbc (default)
Metadata:
creation_time : 2016-04-24 09:48:33
handler_name : VideoHandle
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 196 kb/s (default)
Metadata:
creation_time : 2016-04-24 09:48:33
handler_name : SoundHandle
[Parsed_framerate_0 @ 0x7fe6984253e0] time base:1/90000 -> 1/90000 exact:1
[Parsed_framerate_0 @ 0x7fe6984253e0] fps -> fps:30/1 scene score:7.000000
interpolate start:15 end:240
[libx264 @ 0x7fe698810200] using SAR=1/1
[libx264 @ 0x7fe698810200] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 0x7fe698810200] profile High, level 3.0
[libx264 @ 0x7fe698810200] 264 - core 148 r2705 3f5ed56 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options:
cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=11
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=2pass mbtree=1 bitrate=500
ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 cplxblur=20.0 qblur=0.5
ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x7fe69899b600] Using AVStream.codec to pass codec parameters to
muxers is deprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, mp4, to 'test.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
com.android.version: 6.0.1
location : +60.4916+022.2685/
location-eng : +60.4916+022.2685/
encoder : Lavf57.38.100
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 500 kb/s, 30 fps, 15360 tbn,
30 tbc (default)
Metadata:
creation_time : 2016-04-24 09:48:33
handler_name : VideoHandle
encoder : Lavc57.46.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/500000 buffer size: 0 vbv_delay: -1
Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2016-04-24 09:48:33
handler_name : SoundHandle
encoder : Lavc57.46.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 52 fps=0.0 q=31.0 size= 119kB time=00:00:02.45 bitrate=
398.0kbits/s speed=4.91x
frame= 112 fps=112 q=28.0 size= 266kB time=00:00:04.01 bitrate=
542.8kbits/s speed=4.01x
frame= 172 fps=115 q=30.0 size= 419kB time=00:00:06.02 bitrate=
569.7kbits/s speed=4.01x
frame= 229 fps=114 q=30.0 size= 539kB time=00:00:08.02 bitrate=
550.4kbits/s speed=4.01x
frame= 289 fps=115 q=30.0 size= 670kB time=00:00:10.03 bitrate=
547.2kbits/s speed=4.01x
frame= 349 fps=116 q=30.0 size= 842kB time=00:00:12.03 bitrate=
572.7kbits/s speed=3.99x
frame= 406 fps=115 q=30.0 size= 1035kB time=00:00:14.04 bitrate=
603.9kbits/s speed=3.99x
frame= 467 fps=116 q=30.0 size= 1166kB time=00:00:16.04 bitrate=
595.3kbits/s speed=3.99x
frame= 525 fps=116 q=30.0 size= 1328kB time=00:00:18.05 bitrate=
602.5kbits/s speed=3.99x
frame= 579 fps=115 q=30.0 size= 1515kB time=00:00:20.05 bitrate=
618.7kbits/s speed=3.99x
frame= 636 fps=115 q=30.0 size= 1704kB time=00:00:21.68 bitrate=
643.8kbits/s speed=3.92x
frame= 697 fps=116 q=30.0 size= 1850kB time=00:00:23.81 bitrate=
636.5kbits/s speed=3.95x
frame= 758 fps=116 q=30.0 size= 1987kB time=00:00:25.60 bitrate=
635.8kbits/s speed=3.92x
frame= 820 fps=117 q=30.0 size= 2132kB time=00:00:28.08 bitrate=
622.1kbits/s speed=3.99x
frame= 880 fps=117 q=30.0 size= 2279kB time=00:00:29.44 bitrate=
634.0kbits/s speed=3.91x
frame= 940 fps=117 q=30.0 size= 2471kB time=00:00:31.08 bitrate=
651.2kbits/s speed=3.87x
frame= 998 fps=117 q=30.0 size= 2622kB time=00:00:33.09 bitrate=
649.1kbits/s speed=3.88x
frame= 1060 fps=117 q=30.0 size= 2765kB time=00:00:35.09 bitrate=
645.3kbits/s speed=3.88x
frame= 1117 fps=117 q=30.0 size= 2915kB time=00:00:37.10 bitrate=
643.5kbits/s speed=3.89x
frame= 1172 fps=117 q=30.0 size= 3069kB time=00:00:39.10 bitrate=
642.9kbits/s speed=3.89x
frame= 1234 fps=117 q=30.0 size= 3203kB time=00:00:41.11 bitrate=
638.1kbits/s speed=3.89x
frame= 1296 fps=117 q=30.0 size= 3331kB time=00:00:43.12 bitrate=
632.8kbits/s speed= 3.9x
frame= 1357 fps=117 q=30.0 size= 3459kB time=00:00:45.12 bitrate=
628.0kbits/s speed= 3.9x
frame= 1416 fps=117 q=30.0 size= 3598kB time=00:00:47.13 bitrate=
625.3kbits/s speed= 3.9x
frame= 1478 fps=117 q=30.0 size= 3721kB time=00:00:49.13 bitrate=
620.4kbits/s speed= 3.9x
frame= 1538 fps=117 q=30.0 size= 3852kB time=00:00:51.14 bitrate=
617.1kbits/s speed= 3.9x
[libx264 @ 0x7fe698810200] 2nd pass has more frames than 1st pass (1559)
[libx264 @ 0x7fe698810200] continuing anyway, at constant QP=27
[libx264 @ 0x7fe698810200] disabling adaptive B-frames
[libx264 @ 0x7fe698810200] specified frame type is not compatible with max
B-frames
$ x264 --version
x264 0.148.2705 3f5ed56
(libswscale 4.1.100)
(libavformat 57.37.101)
built on Jun 15 2016, gcc: 4.2.1 Compatible Apple LLVM 7.0.2
(clang-700.1.81)
x264 configuration: --bit-depth=8 --chroma-format=all
libx264 configuration: --bit-depth=8 --chroma-format=all
x264 license: GPL version 2 or later
libswscale/libavformat license: nonfree and unredistributable
WARNING: This binary is unredistributable!
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5493#comment:8>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list