2

I have exported a sound file to microsoft wav using Audacity. I am trying to open this file with ffmpeg :

ffmpeg -i steps-stereo-16b-44khz.wav /tmp/test.ogg

and here's the ouput I get :

fmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun 12 2013 13:46:11 with Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libspeex --enable-libass --enable-libbluray --enable-gnutls --enable-libfreetype --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[dca @ 0x7fd30c013600] Not a valid DCA frame

... SNIP ...

[dca @ 0x7fd5bc013600] Invalid bit allocation index
[dca @ 0x7fd5bc013600] error decoding block
    Last message repeated 3 times
[dca @ 0x7fd5bc013600] Didn't get subframe DSYNC
[dca @ 0x7fd5bc013600] error decoding block
[wav @ 0x7fd5bc013000] max_analyze_duration 5000000 reached at 5009070 microseconds
[wav @ 0x7fd5bc013000] decoding for stream 0 failed
[wav @ 0x7fd5bc013000] Could not find codec parameters for stream 0 (Audio: dts ([1][0][0][0] / 0x0001), 192000 Hz, 2 channels, fltp, 0 kb/s): no decodable DTS frames
Consider increasing the value for the 'analyzeduration' and 'probesize' options
steps-stereo-16b-44khz.wav: could not find codec parameters

If I export the same file to .ogg or .aiff, no problem, the following works fine :

ffmpeg -i steps-stereo-16b-44khz.aiff /tmp/test.ogg

Any idea what could be wrong?

A link to my wav file so you can try to reproduce.

NB my final goal is to slice the audio file. I know I can export file directly to .ogg with audacity. This is just a test case.

EDIT

Getting file info with another program like sox, works well :

sox --info steps-stereo-16b-44khz.wav

Input File     : 'steps-stereo-16b-44khz.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 16-bit
Duration       : 00:00:02.10 = 92608 samples = 157.497 CDDA sectors
File Size      : 370k
Bit Rate       : 1.41M
Sample Encoding: 16-bit Signed Integer PCM
sebpiq
  • 7,540
  • 9
  • 52
  • 69
  • What settings did you use when exporting in Audacity? Signed/unsigned PCM, 16/32 bit, float, etc? – Mr Lister Jul 23 '13 at 12:00
  • You cannot change the settings for exporting to Microsoft wav, it is signed 16-bits – sebpiq Jul 23 '13 at 13:31
  • Yes you can. In the Export dialog, press the Options button. then you get [this window](http://manual.audacityteam.org/man/WAV,_AIFF_and_Uncompressed_Export_Options). – Mr Lister Jul 23 '13 at 13:38
  • Apparently not for this format (or with my install of Audacity for some reason) : http://postimg.org/image/3mchnz81z/ – sebpiq Jul 23 '13 at 14:11
  • Plus SoX doesn't have any problem with the file (see the EDIT), which makes me think it's more of a problem with ffmpeg itself, but I have no idea what that could be! – sebpiq Jul 23 '13 at 14:17
  • In that case, sorry. Anyway, when I play the wav file, I don't hear anything. (I don't have a sound file editor where I'm sitting now, so I can only try to play it, not view it.) 2 seconds of silence. – Mr Lister Jul 23 '13 at 14:22
  • It's normal, it's a test sound file that I have generated with Pure Data. It's just a few values that I know exactly what they are to do some testing. Nothing to be listened. Try to open it with Audacity. – sebpiq Jul 23 '13 at 14:25
  • @LordNeckbeard Is there a way to migrate it automatically? – sebpiq Jul 23 '13 at 17:50
  • @sebpiq I see. The beginning and end are very loud though. – Mr Lister Jul 23 '13 at 17:50

1 Answers1

2

You can get ffmpeg to recognize it with some additional input options:

ffmpeg -acodec pcm_s16le -i steps-stereo-16b-44khz.wav output.ogg

This was a bug in ffmpeg, ticket #2810: unsupported wav, that has been fixed a while ago. You can compile ffmpeg or get a recent build to take advantage of the fix.

Note that for ogg output the default encoder is flac, so you may want to add -codec:a libvorbis as an output option.

llogan
  • 121,796
  • 28
  • 232
  • 243