Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: DTS Encoder (dcaenc) (Read 25229 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

DTS Encoder (dcaenc)

Hi. I've found out there is a nice freeware DTS encoder - dcaenc

It can create coherent *.dts files. Bit it's developer also says that "It may be useful if you want to create a DTS CD". So how to get dtswav files instead of *.dts, for writing them to Audio CD (to get DTS CD)? Is there any way to write the WAV header to dts files? Or maybe I missed something and this encoder is able to create dtswav too?

THX.
🇺🇦 Glory to Ukraine!

DTS Encoder (dcaenc)

Reply #1
Read up on the source code of FFMPEG, specifically the libavformat/spdifenc.c, for source code example on S/PDIF encapsulation of formats like DTS or DTS-HD.

DTS Encoder (dcaenc)

Reply #2
Interesting topic.

I compiled the tool, created a dts file from my 44/16 wav:

Code: [Select]
./dcaenc 441-16.wav 441-16.dts 1411200


The resultant 441-16.dts plays fine in mplayer.

Encapsulating the dts file into wav:

Code: [Select]
sox -t raw -s -c 2 -b 16 -r 44100 441-16.dts 441-16-dts.wav


Format check:

Code: [Select]
soxi 441-16-dts.wav 

Input File     : '441-16-dts.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 16-bit
Duration       : 00:01:00.00 = 2646016 samples = 4500.03 CDDA sectors
File Size      : 10.6M
Bit Rate       : 1.41M
Sample Encoding: 16-bit Signed Integer PCM


Plays fine in mplayer too:

Code: [Select]
mplayer 441-16-dts.wav 

Playing 441-16-dts.wav.
Audio only file format detected.
==========================================================================
Opening audio decoder: [libdca] DTS decoding with libdca
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [dts] afm: libdca (DTS-libdca)

DTS Encoder (dcaenc)

Reply #3
Quote
sox -t raw -s -c 2 -b 16 -r 44100 441-16.dts 441-16-dts.wav


Great! This tool works! Finally... I was desperate to find fine working tool for dts->dtswav conversion! dts2wav, Avidemux and azidts gave me a wrong dtswav file (wrong WAV header, none of players wanted to play it, or played it wrong).

Now I can create DTS-CD's.

Thanks a lot!
🇺🇦 Glory to Ukraine!

DTS Encoder (dcaenc)

Reply #4
If the DTS file contains  pure 44.1/16/2  stream, it is basically raw data stream and can be easily wrapped into wav by telling sox the input stream parameters. If such wav works when burnt onto CD DTS remains to be tested :-)

DTS Encoder (dcaenc)

Reply #5
No. I don't think SoX does S/PDIF encapsulation, which is required or at least suggested for DTS CDs.

Code: [Select]
ffmpeg -i yourfile.dts -acodec copy out.spdif


And the resulting stream will be suitable for stuffing into an audio track, as raw 44100/16/2 PCM.

DTS Encoder (dcaenc)

Reply #6
I tried that and my resultant out.spdif is identical to input in.dts. Is not -acodec copy supposed to make identical copy of the audio stream?

DTS Encoder (dcaenc)

Reply #7
Well, I tried to write dtswav like an Audio CD and then play that disc in foobar2000. At first I was upset: player crashes trying to play my DTS-CD. But then I remembered about read offset. After specifying the drive's offset foobar2000 begun to play my DTS-CD
🇺🇦 Glory to Ukraine!

DTS Encoder (dcaenc)

Reply #8
Quote
* Transmission bitrates (in kbps):

  32    56    64    96    112    128    192    224
  256    320    384    448    512    576    640    768
  960    1024  1152  1280  1344  1408  1411.2  1472
  1536  1920  2048  3072  3840  open  VBR    LOSSLESS


I wonder what does open/VBR/LOSSLESS means? Are these available values for -b parameter? Or..??
🇺🇦 Glory to Ukraine!

DTS Encoder (dcaenc)

Reply #9
If the spdif file is identical to the input, then the DTS encoder tool is already producing S/PDIF encapsulated data, suitable for writing directly to a DTS CD.

The fact that the DTS plugin is crashing on incorrect offset DTS files means I need your crash report to fix it.


 

DTS Encoder (dcaenc)

Reply #11
This should be fixed.

DTS Encoder (dcaenc)

Reply #12
If the spdif file is identical to the input, then the DTS encoder tool is already producing S/PDIF encapsulated data, suitable for writing directly to a DTS CD.


Perhals you mean this: https://gitorious.org/dtsenc/dtsenc/source/...e9e:README#L135

DCAENC_FLAG_IEC_WRAP: wraps DTS frames as defined by the IEC 61937-5 standard
for transmission over SPDIF. Namely, the library adds a 8-byte header to each
frame and pads the frame with zeroes to achieve the same bitrate as a stereo
16-bit PCM stream.


Is not that a standard practice? Without that the output would not be the 1410kbps (or even configurable bitrate) stream. E.g. mplayer (basically any ac3/DTS capable player which can transmit variable bitrate formats over fixed-bitrate channel) does that too - http://repo.or.cz/w/mplayer.git/blob/HEAD:...ad_hwac3.c#l212

DTS Encoder (dcaenc)

Reply #13
It's not the standard practice when a stream has been encoded into a VOB for DVD authoring, or for inclusion on Blu-ray discs. They're not likely to waste stream space padding those to 1411kbps.

DTS Encoder (dcaenc)

Reply #14
It's not the standard practice when a stream has been encoded into a VOB for DVD authoring, or for inclusion on Blu-ray discs. They're not likely to waste stream space padding those to 1411kbps.


That makes sense. That dtsend project generating DTS from PCM is used e.g. for inline conversion of multichannel PCM audio into 5.1/7.1  DTS for transmission over SPDIF/HDMI (in a form of linux alsa plugin) and therefore it generates appropriate fixed bitrate output.