First I hope I'm in the right thread, I wasn't sure if it was more of a video conversion or audio discussion.
So I'm experimenting with some tv show video files trying to merge two types together. I have:
a) MKV file containing H.264 video at 23.976fps (L3.1) with AAC 2.0 audio. This is a so-called WEB-DL, coming from Amazon.
b) MKV file containing x264 video at 23.976fps (L4.1) with AC3 5.1 audio. This is a HDTV capture.
What I'm trying to accomplish is use the 5.1 AC3 audio from the HDTV release with the WEB-DL H.264 video since the quality is way better on this one. Unfortunately, for this particular show, only AAC 2.0 audio is available on Amazon.
Of course, the audio is not in sync between the two since the HDTV is cut approximately to remove the ads and everything and the WEB-DL is a stream directly from the studio. So I take it to sync the audio manually.
The process I'm taking is as follow:
1. Extract both the AAC and AC3 audio files from their respective MKV files using MKVEXTRACT.
2. Import both files inside Audacity using the FFMPEG plugin.
3. Adjust the 6 tracks (by cutting/adding silence) coming from the AC3 file to sync it with the AAC file.
4. Export those 6 tracks to wave.
5. Import those 6 wave files in Vegas to "mux" them back to AC3.
6. Mux the new AC3 file with the H.264 stream from the WEB-DL using MKVMERGE.
So, on with my problem. I have 4 episodes of this show. I was able to do the first one without any hiccups. But for some reason, I can't do it for the other 3. The audio doesn't seem to be at the same framerate or something. For instance, if I adjust the silence on the AC3 track to match the exact time where the AAC file start, after only 4-5 seconds the two tracks begin to desync gradually, getting worst and worst as time goes by. It seems to be the AAC file that is slower than the AC3. What I don't understand though is that both video files are at the same framerate.
Does it have something to do with the video encoding? Or maybe the way the stream is extracted from the MKV?
What else could be causing this?
I attached both files' mediainfo output.
Thanks!
PS: I'm not really looking for workarounds here, I mostly want to learn from this.
+ Reply to Thread
Results 1 to 10 of 10
-
-
The most obvious problem is that the files are different lengths - one is 15 seconds longer than the other.
You'll going to have to look carefully at the video to figure out how to account for it.
If they're the exact same content but one is 15 seconds longer, you can use an audio editor to stretch
the audio to make it fit. -
davexnet, thanks for your reply but did you read my whole post? From your answer it doesn't appear so.
I'm already editing the audio, only one is slower than the other for some reason. The dialog is "exactly" the same, nothing more, nothing less, just slower. You wouldn't be able to hear the difference only by listening to it but when the audio tracks are side by side, it's clear.
I'd really like to know what could cause this when both video run at the same framerate.
Thanks! -
Yes I'm aware that I can't adjust the framerate in audio, I was simply pointing out that it looked like I was trying to put an audio track from a (for example) 25fps movie onto a 23fps video but they really are coming form same framerate movies.
I've attached a screenshot of Audacity with the two tracks one on top of the other. The first part is zoomed in to a couple of seconds to show that is starts in sync and the other shows the first 20 seconds. As you can see even though you can see from the peaks that it's the "same" audio, it starts to desync pretty fast.
The closest I've reached of synching them was using the "Change Speed..." option of Audacity but even then it doesn't seem consistent across the whole file so eventually desync again.
I understand this is close to impossible to figure out but if anybody has any clue of something that might be causing this it would be greatly appreciated.
Thanks! -
ekred, can you post the original audio to the two files so we can take a look? Put them in a 7z or zip file and upload them to
mediafire.com . Put the URL in here.
One file is 15 seconds longer than the other, it seems this is the reason they are not in synch.
Even though the video's are the same frame rate, there may be a factor in their creation (that we're not aware of)
that caused it. -
davexnet, thanks for taking the time to look at this! Here's the Mediafire link.
thegreeman, yeah I have the same suspicion. I'm not sure I understand what header stripping does exactly.
I used MKVExtractGUI to extract the audio from the MKV. It doesn't have any options but I know MKVEXTRACT does. Maybe I should try some more specific switches? -
I am not sure exactly what header stripping is. I have not seen a definitive answer to it on this forum either. Personally, i have found that header stripping, when evident in a file, is more often than not reference to 'header compression'. I always run my mkv's through mkvmerge and have set the compression to none as a default, whether header stripping is mentioned in mediainfo or not; purely to be on the safe side.
Maybe try and do the same before you use mkvextract for the audio and then test your files accordingly? -
I modified the ac3 so that it seems pretty close to the synching of the aac.
I did it a slightly different way, I exported it directly from Audacity as six-channel ac3.
Let me know how close the synch is when you put it back in the video.
http://www.mediafire.com/download.php?px308z3cd3jvdd9
Similar Threads
-
H264+AC3 (MKV container) to H264+MP3 (MKV container)
By diebri in forum Video ConversionReplies: 3Last Post: 19th Oct 2011, 06:19 -
mux h264/aac flv into h264/aac mkv
By Pitorasilo in forum Newbie / General discussionsReplies: 4Last Post: 18th Jul 2011, 09:36 -
Cutting out a bit from an H264 video in an MKV container?
By PsyCLown in forum EditingReplies: 2Last Post: 4th Jan 2009, 10:04 -
H264/AC3 (MKV) to H264/AAC (MP4) ?
By jccca in forum Video ConversionReplies: 10Last Post: 13th Dec 2008, 19:06 -
Extracting H264 Video from MKV Container...
By Dreakon in forum Newbie / General discussionsReplies: 2Last Post: 22nd May 2007, 00:05