FFMPEG [mp3float @ 0x7fd42f813200] Header missing

Viewed 2149

I have a problem with some mp3 files. When transcoding the file with FFMPEG I get the following error:

[mp3float @ 0x7fd42f813200] Header missing
Error while decoding stream #0:0: Invalid data found when processing input

Is this a problem of the file itself, and how it is produced? Or is it a problem of FFMPEG?

Here full decoding message:

ffmpeg version git-2020-07-28-dfd12ee Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.16)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD-dfd12ee_2 --enable-shared --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-demuxer=dash --disable-libjack --disable-indev=jack --enable-opencl --enable-videotoolbox --disable-htmlpages --enable-libfdk-aac --enable-nonfree
  libavutil      56. 57.100 / 56. 57.100
  libavcodec     58. 97.102 / 58. 97.102
  libavformat    58. 49.100 / 58. 49.100
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[mp3 @ 0x7fd42f808200] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'Ice Mc - Think About The Way.mp3':
  Metadata:
    title           : Think About The Way
    TBPM            : 133
    artist          : Ice MC
    date            : 1994
    track           : 4/15
    disc            : 0
    album_artist    : ICE MC
  Duration: 00:04:16.39, start: 0.000000, bitrate: 323 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
    Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 600x592 [SAR 72:72 DAR 75:74], 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      comment         : Other
Stream mapping:
  Stream #0:1 -> #0:0 (mjpeg (native) -> wrapped_avframe (native))
  Stream #0:0 -> #0:1 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
  Metadata:
    title           : Think About The Way
    TBPM            : 133
    artist          : Ice MC
    date            : 1994
    track           : 4/15
    disc            : 0
    album_artist    : ICE MC
    encoder         : Lavf58.49.100
    Stream #0:0: Video: wrapped_avframe, yuvj420p(progressive), 600x592 [SAR 72:72 DAR 75:74], q=2-31, 200 kb/s, 90k fps, 90k tbn, 90k tbc (attached pic)
    Metadata:
      comment         : Other
      encoder         : Lavc58.97.102 wrapped_avframe
    Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc58.97.102 pcm_s16le
[mp3float @ 0x7fd42f813200] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:04:16.60 bitrate=N/A speed= 725x    
video:1kB audio:44204kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

What is also noticed is that this mp3 has the cover embedded as a video stream. And there is also this weird cross mapping. Not sure if that is normal?

1 Answers

Are you sure, that you use only the stream you need? If no, you can check it by printing all the stream number of packets, returned by av_read_frame. To select a specific stream, you should discard others. Check this thread to find out how: How to change stream index in libavformat

Related