Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2417 closed defect (fixed)

ffprobe/ffmpeg: cannot read wavfile (no 'data' tag found)

Reported by: auphonic Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: wav
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

ffprobe and ffmpeg cannot read some wav input files - in other programs (e.g. audacity) they are loading fine!
Tested with ffmpeg 1.1.3 and 1.2 on Ubuntu 12.04 and 12.10 - more details below.

Use the following testfile, to reproduce the problem:
https://auphonic.com/media/share/ffmpeg-testfile.wav

How to reproduce:

ffprobe -v 9 -loglevel 99 ffmpeg-testfile.wav

Output of ffprobe:

...$ ffprobe -v 9 -loglevel 99 ffmpeg-testfile.wav 
ffprobe version 1.2 Copyright (c) 2007-2013 the FFmpeg developers
  built on Mar 30 2013 10:49:20 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1)
  configuration: --enable-gpl --enable-version3 --enable-nonfree --disable-ffplay --disable-ffserver --disable-avdevice --enable-bzlib --enable-libopencore-amrnb --enable-libfreetype --enable-libopencore-amrwb --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libschroedinger --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libopus
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[wav @ 0xae30520] Format wav probed with size=2048 and score=99
[wav @ 0xae30520] no 'data' tag found
[AVIOContext @ 0xae38b20] Statistics: 98304 bytes read, 2 seeks
ffmpeg-testfile.wav: Invalid data found when processing input

Just let me know, if you need more information!

Attachments (2)

patchoddsize.diff (406 bytes ) - added by Carl Eugen Hoyos 11 years ago.
0001-Fix-reading-wav-files-with-odd-length-chunks.patch (724 bytes ) - added by Carl Eugen Hoyos 11 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by auphonic, 11 years ago

BTW: these files are plain recordings from a Zoom H4N!

by Carl Eugen Hoyos, 11 years ago

Attachment: patchoddsize.diff added

comment:2 by Carl Eugen Hoyos, 11 years ago

Keywords: wav added
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

POC attached.

in reply to:  2 ; comment:3 by Michael Niedermayer, 11 years ago

Replying to cehoyos:

POC attached.

Have you posted this patch to the mailing list for review or has it known problems and needs more work ?

in reply to:  3 comment:4 by Carl Eugen Hoyos, 11 years ago

Replying to michael:

Replying to cehoyos:

POC attached.

Have you posted this patch to the mailing list for review or has it known problems and needs more work ?

I just tried to make the patch as simple as possible, two alternatives are posted here:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/162120

comment:5 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: openclosed

Fixed by Matthieu Bouron.

comment:6 by Cobra_Fast, 11 years ago

Cc: cobrafast@gmx.net added
Resolution: fixed
Status: closedreopened

Problem seems to be still present in a fresh clone made today.

ffmpeg version N-52381-g2288c77 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 22 2013 14:12:38 with gcc 4.4.5 (Debian 4.4.5-8)
  configuration: --enable-gpl --enable-version3 --enable-shared --enable-libmp3lame --enable-libx264 --enable-zlib
  libavutil      52. 27.100 / 52. 27.100
  libavcodec     55.  5.100 / 55.  5.100
  libavformat    55.  3.100 / 55.  3.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 60.100 /  3. 60.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[wav @ 0x24ec9c0] no 'data' tag found
data/run/tmp_mix5175387875a04.wav: Invalid data found when processing input
Last edited 11 years ago by Cobra_Fast (previous) (diff)

comment:7 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: reopenedclosed

Works fine here with the sample you provided, if you have another failing sample, please do not hesitate to open a new ticket!

$ ffmpeg -i http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2417/ffmpeg-testfile.wav
ffmpeg version N-52381-g2288c77 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 22 2013 17:44:18 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --enable-version3 --enable-shared --enable-libmp3lame --enable-libx264 --enable-zlib
  libavutil      52. 27.100 / 52. 27.100
  libavcodec     55.  5.100 / 55.  5.100
  libavformat    55.  3.100 / 55.  3.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 60.100 /  3. 60.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
[wav @ 0x21c0fe0] max_analyze_duration 5000000 reached at 5013333 microseconds
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, wav, from 'http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket2417/ffmpeg-testfile.wav':
  Metadata:
    encoded_by      : ZOOM Handy Recorder H4n
    date            : 2013-03-27
    creation_time   : 15:08:29
    time_reference  : 2616432000
    coding_history  : A=PCM,F=48000,W=16,M=stereo,T=ZOOM Handy Recorder H4n
  Duration: 00:04:08.49, bitrate: 1536 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
At least one output file must be specified

in reply to:  7 comment:8 by Cobra_Fast, 11 years ago

Cc: cobrafast@gmx.net removed

Whoops, I just discovered that newer FFmpeg is using WAVEFORMATEX instead of WAVEFORMAT. That was causing some trouble with other scripts I've had. Sorry.

Note: See TracTickets for help on using tickets.