Opened 2 hours ago
#11288 new defect
amerge fails with input stream having non-default channel order
Reported by: | t.rapp | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avfilter |
Version: | git-master | Keywords: | regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
When reading the 8-channel audio stream of a MOV file and passing it to the amerge filter processing fails with error message "Input channel layout "" is invalid or unsupported.".
The error occurs since commit e6c2c8703732bc46395c65c530038c8146df0deb, which caused the input channels to be detected with custom layout "FL+FR+FC+LFE+SL+SR+BL+BR" (which seems to be correct). Previous versions detected the generic "7.1" layout which caused no problems when passed to the amerge filter.
How to reproduce
% ./build-linux/ffmpeg-dbg -probesize 50M -t 0.1 -i /mnt/lux01-user/UserSpace/Tobias/TestFiles/MOV-Uncompressed/NOA/Uncompressed-8bit_2vuy_720x576_TFF_PCM-8ch__FromFFmpeg.mov -f wav -map "[a_out]" -codec:a pcm_s16le -filter_complex "[0:a:0] amerge=inputs=1,ashowinfo [a_out]" -y /dev/null -loglevel repeat+debug -xerror -nostdin -stats -report ffmpeg version N-117705-g7b20985 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609 configuration: --enable-gpl --disable-network --enable-libsoxr --enable-libtwolame --enable-libmp3lame --enable-libvorbis --enable-libfreetype --enable-libx264 --enable-static --disable-shared --progs-suffix=-dbg --enable-debug --disable-optimizations --assert-level=2 --prefix=/usr/local libavutil 59. 46.100 / 59. 46.100 libavcodec 61. 24.100 / 61. 24.100 libavformat 61. 9.100 / 61. 9.100 libavdevice 61. 4.100 / 61. 4.100 libavfilter 10. 6.101 / 10. 6.101 libswscale 8. 9.101 / 8. 9.101 libswresample 5. 4.100 / 5. 4.100 libpostproc 58. 4.100 / 58. 4.100 Splitting the commandline. Reading option '-probesize' ... matched as AVOption 'probesize' with argument '50M'. Reading option '-t' ... matched as option 't' (stop transcoding after specified duration) with argument '0.1'. Reading option '-i' ... matched as input url with argument '/mnt/lux01-user/UserSpace/Tobias/TestFiles/MOV-Uncompressed/NOA/Uncompressed-8bit_2vuy_720x576_TFF_PCM-8ch__FromFFmpeg.mov'. Reading option '-f' ... matched as option 'f' (force container format (auto-detected otherwise)) with argument 'wav'. Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '[a_out]'. Reading option '-codec:a' ... matched as option 'codec' (alias for -c (select encoder/decoder)) with argument 'pcm_s16le'. Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument '[0:a:0] amerge=inputs=1,ashowinfo [a_out]'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '/dev/null' ... matched as output url. Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'repeat+debug'. Reading option '-xerror' ... matched as option 'xerror' (exit on error) with argument '1'. Reading option '-nostdin' ... matched as option 'stdin' (enable or disable interaction on standard input) with argument 0. Reading option '-stats' ... matched as option 'stats' (print progress report during encoding) with argument '1'. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Finished splitting the commandline. Parsing a group of options: global . Applying option filter_complex (create a complex filtergraph) with argument [0:a:0] amerge=inputs=1,ashowinfo [a_out]. Applying option y (overwrite output files) with argument 1. Applying option loglevel (set logging level) with argument repeat+debug. Applying option xerror (exit on error) with argument 1. Applying option nostdin (enable or disable interaction on standard input) with argument 0. Applying option stats (print progress report during encoding) with argument 1. Applying option report (generate a report) with argument 1. Successfully parsed a group of options. [AVFilterGraph @ 0x4fa7d80] Setting 'inputs' to value '1' Parsing a group of options: input url /mnt/lux01-user/UserSpace/Tobias/TestFiles/MOV-Uncompressed/NOA/Uncompressed-8bit_2vuy_720x576_TFF_PCM-8ch__FromFFmpeg.mov. Applying option t (stop transcoding after specified duration) with argument 0.1. Successfully parsed a group of options. Opening an input file: /mnt/lux01-user/UserSpace/Tobias/TestFiles/MOV-Uncompressed/NOA/Uncompressed-8bit_2vuy_720x576_TFF_PCM-8ch__FromFFmpeg.mov. [AVFormatContext @ 0x4fabb80] Opening '/mnt/lux01-user/UserSpace/Tobias/TestFiles/MOV-Uncompressed/NOA/Uncompressed-8bit_2vuy_720x576_TFF_PCM-8ch__FromFFmpeg.mov' for reading [file @ 0x4fac4c0] Setting default whitelist 'file,crypto,data' [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] ISO: File Type Major Brand: qt [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] Unknown dref type 0x206c7275 size 12 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] Processing st: 0, edit list 0 - media time: 0, duration: 384000 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] Unknown dref type 0x206c7275 size 12 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] chan: layout=8388616 bitmap=0 num_descr=0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] Processing st: 1, edit list 0 - media time: 0, duration: 1441824 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] Before avformat_find_stream_info() pos: 656692609 bytes read:42333 seeks:1 nb_streams:2 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] All info found [mov,mp4,m4a,3gp,3g2,mj2 @ 0x4fabb80] After avformat_find_stream_info() pos: 854052 bytes read:904541 seeks:2 frames:2 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/lux01-user/UserSpace/Tobias/TestFiles/MOV-Uncompressed/NOA/Uncompressed-8bit_2vuy_720x576_TFF_PCM-8ch__FromFFmpeg.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf57.83.100 Duration: 00:00:30.04, start: 0.000000, bitrate: 174900 kb/s Stream #0:0[0x1](eng), 1, 1/12800: Video: rawvideo, 1 reference frame (2vuy / 0x79757632), uyvy422(top coded first (swapped)), 720x576, 0/1, 165888 kb/s, SAR 197:180 DAR 197:144, 25 fps, 25 tbr, 12800 tbn (default) Metadata: handler_name : VideoHandler vendor_id : FFMP encoder : Lavc57.107.100 rawvideo Stream #0:1[0x2](eng), 1, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 8 channels (FL+FR+FC+LFE+SL+SR+BL+BR), s32 (24 bit), 9216 kb/s (default) Metadata: handler_name : SoundHandler vendor_id : [0][0][0][0] Successfully opened the file. Parsing a group of options: output url /dev/null. Applying option f (force container format (auto-detected otherwise)) with argument wav. Applying option map (set input stream mapping) with argument [a_out]. Applying option codec:a (alias for -c (select encoder/decoder)) with argument pcm_s16le. Successfully parsed a group of options. Opening an output file: /dev/null. [out#0/wav @ 0x4fad340] Adding streams from explicit maps... [out#0/wav @ 0x4fad340] Creating output stream from an explicitly mapped complex filtergraph 0, output [a_out] [aost#0:0/pcm_s16le @ 0x4fbf200] Created audio stream from complex filtergraph 0:[ashowinfo:default] [aost#0:0/pcm_s16le @ 0x4fbf200] [file @ 0x4fad480] Setting default whitelist 'file,crypto,data' Successfully opened the file. [fc#0 @ 0x4fa7840] Binding input with label '0:a:0' to input stream 0:1 Stream mapping: Stream #0:1 (pcm_s24le) -> amerge:in0 ashowinfo:default -> Stream #0:0 (pcm_s16le) [aost#0:0/pcm_s16le @ 0x4fbf200] Starting thread... [fc#0 @ 0x4fa7840] Starting thread... [aist#0:1/pcm_s24le @ 0x4fbc9c0] [dec:pcm_s24le @ 0x4fcefc0] Starting thread... [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x4faaa80] Starting thread... [AVFilterGraph @ 0x7fabbc000e80] Setting 'inputs' to value '1' detected 4 logical cores [graph_0_in_0:1 @ 0x7fabbc003180] Setting 'time_base' to value '1/48000' [graph_0_in_0:1 @ 0x7fabbc003180] Setting 'sample_rate' to value '48000' [graph_0_in_0:1 @ 0x7fabbc003180] Setting 'sample_fmt' to value 's32' [graph_0_in_0:1 @ 0x7fabbc003180] Setting 'channel_layout' to value '8 channels (FL+FR+FC+LFE+SL+SR+BL+BR)' [graph_0_in_0:1 @ 0x7fabbc003180] tb:1/48000 samplefmt:s32 samplerate:48000 chlayout:8 channels (FL+FR+FC+LFE+SL+SR+BL+BR) [format_out_#0:0 @ 0x7fabbc004f80] Setting 'sample_fmts' to value 's16' [Parsed_amerge_0 @ 0x7fabbc002200] No channel layout for input 1 [AVFilterGraph @ 0x7fabbc000e80] query_formats: 5 queried, 6 merged, 3 already done, 6 delayed [AVFilterGraph @ 0x7fabbc000e80] query_formats not finished [Parsed_ashowinfo_1 @ 0x7fabbc002640] auto-inserting filter 'auto_aresample_0' between the filter 'Parsed_amerge_0' and the filter 'Parsed_ashowinfo_1' [AVFilterGraph @ 0x7fabbc000e80] query_formats: 1 queried, 3 merged, 13 already done, 0 delayed [Parsed_amerge_0 @ 0x7fabbc002200] in0:8 channels (FL+FR+FC+LFE+SL+SR+BL+BR) -> out:0 channels [auto_aresample_0 @ 0x7fabbc007840] [SWR @ 0x7fabbc007940] Input channel layout "" is invalid or unsupported. [auto_aresample_0 @ 0x7fabbc007840] Failed to configure output pad on auto_aresample_0 [fc#0 @ 0x4fa7840] Error reinitializing filters! [fc#0 @ 0x4fa7840] Task finished with error code: -22 (Invalid argument) [fc#0 @ 0x4fa7840] Terminating thread with return code -22 (Invalid argument) [aost#0:0/pcm_s16le @ 0x4fbf200] [enc:pcm_s16le @ 0x4fbe640] Encoder thread received EOF [aost#0:0/pcm_s16le @ 0x4fbf200] [enc:pcm_s16le @ 0x4fbe640] Could not open encoder before EOF [aost#0:0/pcm_s16le @ 0x4fbf200] Task finished with error code: -22 (Invalid argument) [aist#0:1/pcm_s24le @ 0x4fbc9c0] [dec:pcm_s24le @ 0x4fcefc0] Decoder returned EOF, finishing [aost#0:0/pcm_s16le @ 0x4fbf200] Terminating thread with return code -22 (Invalid argument) [aist#0:1/pcm_s24le @ 0x4fbc9c0] [dec:pcm_s24le @ 0x4fcefc0] Terminating thread with return code 0 (success) [aist#0:1/pcm_s24le @ 0x4fbc9c0] All consumers of this stream are done [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x4faaa80] All consumers are done [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x4faaa80] Terminating thread with return code 0 (success) [out#0/wav @ 0x4fad340] Nothing was written into output file, because at least one of its streams received no packets. size= 0KiB time=N/A bitrate=N/A speed=N/A [AVIOContext @ 0x4fbcb80] Statistics: 0 bytes written, 0 seeks, 0 writeouts [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x4faaa80] Input file #0 (/mnt/lux01-user/UserSpace/Tobias/TestFiles/MOV-Uncompressed/NOA/Uncompressed-8bit_2vuy_720x576_TFF_PCM-8ch__FromFFmpeg.mov): [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x4faaa80] Input stream #0:1 (audio): 6 packets read (147456 bytes); 5 frames decoded; 0 decode errors (5120 samples); [in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x4faaa80] Total: 6 packets (147456 bytes) demuxed [AVIOContext @ 0x4fa9fc0] Statistics: 1068381 bytes read, 4 seeks Conversion failed!
Note:
See TracTickets
for help on using tickets.