Opened 8 years ago

Closed 7 years ago

#5741 closed defect (fixed)

Wrong probing of an mp3 file

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

Description

Summary of the bug:

Probing a specific mp3 file gives strange and totally unacurrate results, while mediainfo or exiftool give the right result

How to reproduce:

% ffprobe defect_mp3.mp3
ffprobe started on 2016-07-27 at 20:06:17
Report written to "ffprobe-20160727-200617.log"
Command line:
ffprobe -report "01 - Mein Herz.mp3"
ffprobe version 3.1.1 Copyright (c) 2007-2016 the FFmpeg developers
  built with gcc 6.1.1 (GCC) 20160707
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-netcdf --enable-shared --enable-version3 --enable-x11grab
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[file @ 0x55f43fce2400] Setting default whitelist 'file,crypto'
[mpeg @ 0x55f43fce1ca0] Format mpeg probed with size=131072 and score=52
[mpeg @ 0x55f43fce1ca0] id3v2 ver:3 flags:00 len:104415
[mpeg @ 0x55f43fce1ca0] demuxer does not support additional id3 data, skipping
[mpeg @ 0x55f43fce1ca0] Before avformat_find_stream_info() pos: 104425 bytes read:131072 seeks:0 nb_streams:0
[mpeg @ 0x55f43fce1ca0] probing stream 0 pp:2500
[mpeg @ 0x55f43fce1ca0] Probe with size=677, packets=1 detected mp3 with score=1
[mpeg @ 0x55f43fce1ca0] probing stream 0 pp:2499
[mpeg @ 0x55f43fce1ca0] Probe with size=1354, packets=2 detected mp3 with score=1
[mpeg @ 0x55f43fce1ca0] probing stream 0 pp:2498
[mpeg @ 0x55f43fce1ca0] probing stream 0 pp:2497
[mpeg @ 0x55f43fce1ca0] Probe with size=2708, packets=4 detected mp3 with score=1
[mpeg @ 0x55f43fce1ca0] probing stream 0 pp:2496
[mpeg @ 0x55f43fce1ca0] probing stream 0 pp:2495
[mpeg @ 0x55f43fce1ca0] pes_ext C6 is invalid
[mpeg @ 0x55f43fce1ca0] pes_ext C8 is invalid
[mpeg @ 0x55f43fce1ca0] probing stream 6 pp:2500
[mpeg @ 0x55f43fce1ca0] Probe with size=22613, packets=1 detected mp3 with score=25
[mpeg @ 0x55f43fce1ca0] probed stream 6
[mpeg @ 0x55f43fce1ca0] probing stream 0 pp:2494
[mpeg @ 0x55f43fce1ca0] Probe with size=4062, packets=2500 detected mp3 with score=1
[mpeg @ 0x55f43fce1ca0] probed stream 0
[mp3 @ 0x55f43fce2c60] Header missing
[mp3 @ 0x55f43fce2c60] Header missing
[mp3 @ 0x55f43fce2c60] Header missing
[mp3 @ 0x55f43fce2c60] Header missing
[mp3 @ 0x55f43fce2c60] Header missing
[mp3 @ 0x55f43fce2c60] Header missing
[mp3 @ 0x55f43fce7ae0] Header missing
[mp3 @ 0x55f43fce8860] Header missing
[mp3 @ 0x55f43fce95e0] Header missing
[mp3 @ 0x55f43fd09700] Header missing
[mp3 @ 0x55f43fd0fc20] Header missing
[mp3 @ 0x55f43fd1e320] Header missing
[mp3 @ 0x55f43fd1e320] Header missing
[mp3 @ 0x55f43fd24b60] Header missing
[mp3 @ 0x55f43fd25b20] Header missing
[mp3 @ 0x55f43fce2c60] Header missing
[mpeg @ 0x55f43fce1ca0] decoding for stream 0 failed
[mpeg @ 0x55f43fce1ca0] start time for stream 0 is not set in estimate_timings_from_pts
[mpeg @ 0x55f43fce1ca0] start time for stream 1 is not set in estimate_timings_from_pts
[mpeg @ 0x55f43fce1ca0] start time for stream 3 is not set in estimate_timings_from_pts
[mpeg @ 0x55f43fce1ca0] start time for stream 7 is not set in estimate_timings_from_pts
[mpeg @ 0x55f43fce1ca0] stream 0 : no TS found at start of file, duration not set
[mpeg @ 0x55f43fce1ca0] stream 1 : no TS found at start of file, duration not set
[mpeg @ 0x55f43fce1ca0] stream 2 : no PTS found at end of file, duration not set
[mpeg @ 0x55f43fce1ca0] stream 3 : no TS found at start of file, duration not set
[mpeg @ 0x55f43fce1ca0] stream 7 : no TS found at start of file, duration not set
[mpeg @ 0x55f43fce1ca0] Could not find codec parameters for stream 0 (Audio: mp3, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpeg @ 0x55f43fce1ca0] After avformat_find_stream_info() pos: 104425 bytes read:25264605 seeks:8 frames:262
Input #0, mpeg, from '01 - Mein Herz.mp3':
  Metadata:
    title           : Mein Herz
    artist          : Oomph!
    track           : 1/15
    album           : OOMPH!
    disc            : 1/1
    genre           : Industrial Metal
    TBPM            : 0
    compilation     : 0
    lyrics-         : 
    TMED            : CD
    TORY            : 1992
    album_artist    : Oomph!
    publisher       : Mayan Records
    ALBUMARTISTSORT : Oomph!
    ASIN            : B0001KA9ZU
    Album Artist Credit: Oomph!
    Artist Credit   : Oomph!
    CATALOGNUMBER   : MYNCD019
    MusicBrainz Album Artist Id: d82ba5f4-da09-479a-ab18-4b1a122c4345
    MusicBrainz Album Id: 1a4910a4-0f2b-4cce-96c9-dec8ca1a05ff
    MusicBrainz Album Release Country: DE
    MusicBrainz Album Status: Official
    MusicBrainz Album Type: album
    MusicBrainz Artist Id: d82ba5f4-da09-479a-ab18-4b1a122c4345
    MusicBrainz Release Group Id: eda49ce7-3f60-3bdb-86fe-d263f1ed8537
    REPLAYGAIN_ALBUM_GAIN: -7.68 dB
    REPLAYGAIN_ALBUM_PEAK: 1.000000
    REPLAYGAIN_TRACK_GAIN: -7.92 dB
    REPLAYGAIN_TRACK_PEAK: 1.000000
    Script          : Latn
    date            : 2004-04-05
  Duration: 23:46:45.20, start: 30374.001044, bitrate: 0 kb/s
    Stream #0:0[0x1e0], 7, 1/90000: Audio: mp3, 0 channels, s16p
    Stream #0:1[0x1d5], 50, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:2[0x1c3], 22, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:3[0x1d0], 17, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:4[0x1c7], 23, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:5[0x1d7], 53, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:6[0x1ee], 22, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:7[0x1ca], 32, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:8[0x1dc], 36, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
[AVIOContext @ 0x55f43fcea760] Statistics: 25264605 bytes read, 8 seeks

I uploaded the problematic file to https://polochon.lelele.io/defect_mp3.mp3 . Let me know if you want it uploaded directly on the ffmpeg ftp !

Change History (3)

comment:1 by Carl Eugen Hoyos, 8 years ago

Component: undeterminedavformat
Keywords: regression added
Reproduced by developer: set
Status: newopen
Version: 3.0.2git-master

For future tickets: Please remember to test current FFmpeg git head before opening a ticket.
Regression since ac3ef4a4 (reproducible since 38cef584),

$ ffmpeg -loglevel 99 -i defect_mp3.mp3 
ffmpeg version N-81118-gfb91850 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (SUSE Linux)
  configuration: --enable-gpl --enable-libvpx
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 50.100 / 57. 50.100
  libavformat    57. 44.100 / 57. 44.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 49.100 /  6. 49.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.                   
Reading option '-i' ... matched as input file with argument 'defect_mp3.mp3'.                                         
Finished splitting the commandline.                                                                                   
Parsing a group of options: global .                                                                                  
Applying option loglevel (set logging level) with argument 99.                                                        
Successfully parsed a group of options.                                                                               
Parsing a group of options: input file defect_mp3.mp3.                                                                
Successfully parsed a group of options.                                                                               
Opening an input file: defect_mp3.mp3.                                                                                
[file @ 0x3530ba0] Setting default whitelist 'file,crypto'                                                            
Probing mp3 score:12 size:2048
Probing mp3 score:12 size:4096                                                                                        
Probing mp3 score:12 size:8192                                                                                        
Probing mp3 score:12 size:16384                                                                                       
Probing mp3 score:12 size:32768                                                                                       
Probing mp3 score:12 size:65536                                                                                       
Probing mp3 score:51 size:26647                                                                                       
Probing mpeg score:52 size:26647                                                                                      
[mpeg @ 0x3530260] Format mpeg probed with size=131072 and score=52
[mpeg @ 0x3530260] id3v2 ver:3 flags:00 len:104415                                                                    
[mpeg @ 0x3530260] demuxer does not support additional id3 data, skipping                                             
[mpeg @ 0x3530260] Before avformat_find_stream_info() pos: 104425 bytes read:131072 seeks:0 nb_streams:0              
[mpeg @ 0x3530260] probing stream 0 pp:2500                                                                           
Probing mp3 score:1 size:677
[mpeg @ 0x3530260] Probe with size=677, packets=1 detected mp3 with score=1
[mpeg @ 0x3530260] probing stream 0 pp:2499                                                                           
Probing mp3 score:1 size:1354
[mpeg @ 0x3530260] Probe with size=1354, packets=2 detected mp3 with score=1
[mpeg @ 0x3530260] probing stream 0 pp:2498                                                                           
[mpeg @ 0x3530260] probing stream 0 pp:2497                                                                           
Probing mp3 score:1 size:2708
[mpeg @ 0x3530260] Probe with size=2708, packets=4 detected mp3 with score=1
[mpeg @ 0x3530260] probing stream 0 pp:2496                                                                           
[mpeg @ 0x3530260] probing stream 0 pp:2495                                                                           
[mpeg @ 0x3530260] pes_ext C6 is invalid
[mpeg @ 0x3530260] pes_ext C8 is invalid                                                                              
[mpeg @ 0x3530260] probing stream 6 pp:2500
Probing mp3 score:25 size:22613
[mpeg @ 0x3530260] Probe with size=22613, packets=1 detected mp3 with score=25
[mpeg @ 0x3530260] probed stream 6                                                                                    
[mpeg @ 0x3530260] probing stream 0 pp:2494                                                                           
Probing mp3 score:1 size:4062
[mpeg @ 0x3530260] Probe with size=4062, packets=2500 detected mp3 with score=1
[mpeg @ 0x3530260] probed stream 0                                                                                    
[mp3 @ 0x3534280] Header missing
    Last message repeated 5 times
[mp3 @ 0x3537920] Header missing
[mp3 @ 0x35386a0] Header missing
[mp3 @ 0x3553d60] Header missing
[mp3 @ 0x3558fa0] Header missing
[mp3 @ 0x355f7e0] Header missing
[mp3 @ 0x356db40] Header missing
    Last message repeated 1 times
[mp3 @ 0x3573fe0] Header missing
[mp3 @ 0x357d060] Header missing
[mp3 @ 0x3534280] Header missing
[mpeg @ 0x3530260] decoding for stream 0 failed
[mpeg @ 0x3530260] start time for stream 0 is not set in estimate_timings_from_pts
[mpeg @ 0x3530260] start time for stream 1 is not set in estimate_timings_from_pts                                    
[mpeg @ 0x3530260] start time for stream 3 is not set in estimate_timings_from_pts                                    
[mpeg @ 0x3530260] start time for stream 7 is not set in estimate_timings_from_pts                                    
[mpeg @ 0x3530260] stream 0 : no TS found at start of file, duration not set
[mpeg @ 0x3530260] stream 1 : no TS found at start of file, duration not set                                          
[mpeg @ 0x3530260] stream 2 : no PTS found at end of file, duration not set                                           
[mpeg @ 0x3530260] stream 3 : no TS found at start of file, duration not set                                          
[mpeg @ 0x3530260] stream 7 : no TS found at start of file, duration not set                                          
[mpeg @ 0x3530260] stream 0: start_time: 30374.001 duration: 85605.197
[mpeg @ 0x3530260] stream 1: start_time: 30374.001 duration: 85605.197                                                
[mpeg @ 0x3530260] stream 2: start_time: 79828.825 duration: -102481911520608.625                                     
[mpeg @ 0x3530260] stream 3: start_time: 30374.001 duration: 85605.197                                                
[mpeg @ 0x3530260] stream 4: start_time: 109157.628 duration: 0.026                                                   
[mpeg @ 0x3530260] stream 5: start_time: 115979.172 duration: 0.026                                                   
[mpeg @ 0x3530260] stream 6: start_time: 30374.001 duration: 0.026                                                    
[mpeg @ 0x3530260] stream 7: start_time: 30374.001 duration: 85605.197                                                
[mpeg @ 0x3530260] stream 8: start_time: 113726.949 duration: 0.026                                                   
[mpeg @ 0x3530260] format: start_time: 30374.001 duration: 85605.197 bitrate=0 kb/s                                   
[mpeg @ 0x3530260] Could not find codec parameters for stream 0 (Audio: mp3, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options                                       
[mpeg @ 0x3530260] After avformat_find_stream_info() pos: 104425 bytes read:25264605 seeks:8 frames:262
Input #0, mpeg, from 'defect_mp3.mp3':
  Metadata:
    title           : Mein Herz
    artist          : Oomph!
    track           : 1/15
    album           : OOMPH!
    disc            : 1/1
    genre           : Industrial Metal
    TBPM            : 0
    compilation     : 0
    lyrics-         : 
    TMED            : CD
    TORY            : 1992
    album_artist    : Oomph!
    publisher       : Mayan Records
    ALBUMARTISTSORT : Oomph!
    ASIN            : B0001KA9ZU
    Album Artist Credit: Oomph!
    Artist Credit   : Oomph!
    CATALOGNUMBER   : MYNCD019
    MusicBrainz Album Artist Id: d82ba5f4-da09-479a-ab18-4b1a122c4345
    MusicBrainz Album Id: 1a4910a4-0f2b-4cce-96c9-dec8ca1a05ff
    MusicBrainz Album Release Country: DE
    MusicBrainz Album Status: Official
    MusicBrainz Album Type: album
    MusicBrainz Artist Id: d82ba5f4-da09-479a-ab18-4b1a122c4345
    MusicBrainz Release Group Id: eda49ce7-3f60-3bdb-86fe-d263f1ed8537
    REPLAYGAIN_ALBUM_GAIN: -7.68 dB
    REPLAYGAIN_ALBUM_PEAK: 1.000000
    REPLAYGAIN_TRACK_GAIN: -7.92 dB
    REPLAYGAIN_TRACK_PEAK: 1.000000
    Script          : Latn
    date            : 2004-04-05
  Duration: 23:46:45.20, start: 30374.001044, bitrate: 0 kb/s
    Stream #0:0[0x1e0], 7, 1/90000: Audio: mp3, 0 channels, s16p
    Stream #0:1[0x1d5], 50, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:2[0x1c3], 22, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:3[0x1d0], 17, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:4[0x1c7], 23, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:5[0x1d7], 53, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:6[0x1ee], 22, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:7[0x1ca], 32, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
    Stream #0:8[0x1dc], 36, 1/90000: Audio: mp3, 44100 Hz, stereo, s16p, 320 kb/s
Successfully opened the file.
At least one output file must be specified
[AVIOContext @ 0x3538ec0] Statistics: 25264605 bytes read, 8 seeks

comment:2 by Carl Eugen Hoyos, 8 years ago

Priority: normalimportant

comment:3 by Carl Eugen Hoyos, 7 years ago

Resolution: fixed
Status: openclosed

Fixed by Michael in 4e5049a2

Note: See TracTickets for help on using tickets.