2

I continue to get this error when trying to convert a wav file to mp3 using ffmpeg.

This is the command i'm running

ffmpeg -i 11_22_40AM.wav  -acodec mp3 11_22_40AM.mp3

And this is the error

[gsm_ms @ 0x5567d18626c0] Packet is too small
Error while decoding stream #0:0: Invalid data found when processing input

And all the output caused by command

ffmpeg -i 11_22_40AM.wav  -acodec mp3 11_22_40AM.mp3
ffmpeg version 4.2.2-0york0~16.04 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
  configuration: --prefix=/usr --extra-version='0york0~16.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, wav, from '11_22_40AM.wav':
  Duration: 00:01:08.68, bitrate: 13 kb/s
    Stream #0:0: Audio: gsm_ms (1[0][0][0] / 0x0031), 8000 Hz, mono, s16, 13 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (gsm_ms (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to '11_22_40AM.mp3':
  Metadata:
    TSSE            : Lavf58.29.100
    Stream #0:0: Audio: mp3 (libmp3lame), 8000 Hz, mono, s16p
    Metadata:
      encoder         : Lavc58.54.100 libmp3lame
[gsm_ms @ 0x5567d18626c0] Packet is too small
Error while decoding stream #0:0: Invalid data found when processing input
size=      67kB time=00:01:08.69 bitrate=   8.0kbits/s speed= 169x    
video:0kB audio:67kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.379184%

1 Answers1

2

The error message appears to be at the very end of the file. Check to see if it still converted correctly regardless of the message. If not here are some things to try:

  • Update to the latest ffmpeg. Use a current build from the git master branch. This will always be newer than any release and is the first thing to try when encountering an issue. You can download it or follow a compile guide.

  • FFmpeg supports both native and external GSM decoders. Yours was compiled with --enable-libgsm so you have access to both. Your file appears to be the Microsoft GSM variant, so if you want to try libgsm instead of the native decoder use:

    ffmpeg -c:a libgsm_ms -i input.wav output.mp3
    
llogan
  • 12,348