Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6106 closed defect (fixed)

Some pcm wavs detected as eac3

Reported by: Martijn Meijer Owned by:
Priority: important Component: avformat
Version: git-master Keywords: wav probe regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:

I use ffmpeg extensively to identify file formats.

There are some pcm wavs that are mis-identified as varieties of ac3 - recompiling with --disable-demuxer=ac3 fixes it, but that's not nice if you also want to be able to deal with ac3 audio.

This was not a case with a very old FFmpeg I have on a different machine (N-34304-gc0dbab9, built Oct 31 2011), but bisecting 5 years seems... unproductive.

How to reproduce:

Compile ffmpeg (git master) with default settings, and run ffmpeg -i with the file I'm supplying.

$ ./ffmpeg -i pcm_wav_misidentified_as_eac3.wav
ffmpeg version N-83248-gb4a13d442a Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: 
  libavutil      55. 45.100 / 55. 45.100
  libavcodec     57. 75.100 / 57. 75.100
  libavformat    57. 65.100 / 57. 65.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 70.100 /  6. 70.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
Input #0, wav, from 'pcm_wav_misidentified_as_eac3.wav':
  Duration: 00:00:05.00, bitrate: 1411 kb/s
    Stream #0:0: Audio: eac3 ([1][0][0][0] / 0x0001), 48000 Hz, 5.0(side), fltp, 64 kb/s (visual impaired)
At least one output file must be specified

Built Jan 25 13:03 CET.

Additional comment:

Based on what I read on http://soundfile.sapp.org/doc/WaveFormat/ the stream shouldn't even have to be interpreted by all different codecs as long as the AudioFormat field (at bytes 20-21) is 0x0001 ? Just a thought...

Full output:

$ ./ffmpeg -v 9 -loglevel 99 -report -i pcm_wav_misidentified_as_eac3.wav
ffmpeg started on 2017-01-27 at 11:50:13
Report written to "ffmpeg-20170127-115013.log"
ffmpeg version N-83248-gb4a13d442a Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: 
  libavutil      55. 45.100 / 55. 45.100
  libavcodec     57. 75.100 / 57. 75.100
  libavformat    57. 65.100 / 57. 65.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 70.100 /  6. 70.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-i' ... matched as input url with argument 'pcm_wav_misidentified_as_eac3.wav'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url pcm_wav_misidentified_as_eac3.wav.
Successfully parsed a group of options.
Opening an input file: pcm_wav_misidentified_as_eac3.wav.
[file @ 0x7fb764d02680] Setting default whitelist 'file,crypto'
Probing mp3 score:1 size:2048
Probing wav score:99 size:2048
[wav @ 0x7fb765800000] Format wav probed with size=2048 and score=99
[wav @ 0x7fb765800000] Before avformat_find_stream_info() pos: 44 bytes read:65580 seeks:1 nb_streams:1
[wav @ 0x7fb765800000] probing stream 0 pp:32
Probing mp3 score:1 size:4096
[wav @ 0x7fb765800000] Probe with size=4096, packets=2469 detected mp3 with score=1
[wav @ 0x7fb765800000] probing stream 0 pp:31
Probing mp3 score:1 size:8192
[wav @ 0x7fb765800000] Probe with size=8192, packets=2470 detected mp3 with score=1
[wav @ 0x7fb765800000] probing stream 0 pp:30
[wav @ 0x7fb765800000] probing stream 0 pp:29
Probing mp3 score:1 size:16384
[wav @ 0x7fb765800000] Probe with size=16384, packets=2472 detected mp3 with score=1
[wav @ 0x7fb765800000] probing stream 0 pp:28
[wav @ 0x7fb765800000] probing stream 0 pp:27
[wav @ 0x7fb765800000] probing stream 0 pp:26
[wav @ 0x7fb765800000] probing stream 0 pp:25
[wav @ 0x7fb765800000] probing stream 0 pp:24
[wav @ 0x7fb765800000] probing stream 0 pp:23
[wav @ 0x7fb765800000] probing stream 0 pp:22
[wav @ 0x7fb765800000] probing stream 0 pp:21
[wav @ 0x7fb765800000] probing stream 0 pp:20
[wav @ 0x7fb765800000] probing stream 0 pp:19
[wav @ 0x7fb765800000] probing stream 0 pp:18
[wav @ 0x7fb765800000] probing stream 0 pp:17
Probing ac3 score:25 size:65536
[wav @ 0x7fb765800000] Probe with size=65536, packets=2484 detected ac3 with score=25
[wav @ 0x7fb765800000] probing stream 0 pp:16
[wav @ 0x7fb765800000] probing stream 0 pp:15
[wav @ 0x7fb765800000] probing stream 0 pp:14
[wav @ 0x7fb765800000] probing stream 0 pp:13
[wav @ 0x7fb765800000] probing stream 0 pp:12
[wav @ 0x7fb765800000] probing stream 0 pp:11
[wav @ 0x7fb765800000] probing stream 0 pp:10
[wav @ 0x7fb765800000] probing stream 0 pp:9
[wav @ 0x7fb765800000] probing stream 0 pp:8
[wav @ 0x7fb765800000] probing stream 0 pp:7
[wav @ 0x7fb765800000] probing stream 0 pp:6
[wav @ 0x7fb765800000] probing stream 0 pp:5
[wav @ 0x7fb765800000] probing stream 0 pp:4
[wav @ 0x7fb765800000] probing stream 0 pp:3
[wav @ 0x7fb765800000] probing stream 0 pp:2
[wav @ 0x7fb765800000] probing stream 0 pp:1
Probing ac3 score:50 size:131072
[wav @ 0x7fb765800000] Probe with size=131072, packets=2500 detected ac3 with score=50
[wav @ 0x7fb765800000] probed stream 0
[wav @ 0x7fb765800000] stream 0: start_time: -209146758205323.719 duration: 5.000
[wav @ 0x7fb765800000] format: start_time: -9223372036854.775 duration: 5.000 bitrate=1411 kb/s
[wav @ 0x7fb765800000] After avformat_find_stream_info() pos: 882044 bytes read:947580 seeks:1 frames:16
Input #0, wav, from 'pcm_wav_misidentified_as_eac3.wav':
  Duration: 00:00:05.00, bitrate: 1411 kb/s
    Stream #0:0, 16, 1/44100: Audio: eac3 ([1][0][0][0] / 0x0001), 48000 Hz, 5.0(side), fltp, 64 kb/s (visual impaired)
Successfully opened the file.
At least one output file must be specified
[AVIOContext @ 0x7fb764d028c0] Statistics: 947580 bytes read, 1 seeks

Attachments (1)

pcm_wav_misidentified_as_eac3.wav (861.4 KB ) - added by Martijn Meijer 7 years ago.
Pcm wav file identified as eac3

Download all attachments as: .zip

Change History (4)

by Martijn Meijer, 7 years ago

Pcm wav file identified as eac3

comment:1 by Carl Eugen Hoyos, 7 years ago

Component: undeterminedavformat
Keywords: wav regression added; pcm ac3 removed
Priority: normalimportant
Reproduced by developer: set
Status: newopen

Regression since 40a3e1e9c54997e4dfc7802b5a758b68ceb64982
(What's the difference between bisecting one year or five years?)

comment:2 by Carl Eugen Hoyos, 7 years ago

Resolution: fixed
Status: openclosed

This was fixed in 227d602bb36f9460e007fb3e1fbff4a776838498 (3.3).

comment:3 by Carl Eugen Hoyos, 7 years ago

Keywords: probe added
Note: See TracTickets for help on using tickets.