Opened 11 years ago
Closed 11 years ago
#3110 closed defect (fixed)
wav muxer does not force single stream
Reported by: | burek | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | wav |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | yes |
Description
Summary of the bug:
Trying to extract each channel of the input audio (in 5.1 channel format) into a separate stream of 1 output file, produces invalid output (at least invalid when played with ffplay or vlc).
How to reproduce:
ffmpeg -i 6_Channel_ID.wav -map 0:0 -c:a copy -map 0:0 -c:a copy -map 0:0 -c:a copy -map 0:0 -c:a copy -map 0:0 -c:a copy -map 0:0 -c:a copy -map_channel 0.0.0:0.0 -map_channel 0.0.1:0.1 -map_channel 0.0.2:0.2 -map_channel 0.0.3:0.3 -map_channel 0.0.4:0.4 -map_channel 0.0.5:0.5 out.wav ffmpeg version N-57781-g0610d6e Copyright (c) 2000-2013 the FFmpeg developers built on Nov 1 2013 18:01:35 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopenco re-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li bvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 52. 49.100 / 52. 49.100 libavcodec 55. 40.101 / 55. 40.101 libavformat 55. 20.105 / 55. 20.105 libavdevice 55. 5.100 / 55. 5.100 libavfilter 3. 90.100 / 3. 90.100 libswscale 2. 5.101 / 2. 5.101 libswresample 0. 17.104 / 0. 17.104 libpostproc 52. 3.100 / 52. 3.100 Input #0, wav, from '6_Channel_ID.wav': Duration: 00:00:05.84, bitrate: 4233 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 5.1, s16, 4233 kb/s File 'out.wav' already exists. Overwrite ? [y/N] y Output #0, wav, to 'out.wav': Metadata: ISFT : Lavf55.20.105 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 5.1, 4233 kb/s Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 5.1, 4233 kb/s Stream #0:2: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 5.1, 4233 kb/s Stream #0:3: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 5.1, 4233 kb/s Stream #0:4: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 5.1, 4233 kb/s Stream #0:5: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 5.1, 4233 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:0 -> #0:1 (copy) Stream #0:0 -> #0:2 (copy) Stream #0:0 -> #0:3 (copy) Stream #0:0 -> #0:4 (copy) Stream #0:0 -> #0:5 (copy) Press [q] to stop, [?] for help size= 18099kB time=00:00:05.83 bitrate=25401.7kbits/s video:0kB audio:18099kB subtitle:0 global headers:0kB muxing overhead 0.000550%
The output file out.wav plays very choppy in ffplay and vlc.
The input source file "6_Channel_ID.wav" can be obtained freely from: http://www-mmsp.ece.mcgill.ca/Documents../AudioFormats/WAVE/Samples.html
Change History (4)
comment:1 by , 11 years ago
Analyzed by developer: | set |
---|---|
Component: | undetermined → avformat |
Reproduced by developer: | set |
Status: | new → open |
Version: | unspecified → git-master |
comment:3 by , 11 years ago
Keywords: | wav added |
---|---|
Summary: | Extracting streams from 5.1 audio input creates invalid output → wav muxer does not force single stream |
Reproducible with the following commands:
$ ffmpeg -f s16le -i /dev/zero -t 1 -map 0:0 -map 0:0 out1.wav
$ ffmpeg -i fate-suite/svq3/Vertical400kbit.sorenson3.mov -map 0:1 -map 0:1 out2.wav
WAV files do not support multiple channels. ffmpeg should warn you about it and fail immediately. Instead it merges packets from the additional streams with the first one; patch to fix that sent to the mailing-list.