#11624(undetermined:new): Using audio filters throws Assertion best_input >= 0 failed
#11624: Using audio filters throws Assertion best_input >= 0 failed -------------------------------------+------------------------------------- Reporter: Jozef | Type: defect Chutka | Status: new | Priority: normal Component: | Version: undetermined | unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Using the following order of audio filters: {{{ ffmpeg -f lavfi -i anoisesrc=d=1 -af "aresample=22050,asplit[a][b];[a]anullsink;[b]atrim=end_sample=1" -f null - }}} throws: {{{ Assertion best_input >= 0 failed at fftools/ffmpeg_filter.c:2118 }}} Using verbose log level, this is full log: {{{ ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers built with Apple clang version 17.0.0 (clang-1700.0.13.3) configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1.1_3 --enable- shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable- gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable- libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable- libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable- libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable- libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable- libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable- libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 Successfully parsed a group of options. Parsing a group of options: input url anoisesrc=d=5. Applying option f (force container format (auto-detected otherwise)) with argument lavfi. Successfully parsed a group of options. Opening an input file: anoisesrc=d=5. [AVFilterGraph @ 0x138704cd0] Setting 'd' to value '5' detected 8 logical cores [AVFilterGraph @ 0x138704cd0] query_formats: 2 queried, 2 merged, 1 already done, 0 delayed [lavfi @ 0x138704810] All info found [lavfi @ 0x138704810] stream 0: start_time: 0 duration: NOPTS [lavfi @ 0x138704810] format: start_time: 0 duration: NOPTS (estimate from bit rate) bitrate=3072 kb/s Input #0, lavfi, from 'anoisesrc=d=5': Duration: N/A, start: 0.000000, bitrate: 3072 kb/s Stream #0:0, 1, 1/48000: Audio: pcm_f64le, 48000 Hz, mono, dbl, 3072 kb/s Successfully opened the file. Parsing a group of options: output url -. Applying option af (alias for -filter:a (apply filters to audio streams)) with argument aresample=22050,asplit[a][b];[a]anullsink;[b]atrim=end_sample=1000. Parsing stream specifier: a Parsed media type: audio; remainder: Applying option f (force container format (auto-detected otherwise)) with argument null. Successfully parsed a group of options. Opening an output file: -. [out#0/null @ 0x1387056c0] No explicit maps, mapping streams automatically... [aost#0:0/pcm_s16le @ 0x138706df0] Created audio stream from input stream 0:0 [AVFilterGraph @ 0x138707c50] Setting 'sample_rate' to value '22050' [AVFilterGraph @ 0x138707c50] Setting 'end_sample' to value '1000' Successfully opened the file. Stream mapping: Stream #0:0 -> #0:0 (pcm_f64le (native) -> pcm_s16le (native)) [aost#0:0/pcm_s16le @ 0x138706df0] Starting thread... [af#0:0 @ 0x138707830] Starting thread... [aist#0:0/pcm_f64le @ 0x138705e50] [dec:pcm_f64le @ 0x138708960] Starting thread... [in#0/lavfi @ 0x138704590] Starting thread... Press [q] to stop, [?] for help [AVFilterGraph @ 0x1399044e0] Setting 'sample_rate' to value '22050' [AVFilterGraph @ 0x1399044e0] Setting 'end_sample' to value '1000' [graph_-1_in_0:0 @ 0x139806a70] Setting 'time_base' to value '1/48000' [graph_-1_in_0:0 @ 0x139806a70] Setting 'sample_rate' to value '48000' [graph_-1_in_0:0 @ 0x139806a70] Setting 'sample_fmt' to value 'dbl' [graph_-1_in_0:0 @ 0x139806a70] Setting 'channel_layout' to value 'mono' [graph_-1_in_0:0 @ 0x139806a70] tb:1/48000 samplefmt:dbl samplerate:48000 chlayout:mono [format_out_#0:0 @ 0x139807380] Setting 'sample_fmts' to value 's16' [AVFilterGraph @ 0x1399044e0] query_formats: 7 queried, 12 merged, 6 already done, 0 delayed [Parsed_aresample_0 @ 0x139806480] [SWR @ 0x130008000] Using dblp internally between filters [Parsed_aresample_0 @ 0x139806480] ch:1 chl:mono fmt:dbl r:48000Hz -> ch:1 chl:mono fmt:s16 r:22050Hz Output #0, null, to 'pipe:': Metadata: encoder : Lavf61.7.100 Stream #0:0, 0, 1/22050: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s Metadata: encoder : Lavc61.19.101 pcm_s16le [out#0/null @ 0x1387056c0] Starting thread... [out_#0:0 @ 0x139807220] EOF on sink link out_#0:0:default. [in#0/lavfi @ 0x138704590] EOF while reading input [in#0/lavfi @ 0x138704590] Terminating thread with return code 0 (success) [aist#0:0/pcm_f64le @ 0x138705e50] [dec:pcm_f64le @ 0x138708960] Decoder thread received EOF packet [aist#0:0/pcm_f64le @ 0x138705e50] [dec:pcm_f64le @ 0x138708960] Decoder returned EOF, finishing [aist#0:0/pcm_f64le @ 0x138705e50] [dec:pcm_f64le @ 0x138708960] Terminating thread with return code 0 (success) Assertion best_input >= 0 failed at fftools/ffmpeg_filter.c:2118 zsh: abort ffmpeg -f lavfi -i anoisesrc=d=5 -af -f null - -loglevel 1000 }}} My original filter looks far more complex but the provided one is the minimalistic demo I could come up with for the related issue. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11624> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11624: Using audio filters throws Assertion best_input >= 0 failed -------------------------------------+------------------------------------- Reporter: Jozef | Owner: (none) Chutka | Type: defect | Status: closed Priority: normal | Component: | undetermined Version: unspecified | Resolution: fixed Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Marton Balint): * resolution: => fixed * status: new => closed Comment: Fixed in 44546751db824002f07cc0b8b2fc62587a5a34b5. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11624#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg