Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5409 closed enhancement (fixed)

shorten in nistsphere container does not seem to work

Reported by: Giulio Paci Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: shorten nistsphere
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I have several files in NIST sphere format containing an embedded shorten audio stream.

How to reproduce:

% ffmpeg -i shorten_in_nistsphere_does_not_work.sph output.wav
ffmpeg version 2.8.6-1+b2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.1 (Debian 5.3.1-11) 20160307
  configuration: --prefix=/usr --extra-version=1+b2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  WARNING: library configuration mismatch
  avutil      configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  avcodec     configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  avformat    configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  avfilter    configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  avresample  configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  swscale     configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  swresample  configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  postproc    configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[nistsphere @ 0xcc63c0] Failed to parse 'sample_min -i -4099
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'sample_max -i 4314
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'database_id -s6 APASCI
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'database_version -s3 1.0
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'acq_date -s8 19930617
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'utterance_id -s7 di56313
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'sample_checksum -i 65245
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'microphone_id -s17 SennheiserMK' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'speaking_mode -s4 read
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'acquisition_medium -s15 DAT-Son' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'acquisition_enviroment -s14 ins' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'acquisition_site -s13 IRST-Tren' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'language -s7 italian
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'speaker_id -s5 clca0
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'speaker_age -s2 24
' as metadata
[nistsphere @ 0xcc63c0] Failed to parse 'speaker_gender -s6 female
' as metadata
[nistsphere @ 0xcc63c0] coding pcm,embedded is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[nistsphere @ 0xcc63c0] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[nistsphere @ 0xcc63c0] Could not find codec parameters for stream 0 (Audio: none, 16000 Hz, 1 channels): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
shorten_in_nistsphere_does_not_work.sph: could not find codec parameters
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, nistsphere, from 'shorten_in_nistsphere_does_not_work.sph':
  Duration: 00:00:01.65, bitrate: 108 kb/s
    Stream #0:0: Audio: none, 16000 Hz, 1 channels
No decoder for stream #0:0, filtering impossible
Error opening filters!

The file seems to uncorrectly parse the sphere header and thus not detecting the encoding format.
On the same file I have tried to remove the sphere header, but then it seems to fail detecting samplerate and fails:

% tail -c +1025 shorten_in_nistsphere_does_not_work.sph > shorten_in_nistsphere_does_not_work.shn
% ffmpeg -i shorten_in_nistsphere_does_not_work.shn output.wav
ffmpeg version 2.8.6-1+b2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.1 (Debian 5.3.1-11) 20160307
  configuration: --prefix=/usr --extra-version=1+b2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  WARNING: library configuration mismatch
  avutil      configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  avcodec     configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  avformat    configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  avfilter    configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  avresample  configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  swscale     configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  swresample  configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  postproc    configuration: --prefix=/usr --extra-version=1+b1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[shorten @ 0x22c1120] missing verbatim section at beginning of stream
    Last message repeated 14 times
[shn @ 0x22c03c0] decoding for stream 0 failed
[shn @ 0x22c03c0] Could not find codec parameters for stream 0 (Audio: shorten, 1 channels, s16p): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
shorten_in_nistsphere_does_not_work.shn: could not find codec parameters
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, shn, from 'shorten_in_nistsphere_does_not_work.shn':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Audio: shorten, 1 channels, s16p
[abuffer @ 0x22bfa20] Value inf for parameter 'time_base' out of range [0 - 2.14748e+09]
    Last message repeated 3 times
[abuffer @ 0x22bfa20] Error setting option time_base to value 1/0.
[graph 0 input from stream 0:0 @ 0x22c7ac0] Error applying options to the filter.
Error opening filters!

The file is correctly handled by sph2pipe v2.5, which, unfortunately, has license issues as it includes portion of the original shorten decoder:

% sph2pipe shorten_in_nistsphere_does_not_work.sph output.sph
% sph2pipe shorten_in_nistsphere_does_not_work.sph -f wav output.wav

This form of encoding has been used by a few famous speech corpora, that are still provided in this format. Thus, even if the file format is legacy, it is very likely that people involved in speech recognition will need a tool that lets them decode these files. There is one, but it is not free.

Is there any chance that ffmpeg can be fixed and made it to work with these kind of files?

Attachments (2)

shorten_in_nistsphere_does_not_work.sph (21.9 KB ) - added by Carl Eugen Hoyos 8 years ago.
mulaw_in_nistsphere_does_not_work.sph (38.4 KB ) - added by Carl Eugen Hoyos 8 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 by Giulio Paci, 8 years ago

I just uploaded shorten_in_nistsphere_does_not_work.sph example and expected output (shorten_in_nistsphere_does_not_work.wav) to ftp.

comment:2 by Elon Musk, 8 years ago

Status: newopen

You can find patch that fixes this on ffmpeg-devel mailing list.

comment:3 by Carl Eugen Hoyos, 8 years ago

Component: undeterminedavformat
Keywords: nistsphere added; nist sphere removed
Priority: normalwish
Version: unspecifiedgit-master

by Carl Eugen Hoyos, 8 years ago

comment:4 by Elon Musk, 8 years ago

Resolution: fixed
Status: openclosed

comment:5 by Giulio Paci, 8 years ago

Wow! The fix was ultra fast. :-) Thank you!

However I checked the audio data and the last 12 samples are missing while the decoding the file that I uploaded (with respect to the file that was generated by sph2pipe).

Maybe it is related to #4712?

comment:6 by Elon Musk, 8 years ago

I sent patch for that to mailing list too.
Googling of NIST SPHERE I found that also wavpack and shortpack coding is available.
Do you have such files?

comment:7 by Giulio Paci, 8 years ago

I confirm the patch is working for me as well.

I am doing an extensive search over my database for unsupported NIST SPHERE files, but I have not yet found any wavpack or shortpack stream in NIST SPHERE file.

On the other end I have found some mu-law NIST SPHERE files. If it is useful, I can upload a sample.

comment:8 by Elon Musk, 8 years ago

Mu-law should be supported, no?

comment:9 by Giulio Paci, 8 years ago

I have uploaded this file that is supported by sph2pipe, but not by ffmpeg:

shorten_in_nistsphere_does_not_work_with_empty_output.sph

This file is not supported by both programs, but the contained stream is valid mu-law data:

mulaw_in_nistsphere_does_not_work.sph

in reply to:  9 ; comment:10 by Carl Eugen Hoyos, 8 years ago

Replying to giuliopaci:

This file is not supported by both programs, but the contained stream is valid mu-law data:

mulaw_in_nistsphere_does_not_work.sph

What has created this sample?

by Carl Eugen Hoyos, 8 years ago

comment:11 by Elon Musk, 8 years ago

Support for both samples is now added.

in reply to:  10 comment:12 by Giulio Paci, 8 years ago

Replying to cehoyos:

Replying to giuliopaci:

mulaw_in_nistsphere_does_not_work.sph

What has created this sample?

I really do not know. This is a sample from an old speech corpus.

comment:13 by Giulio Paci, 8 years ago

I uploaded a few more files that have some issues with ffmpeg (dee138624fdf0997a46f04672f0ec50782403e45):

shorten_in_nistsphere_does_not_work_missing_last_null_sample.sph:
sph2pipe produces one more null sample at the end with respect to ffmpeg

shortpack_in_nistsphere_does_not_work.sph:
I guess this is shortpack in NIST SPHERE file, but I am not completely sure

wavpack_in_nistsphere_does_not_work_1.sph
wavpack_in_nistsphere_does_not_work_2.sph
wavpack_in_nistsphere_does_not_work_3.sph:
I am almost sure that these are wavpack in NIST SPHERE file.

comment:14 by Elon Musk, 8 years ago

Any utility that can decode this?

comment:15 by Giulio Paci, 8 years ago

I guess sphere package from nist can handle them (http://www.nist.gov/itl/iad/mig/tools.cfm).
The guess is based on the fact that I found the wavpack files in a very old uncompressed sphere directory.

I do not remember where I found the shortpack and I do not have access to my computer at the moment, so I cannot verify it.

comment:16 by Elon Musk, 8 years ago

This is other wavpack, from MIT no longer used by anything.
If such files are actually usefull to you.I will add decoding support, otherwise not.

comment:17 by Giulio Paci, 8 years ago

I am not sure if they are useful to me or not. It depends on the fact that anybody has used it for speech corpora or not.
Up to now I have not found any file that I want to be supported that is using that format. So my temporary answer is that I do not need support for them.

comment:18 by Giulio Paci, 8 years ago

I am not sure if they are useful to me or not. It depends on the fact that anybody has used it for speech corpora or not.
Up to now I have not found any file that I want to be supported that is using that format. So my temporary answer is that I do not need support for them.

comment:19 by Giulio Paci, 8 years ago

I uploaded a few more files that are not working with FFmpeg (15fa01786ce6cd714e85e36e86b974fc6918f357
):
shorten_in_nistsphere_does_not_work_missing_several_samples_1.sph
shorten_in_nistsphere_does_not_work_missing_several_samples_2.sph
shorten_in_nistsphere_does_not_work_missing_several_samples_3.sph
shorten_in_nistsphere_does_not_work_missing_several_samples_4.sph
shorten_in_nistsphere_does_not_work_missing_several_samples_5.sph
shorten_in_nistsphere_does_not_work_missing_several_samples_6.sph
shorten_in_nistsphere_does_not_work_missing_several_samples_7.sph
shorten_in_nistsphere_does_not_work_missing_several_samples_8.sph
shorten_in_nistsphere_does_not_work_with_empty_output_2.sph

I found the original source of the shortpack file, and it was an uncompressed sphere directory. I did not find any nist sphere + shortpack or wavpack files in any of the corpora that I have here yet.
I am going to do a more extensive search during the next days.

comment:20 by Elon Musk, 8 years ago

All bugs in shorten decoder had hopefully been fixed.

comment:21 by Giulio Paci, 8 years ago

It seems so. I tried to run a few tests on the complete collection of sphere files that I have access to (~200000 files). The only not working files are now those wavpack/shortpack examples that I already sent: all the other files seems properly supported now.

Thank you very much for your very quick fixes. :-)
Cheers!

Note: See TracTickets for help on using tickets.