Comment 3 for bug 305315

Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

On further investigation it's already open upstream. This problem arises because the relevant file's "fmt " chunk specifies type 0x01 (it's in little-endian format, two bytes at offset 0x14), which is uncompressed PCM data.

http://www.sonicspot.com/guide/wavefiles.html#fmt

$ hexdump -x diatonis_dts_secret-universe.wav -n 2 -s 0x14
0000014 0001
0000016

Using hexedit to change the bytes at offset 0x14 from 01 00 to 01 20 (0x2001 in little-endian format):

$ hexdump -x diatonis_dts_secret-universe.wav -n 2 -s 0x14
0000014 2001
0000016

The file now plays properly in ffplay, and ffmpeg can decode it properly.

I would consider this a problem with the file, but according to the following thread on ffmpeg-devel, it's standard for programs writing DTS audio to do so with a broken header to maintain compatibility with broken CD burning programs. There was a patch proposed, but it wasn't adopted at the time.

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-February/007703.html

As an aside, there's a workaround which I had thought didn't work because I was specifying the options in the wrong order. Using "ffplay -f dts file.wav" or "ffmpeg -f dts -i file.wav output.ogg" skips the codec detection, and works properly.