IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
DTS Encoder (dcaenc), how to get dtswav?
Steve Forte Rio
post Nov 1 2013, 22:58
Post #1





Group: Members
Posts: 474
Joined: 4-October 08
From: Ukraine
Member No.: 59301



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.

This post has been edited by Steve Forte Rio: Nov 1 2013, 22:59
Go to the top of the page
+Quote Post
kode54
post Nov 2 2013, 00:12
Post #2





Group: Admin
Posts: 4689
Joined: 15-December 02
Member No.: 4082



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.
Go to the top of the page
+Quote Post
phofman
post Nov 2 2013, 01:16
Post #3





Group: Members
Posts: 331
Joined: 14-February 12
Member No.: 97162



Interesting topic.

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

CODE
./dcaenc 441-16.wav 441-16.dts 1411200


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

Encapsulating the dts file into wav:

CODE
sox -t raw -s -c 2 -b 16 -r 44100 441-16.dts 441-16-dts.wav


Format check:

CODE
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
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)
Go to the top of the page
+Quote Post
Steve Forte Rio
post Nov 2 2013, 20:46
Post #4





Group: Members
Posts: 474
Joined: 4-October 08
From: Ukraine
Member No.: 59301



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!

This post has been edited by Steve Forte Rio: Nov 2 2013, 20:52
Go to the top of the page
+Quote Post
phofman
post Nov 2 2013, 21:06
Post #5





Group: Members
Posts: 331
Joined: 14-February 12
Member No.: 97162



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 :-)
Go to the top of the page
+Quote Post
kode54
post Nov 2 2013, 21:14
Post #6





Group: Admin
Posts: 4689
Joined: 15-December 02
Member No.: 4082



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

CODE
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.
Go to the top of the page
+Quote Post
phofman
post Nov 2 2013, 21:47
Post #7





Group: Members
Posts: 331
Joined: 14-February 12
Member No.: 97162



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?
Go to the top of the page
+Quote Post
Steve Forte Rio
post Nov 2 2013, 23:20
Post #8





Group: Members
Posts: 474
Joined: 4-October 08
From: Ukraine
Member No.: 59301



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 rolleyes.gif

This post has been edited by Steve Forte Rio: Nov 2 2013, 23:21
Go to the top of the page
+Quote Post
Steve Forte Rio
post Nov 2 2013, 23:41
Post #9





Group: Members
Posts: 474
Joined: 4-October 08
From: Ukraine
Member No.: 59301



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..??
Go to the top of the page
+Quote Post
kode54
post Nov 2 2013, 23:47
Post #10





Group: Admin
Posts: 4689
Joined: 15-December 02
Member No.: 4082



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.
Go to the top of the page
+Quote Post
Steve Forte Rio
post Nov 2 2013, 23:58
Post #11





Group: Members
Posts: 474
Joined: 4-October 08
From: Ukraine
Member No.: 59301



QUOTE (kode54 @ Nov 2 2013, 20:47) *
The fact that the DTS plugin is crashing on incorrect offset DTS files means I need your crash report to fix it.


http://dl.dropboxusercontent.com/u/93067701/crash_report.zip
Go to the top of the page
+Quote Post
kode54
post Nov 3 2013, 03:02
Post #12





Group: Admin
Posts: 4689
Joined: 15-December 02
Member No.: 4082



This should be fixed.
Go to the top of the page
+Quote Post
phofman
post Nov 3 2013, 07:47
Post #13





Group: Members
Posts: 331
Joined: 14-February 12
Member No.: 97162



QUOTE (kode54 @ Nov 3 2013, 00:47) *
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
Go to the top of the page
+Quote Post
kode54
post Nov 3 2013, 09:05
Post #14





Group: Admin
Posts: 4689
Joined: 15-December 02
Member No.: 4082



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.
Go to the top of the page
+Quote Post
phofman
post Nov 3 2013, 11:10
Post #15





Group: Members
Posts: 331
Joined: 14-February 12
Member No.: 97162



QUOTE (kode54 @ Nov 3 2013, 10:05) *
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.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st December 2014 - 02:13