It is currently 07 Feb 2025, 12:18




 Page 1 of 1 [ 4 posts ] 
Author Message
 Post subject: dtsutil - A simple utility to extract DTS bitstreams
PostPosted: 31 Jan 2025, 06:21 
Honest fan
Honest fan
User avatar

Joined: 25 Feb 2020, 05:51
Posts: 92
Location: United States
Has thanked: 9 times
Been thanked: 29 times
dtsutil is a little utility I wrote to extract the raw DTS bitstreams from PCM WAV recordings taken from the LaserDisc SPDIF output.

I know a couple of utilities already exist, but I had issues reliability extracting the entire movie's stream with them. I capture my LDs as one audio/video file with all disc sides in it. This means there are blank pauses/gaps between the SPDIF data in the files. This sometimes seemed to cause issues with the existing utilities I tried, so I wanted to try to make my own that will (hopefully) handle this reliably.

Here's the GitHub link if anybody is interesting in trying it: https://github.com/mikechambers84/dtsutil

It's an alpha version right now. I haven't tried a lot of discs, but I did a couple and had no issues. I use an ESI U24 XL with ASIO to capture the SPDIF output.

I will probably add AC3 support as well, but am starting with DTS and just threw this together today. I hope it's useful to someone else out there!

If anybody has problems getting it to work properly, please create an issue on the GitHub page so that I can look into it.

Usage example:

Image
_________________
My collection: Click!

I also write software.
Offline
 Profile  
 
 Post subject: Re: dtsutil - A simple utility to extract DTS bitstreams
PostPosted: 31 Jan 2025, 07:36 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4834
Location: Tokyo
Has thanked: 341 times
Been thanked: 1333 times
mikechambers wrote:
If anybody has problems getting it to work properly, please create an issue on the GitHub page so that I can look into it.


Will git it a try!

How long did it take to process Dark City entirely after TOSLINK capture?
Did you concatenate side 1 and 2 into a single WAV before extraction?

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: dtsutil - A simple utility to extract DTS bitstreams
PostPosted: 31 Jan 2025, 16:42 
Honest fan
Honest fan
User avatar

Joined: 25 Feb 2020, 05:51
Posts: 92
Location: United States
Has thanked: 9 times
Been thanked: 29 times
admin wrote:
mikechambers wrote:
If anybody has problems getting it to work properly, please create an issue on the GitHub page so that I can look into it.


Will git it a try!

How long did it take to process Dark City entirely after TOSLINK capture?
Did you concatenate side 1 and 2 into a single WAV before extraction?

Julien


It took about 8 or 10 seconds to process the whole movie's stream.

And yes, they were in a single WAV. When I capture LD's, I just record everything into one file for all sides and then clip out all the frames in the video before the first disc frame, and between side changes in VirtualDub 2. During this step I also crop to 720x360 (for widescreen movies) and run the IVTC filter on it.

I don't have to clip out any of the blank audio between sides when extracting DTS though, I wrote this so that when it hits any samples without DTS packets, it just keeps seeking forward until it sees the next one and then it resumes extraction to the output file.

I am noticing an odd issue though. When I played the extracted DTS file directly in VLC, everything sounded perfect and the entire movie's length was there with no glitches in the sound. Now that I'm trying to mux together an MKV with video and audio in ffmpeg, it seems to miss packets and the audio is only around half the length of the movie in the MKV output and it seems to play through it too fast. Hmm.

I'm not sure if it's an issue with my extraction or with ffmpeg's muxing. Like I said, the raw .dts file sounds great alone in VLC. You can also see in the screenshot that's it's processed 1:45:07 worth of samples in DTS frames, which is the correct length of the video, and is also what VLC reports as the length of the .dts file.

ffmpeg -i dark_city_video_only.avi -i dark_city_audio_only.dts -aspect 16:9 -vcodec h264 -preset veryslow -b:v 8000k -acodec copy dark_city.mkv


This is the command line I used.

EDIT: I'm also thinking of writing another utility to stream the SPDIF input and save it directly as an AC3 or DTS bitstream. It would be nice to eliminate the intermediate step of making a WAV file.
_________________
My collection: Click!

I also write software.
Offline
 Profile  
 
 Post subject: Re: dtsutil - A simple utility to extract DTS bitstreams
PostPosted: 03 Feb 2025, 18:58 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4834
Location: Tokyo
Has thanked: 341 times
Been thanked: 1333 times
Compiles instantly with GCC.

$ gcc dtsutil.c -o dtsutil.exe
$ ./dtsutil.exe
dtsutil v1.0 alpha by Mike Chambers
A tool to extract the DTS bitstream from WAV files.

Specify input WAV and output DTS files on command line:
  dtsutil.exe input.wav output.dts


Will play a DTS LD + ZOOM U-44 capture to give it a try soon.

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: