[FFmpeg-user] How to convert music into DTS encoded WAV file?
Peter White
peter.white at posteo.net
Wed Aug 10 17:09:01 EEST 2016
Hi!
10.08.2016 11:40 Nomis101:
> I found out, that I can listen to 5.1 surround music over iTunes /
> Airplay if the music is an dts-encoded WAV file (44.1 kHz, 16 Bit). This
> means I have to convert all my surround music, mostly *.dts, *.flac or
> *.ac3, into this format.
>
> The format that I need is the following:
>
> /$ ffmpeg -i /Users/Music/test.wav
> Input #0, wav, from '/Users/Music/test.wav':
> Duration: 00:04:47.37, bitrate: 1411 kb/s
> Stream #0:0: Audio: dts (DTS) ([1][0][0][0] / 0x0001), 44100 Hz,
> 5.1(side), fltp
>
> You can find a short sample of a proper formatted file here. With
> Quicktime you will only get some noise. To hear the music you need VLC,
> which can decode the dts.
> http://polysom.verilite.de/tmp/test.zip
>
> The most promising command so far was:/
> //$ ffmpeg -i /Volumes/Macintosh/EREDV946.flac -ar 44100 -b:a 1411k
> -acodec pcm_s16le /Volumes/Macintosh/EREDV946.wav//
> [...]
> //$ ffmpeg -i /Volumes/Macintosh/EREDV946.wav -strict -2 -acodec dts
Is there a reason you did this in two steps? ffmpeg should be able to
just:
$ ffmpeg -i test.wav -strict -2 -c:a dts -ar 44100 -b:a 1411k output.wav
> //Output #0, wav, to '/Volumes/Macintosh/EREDV946_2.wav'://
> // Metadata://
> // ISFT : Lavf57.41.100//
> // Stream #0:0: Audio: dts (dca) ([1] [0][0] / 0x2001), 44100 Hz,
> 5.1(side), s32, 1411 kb/s//
This is not quite the same as your sample. Here the sample format is
s32 as opposed to fltp in the sample. Sadly though, I am unable to set
the sample format to fltp. It seem this is not supported. The dca
encoder is still experimental, might be why.
$ ffmpeg -i test.wav -strict -2 -c:a dts -ar 44100 -b:a 1411k
-sample_fmt fltp output.wav
Input #0, wav, from 'test.wav':
Duration: 00:00:05.03, bitrate: 1411 kb/s
Stream #0:0: Audio: dts (DTS) ([1][0][0][0] / 0x0001), 44100 Hz,
5.1(side), fltp
[dca @ 0x252ce00] Specified sample format fltp is invalid or not supported
Output #0, wav, to 'output.wav':
Stream #0:0: Unknown: none
Metadata:
encoder : Lavc57.51.100 dca
Stream mapping:
Stream #0:0 -> #0:0 (dts (dca) -> dts (dca))
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height
> But this does not play with VLC or import into iTunes.
For me it doesn't as well. Interistingly enough, it does play in MPV.
> I think maybe
> because the thing in the bracket is not correct? It should be
> "([1][0][0][0] / 0x0001)", but it is "([1] [0][0] / 0x2001)".
Out of my depth here, but that is certainly possible.
> Can somebody help me on how to generate a properly dts-encoded WAV file
> using ffmpeg that imports into iTunes?
It might help, if you can get some info which formats iTunes accepts.
I cannot imagine that it is that narrow in playing such files.
Best,
Peter
More information about the ffmpeg-user
mailing list