Opened 5 years ago

Closed 5 years ago

#286 closed defect (fixed)

Transcoding wmav2 file leaves ffmpeg in infinite loop

Reported by: jdelstrother Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: wma9 loop
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hi,
I have a mov-wrapped wma9 file that, if I try to transcode it to aiff/wav using ffmpeg, just results in ffmpeg sitting in a loop writing out gigabytes and gigabytes of zeros to the output file.

eg -

./ffmpeg_g -v 9 -loglevel 99 -i infinite_loop_wma9.mov infinite_loop_wma9.aiff
ffmpeg version N-30883-g56e11d2, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun 20 2011 10:51:26 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
  configuration: --enable-libfaac --enable-libvorbis --enable-nonfree --disable-ffplay --disable-avdevice --enable-version3 --extra-cflags=-I/opt/local/include --extra-ldflags=-L/opt/local/lib
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  7. 0 / 53.  7. 0
  libavformat  53.  4. 0 / 53.  4. 0
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    0. 14. 1 /  0. 14. 1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101807c00] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101807c00] ISO: File Type Major Brand: qt  
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101807c00] All info found
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'infinite_loop_wma9.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2011-06-09 15:54:35
  Duration: 00:05:13.42, start: 0.000000, bitrate: 65 kb/s
    Stream #0.0(eng), 1, 1/44100: Audio: wmav2, 44100 Hz, 2 channels, s16, 64 kb/s
    Metadata:
      creation_time   : 2011-06-09 15:54:35
Output #0, aiff, to 'infinite_loop_wma9.aiff':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2011-06-09 15:54:35
    encoder         : Lavf53.4.0
    Stream #0.0(eng), 0, 1/44100: Audio: pcm_s16be, 44100 Hz, 2 channels, s16, 1411 kb/s
    Metadata:
      creation_time   : 2011-06-09 15:54:35
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop, [?] for help
[1]    6485 killed     ./ffmpeg_g -v 9 -loglevel 99 -i infinite_loop_wma9.mov infinite_loop_wma9.aif

FFmpeg will sit in that 'Stream mapping' section apparently forever until I kill it, or I run out of disk space.

I've seen this occur on 0.6.1 which we currently use, and on the development head (56e11d230525bb9659e79d3253351b94ec3f8478).

I'm not sure what software was used to create the bad file - if it's necessary, I can try and get in touch with the user who created it.

I've attached the bad input file, and a truncated version of the output file (the real output file has the AIFF header, just followed by several gigabytes of zeros).

Anything else I can provide?

Attachments (2)

infinite_loop_wma9.mov (2.4 MB) - added by jdelstrother 5 years ago.
WMA9 file that makes ffmpeg loop indefinitely
infinite_loop_wma9_truncated.aiff (10.0 KB) - added by jdelstrother 5 years ago.
Truncated output file from the wma9 input

Change History (7)

Changed 5 years ago by jdelstrother

WMA9 file that makes ffmpeg loop indefinitely

Changed 5 years ago by jdelstrother

Truncated output file from the wma9 input

comment:1 Changed 5 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from Transcoding wma9 file leaves ffmpeg in infinite loop to Transcoding wmav2 file leaves ffmpeg in infinite loop

How was this file produced? Is it playable by any software?

Not a regression, afaict.
Different backtraces possible.

(gdb) r -i infinite_loop_wma9.mov -f null -                                  
Starting program: ffmpeg_g -i infinite_loop_wma9.mov -f null -
ffmpeg version git-N-30819-g56629aa, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jun 20 2011 10:21:55 with gcc 4.5.3
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc --enable-gpl
  libavutil    50. 42. 0 / 50. 42. 0
  libavcodec   52.122. 0 / 52.122. 0
  libavformat  52.109. 0 / 52.109. 0
  libavdevice  52.  5. 0 / 52.  5. 0
  libavfilter   1. 79. 0 /  1. 79. 0
  libswscale    0. 14. 1 /  0. 14. 1
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'infinite_loop_wma9.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2011-06-09 15:54:35
  Duration: 00:05:13.42, start: 0.000000, bitrate: 65 kb/s
    Stream #0.0(eng): Audio: wmav2, 44100 Hz, 2 channels, s16, 64 kb/s
    Metadata:
      creation_time   : 2011-06-09 15:54:35
Output #0, null, to 'pipe:':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2011-06-09 15:54:35
    encoder         : Lavf52.109.0
    Stream #0.0(eng): Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
    Metadata:
      creation_time   : 2011-06-09 15:54:35
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop, [?] for help

Program received signal SIGINT, Interrupt.
0x0000000000866769 in float_to_int16_interleave_sse2 (dst=0x7ffff7f5c040, src=0x7fffffffc720, len=-3104, channels=<value optimized out>) at libavcodec/x86/fmtconvert_mmx.c:219
219     FLOAT_TO_INT16_INTERLEAVE(sse2,
(gdb) bt
#0  0x0000000000866769 in float_to_int16_interleave_sse2 (dst=0x7ffff7f5c040, src=0x7fffffffc720, len=-3104, channels=<value optimized out>) at libavcodec/x86/fmtconvert_mmx.c:219
#1  0x0000000000826819 in wma_decode_frame (samples=0x7ffff7f5a040, s=0x12de6e0) at libavcodec/wmadec.c:800
#2  wma_decode_superframe (samples=0x7ffff7f5a040, s=0x12de6e0) at libavcodec/wmadec.c:908
#3  0x00000000007c20d8 in avcodec_decode_audio3 (avctx=0x12bf760, samples=<value optimized out>, frame_size_ptr=<value optimized out>, avpkt=<value optimized out>) at libavcodec/utils.c:838
#4  0x00000000004091ee in output_packet (ist=<value optimized out>, ist_index=0, ost_table=0x12c0e80, nb_ostreams=1, pkt=<value optimized out>) at ffmpeg.c:1583
#5  0x000000000040b90e in transcode (nb_output_files=1, input_files=0x12bd440, nb_input_files=1, stream_maps=0x0, nb_stream_maps=<value optimized out>, output_files=0xd53060) at ffmpeg.c:2761
#6  0x0000000000410f6d in main (argc=<value optimized out>, argv=<value optimized out>) at ffmpeg.c:4562

comment:2 Changed 5 years ago by jdelstrother

I've emailed the user who created that file to try and get some more info on where it came from.
Quicktime Player 10 and iTunes 10 on the Mac seems fine playing it. VLC fails (unsurprisingly, given its ffmpeg basis).

comment:3 Changed 5 years ago by cehoyos

Are you really saying that QuickTime? can decode wmav2?
It does not work for me with QuickTime? 7.

comment:4 Changed 5 years ago by jdelstrother

Ah, sorry. I have Flip4Mac installed, so QT is using their WMV component to play.

Apparently the user exported the original file from Garageband - I assume she must have Flip4Mac or something similar installed, though I haven't been able to reproduce the problem using my Flip4Mac exporter. I'll try and get some more details.

comment:5 Changed 5 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed

Fixed locally, will push soon

Note: See TracTickets for help on using tickets.