Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#2572 closed defect (invalid)

Removal of audio streams from an ASF file produces no-sound video

Reported by: xnp Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: asf
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
I am trying to remove the non-english streams from an ASF file and just copy one video and one audio english.

ffmpeg correctly parses and keeps only the english stream but reports this error:

Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

How to reproduce:

% ffmpeg -i asf_file_with_multiple_video_and_audio_streams.asf -map 0:25 -map 0:1 -c:a copy -c:v copy justenglish.mkv

ffmpeg version N-52045-g694fa00 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 12 2013 16:54:51 with gcc 4.8.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-l
bass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-l
bopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 26.100 / 52. 26.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  2.100 / 55.  2.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 53.101 /  3. 53.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[wmv3 @ 02794d80] Extra data: 8 bits left, value: 0
[wmv3 @ 02795860] Extra data: 8 bits left, value: 0
[wmv3 @ 02796e00] Extra data: 8 bits left, value: 0
[asf @ 02656020] max_analyze_duration 5000000 reached at 5180000 microseconds
[asf @ 02656020] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.0 : mono
Guessed Channel Layout for  Input Stream #0.1 : mono
Guessed Channel Layout for  Input Stream #0.2 : mono
Guessed Channel Layout for  Input Stream #0.3 : mono
Guessed Channel Layout for  Input Stream #0.4 : mono
Guessed Channel Layout for  Input Stream #0.5 : mono
Guessed Channel Layout for  Input Stream #0.6 : mono
Guessed Channel Layout for  Input Stream #0.7 : mono
Guessed Channel Layout for  Input Stream #0.8 : mono
Guessed Channel Layout for  Input Stream #0.9 : mono
Guessed Channel Layout for  Input Stream #0.10 : mono
Guessed Channel Layout for  Input Stream #0.11 : mono
Guessed Channel Layout for  Input Stream #0.12 : mono
Guessed Channel Layout for  Input Stream #0.13 : mono
Guessed Channel Layout for  Input Stream #0.14 : mono
Guessed Channel Layout for  Input Stream #0.15 : mono
Guessed Channel Layout for  Input Stream #0.16 : mono
Guessed Channel Layout for  Input Stream #0.17 : mono
Guessed Channel Layout for  Input Stream #0.18 : mono
Guessed Channel Layout for  Input Stream #0.19 : mono
Guessed Channel Layout for  Input Stream #0.20 : mono
Guessed Channel Layout for  Input Stream #0.21 : mono
Guessed Channel Layout for  Input Stream #0.24 : mono
Input #0, asf, from 'asf_file_with_multiple_video_and_audio_streams.asf':
  Metadata:
    WMFSDKVersion   : 11.0.5721.5145
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
    DeviceConformanceTemplate: MP@LL
  Duration: 00:00:18.17, start: 10375.601000, bitrate: 1581 kb/s
    Stream #0:0(ger): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:1(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:2(fre): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:3(ita): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:4(dut): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:5(dan): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:6(gre): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:7(spa): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:8(por): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:9(fin): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:10(swe): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:11(cze): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:12(est): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:13(lav): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:14(lit): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:15(hun): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:16(mlt): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:17(pol): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:18(slo): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:19(slv): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:20(bul): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:21(rum): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:22(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 512x288, 512 kb/s, 25 tbr, 1k tbn, 1k tbc
    Stream #0:23(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 512x288, 256 kb/s, 1k tbr, 1k tbn, 1k tbc
    Stream #0:24(zul): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, fltp, 32 kb/s
    Stream #0:25(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 256x144, 90 kb/s, 1k tbr, 1k tbn, 1k tbc
Output #0, matroska, to 'justenglish.mkv':
  Metadata:
    WMFSDKVersion   : 11.0.5721.5145
    WMFSDKNeeded    : 0.0.0.0000
    IsVBR           : 0
    DeviceConformanceTemplate: MP@LL
    encoder         : Lavf55.2.100
    Stream #0:0(eng): Video: wmv3 (WMV3 / 0x33564D57), yuv420p, 256x144, q=2-31, 90 kb/s, 1k tbn, 1k tbc
    Stream #0:1(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, mono, 32 kb/s
Stream mapping:
  Stream #0:25 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=-1.0 Lsize=       1kB time=00:00:00.00 bitrate=N/A
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead inf%
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

ffmpeg version N-52045-g694fa00
built on Apr 12 2013 16:54:51 with gcc 4.8.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-liba
ss --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libo
penjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-am
rwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil      52. 26.100 / 52. 26.100
libavcodec     55.  2.100 / 55.  2.100
libavformat    55.  2.100 / 55.  2.100
libavdevice    55.  0.100 / 55.  0.100
libavfilter     3. 53.101 /  3. 53.101
libswscale      2.  2.100 /  2.  2.100
libswresample   0. 17.102 /  0. 17.102
libpostproc    52.  3.100 / 52.  3.100

I have uploaded said file in the FTP as "asf_file_with_multiple_video_and_audio_streams.asf"

Change History (5)

comment:1 Changed 5 years ago by cehoyos

The following works as expected:
$ ffmpeg -i asf_file_with_multiple_video_and_audio_streams.asf -map 0:3 -map 0:22 -acodec copy -vcodec copy out.mkv

comment:2 Changed 5 years ago by cehoyos

Is there an application that plays another language for the sample you uploaded?

comment:3 Changed 5 years ago by xnp

Thanks a lot for the command. This seems to solve the problem for this file.

As to your second question, I just used VLC and mplayer and they both play the english stream when the "italian" stream is selected. So, please go ahead and close the bug.

To sum things up, the thing is that this file was produced by an mplayer -dumpstream command which most probably messed up the audio streams. I tried with a second dumpstream on the same stream and this time only the german version can be accessed. So, this most possibly is an mplayer bug.

Thanks again!

comment:4 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Resolution set to invalid
  • Status changed from new to closed

comment:5 Changed 5 years ago by cehoyos

Thank you for the additional tests!

Note: See TracTickets for help on using tickets.