Skip to main content
Topic: WAV (DTS) Cue sheet anomoly 2nd track >> forward (Read 6786 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WAV (DTS) Cue sheet anomoly 2nd track >> forward

Recently, I acquired Quadraphonic transfers in the form of One Large WAV file (DTS encoded) and a CUE sheet.

I Enqueue in Foobar successfully. All the tracks load correctly however starting from the second track through to the last track, approximately the first 10 seconds are static much like you'd expect when loading a DTS file into a Sound Application without the DTS encoder. Once I skip past the first 10 seconds or so, the song plays fine.  Of further note, is while the track is playing, I drag back to the very beginning of the very same track and the static sound is gone. The entire song plays without issue.

Lastly, if I don't use the Cue Sheet, the entire WAV file plays without issue in Foobar as one large DTS encoded file.  The WAV files and CUE sheet were encoded/created in 2010 if this helps.

Might anyone know the cause for the first 10 seconds on the first try of every track (except the first) plays improperly but if I drag the slider to the very beginning of the track it then plays fine?

Rev

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #1
Are you using latest foo_input_dts? Can you test what happens if you convert this image+cue to separate wav tracks? (just be sure to  disable option "Enable decoding postpsocessing" and do not use any DSP in section "Processing" of converter's settings)

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #2
Yes, the absolute latest DTS encoder was installed yesterday and successfully to version 0.6.8
Rollin..you are a life saver, the next suggestion worked Great.
For others that may experience this issue I just wish to add details
1)load the original CUE file in Foobar
2)select all tracks so they are highlighted
3)right click choose Convert, then choose the 3 dots (elipsis)
4) on the pop up Output format should be FLAC, level 0,
Processing should be set to NONE, click Processing hyperlink as well and as Rollin pointed out, Deselect "enable decode..." and be sure there are no active DSP's are listed, the lower check box should be unchecked. The file conversion should take place. Reload the individual songs and issue Solved

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #3
on the pop up Output format should be FLAC, level 0
Notice that FLAC doesn't compress DTSWAV well. Size of resulting FLAC can be even larger than source DTSWAV' size.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #4
yes I did notice this. the bit rate went from 1411kpbs to 1258kbps (slight improvement). Kind of the same principle when a RAR or ZIP is created with JPGs, an implosion can occur.

I've been using the formula you provided and its worked flawlessly on approx 25 large WAV's except on one large WAV which had ten tracks.  of 10 tracks only the first track plays with the static sound unless I back queue the track.  I also found a different CUE file online to match the catalog number of the recording, and still same result Foobar plays the intro with the static sound. I loaded the CUE separately and also embedded the CUE, first track. (file bit rate and type did not change with CUE Splitter). I verified the other 9 tracks show as 6 channel in Foobar 1.46

Thanks for your kind assistance Rollin'.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #5
interesting, this same occurrence whereby only the first track plays with static, just happened again on a DTS encoded large WAV.  Remaining tracks 2 - 10 converted fine.

Is there a buffer or spin up up type option that may help to shave off the track 1 static ?

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #6
There must be two consecutive DTS packets within the first 10 seconds of the audio, or else the stream decoder will give up and let it be decoded as plain PCM.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #7
yes I did notice this. the bit rate went from 1411kpbs to 1258kbps (slight improvement).
DTS in WAV have the two MSBs zero, don't they?
1411*14/16 is a little below 1258.
High Voltage socket-nose-avatar

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #8
yes I did notice this. the bit rate went from 1411kpbs to 1258kbps (slight improvement).
DTS in WAV have the two MSBs zero, don't they?
1411*14/16 is a little below 1258.

this drop in KBPS happened when I had completed the file conversion as Rollin had suggested. I had converted from 1 large WAV [DTS] to FLAC .  All plays fine except the first few seconds of the first track which never resolves unless I move the slider backward to about 4 seconds just after the intro while in play mode, then all plays normal.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #9
There must be two consecutive DTS packets within the first 10 seconds of the audio, or else the stream decoder will give up and let it be decoded as plain PCM.
thanks good point. it appears the 1st track should be tossed then unless there's a superficial way to add a DTS packet or a potential work around

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #10
There is another potential workaround, it involves letting the DTS postprocessing decoder absorb a lot more before it gives up. Of course, just know that it's doing this to every single FLAC file it sees with 44100/16/Stereo configuration, converting it back to integer from float, and attempting to perform basic DTS decoding on it, advancing byte by byte through the data. This isn't terribly heavy, since it's mostly only scanning for the sync field and headers, in at least four different encodings. (14 bit, 16 bit, little/big endian)

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #11
There is another potential workaround, it involves letting the DTS postprocessing decoder absorb a lot more before it gives up. Of course, just know that it's doing this to every single FLAC file it sees with 44100/16/Stereo configuration, converting it back to integer from float, and attempting to perform basic DTS decoding on it, advancing byte by byte through the data. This isn't terribly heavy, since it's mostly only scanning for the sync field and headers, in at least four different encodings. (14 bit, 16 bit, little/big endian)

Kode54 - I'm intrigued.  Might you be kind enough to offer where I can acquire the details to perform your suggestion? In addition, once this processing is set up, perhaps then I can run the Foobar Convert to create a new DTS WAV or a DTS FLAC, then disable the tip you've provided.

 

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #12
It's something I need to change in my plugin, not something you need to do. Well, other than maybe:

1) Remove foo_input_dts.
2) Open the converter on the first track.
3) Add a Skip Silence DSP to skip the startup silence.
4) Configure Skip Silence DSP to only skip a minimum of 2 seconds of silence or so, so it doesn't delete the padding between DTS packets.
5) Convert this to a separate FLAC track for later use.


Or I could make it scan for 30 seconds of data first, which will just use slightly more memory, and maybe cause some lossless tracks to take a moment (unlikely to be noticed) to open.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #13
It's something I need to change in my plugin, not something you need to do. Well, other than maybe:

1) Remove foo_input_dts.
2) Open the converter on the first track.
3) Add a Skip Silence DSP to skip the startup silence.
4) Configure Skip Silence DSP to only skip a minimum of 2 seconds of silence or so, so it doesn't delete the padding between DTS packets.
5) Convert this to a separate FLAC track for later use.


Or I could make it scan for 30 seconds of data first, which will just use slightly more memory, and maybe cause some lossless tracks to take a moment (unlikely to be noticed) to open.

If you believe this may help others, I can wait for the update. No hurry. And if it helps you, I can upload 2 files to a Cloud location for your testing and IM the link.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #14
Opted to give the outlined steps above a try today in the exact order as listed (set MS to 2150)  and then also reloaded the DTS component / restarted as a final step.

No success unfortunately.  Tried this with both problematic files same result, starts with static but once song begins I moved the slider back not quite to the beginning and the track plays fine.  Hope this helps. If you require these test files please advise

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #15
By the way, to avoid this problem completely, you can extract raw DTS from DTSWAV with ffmpeg.
ffmpeg.exe -i inputfile.wav -c:a copy outputfile.dts
If you will ever need DTSWAV again, DTS can be packed to wav with SoX
sox.exe -t raw -e signed-integer -c 2 -b 16 -r 44100 inputfile.dts outputfile.wav

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #16
the FFMPEG section of code worked great at a CMD prompt.  The newly created DTS file plays without issue in Foobar. its of course one large DTS file

On the Sox portion, I've not been successful.  I've gone through the extent of downloading Win32 Sox 14.x.x and install to the default directory. Since this default folder is not listed within the PATH, I moved the DTS file to the Sox root folder. I then ran your string at CMD, it runs, no errors are reported but there's no output file in the default Sox directory (this is where Sox.exe is located and also the source DTS file).

open to thoughts or I could perhaps build a CUE sheet though unaware of what apps can insert a CUE into a DTS file
thanks

Update: 
found the file at:  C:\Users\ME\AppData\Local\VirtualStore\Program Files (x86)\sox-14-4-2
when I loaded the WAV in Foobar, it was back to reproducing static sound.

I then tried using Foobar to Convert to WAV with the Sox DSP and also without the Sox DSP and the check box ticked for 'Enable Decode post processing".  This produced an error which claims "Decoder produced garbage at 27:12.456"  (total Length) however there are no discoverable issues with either newly created WAV file though the bit rate and size in both scenarios imploded from 287MB to 1.6gig and 1411kbps (DTS file) to 8467kbps.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #17
its of course one large DTS file
open to thoughts or I could perhaps build a CUE sheet though unaware of what apps can insert a CUE into a DTS file
Open cue in Notepad and edit file name there. So cue will use your newly created DTS file. And fb2k CAN insert (embed) cue into DTS.

when I loaded the WAV in Foobar, we are back to square 1 (all static)
This is why i wrote "If you will ever need DTSWAV again." Do you really need it now, when you have properly playing DTS?

I then tried using Foobar to Convert to WAV with the Sox DSP and also without the Sox DSP and the check box ticked for 'Enable Decode post processing".  This produced an error which claims "Decoder produced garbage at 27:12.456"  (total Length) however there are no discoverable issues with either newly created WAV file though the bit rate and size in both scenarios imploded from 287MB to 1.6gig and 1411kbps (DTS file) to 8467kbps.
Obviously resulting file is much larger because you converted from lossy DTS to lossless PCM wav. As for "Decoder produced garbage", maybe @kode54 can tell something about this.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #18
There are a couple old programs for converting between WAV-DTS and DTS.

1. BeSplit (wav->dts): can also cut streams, can't process an odd variety of DTS-CD with incorrect frame size, which need fixing.
2. AC3Filter bsconvert (compact dts<->14-bit-dts)

I would keep the music as a compact extracted DTS, which is smaller and avoids the complexity of 2 layers. If you have an official CD, verify that the copy is secure with CueTools before conversion, as you won't be able to verify it later, and any errors will affect way more compressed samples. If the conversion tool discards some non-audio data from the start of the stream, the cue points will be off and will need to be manually adjusted or silent frames inserted. There usually is some junk data or incomplete frames, but way shorter than 10 seconds.

Do not split the album into tracks if the track transitions are segued/overlapping, as the format isn't gapless (worse with Wav encapsulation). You can reference a .dts file in a cue sheet. If you plan to use detailed tagging, and listen only in Foobar or video players, you could also mux a gapless CD into Matroska and generate chapters from the cue sheet.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #19
"This is why i wrote "If you will ever need DTSWAV again." Do you really need it now, when you have properly playing DTS?"

Thanks I realize this - as one large DTS file its useless to have to scroll to track 4 or 6 as an example.  Unaware of any other option but to insert a CUE sheet into a newer WAV.  I'll give that a shot with the Notepad idea, I was unaware of Notepad editing a CUE file..thanks again

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #20
Do not split the album into tracks if the track transitions are segued/overlapping, as the format isn't gapless (worse with Wav encapsulation).
I just made quick test: took DTS file, packed it to wav, split wav to separate tracks by cue, then merged tracks back to image, then repacked from wav to DTS, then compared resulting DTS with source DTS using foo_bitcompare and they are bit identical.

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #21
The original CUE modification concept worked well after applying it to the newly created WAV file (meaning the new CUE sheet loaded) and separated all 10 tracks nicely in Foobar. 
J7N - on this recording tracks were not segued/overlapped (thankfully) but when I performed a Discogs match, the end of the first track bleeds about 1 second of track 2, all others are fine. I can live with this ...thx

Re: WAV (DTS) Cue sheet anomoly 2nd track >> forward

Reply #22
I just made quick test: took DTS file, packed it to wav, split wav to separate tracks by cue, then merged tracks back to image, then repacked from wav to DTS, then compared resulting DTS with source DTS using foo_bitcompare and they are bit identical.
If I understand the steps right, the repacking did not involve decoding of the separate tracks. I observe a fade-in of about 384 samples due to missing overlap with the previous frame (maybe not noticeable with quiet or chaotic sound), or that plus loss of one whole frame if the cut is at an arbitrary position in the stream as WAV. BeSplit makes cuts as well as possible on encoded frame boundary, but has other issues (no support for open bitrate, doesn't account for duration of unrecognized junk data or silence).

 
SimplePortal 1.0.0 RC1 © 2008-2019