Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th January 2017, 09:17   #21  |  Link
sebus
Registered User
 
Join Date: Mar 2002
Posts: 163
Thanks, that makes sense!

But can you explain:

7FFE8001FC7CDFF2

7FFE8001 - DTS marker
FC7C - ?
DFF - frame size = 3583
2 - ?

sebus

Last edited by sebus; 8th January 2017 at 20:56.
sebus is offline   Reply With Quote
Old 8th January 2017, 21:09   #22  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
From ts_102114v010301p.pdf (use Google or other)

FSIZE (Primary Frame Byte Size)

(FSIZE+1) is the total byte size of the current frame including primary audio data as well as any extension audio data.
Valid range for FSIZE: 95 to 16 383. Invalid range for FSIZE: 0 to 94.

Frame size = DDF + 1 = 3584

FSIZE is a field of 14 bits (see the pdf) than include 2 bits from precedent byte (here 00) and the next bits (the 2) are for the next fields AMODE etc.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 8th January 2017 at 21:15.
tebasuna51 is offline   Reply With Quote
Old 8th January 2017, 23:07   #23  |  Link
sebus
Registered User
 
Join Date: Mar 2002
Posts: 163
Thanks

sebus
sebus is offline   Reply With Quote
Old 17th January 2017, 03:40   #24  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
I make a little tool to do the dtswav to standard dts conversión.

Instead read the framesize in the header, like seems a buggy data, I read the file to calculate the correct framesize.
Seems work fine with all dtswav than I have, even with the created with ffdcaenc.

[EDIT]

New version in next post
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 13th August 2018 at 14:33. Reason: tool new version
tebasuna51 is offline   Reply With Quote
Old 18th January 2017, 19:38   #25  |  Link
sebus
Registered User
 
Join Date: Mar 2002
Posts: 163
Thanks! This one does works nicely

sebus
sebus is offline   Reply With Quote
Old 13th August 2018, 13:04   #26  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
I have received these mp's from schorman:

Quote:
I had a question about the wav2dts tool posted here.

First, the tool is exactly what I've been looking for for about five years!

I first discovered the problem with DTS frame headers when capturing laserdisc DTS audio back in 2013. I discovered, much as you did in the thread above, that fixing the FSIZE and RATE portions of the DTS headers made the .dts files more compatible with available DTS software decoders/players.

Anyway, your tool is nearly perfect for processing DTS streams captured from laserdisc in a single step. Unfortunately, since capturing LD audio is essentially a manual process, the resulting recordings typically have padding at the beginning and end of the wav files produced. This is different than files produced by ripping a DTS-CD.

In testing wav2dts.exe I noticed that the program can remove padding of roughly 0.5 seconds at the beginning of the file, but does not remove padding at the end of the track. This results in additional file data, which both delaycut and eac3to interpret as additional DTS frames.

Would it be possible to update the software to eliminate the additional padding? Also, would it be possible to increase the search size for the first DTS frame header?

Thanks again,

schorman

Here are some samples:

original recording...
wav2dts output...
corrected dts...
Thanks schorman, I never try with LD audio.

At least eac3to can obtain the "corrected dts" from the "wav2dts output", deleting the end padding, with:

eac3to "wav2dts output.dts" "corrected dts.dts"

Quote:
Ok, I was actually able to adapt your code to work. It now can process files with up to 30 seconds of silence or junk either before or after the dts stream.

Here is my updated code:

https://pastebin.com/GjspmX84

I'm not a coder at all, so if you have suggestions on a way to improve this, please share.

Thanks for this!

schorman
In your code you increment the search in the initial padding and add a detection of end pading.

I have new versions of wav2dts to suport other dts types and best detection of FrameSize. I can include your request in a new version in next days.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 13th August 2018, 14:31   #27  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
It works on the first attempt:

Quote:
D:\tmp>wav2dts mk_original.wav

FileSize : 611618202 bytes
Initial invalid bytes : 59702
Last bytes rejected : 66660
------------- Valid Header
FrameSizeRead : 3585 bytes.
FrameSize14le : 4096 bytes.
FrameSize16be : 3584 bytes.
NumFrames : 149290.
Channels mode : Surround.
SampleRate : 44.1 KHz.

Done, created : mk_original.dts
[EDIT] The attachement include Wav2dts.exe and DtsWav.exe
Attached Files
File Type: 7z WAVDTSutil.7z (49.9 KB, 80 views)
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 11th June 2021 at 13:25. Reason: Unic attachement
tebasuna51 is offline   Reply With Quote
Old 13th August 2018, 18:37   #28  |  Link
schorman
Registered User
 
Join Date: Jul 2008
Posts: 6
I wanted to mention that I removed the restriction on the amount of padding at the beginning and end of the file.
schorman is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.