[FFmpeg-user] Mystery error initializing complex filters -- bug?
Paul B Mahol
onemda at gmail.com
Mon Mar 22 09:00:48 EET 2021
On Mon, Mar 22, 2021 at 6:43 AM Mark Filipak (ffmpeg) <markfilipak at bog.us>
wrote:
> Hi All,
>
> A little help, please.
>
> Using the latest git source, using '-filter_complex_script', I get a
> mystery error.
>
> I have checked the filter_complex_script: 23fps.ffmpeg.filter.txt, for
> errors. Especially I've
> checked that every input pad (especially [AA1]) has one and only one
> matching output pad, and that
> every output pad (especially [AA1]) has one and only one matching input
> pad.
>
> Can you suggest any other checks or should I file a bug now?
>
This is not a bug. Repeat, this is not a bug.
If you do not understand how filtergraphs works I advise to use some other
tool.
>
> Thanks Much!
> Mark.
>
>
> Contents:
> command line
> debug level report
> filter_complex_script
>
> === command line ===
>
> ffmpeg -i "THE LAST EMPEROR.excerpt.24fps.mkv" -filter_complex_script
> 23fps.ffmpeg.filter.txt -map 0
> -codec:v libx265 -x265-params crf=16:qcomp=1.00 -codec:a copy -codec:s
> copy -dn "THE LAST
> EMPEROR.excerpt.60fps.mkv"
>
> === debug level report ===
>
> ffmpeg started on 2021-03-22 at 01:30:30
> Report written to "ffmpeg-20210322-013030.log"
> Log level: 48
> Command line:
> ffmpeg -i "THE LAST EMPEROR.excerpt.24fps.mkv" -filter_complex_script
> 23fps.ffmpeg.filter.txt -map 0
> -codec:v libx265 -x265-params "crf=16:qcomp=1.00" -codec:a copy -codec:s
> copy -dn "THE LAST
> EMPEROR.excerpt.60fps.mkv"
> ffmpeg version N-101658-g75fd3e1519 Copyright (c) 2000-2021 the FFmpeg
> developers
> built with gcc 9.3-win32 (GCC) 20200320
> configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static
> --pkg-config=pkg-config
> --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32
> --enable-gpl --enable-version3
> --disable-debug --disable-w32threads --enable-pthreads --enable-iconv
> --enable-zlib --enable-libxml2
> --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma
> --enable-fontconfig
> --enable-opencl --enable-libvmaf --enable-vulkan --enable-libvorbis
> --enable-amf --enable-libaom
> --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec
> --enable-cuda-llvm
> --enable-libglslang --enable-libgme --enable-libass --enable-libbluray
> --enable-libmp3lame
> --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp
> --enable-lv2 --enable-libmfx
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
> --enable-librav1e
> --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr
> --enable-libsrt
> --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d
> --enable-libvidstab --e libavutil
> 56. 71.100 / 56. 71.100
> libavcodec 58.135.100 / 58.135.100
> libavformat 58. 77.100 / 58. 77.100
> libavdevice 58. 14.100 / 58. 14.100
> libavfilter 7.111.100 / 7.111.100
> libswscale 5. 10.100 / 5. 10.100
> libswresample 3. 10.100 / 3. 10.100
> libpostproc 55. 10.100 / 55. 10.100
> Splitting the commandline.
> Reading option '-i' ... matched as input url with argument 'THE LAST
> EMPEROR.excerpt.24fps.mkv'.
> Reading option '-filter_complex_script' ... matched as option
> 'filter_complex_script' (read complex
> filtergraph description from a file) with argument
> '23fps.ffmpeg.filter.txt'.
> Reading option '-map' ... matched as option 'map' (set input stream
> mapping) with argument '0'.
> Reading option '-codec:v' ... matched as option 'codec' (codec name) with
> argument 'libx265'.
> Reading option '-x265-params' ... matched as AVOption 'x265-params' with
> argument 'crf=16:qcomp=1.00'.
> Reading option '-codec:a' ... matched as option 'codec' (codec name) with
> argument 'copy'.
> Reading option '-codec:s' ... matched as option 'codec' (codec name) with
> argument 'copy'.
> Reading option '-dn' ... matched as option 'dn' (disable data) with
> argument '1'.
> Reading option 'THE LAST EMPEROR.excerpt.60fps.mkv' ... matched as output
> url.
> Finished splitting the commandline.
> Parsing a group of options: global .
> Applying option filter_complex_script (read complex filtergraph
> description from a file) with
> argument 23fps.ffmpeg.filter.txt.
> [file @ 0000020aba1a6440] Setting default whitelist 'file,crypto,data'
> [AVIOContext @ 0000020aba1aef40] Statistics: 1952 bytes read, 0 seeks
> Successfully parsed a group of options.
> Parsing a group of options: input url THE LAST EMPEROR.excerpt.24fps.mkv.
> Successfully parsed a group of options.
> Opening an input file: THE LAST EMPEROR.excerpt.24fps.mkv.
> [NULL @ 0000020ab89d9c80] Opening 'THE LAST EMPEROR.excerpt.24fps.mkv' for
> reading
> [file @ 0000020ab89da3c0] Setting default whitelist 'file,crypto,data'
> [matroska,webm @ 0000020ab89d9c80] Format matroska,webm probed with
> size=2048 and score=100
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x22B59D at pos. 4397
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x22B59D at pos. 4461
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x22B59D at pos. 4519
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x22B59D at pos. 4573
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913312
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913358
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913397
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913440
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913517
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913584
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913665
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913725
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913771
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913811
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913853
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913930
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65913997
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914078
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914137
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914183
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914222
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914263
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914340
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914407
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914488
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914542
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914588
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914625
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914661
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914738
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914805
> [matroska,webm @ 0000020ab89d9c80] Unknown entry 0x447B at pos. 65914886
> st:0 removing common factor 1000000 from timebase
> st:1 removing common factor 1000000 from timebase
> st:2 removing common factor 1000000 from timebase
> st:3 removing common factor 1000000 from timebase
> [matroska,webm @ 0000020ab89d9c80] Before avformat_find_stream_info() pos:
> 5794 bytes read:34409
> seeks:2 nb_streams:4
> [h264 @ 0000020aba1a7c00] nal_unit_type: 7(SPS), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] nal_unit_type: 8(PPS), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] nal_unit_type: 7(SPS), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] nal_unit_type: 8(PPS), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] nal_unit_type: 7(SPS), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] nal_unit_type: 8(PPS), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] nal_unit_type: 6(SEI), nal_ref_idc: 0
> [h264 @ 0000020aba1a7c00] nal_unit_type: 6(SEI), nal_ref_idc: 0
> [h264 @ 0000020aba1a7c00] nal_unit_type: 6(SEI), nal_ref_idc: 0
> [h264 @ 0000020aba1a7c00] nal_unit_type: 5(IDR), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] nal_unit_type: 5(IDR), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] nal_unit_type: 5(IDR), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] nal_unit_type: 5(IDR), nal_ref_idc: 3
> [h264 @ 0000020aba1a7c00] Format yuv420p chosen by get_format().
> [h264 @ 0000020aba1a7c00] Reinit context to 1920x1088, pix_fmt: yuv420p
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] no picture
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [matroska,webm @ 0000020ab89d9c80] first_dts 42 not matching first dts
> NOPTS (pts 0, duration 41) in
> the queue
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [h264 @ 0000020aba1a7c00] ct_type:0 pic_struct:0
> [matroska,webm @ 0000020ab89d9c80] Probe buffer size limit of 5000000
> bytes reached
> [matroska,webm @ 0000020ab89d9c80] Could not find codec parameters for
> stream 3 (Subtitle:
> hdmv_pgs_subtitle (pgssub)): unspecified size
> Consider increasing the value for the 'analyzeduration' (0) and
> 'probesize' (5000000) options
> [matroska,webm @ 0000020ab89d9c80] After avformat_find_stream_info() pos:
> 5023689 bytes read:5052304
> seeks:2 frames:244
> Input #0, matroska,webm, from 'THE LAST EMPEROR.excerpt.24fps.mkv':
> Metadata:
> encoder : libebml v1.4.0 + libmatroska v1.6.2
> creation_time : 2021-01-23T03:12:17.000000Z
> Duration: 00:00:20.11, start: 0.000000, bitrate: 26228 kb/s
> Stream #0:0, 39, 1/1000: Video: h264 (High), yuv420p(tv, bt709,
> progressive), 1920x1080 [SAR 1:1
> DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
> Metadata:
> BPS-eng : 24046529
> DURATION-eng : 00:00:20.020000000
> NUMBER_OF_FRAMES-eng: 480
> NUMBER_OF_BYTES-eng: 60176441
> _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
> _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-23 03:12:17
> _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> Stream #0:1(eng), 152, 1/1000: Audio: dts (DTS-HD MA), 48000 Hz,
> stereo, s32p (24 bit) (default)
> Metadata:
> BPS-eng : 2085565
> DURATION-eng : 00:00:20.096000000
> NUMBER_OF_FRAMES-eng: 1884
> NUMBER_OF_BYTES-eng: 5238940
> _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
> _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-23 03:12:17
> _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> Stream #0:2(eng), 53, 1/1000: Audio: ac3, 48000 Hz, stereo, fltp, 192
> kb/s
> Metadata:
> BPS-eng : 192000
> DURATION-eng : 00:00:20.096000000
> NUMBER_OF_FRAMES-eng: 628
> NUMBER_OF_BYTES-eng: 482304
> _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
> _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-23 03:12:17
> _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> Stream #0:3(eng), 0, 1/1000: Subtitle: hdmv_pgs_subtitle
> Metadata:
> BPS-eng : 0
> DURATION-eng : 00:00:00.000000000
> NUMBER_OF_FRAMES-eng: 0
> NUMBER_OF_BYTES-eng: 0
> _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
> _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-23 03:12:17
> _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
> Successfully opened the file.
> [Parsed_settb_0 @ 0000020aba27ebc0] Setting 'expr' to value '1/720000'
> [Parsed_setpts_1 @ 0000020ababb2dc0] Setting 'expr' to value 'N*30030'
> [Parsed_fps_2 @ 0000020ababb3180] Setting 'fps' to value '24000/1001'
> [Parsed_fps_2 @ 0000020ababb3180] fps=24000/1001
> [Parsed_tinterlace_5 @ 0000020aba7bdf00] Setting 'mode' to value 'drop_odd'
> [Parsed_tinterlace_7 @ 0000020abac79940] Setting 'mode' to value 'drop_odd'
> [AVFilterGraph @ 0000020abb032040] No output pad can be associated to link
> label 'AA1'.
> [Parsed_fps_2 @ 0000020ababb3180] 0 frames in, 0 frames out; 0 frames
> dropped, 0 frames duplicated.
> Error initializing complex filters.
> Invalid argument
> [AVIOContext @ 0000020aba1aef40] Statistics: 5052304 bytes read, 2 seeks
>
> === filter_complex_script ===
>
> [in]settb=expr=1/720000,setpts=N*30030,fps=24000/1001,
> separatefields,split[ABC][abc],
> [ABC]tinterlace=mode=drop_odd,split[AC][B],
> [AC]tinterlace=mode=drop_odd,split[AA5][AA3][AA1][AC1][AC3],
> [AA5]select=eq(mod(N\,2)\,0),setpts=PTS+30030[A5],
> [AA3]select=eq(mod(N\,2)\,0),setpts=PTS+42042[A3],
> [AA1]select=eq(mod(N\,2)\,0),setpts=PTS+54054[A1],
> [AC1]select=eq(mod(N\,2)\,1),setpts=PTS+6006[C1],
> [AC3]select=eq(mod(N\,2)\,1),setpts=PTS+18018[C3],
> [B]tinterlace=mode=drop_even,split=4[_B2][B2_][_B4][B4_],
> [_B2]setpts=PTS+12012[AB2],
> [_B4]setpts=PTS+24024[AB4],
> [B4_]setpts=PTS+36036[B4C],
> [B2_]setpts=PTS+48048[B2C],
> [A3][AB2]mix=weights=3 2[A3B2],
> [A1][AB4]mix=weights=1 4[A1B4],
> [B4C][C1]mix=weights=4 1[B4C1],
> [B2C][C3]mix=weights=2 3[B2C3],
> [abc]tinterlace=mode=drop_odd,split[ac][b],
> [ac]tinterlace=mode=drop_odd,split[aa5][aa3][aa1][ac1][ac3],
> [aa5]select=eq(mod(n\,2)\,0),setpts=PTS+30030[a5],
> [aa3]select=eq(mod(n\,2)\,0),setpts=PTS+42042[a3],
> [aa1]select=eq(mod(n\,2)\,0),setpts=PTS+54054[a1],
> [ac1]select=eq(mod(n\,2)\,1),setpts=PTS+6006[c1],
> [ac3]select=eq(mod(n\,2)\,1),setpts=PTS+18018[c3],
> [b]tinterlace=mode=drop_even,split=4[_b2][b2_][_b4][b4_],
> [_b2]setpts=PTS+12012[ab2],
> [_b4]setpts=PTS+24024[ab4],
> [b4_]setpts=PTS+36036[b4c],
> [b2_]setpts=PTS+48048[b2c],
> [a3][ab2]mix=weights=3 2[a3b2],
> [a1][ab4]mix=weights=1 4[a1b4],
> [b4c][c1]mix=weights=4 1[b4c1],
> [b2c][c3]mix=weights=2 3[b2c3],
> [A5][a5]interleave,
> weave,
> fps=fps=60000/1001,
> select=eq(mod(N\,5)\,0)[A5a5],
> [A3B2][a3b2]interleave,
> weave,
> fps=fps=60000/1001,
> select=eq(mod(N\,5)\,1)[A3B2a3b2],
> [A1B4][a1b4]interleave,
> weave,
> fps=fps=60000/1001,
> select=eq(mod(N\,5)\,2)[A1B4a1b4],
> [B4C1][b4c1]interleave,
> weave,
> fps=fps=60000/1001,
> select=eq(mod(N\,5)\,3)[B4C1b4c1],
> [B2C3][b2c3]interleave,
> weave,
> fps=fps=60000/1001,
> select=eq(mod(N\,5)\,4)[B2C3b2c3],
> [A5a5][A3B2a3b2][A1B4a1b4][B4C1b4c1][B2C3b2c3]interleave=nb_inputs=5[out]
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list