Taperssection.com

Gear / Technical Help => Photo / Video Recording => Topic started by: Pittylabelle on March 30, 2018, 07:26:34 PM

Title: Generated VHS video and audio files are not in sync after multiplexing!
Post by: Pittylabelle on March 30, 2018, 07:26:34 PM
I have been trying for about 14 days now to get a problem under control - so far no luck. Of course I have already researched here in the forum, but could not find something suitable.

My goal is to replace the audio tracks of my music VHS recordings (made via DVD recorder) with simultaneously recorded audio files (made via an external audio recorder) in WAV format.

I think my idea was to be too good to be true:
1. Simply demux the VHS video files (VIDEO_TS) and then use the AC3 audio track as a reference for the separately recorded WAV file.
2. Multiplexing the then exactly tailored and edited/optimised WAV file with the demuxed M2V video file, for example via MKVToolnix - done.

But, far from it!

The difficulties are already starting at point 1:
I have not been able to extract a audio file that would be suitable as a reference for my WAV file.

All the programs I've tested so far, extract video and audio files that are unusable. When I multiplex these files for testing purposes, audio and video become out of sync after a certain amount of time. My multiplex programs are: ImagoMPEG-Muxer and MKVToolnix

The programs I had tested for demuxing so far were: DGMPGDec, Avidemux, TMPGEnc and ProjectX.

The only partially positive exception was ProjectX. After multiplexing the before generated files, audio an video are in sync. Unfortunately, ProjectX corrects the generated files while demuxing in the first place and discards, for example, erroneous GOP files. Then of course, the length of my WAV file are no longer consistent with the newly generated ProjectX audio file.

There must be a way to generate video and audio files from the VHS recordings that work together synchronously, without these "GOP file corrections".

Even if I generate the VOB files of the recorded DVD-R of the DVD recorder with the program VOB2MPG to a single MPEG file, audio and video are absolutely in sync. Unfortunately, I can not create single video and audio files from these MPEG files that are in sync - again for the above reasons.

Maybe someone has an idea?
Title: Re: Generated VHS video and audio files are not in sync after multiplexing!
Post by: willndmb on March 30, 2018, 11:08:30 PM
I'm not following exactly.
You want to basically dub your aud recoding to your video and then export as a new video with the dubbed audio replacing the original audio on the video, correct?

I don't know the programs you listed  because I use a Mac but try looking into Sony Vegas and/or Plural Eyes plug in.
PE I never had much luck with but know many others have. I believe Vegas has a built in synch feature similar to Final Cut Pro.
In FCP you would just load the video file and audio files into it no telling it to line them up

Your programs are not allowing you to A) dub and/or B) export the files
.??
Title: Re: Generated VHS video and audio files are not in sync after multiplexing!
Post by: Pittylabelle on March 31, 2018, 07:52:51 AM
I'm not following exactly.
You want to basically dub your aud recoding to your video and then export as a new video with the dubbed audio replacing the original audio on the video, correct?

No, not exactly.
As described, I simply want to change the audio tracks.
No re-encoding and/or export of a new file is needed.
Simply multiplexing the M2V elementary video stream with the new WAV audio stream

For example, you can put a video and audio file in a container like MKV and you have one single file with video and audio.

I don't know the programs you listed  because I use a Mac but try looking into Sony Vegas and/or Plural Eyes plug in.
PE I never had much luck with but know many others have. I believe Vegas has a built in synch feature similar to Final Cut Pro.
In FCP you would just load the video file and audio files into it no telling it to line them up
Your programs are not allowing you to A) dub and/or B) export the files
.??

As said before, no export and re-sync is needed - just a multiplexing with a new audio file of the same lenght.

But the things you mentioned are not my problem at all. ;-)

My problem is to get the original audio that a) fits to the elemantary M2V video stream
and b) is a lenghts reference for the new WAV audio stream.
Title: Re: Generated VHS video and audio files are not in sync after multiplexing!
Post by: vanark on March 31, 2018, 08:10:10 AM
Are you sure the audio doesn't need to be stretched or shrunk?
Title: Re: Generated VHS video and audio files are not in sync after multiplexing!
Post by: Pittylabelle on March 31, 2018, 09:27:59 AM
Are you sure the audio doesn't need to be stretched or shrunk?

Yes, probably the new audio need to be stretched or shrunk, as it was recorded with another device -
but first I need that proper reference audio file that is contained in the original file.

I have extracted this reference file countless times with the programs listed above - but it is not
in sync after a re-multiplexing for test purposes.
Title: Re: Generated VHS video and audio files are not in sync after multiplexing!
Post by: EmRR on March 31, 2018, 10:10:22 AM
My best guess is you have a sample rate conflict between audio and video.  I've had that experience on a Mac system, where it would play fine in the editor but exhibit drift once rendered.  Changing audio from 44K1 to 48 so it matched video was the solution in that case.

Could be entirely wrong! 

VHS....we're not talking about simple tape speed drift are we? 
Title: Re: Generated VHS video and audio files are not in sync after multiplexing!
Post by: Pittylabelle on March 31, 2018, 12:08:20 PM
My best guess is you have a sample rate conflict between audio and video.  I've had that experience on a Mac system, where it would play fine in the editor but exhibit drift once rendered.  Changing audio from 44K1 to 48 so it matched video was the solution in that case.

Could be entirely wrong! 

VHS....we're not talking about simple tape speed drift are we?

No, there is no sample rate conflict between audio and video. As I said, it's the original AC3 Audio in 48 kHz of the original MPEG file. The original MPEG file is in sync.

But when I demux the original MPEG file and multipex the two demuxed files, the new file is not in sync.
Title: Re: Generated VHS video and audio files are not in sync after multiplexing!
Post by: beatkilla on March 31, 2018, 06:24:40 PM
I've done something similar to what you are doing by using MPEGstreamclip   from squared5(free)

And also Sony Vegas Pro.

You should be able to do it with just MPEGstreamclip though.
Title: Re: Generated VHS video and audio files are not in sync after multiplexing!
Post by: Pittylabelle on March 31, 2018, 08:24:29 PM
I've done something similar to what you are doing by using MPEGstreamclip   from squared5(free)

And also Sony Vegas Pro.

You should be able to do it with just MPEGstreamclip though.

Thanks for the tip-off. I'll try that out and report later on the result. ;-)