Combining different video and audio sources

QuadraphonicQuad

Help Support QuadraphonicQuad:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

ArmyOfQuad

2K Club - QQ Super Nova
Since 2002/2003
Joined
Apr 22, 2002
Messages
2,322
Location
Attleboro, MA
Not sure if anyone else is playing around with this stuff, but I haven't had a chance to figure this one out yet, so figured I'd throw it out there and see if anyone else has figured it out.

I've been working towards having somewhat of a consistent archive for playback, and have been ripping just about everything audio that I can to flac files. When it comes to ripping the dvd-a to flac, often these discs had bonus video content. I've been dealing with this by ripping the bonus video content to .mpg, so that I have that material easily available to me to play over the network.

But, one of the trade offs or compromises in dvd-audio, was that you couldn't have high resolution surround sound and video at the same time. And I'm wondering....that shouldnt' be a compromise we have to live with anymore. Certainly, we have bluray that does lossless compressed high resolution audio with video, even HD video, so certainly I should be able to create video files that preserve the original unaltered mpg video content (I don't want to re-encode anything), synced up with high resolution audio if available.

For example, the talking heads dvd-a includes the music video for Burning Down the House. I believe the mpg includes the options for stereo or lossy compressed surround. But....now we don't have to settle for that. One should be able to take the high resolution 5.1 surround mix, sync it up to the mpg video, and.......

then what?

Well, I'm thinking the audio is going to need to be in a format that will work with a video file of some sort. Perhaps encoding to dts-ma?

But then, what do I do to create a new video file that contains the high resolution audio? What software do I use, what file type do I create?

And, I would also want the added flexibility of being able to have multiple audio choices. When I extract the mpg from the dvd, if it has multiple audio programs, the program I use to extract it makes me an mpg that contains the mulitple audio programs. I've not played around much with hardware letting me choose which audio track to listen to, but I know vlc has the option to select which audio program. Although, I wouldn't know how to actually create an mpg with multiple audio choices.



Of course, another thought that has come to mind that I'm itching to do once I figure out a solution, is go back to the flaming lips dvd-as, and make versions of those that allow the use of the video visual on the dvd-v portion, synced up with the high resolution audio on the dvd-a portion.



Anyways, I'm still looking for ways to do these things, so if I figure something out, keep an eye on this spot for an update. But if anyone out there is already doing these things, please let me know.
 
I attempted this once with DVD Architect, and got completely confused.
 
YES!

I like this.

People have suggested some things in the past, but it seems most things are based on creating a disc image, or folders to go on a disc....and I'm no longer interested in emulating physical media. Not that physical media in itself is a bad thing, or a format that can easily be burned to physical media is bad, but when it comes to storing my material for playback on the network, it just seems silly to use the emulation of physical media formats for storage. People aren't listening to .iso images on their ipods, that would just be silly.

So, I downloaded and took a look at this tsMuxer program, and it's great! .ts is the file type I've been looking for, take a dvd quality mpg, take high resolution audio in .wav or dts-ma, put it together.....one file with dvd quality video and dvd-audio quality audio.

Of course, when bringing together video and audio from different sources, the audio is gonna need to be worked to sync up. I had to take the high resolution "burning down the house" and pitch it by 3 cents to make it time perfectly, remove a little bit of the beginning and fix the fade in, and add some silence to the end. But, once I had a new high resolution audio file that matches the length and timing of the audio extracted from the .mpg perfectly, they combined perfectly into a .ts file using tsMuxer.

However, they are rather large files.

The video of Burning down the House by itself is 149 MB
The flac file of the 5.1 surround mix is 167 MB
So, ideally, this data should be able to be stored in 316 MB
But, file containers seem to not like flac, so I can either go wav or dts-ma.
The flac expanded to wav comes to 412 MB....much larger than the flac, more than double
So, I compressed to dts-ma, which brought it down to 239 MB, which is 72 MB more than the flac.
So, not quite as efficient as flac...but, workable.
When all is said and done, I now have a 399 MB file that has dvd quality video and dvd-audio quality audio. I did only put the surround mix on this, but if I wanted to, I could add the high resolution stereo mix as well, to offer a choice of which mix to listen to. But...I don't see myself ever going for the stereo, so I may just leave well enough alone on this.


One thing I had to do...tsMuxer doesn't recognize the .dtshd file type. So I had to rename my dts-ma file to have a .dts file extension instead. This didn't cause a problem, it still made the .ts file just fine, and played back on a player that can do dts-ma, it worked fine.

I found my POS netgear box will not do dts-ma. But, the oppo passes it along to the receiver just fine, and the receiver plays it back.
 
The container you're looking for is Matroska (.mkv) - I have several films that are 1080p x264 encoded video with a 5.1 FLAC audio track. Assuming your playback devices support it, it's the way to go.
 
Little update.....not so sure I needed to adjust the audio by 3 cents. What I did to start with was I started a sony vegas session and brought in both the video, and the flac, to see how they lined up, and there was a definite drift as I played them. But...3 cents is such an insignificant amount to pitch. I'm wondering if maybe the audio are fine, but vegas was having difficulty keeping them in sync when playing back, I"m gonna have to do some more investigating, because playing with the flaming lips, I wasn't expecting them to go out of sync, but they do quite quickly, even though they appear to line up fine and not be way off by the end.
 
Tried to create an .mkv....gave me some bogus error, and the thing doesn't play right. If I skip later into the file, at parts, all the audio is there, but if I play the end of the first song, the next song never starts. The video continues, the audio stops. Seems like a problematic, unreliable format....not quite sure .mkv is ready. .ts worked right out of the box, and seems to be reliable from my initial tests, like usual, I'll stick to what works.
 
Ok, played around with .mkv a bit more, and I think this may be the better way to go actually. I decided to start with the method that works in my .ts creation, and created an .mkv of Soft Bulletin, containing the mpg from the dvd-video, and the surround and stereo mixes from the dvd-a, encoded to dts-ma. This created a .ts file that is 6.45 GB, and an .mkv file that is 6.12 GB, so the .mkv comes out smaller. If I can get the .mkv to work with flac, it will be even better. Perhaps it didn't like that I tried to add the tracks as individual .flac files by appending them, or maybe it doesn't like that the surround is 96kHz while the stereo is 88.2kHz. (I had to upsample the stereo to 96 for the dts-ma, since dts-ma will only do 96 or 48). Also, I tried to add chapters to the .ts file so I can skip to tracks, but that didn't work...but I have been able to add chapters to the .mkv just fine.

Here's what I'm using for .mkv creation, http://www.downloadbestsoft.com/MKVToolNix.html
 
Tried creating it with flac again, but it still doesn't like it. (got mixed up and checked the wrong file and originally posted about it working on the 2nd try.)
 
Ok, found a solution, and have now created an .mkv of The Soft Bulletin that contains the dvd quality video from the dvd-video portion, and high resolution 5.1 and stereo sound from the dvd-a portion in flac. The problem I was having was clearly with the appending of the separate tracks, not sure why that was causing a problem, but the obvious easy way to work around this problem was to join all the flacs into large full album flacs. Which is fine since I had a chapters file saved.

I've used this program to create the .mkv

http://www.downloadbestsoft.com/MKVToolNix.html

I've found the easiest way to get the chapter listing was to export the audio from the dvd-v portion of the disc using the option to extract audio from a dvd in audiomuxer, since this also created a chapters txt document. In mkvmerge gui, I went to the chapter editor tab, and clicked the chapter editor menu, and selected new chapters. This then let me add a chapter for each track, and using my text document I was able to easily get the beginning and ending time for each chapter, and name them by the track name. This tab doesn't actually add the chapters to the .mkv though, you save it from the chapter editor menu, which saves an xml file, then in the global tab, you can add the chapter file.

To easily create my full album .flac files, I used foobar2000 to convert the flac files into one large flac file. The problem I ran into here is flac doesn't like going beyond 2 GB. So, I found this replacement flac.exe file that doesn't have a problem with large .flac files
www.hydrogenaudio.org/forums/index.php?act=attach&type=post&id=6130

So, once you've created your full album flacs, and have your extracted video (I use a program called vob2mpg to easily extract mpg from a dvd), in the input tab you can add your mpg and flac files, and uncheck the audio that is in the mpg file, and you're ready to click start muxing.


I don't think I left anything out there, but let me know if anyone tries this, and runs into problems.


Also, the end result is now a file that contains this all, at 5.7 GB.
 
OK - So I've managed to create a Blu-ray disc of Yoshimi Battles the Pink Robots with the MPEG2 Frequency Waveform Cartoons and LPCM 96/24 5.1 using tsMuxer!! Yay!!!

Why didn't I create a .ts or a .mkv? Because my Oppo BDP-83SE won't play multichannel .mkv files or .ts at all. It will play AVCHD & Blu-ray (from disc)...

Thanks AOQ for the tip to use vob2mpg. It worked a treat!

I had an issue with the joined DVD-A WAV files being bigger than 4gb. But with tsMuxer you can "Join" files.. so I was able to input multiple WAV files separately... this should work for FLAC too...

I'm having issues with white noise though - I think because its trying to stream more than my USB drive can handle...approx. 19 M/s. I'll try with the AUdio dropped down to 48/24 & see how that goes...

Also had to add a delay (I think) of 1875 milliseconds...as the video had a delay before the audio started...
 
Back
Top