Log in

View Full Version : DTS into a multi-channel format


chaembian
28th January 2007, 04:30
Hi

I had bought a DTS audio CD hoping that my DVD player can play it. Sadly, the player doesn't seem to support DTS. I thought I can play it back in computer. I extracted the the tracks as WAV, renamed the files to have DTS as its extension and used Foobar2000 / foo_dts to play the file. The playback is very fast.

I thought I'll convert into a format that supports multi-channel (AAC, Ogg). And I'm lost here. I have tried decoding/demuxing the DTSWAV file to no avail. I have tried using DTSParser, BeSplit, BeSweet /azidts but I have not been successful. With DTSParser (to rebuild stream) but it wrote 2048 byte file. I have attached screenshot for the same.

With BeSplit, I get a file that is the half the size / half the playback time of the input file.


BeSplit v0.9b6 by DSPguru.
--------------------------

Logging start : 01/28/07 , 07:27:43.

BeSplit.exe -core( -input test.dts -output test_bs.dts -logfilea test.txt -type dtswav -fix)

[00:00:00:000] +------- BeSplit -----
[00:00:00:000] | Input : test.dts
[00:00:00:000] | Source Sample-Rate: 44.1KHz
[00:00:00:000] | Channels Count: 5.1, Bitrate: 1411.2kbps
[00:00:00:000] | Output : test_bs.dts
[00:00:00:000] +---------------------
[00:02:55:205] | Writing test_bs.dts
[00:02:55:205] +---------------------
[00:02:55:205] Operation Completed !
[00:00:09:000] <-- Process Duration
Logging ends : 01/28/07 , 07:27:52.


With BeSweet, I get the pRFS->Load(SourceFile, Null) error. I have installed Trial version of WinDVD.

With TranzCode, I have been most successful. I was able to split the song into respective mono channels. But the song seems to have been squeezed into exactly half the time space resulting in a very fast paced playback.


File Information (length calculated): test.dts
---------------------------------------------------------------
filesize : 62,022,284 bytes
filetype : DTS Padded
channels : 6 [5.1]
bit depth : 24 bit integer
sample rate : 44,100 Hz
bit rate : 1,411.20 kbps
length (calc) : 351.596553 seconds [0:05:51.597]
length (calc) : 15,505,408 samples
frames (calc) : 30,284
framesize : 2,048 bytes
sync interval : 544,367,988 bytes
sync word fmt : 14 bit
amode : 9 [FL,FR,C,LFE,SL,SR] (multich wav compatible)


J:\TEMP\DTS>Tranzcode.exe "test.dts"
Input filename: [test.dts] (DTS Padded)
Input attribs: [5.1 ch, 24 bit, 44.1 kHz, bitrate 1411 kbps]
Output attribs: [PCM wav fmt, (6) x 1 ch, 32 bit flt, 44.1 kHz]
Output file(s): test-FL.wav
test-FR.wav
test-C.wav
test-LFE.wav
test-SL.wav
test-SR.wav
Processing: Completed. [15142 frames decoded in 16 secs]



I'm kind of lost here. I have searched the forum but I might not have used the correct keywords. I'm lost here and help is much appreciated. Thanks in advance.

Pookie
28th January 2007, 04:36
Read this thread....

http://forum.doom9.org/showthread.php?t=120871 Recently done by Blue_MiSfit and friends.

Condensed into procedure...

Creates multichannel wav refered to as 6channel.wav for the remaining commands
Tranzcode input.dts /mch

Download GrabaBin http://www.mytempdir.com/1181552 by tebasuna51
GrabaBin.exe /B 41_63 /F 6channel.wav

Use flac v1.1.2
flac.exe 6channel.wav -o output.flac


Or, just convert to 6 Channel AC3 (I think the channels #s translate properly, but you'll need to test)

save script as dtsin.avs
NicDtsSource("input.dts", Channels=6, DRC=0)
convertAudiotofloat()

bepipe.exe --script "import(^dtsin.avs^)" - | aften.exe -v 0 -b 384 -dynrng 5 - output.ac3

chaembian
28th January 2007, 05:00
Condensed into procedure...


Thanks a bunch! I will report back!

chaembian
28th January 2007, 05:14
J:\TEMP\DTS>Tranzcode.exe test.dts /mch
Input filename: [test.dts] (DTS Padded)
Input attribs: [5.1 ch, 24 bit, 44.1 kHz, bitrate 1411 kbps]
Output attribs: [Ext wav fmt, 6 ch, 32 bit flt, 44.1 kHz]
Output file(s): test(multichn).wav
Processing: Completed. [15142 frames decoded in 11 secs]

J:\TEMP\DTS>GrabaBin.exe /B 41_63 /F multichn.wav

J:\TEMP\DTS>flac.exe multichn.wav -o test.flac

flac 1.1.2, Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.

options: -P 4096 -b 4608 -m -l 8 -q 0 -r 3,3
multichn.wav: WARNING: found non-standard 'fmt ' sub-chunk which has length = 40

multichn.wav: ERROR: unsupported compression type 65534



I have renamed test(multichn).wav to multichn.wav before GrabaBin step. :/

Which step exactly addresses the faster playback issue? The number of frames decoded by TranzCode is still half the number of frames in the original file.

Pookie
28th January 2007, 06:14
I'm guessing perhaps it is the bit depth in tranzcode ? Are you decompressing to wav on a fat32 drive ?

Just tried the Avisynth method to flac

bepipe.exe --script "import(^dtsin.avs^)" - | flac - -o out.flac

I have sound at correct speed. I have no way to test channel mapping, though. 16 bit / 48000hz

chaembian
28th January 2007, 08:03
Bit depth in Tranzcode? The 24-bit to 32-bit is making it play faster? I don't know. The drive is NTFS.

The DTS stream isn't the kind out of DVD. I have ripped it from an audio CD. I understand that the stream isn't the same as a DTS stream out of DVD and is called DTSWAV. But beyond that I'm lost! :|

Skelsgard
28th January 2007, 08:30
Don´t change the extension from .WAV to .DTS. The header will be wrong for a DTS file.
DTS WAV headers are not the same as DTS headers, so you need to change this I order to read the file as a standard DTS file, and you can´t accomplish this by simply changing the extension.
Get WAV2DTS.exe. It will take the DTS WAV file and convert it to DTS file (it will not transcode it, it is NOT a lossy procedure).
Then you can decode the DTS with NicDTSSource or any other method of your choice.
If you´re interested in SAP playback, check which formats are supported by your player. The absolutely mandatory format for multichannel is AC3 5.1 48kHz 16 bits, so if you choose this one, you'll guarantee to have full compatibility.
DTS WAV files are 44.1kHz, so you should test if your player can read 44.1kHz AC3 files. If not, you´ll need to upsample to 48kHz before encoding.
If SAP compatibility is not an issue for you, then AAC would be my choice for multichannel encoding. You won't need to upsample and you'll get same quality at lower bitrates. The choice based on quality would be between CT's encoder (the one that comes in Winamp) and NeroAACEnc. I personally use NeroAACEnc, but this is by no means against CT's.
FLAC if you want lossless encoding would be my choice too, as pookie recommended you earlier.

Cheers

chaembian
28th January 2007, 08:51
When I use WAV2DTS, this is what I get:


J:\TEMP\DTS>wav2dts.exe
Version 1.2
Usage: wav2dts.exe <file.wav>
<file.wav.dts> will be produced in the same directory.

J:\TEMP\DTS>wav2dts.exe Track01.wav
Version 1.2
Creating Track01.wav.dts
WAV Header: 2 channels 44100 Hz 16 bits
-

J:\TEMP\DTS>Tranzcode.exe Track01.wav.dts /i
Error: File is corrupt, or is not a dolby digital file!

File Information (length calculated): Track01.wav.dts
----------------------------------------------------------------
filesize : 54,269,460 bytes
filetype : DTS Padded
channels : 0 [0.0]
bit depth : 0 bit integer
sample rate : 0 Hz
bit rate (n/a): <open>
length (calc) : 0.000000 seconds [0:00:00.000]
length (calc) : 0 samples
frames (calc) : 0
framesize : 0 bytes
sync interval : 0 bytes
sync word fmt : 16 bit
amode : 60 [É☺8] (multich wav compatible)


I hope I have used it correctly. I was only shooting blindly with that Tranzcode usage. Is there a way to check out the properties of a DTS file? I'm not sure if I have done it correctly. The DTS file is not playable in foobar2000.


could not enumerate tracks (Unsupported format or corrupted file) on:
J:\TEMP\DTS\Track01.wav.dts
Unable to open item for playback (Unsupported format or corrupted file):
"J:\TEMP\DTS\Track01.wav.dts"

Skelsgard
28th January 2007, 12:00
When I use WAV2DTS, this is what I get:...
This basically anulls the possibility of a "bug" kinda problem between versions, as DTSParser has WAV2DTS in it (IIRC).
Some things to check:
1) Try to decode the DTS file to multichannel WAV first. You can use, for example, Behappy thru NicDTSSource.
2) Try to see if the file as a DTS-WAV track can be played thru DirectShow with DTSWAVSource.ax or ffdshow's audio decoder ("Check for DTS in WAV" enabled).
3) Check if the file exported as DTS can be decoded thru DirectShow (load with DTSAC3Source.ax or DTSSource.ax) with filters like AC3filter or ffdshow.
If any of the other methods fail, but it can be played thru DirectShow you can decode it with a GraphEdit graph to multichannel WAV.
Then encode the mch WAV with Tranzcode.


Cheers.

tebasuna51
28th January 2007, 17:37
@Pookie, sorry but today you aren't fine :o
- About my patch for maskchannels: GrabaBin.exe /B 41_63 /F 6channel.wav
is needed with WAVE_FORMAT_EXTENSIBLE created by WaveWizard. Tranzcode 0.40b make a WAVE_FORMAT_EXTENSIBLE with correct maskchannel then the patch is unnecessary.

- About flac:
flac 1.1.2, Copyright (C) 2000,2001,2002,2003,2004,2005 Josh Coalson

zz.wav: WARNING: found non-standard 'fmt ' sub-chunk which has length = 40
zz.wav: ERROR: unsupported compression type 65534
'fmt ' sub-chunk length = 40 and type 65534 is WAVE_FORMAT_EXTENSIBLE then flac 1.1.2 don't support WAVE_FORMAT_EXTENSIBLE

flac 1.1.3, Copyright (C) 2000,2001,2002,2003,2004,2005,2006 Josh Coalson

zz.wav: ERROR: unsupported WAVEFORMATEXTENSIBLE chunk with non-PCM format 3
Format 3 is float, then flac 1.1.3 support WAVE_FORMAT_EXTENSIBLE but not 32 bit float samples.

We need flac 1.1.3 but before (where input.wav is wavdts):
Tranzcode input.wav output /mch /24
(or /16 for 24/16 bit integer)

- About AviSynth method (dtsin.avs):
NicDtsSource("input.dts", Channels=6, DRC=0)
convertAudiotofloat()
If the user have v2.5.6 the output is converted to 16 bit int anyway, only with new AviSynth v2.5.7 and this instruction:
global OPT_AllowFloatAudio=True
we obtain a 32 float output.
But we don't need this conversion, with flac don't work and Aften do itself the conversion.

Then instead a dtsin.avs and:
bepipe.exe --script "import(^dtsin.avs^)" - | aften.exe ...
(take away the '-' before '|') is enough:
bepipe.exe --script "NicDtsSource(^input.dts^)" | aften.exe ...

Pookie
28th January 2007, 20:21
@tebasuna51, thank you for your expertise. Great to learn from you.

Rockaria
28th January 2007, 20:34
I had bought a DTS audio CD hoping that my DVD player can play it. Sadly, the player doesn't seem to support DTS. I thought I can play it back in computer. I extracted the the tracks as WAV, renamed the files to have DTS as its extension and used Foobar2000 / foo_dts to play the file. The playback is very fast.
...

Yeah, some advanced players can directly play(decode) the 44.1k 6ch dts stream imbeded in the DTSWAV(44.1k 2ch, some recognizes as 48k) ripped from DTS CDs.
. foobar2k : requires the extention to be 'dts'. transcodes to any formats supported
. vlc(videolan client) : most generous with less standard formats(including DDWAV). transcodes to any formats supported
. ffdshow : check the option something like ' decode dts signal in wav ', can be encoded into ac3 when used with graphedit.
. dtswavsource.ax : used with graphedit.

Another way is ofcourse to 'strip' to DTS format with tools mentioned and using any dts decoders if successful.

The problem here seems to be the DTSWAV decoder in the tools are not identifying(scanning) the dts(wav) stream with (limited) different understandings.
Try excluding the extra filler blocks between the wavheader & data blocks using hexa eitors and see what happens to each different scanning logics in the dtswav players/tools.
You will also find some useful threads discussed before. good luck.

chaembian
29th January 2007, 02:12
@Tebasuna51

I went by the Tranzcode method. Will the resultant multi-channel wave be listenable? When I tried in foobar2000, it played even faster than DTS playback (in foobar2000 with foo_input_dts) -- typical 'chipmunck' sounds as these are referred by Pookie in an earlier post in another thread. Why is the DTS playback in foobar2000 faster? Any insight into this?

Why is it that only half the total number of frames are getting processed? Half the total number of frames doesn't translate to half the track too. Its more like the track being squeezed into half the total number of frames. :/


J:\TEMP\DTS>Tranzcode.exe Track01.wav /mch /16
Input filename: [Track01.wav] (DTS Wave)
Input attribs: [5.1 ch, 16 bit, 44.1 kHz, bitrate 1411 kbps]
Output attribs: [Ext wav fmt, 6 ch, 16 bit, 44.1 kHz]
Additional dsp: [bit depth: 32-bit flt -→ 16-bit]
Output file(s): Track01(multichn)(16-bit,44.1kHz).wav
Processing: Completed. [15142 frames decoded (incl dsp) in 9 secs]

J:\TEMP\DTS>Tranzcode.exe "Track01(multichn)(16-bit,44.1kHz).wav" /im

File Information: Track01(multichn)(16-bit,44.1kHz).wav
------------------------------------------------------------------------
filesize : 93,026,372 bytes
filetype : Multichannel Wave (Extensible Wave Format)
channels : 6
bit depth : 16 bit integer
sample rate : 44,100 Hz
bit rate : 4,233.60 kbps
length (time) : 175.786667 seconds [0:02:55.787]
length (samp) : 7,752,192 samples
wav data begin: 68 bytes
wav data chunk: 93,026,304 bytes
speaker flags : 63, [0x3f], [000000000000111111], [FL,FR,C,LFE,SL,SR]

J:\TEMP\DTS>Tranzcode.exe "Track01.wav" /im

File Information (length measured): Track01.wav
------------------------------------------------------------------------
filesize : 62,022,284 bytes
filetype : DTS Wave
channels : 6 [5.1]
bit depth : 16 bit integer
sample rate : 44,100 Hz
bit rate : 1,411.20 kbps
length (time) : 351.573333 seconds [0:05:51.573]
length (samps): 15,504,384 samples
frames : 30,283
framesize : 2,048 bytes
sync interval : 2,048 bytes
wav data begin: 44 bytes
wav data chunk: 62,022,240 bytes
sync word fmt : 14 bit
amode : 9 [FL,FR,C,LFE,SL,SR] (multich wav compatible)


@Rockaria

Yeah, I wish foobar2000 plays this DTS well. Like you have rightly observed, if it had done this, things would have been much simpler!

I have tried using VLC to play the DTS file. But nothing seems to be happening ...

I'm not sure how to exactly make use of ffdshow() to decode this file with a player. That said, I have set it up to decode DTS just as you have written. I tried using this filter in Graphedit as:

AVI/WAV Source --> ffdshow audio decoder --> Direct Sound Device

It crashed. Then I set up the first two filter as above and hit render for the rest,

AVI/WAV Source --> ffdshow audio decoder --> AC3Filter --> ffdshow audio decoder (002) --> Direct Sound Device

It crashed again.

On DTSWAVSource.ax, I'm guessing that the implementation to parse and decode be same as that was implemented in DTSParser/WAV2DTS. GraphEdit was not responsive for sometime before crashing.

@Skelsgard

When I tried using DTSAC3Source.ax for this file, I got a 'Filter failed to load file. Unspecified error (Return code: 0x80004005). I don't have DTSSource at the moment. Will check it and report back! If I can decode these, I prefer to transcode them to AAC as well.

Skelsgard
29th January 2007, 04:29
@Skelsgard

When I tried using DTSAC3Source.ax for this file, I got a 'Filter failed to load file. Unspecified error (Return code: 0x80004005). I don't have DTSSource at the moment. Will check it and report back! If I can decode these, I prefer to transcode them to AAC as well.
What about DTSWAVSource.ax? Did it failed to load it too?

Cheers.

boondocks
29th January 2007, 04:35
Hi

I had bought a DTS audio CD hoping that my DVD player can play it. Sadly, the player doesn't seem to support DTS. I thought I can play it back in computer. I extracted the the tracks as WAV, renamed the files to have DTS as its extension and used Foobar2000 / foo_dts to play the file. The playback is very fast.

I thought I'll convert into a format that supports multi-channel (AAC, Ogg). And I'm lost here. I have tried decoding/demuxing the DTSWAV file to no avail. I have tried using DTSParser, BeSplit, BeSweet /azidts but I have not been successful. With DTSParser (to rebuild stream) but it wrote 2048 byte file. I have attached screenshot for the same.

With BeSplit, I get a file that is the half the size / half the playback time of the input file.


BeSplit v0.9b6 by DSPguru.
--------------------------

Logging start : 01/28/07 , 07:27:43.

BeSplit.exe -core( -input test.dts -output test_bs.dts -logfilea test.txt -type dtswav -fix)

[00:00:00:000] +------- BeSplit -----
[00:00:00:000] | Input : test.dts
[00:00:00:000] | Source Sample-Rate: 44.1KHz
[00:00:00:000] | Channels Count: 5.1, Bitrate: 1411.2kbps
[00:00:00:000] | Output : test_bs.dts
[00:00:00:000] +---------------------
[00:02:55:205] | Writing test_bs.dts
[00:02:55:205] +---------------------
[00:02:55:205] Operation Completed !
[00:00:09:000] <-- Process Duration
Logging ends : 01/28/07 , 07:27:52.


With BeSweet, I get the pRFS->Load(SourceFile, Null) error. I have installed Trial version of WinDVD.

With TranzCode, I have been most successful. I was able to split the song into respective mono channels. But the song seems to have been squeezed into exactly half the time space resulting in a very fast paced playback.


File Information (length calculated): test.dts
---------------------------------------------------------------
filesize : 62,022,284 bytes
filetype : DTS Padded
channels : 6 [5.1]
bit depth : 24 bit integer
sample rate : 44,100 Hz
bit rate : 1,411.20 kbps
length (calc) : 351.596553 seconds [0:05:51.597]
length (calc) : 15,505,408 samples
frames (calc) : 30,284
framesize : 2,048 bytes
sync interval : 544,367,988 bytes
sync word fmt : 14 bit
amode : 9 [FL,FR,C,LFE,SL,SR] (multich wav compatible)


J:\TEMP\DTS>Tranzcode.exe "test.dts"
Input filename: [test.dts] (DTS Padded)
Input attribs: [5.1 ch, 24 bit, 44.1 kHz, bitrate 1411 kbps]
Output attribs: [PCM wav fmt, (6) x 1 ch, 32 bit flt, 44.1 kHz]
Output file(s): test-FL.wav
test-FR.wav
test-C.wav
test-LFE.wav
test-SL.wav
test-SR.wav
Processing: Completed. [15142 frames decoded in 16 secs]



I'm kind of lost here. I have searched the forum but I might not have used the correct keywords. I'm lost here and help is much appreciated. Thanks in advance.

It's all confusing to me, the apps involved,etc, you are using. Basically you want to convert a CD (44.1 Khz) to DVD (48 Khz)
and write to a dvd disc,for a dvd player.
If you want to write to a DVD, you must convert to the 48
Khz DVD standard (in most cases), and use an app that will
do so (Nero will write it), DVD Maestro or other apps can
expound on the DVD menus, with graphics, etc.
FOOBAR wants to see a .dts file extension for DTS, but will
play dts wav at either 44.1 or 48khz, and IIRC will play a
padded dts file.
VLC media player will automatically recognize dts files and play
them (if 44.1 Khz) but may have to tell the program they are
multichannel if not 5.1 encoded, for example not encoded with
6 channels, whether they are really quad or 5.0 or 5.1.
Clear as mud? :)
HTH,
boondocks

chaembian
29th January 2007, 04:54
@Skelsgard

Yeah, it crashed as well.

@boondocks

No, my priority now is to make it playable in my computer with free tools. To this end, I want to convert it into a compatible format -- AAC, Ogg, FLAC. At the moment, the CD is playable only with WinDVD in trial.

Several posts/topics both here and at HA indicates that foo_dts is indeed capable of decoding DTSWAV. My own experience is something different. It plays the file, there is no static hiss, yes. But the playback is pretty fast.

I have tried setting up VLC in accordance to a FAQ written by Daphy. It did not work. I did not explore it by much.

Skelsgard
29th January 2007, 06:04
2 things then:
1) download this DTS WAV track from the Swedish Radio Multichannel 5.1.
http://www.sr.se/laddahem/multikanal/dts/Berwald/Mendelssohn_2.wav
As you can not upload the file you talking about, as it would violate the 30 secs. max playtime for a clip, and trimming is out of the question, as you can not even play it outside WinDVD, this file that everybody can decode without any problem we can use it as a common test file to pinpoint where the problem might be.
Try to apply everything discussed here to that file and tell us how does it go.

2) not too smart to ask now but... what did you extracted the DTS WAV with in the first place? and has it worked for you before with other DTS-CDs without a problem?

Cheers.

chaembian
29th January 2007, 06:29
I'm at work now. I'll not be able to do [1] right away. I'll update you on the testing in the evening.

Regarding the ripper, I have used both EAC and dbPowerAmp to extract the track. I wasn't sure when I did that but searches later in forums often suggested this route. The track01.wav I have used in the test so far is extracted using dbPowerAmp with bits/chnls set as source. I don't remember other parameters if there are any but this was done in accordance to a post. I'm not able to recollect the forum/post off hand, I'll try to link it up if needed. Curiously, when the properties of EAC track and dbPowerAmp track thro' Tranzcode /im was the same. I'll confirm if they are both bit identical when I'm home.

This is my first experience with a DTS-CD and so far, it has been a sorry tale. ;)

Why is demuxing or transcoding happening only for half the total number of frames? And after tranzcoding (to multi-channel or to the 6 mono-channel waves), why is the playback so fast?

WinDVD cannot play the extracted track. I'm guessing that this is because of the misleading wav header. I don't think I have checked this with dbPowerAmp ripped version of the track.

chaembian
29th January 2007, 06:32
The CD cover has this warning -- that the CD is compatible only with DVD players. Can it be that the DTS stream is sampled at 48K Hz and for some reason, we are handling this as 44.1K Hz stream?

If yes, can this be tested?

Rockaria
29th January 2007, 08:46
Audio (DTS)CDs need to be 44.1khz * 16bit * 2(stereo) == 1411kbps externally where the 44.1k 6ch dts signal is kinda clustred into.
When played with dvd players, the (dts)pcm stream will be decoded again to 44.1k 6ch pcms. It also plays when the 2ch pcm passthrued to decoders(receiver) from a cd player.

iirc, dtswavsource uses windvd component internally. So if the cd is playable using windvd, I believe it also can play dtswavs if there's no problem in the seeking logic with the ripped tracks. The first track might have extra hindering filler blocks(in the preceding data blocks). Check if second track plays well especially with foobar2k for the easy transcodings.
. the filter chain would be something like :
dtswavsource -> ffdshow/ac3filter/windvd decoder -> soundout device.
. when ffdshow is used(with dtswavsource or any wavsource), check belows in the codecs->dts setting :
decoder->libdts, check for dts in wav->marked(it's in the bottom)

vlc also can play/dump (DTS) CD tracks. But some versions might not play DTS at all.

Well, hard to recall all the memories but hope this helps a bit...

tebasuna51
29th January 2007, 13:35
Why is demuxing or transcoding happening only for half the total number of frames?
This is the question, why Tranzcode detect (/im) 30283 frames and decode only 15142. Have troubles with even frames?
If your soft work fine with swedish audio samples and don't work with all your extracted tracks, and WinDVD don't play the extracted tracks, maybe is a problem extracting the wavdts from CD.
And after tranzcoding (to multi-channel or to the 6 mono-channel waves), why is the playback so fast?
If even frames aren't decoded this can be the apparent effect, playback at double speed.

BTW, warning with ffdshow dts decoder, have a bug (http://forum.doom9.org/showthread.php?t=118111) decoding 44.1 KHz dts.

Rockaria
29th January 2007, 19:33
BTW, warning with ffdshow dts decoder, have a bug decoding 44.1 KHz dts.
That looks like a red-sign(confirmed, verified, public) instead of an orange-sign to people like me who have been using ffdshow libdts 44.1k very long feeling no audible artefacts at all on 44.1k.

Since 23.22ms missing on every 1060ms mess-up is not ignorable, I will try to confirm on that thread if time permits
by controlling/restricting different conditions(variables) like :
. wavdest : compare 44.1k dump results with other dts decoder filter such as 'Audio Decoder (MPA)' or dtswavsource.
. ffdshow DSPs : completely off.
...

chaembian
2nd February 2007, 07:24
Hi all!

Sorry, work got hectic towards the month-end. I managed to save sometime to test the suggestions and post results.

Firstly, the DTSWAVSource works fine for every even numbered track. Using this in GraphEdit, I was able to write the output to a wave file. The filter chain is:

DTSWAVSource --> InterVideo Audio Filter* --> AC3Filter --> WAV Dest --> File Writer

(* I used iviaudio3.ax that was included in the wav2wav6 package. The iviaudio4.ax and the new filter with WinDVD 8 did not work :confused: )

The resulting WAV file was not readable in foobar2000. Nor was Tranzcode able to parse and present info on the file. wav2wav6 worked fine. It generated mono channel waves which plays well in foobar2000. Now, how do I use these to encode the track into AAC?

Kudos to Rockaria who suggested to pick another track for testing. How do I convert the other tracks? All the tracks play fine in WinDVD when I play them from the audio CD itself.

The Mendelssohn_2.wav played fine in foobar2000. It seemed to struggle a bit before playback begun though... DTSParser worked well. Tranzcode couldn't work on the file.

Rockaria
2nd February 2007, 18:33
Great to hear the progress!:)
You can take any routes using readable intermediate 6 mono wavs, 6ch wav or directly from DTSWAV.
My suggestion is in this case is ofcource the shortest path using DTSWAV->foobar2k->CT or Nero aac cli encoder.

The odd tracks(& possibly some other even tracks) from this DTS CD encoding/ripping might not still be be ready to be perfectly scanned for the working dtswavsourse/dtsparser/foo_dts.

Compare the hexa view of the beginning data blocks to the working track & actual data part. You may find some difference in the beginning filler part.
Try excluding the hindering extra filler blocks by 16*x bit offset increment to help the decoders seek better. It needs some tries but less than ten to find the pattern I believe.(these fillers seem to be obtained while writing to or ripping from the Audio CD)

chaembian
4th February 2007, 17:31
Great to hear the progress!:)
You can take any routes using readable intermediate 6 mono wavs, 6ch wav or directly from DTSWAV.
My suggestion is in this case is ofcource the shortest path using DTSWAV->foobar2k->CT or Nero aac cli encoder.

The odd tracks(& possibly some other even tracks) from this DTS CD encoding/ripping might not still be be ready to be perfectly scanned for the working dtswavsourse/dtsparser/foo_dts.

Compare the hexa view of the beginning data blocks to the working track & actual data part. You may find some difference in the beginning filler part.
Try excluding the hindering extra filler blocks by 16*x bit offset increment to help the decoders seek better. It needs some tries but less than ten to find the pattern I believe.(these fillers seem to be obtained while writing to or ripping from the Audio CD)

Foobar2000 doesn't read the file that was written using File Writer in GraphEdit. It can read the 6 mono channel waves generated by Wav2Wav6 though... I tried merging these waves using WaveWizard, but it couldn't read these files. (Foobar2000 can read the mono waves. WaveWizard cannot read these. No application can read the wave captured using GraphEdit except Wav2Wav6)

How do I identify the DTS stream? Does it have a signature byte or something?

Can I ask you to be bit more elaborate in the '16*x bit offset increment' procedure? :confused:

Rockaria
4th February 2007, 20:57
Sorry, it seems I a little overestimated the situation.
I read :
The Mendelssohn_2.wav played fine in foobar2000. It seemed to struggle a bit before playback begun though... DTSParser worked well. Tranzcode couldn't work on the file.
as you were able to play the ripped 2nd(& even) DTSWAV(s) with foobar2k (by adding the .dts extention).

My logic is : why use the resource taking intermediate wav files when you can directly play/decode/transcode?
So I completely forgot the other ways using intermediate files(or even transcoding). I believe other users or search will help if you want these ways.
One thing I can remember if you want to use Graphedit, is to encode to 640k 6ch ac3 using ffdshow.(search in this section)

As for the hexa editors(I repeated 3 times), I guess you have no experience using it. It's a very low level solution but shouldn't be a hard job for the experienced(you :) ). I am regretful I cannot be that much helpful if you mind getting a hexa editor(large enough capacity) and posting some first few blocks of binary(hexa) view of the DTSWAV files.
(I am also busy for preparing my long journey atm.)

chaembian
4th February 2007, 23:59
as you were able to play the ripped 2nd(& even) DTSWAV(s) with foobar2k (by adding the .dts extention).


Foobar2000 can play all the ripped tracks except that it plays them too fast. :/ Only DTSWAVSource (in GraphEdit) has played the (even) tracks well outside WinDVD. (And WinDVD can play the tracks only from the CD directly and not from the ripped tracks in the HDD.)


As for the hexa editors(I repeated 3 times), I guess you have no experience using it. It's a very low level solution but shouldn't be a hard job for the experienced(you :) ). I am regretful I cannot be that much helpful if you mind getting a hexa editor(large enough capacity) and posting some first few blocks of binary(hexa) view of the DTSWAV files.
(I am also busy for preparing my long journey atm.)

I'm sorry, if you were asking me to post screenshots from an hex-editor earlier, I should have missed it. Here are the screenshots from track 01 and track 02. Hope these serve the purpose. If there is something I should specifically look for and capture, let me know.

Have a nice and safe journey! :)

Imageshacked screenshots
http://img122.imageshack.us/img122/7831/eventrack02ss01cy1.th.png (http://img122.imageshack.us/my.php?image=eventrack02ss01cy1.png)
http://img122.imageshack.us/img122/6613/eventrack02ss02ha6.th.png (http://img122.imageshack.us/my.php?image=eventrack02ss02ha6.png)
http://img122.imageshack.us/img122/7042/oddtrack01ss01xn2.th.png (http://img122.imageshack.us/my.php?image=oddtrack01ss01xn2.png)
http://img172.imageshack.us/img172/6264/oddtrack01ss02nb5.th.png (http://img172.imageshack.us/my.php?image=oddtrack01ss02nb5.png)
http://img122.imageshack.us/img122/9500/oddtrack01ss03xf6.th.png (http://img122.imageshack.us/my.php?image=oddtrack01ss03xf6.png)

Rockaria
5th February 2007, 01:20
Yes, I just wanted to know the status with the check point.
Pending approvals will last forever otherwise using any external web links.
Until we can confirm with the actual images in case, let us use the DTSWAV from http://www.sr.se/laddahem/MultiKanal...EST_011212.zip

Below is the text view of the header :
RIFF$ UWAVEfmt D? ? data
After that there follows some repeating patterns of blocks like : some lines of noise-like info + many lines of x'00s
until it reaches the actual DTS(wav) signal, with no such repeating patterns.

Try to delete the filler block lines from x'30 or x'40 until few lines before the actual DTS(WAV) data part begins, by the lines of x'10 offset increments.
Besplit(besliced) will fix the wavheader(lenth) or even possibly strip to DTS if it works and want to save some amount of spaces while keeping the original fidelity.
I guess the patterns of the noise(filler) blocks may vary by each different burner/decoder used.

Thanks for the good words and I also wish you useful explorations on Audio...

PS : the actiual DTS(WAV) stream(prolly from the DTS header) in my example seems to start at the address(offset) around x(hexa)'58020.

zmin2001
29th September 2007, 06:18
Anyone has figured out where the problem lies? I have exactly the same issue (played very fast in foobar2000) as Chaembian except it happens only to certain DTS Audio CDs in my collection. All the other CDs work just fine (with foobar2000). All the CDs (good or bad) play well in PowerDVD.

I believe its not a setup/configuration issue. It's to do with the DTS Source (CD). I noticed the CDs with foobar2000 playback issue are newer than the ones that play well in foobar2000. I don't know very much about DTS specs. Could it be the "problematic: CDs use some "extensions" that currently tools (e.g. foobar2000, VLC Player, BeSplit, DTSSource etc.) can't handle?

Zodraz
29th September 2007, 15:41
Problem is because of bad sound cards which don't support 44,1 kHz AC3/DTS over S/PDIF connector. You could read this very nice tutorial from the author of the AC3Filter:
http://ac3filter.net/files/docs/ac3filter_1_30b/spdif_eng.html

If you are playing DTS over analog connectors, then I don't know why you have a problem. Especially is unclear to me how some of your DTS-CDs are playing well and another don't.

Austin Forgotten
30th September 2007, 21:32
Hi,

Haven't read this thread complete/thoroughly, but don't bother with the "/mch" switch in Tranzcode 0.40 beta, it has a bug, since the wav header of the output file is wrong, making it useless since it will be unable to be loaded into a player/audio editor etc.. You might want to decode to mono wavs and then merge them to a multichannel wav using Wavewizard or some other app, or just use another means of transcoding. Sorry about the long delay in making available a less buggy ver. of my app. I have been working on it, and have fixed many bugs like this one, unfortunately it's still not ready to the public yet.

Hmm... after reading a bit more I saw:

This is the question, why Tranzcode detect (/im) 30283 frames and decode only 15142. Have troubles with even frames?


This could be possible as I had such a problem with playback of a DTS disc (Band on the Run). I have determined that the problem was that it skip every other frame which looks like it above since the #frames decoded is half as what ought to be. The problem lies in the code , where it jumps to the find the next sync bytes it adds a frame length which is about 2-4 bytes to much. I've fixed this already, but it's not available yet. Perhaps if a small sample were made available for testing (i.e. PM me if you would like me to test it).

Re-edited...

Ok I have a solution if someone is willing to edit the code from file "dcadec.c" of the libdca-0.0.5 package here http:////download.videolan.org/pub/videolan/libdca/0.0.5/, then compile and make available the binary. You can redirect the output to a multichannel wav, which has the correct header.

To fix the skipped frames for those files mentioned above, here is what you need to do:

In the function: static void dca_decode_data (uint8_t * start, uint8_t * end)

change the line:

bufpos = buf + length;

to:

bufpos = buf + length-2;

You might also want to fix the output msgs as well, which slow things down and are hard to read:

comment out:

//fprintf (stderr, "skip\n");


and replace: "/n" with "/r"

as below:

from:

fprintf (stderr,"\n%d frames decoded in %.2f seconds (%.2f fps)\n",
frame_counter, total_elapsed / 100.0, tfps);

to:

fprintf (stderr,"\r%d frames decoded in %.2f seconds (%.2f fps)\r",
frame_counter, total_elapsed / 100.0, tfps);


Then use the following commandline to output a multichannel wav:

dcadec -o wav6 > <output filename> <input filename>

(i.e. dcadec -o wav6 > Out.wav "My_dtswav.wav")

or use:

"wavall" instead of "wav6"

-AF

tebasuna51
1st October 2007, 02:11
Haven't read this thread complete/thoroughly, but don't bother with the "/mch" switch in Tranzcode 0.40 beta, it has a bug, since the wav header of the output file is wrong, making it useless since it will be unable to be loaded into a player/audio editor etc..

I can't locate any bug in multichannel wav header, seems a correct WAVE_FORMAT_EXTENSIBLE header, I can open this wav in Audacity and SoundForge9, encode with aften, ...

What is the problem?

Austin Forgotten
1st October 2007, 02:26
Oh I thought there was errors in the multich wav header (I swear I fixed it in the new unrel ver - I don't remember anymore quite a few bytes were off - maybe you'll notice on outputs which are not 32-bit floats) well I'm glad it's usable :)

Anyway I compiled dca.exe with that fix I mentioned, and was going to make the exe available at Tranzcode's home but I couldn't logon :(, guess it's been too long since I last visited there.

Zodraz
1st October 2007, 07:56
Austin, please, could you tell us when/if the source code of the new version of Tranzcode will be available? You know, kurtnoise is waiting for it to add DTS support in his BeLight.

Anyway, thanks for a great program!

sebus
15th February 2014, 15:54
In case anybody else still needs some of the files mentioned here, I uploaded them here (http://s000.tinyupload.com/index.php?file_id=50115165811872634093)