Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
23rd August 2010, 18:10 | #1 | Link |
Registered User
Join Date: Aug 2010
Posts: 82
|
MKV to MP4 Without quality Loss (Audio/Video Sync Issues)
I am trying to remux a ~23 min. video (MKV container/AVC) to an easier to edit container, in order to cut a 3-5 minute clip from it and upload it to the internet.
So far I have tried: - Opening the MKV in Avidemux and trying to save the 3 minute selection. - Opening the mkv in Virtualdubmod w/ avisynth and trying to save the selection as an Xvid AVI. - Extracting the contained files with MKVextractGUI and remuxing them to: - an mp4 file with my mp4box gui. - an mkv with just the single audio and subtitle files I wanted to be in the clip. In every case the resulting video file experienced the same problem: severe audio/video sync problems. When I tried just opening the MKV file (in avidemux or vdm) to edit it directly, the audio was to late. When i tried remuxing it to an mp4, the audio was too far ahead of the video. Whatever I try there is always the same problem with the audio/video being out of sync. I have tried other video forums, but the posters just go around in circles. The closest I've come to solving this issue is by remuxing the mkv to an mp4 in my mp4box gui. Although the audio and subtitles are completely synced, the video and audio are not. This problem keeps recurring with all mkv/H264 files I attempt to convert or remux. I don't know whether the issue is with the laughable mkv support that is currently available or if my computer is just being hacked by some loser trying to screw up the conversion every single time, but MKV/H264 files are the only videos i've had trouble successfully converting and uploading to a streaming site. So if anyone coudl give any advice that would actually solve this repeated problem, thanks in advance. |
23rd August 2010, 19:02 | #3 | Link |
Registered User
Join Date: Aug 2010
Posts: 82
|
I tried checking the "enable splitting" box in the global tab in mkvmerge. I used the split by time code option, specified the exact durations, and it split the video into 3 files, the 2nd of which was the closest to the clip I wanted, but still the audio was out of sync. The cuts weren't even close enough to the durations I typed. Instead of the selection i wanted being contained entirely in the second video, the first half of the clip was at the end of the 2nd video and the remaining portion was at the beginning of the 3rd video. This, though, is clearly not what I was aiming to do.
|
23rd August 2010, 19:48 | #4 | Link |
Registered User
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
|
make a .bat file like this:
Code:
mkvmerge -o my_video-part.mkv my_video.mkv --split 00:01:30 --split 00:03:45 --split-max-files 3 also edit the beginning of the cut (00:01:30) and the end of the cut (00:03:45) in this format: HH:MM:SS (hours:minutes:seconds). Your cut will be named my_video-part-002.mkv. N.B. mkvmerge will cut the video at the first IDR frame AFTER the desired time! _
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note... Visit The Land Of Dracula (Romania - EU)! Last edited by b66pak; 23rd August 2010 at 19:57. |
23rd August 2010, 19:58 | #6 | Link |
Registered User
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
|
excuse the speed...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note... Visit The Land Of Dracula (Romania - EU)! |
23rd August 2010, 20:15 | #7 | Link | |
Registered User
Join Date: Aug 2010
Posts: 82
|
Quote:
The video is 23 minutes long. I want to cut a selection from 00:03:53 to 00:06:23. I assume the 2nd of the 3 mkv files should contain the footage from 00:03:53 to 00:06:23. Yet when I watch the 2nd mkv file in MPC the audio is still out of sync and the footage at the beginning of the file is ahead of where I indicated (00:03:53). What might the problem be? |
|
23rd August 2010, 20:26 | #8 | Link | ||
Registered User
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
|
Quote:
Quote:
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note... Visit The Land Of Dracula (Romania - EU)! |
||
23rd August 2010, 23:11 | #9 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
About the cuts not being exactly where specified: please note that mkvmerge cuts at the nearest keyframes - otherwise the video would be broken at the cuts. You cannot cut at non-keyframes without reencoding.
About the audio/video desync: you're saying that a.) your mkv files are perfectly in sync, but b.) after cutting with mkvmerge they are not? That would be the first time for me to ever hear about such a problem. If you try b66pak's suggestion (using the global tab in the GUI should have the same result as using the commandline) on your original, still-in-sync files (not the demuxed or remuxed streams), I'm pretty sure the resulting files will be fine. Why demuxing and remuxing destroys the sync between video and audio but not between audio and subtitles: you're probably dealing with variable framerate content (often anime) and did not take care of the timecodes thus destroying the sync. |
9th September 2010, 19:48 | #11 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
If you have respected the following things, it should've worked:
1.) your original file is definitely in perfect sync over the whole time line 2.) you opened that original file in mmg 3.) you only used mmg for cutting using the "global" tab 4.) you did not set any "fps" in mmg (otherwise the timecodes from the original file will be overwritten) (<- maybe this?) 5.) you're using the same player for both the original and the cutted file if you have respected all of the above and the file is still out of sync it could have one of the following reasons: a.) your original file is broken b.) you've found an error in mkvmerge c.) your player is broken in some way or too slow (<- probably not this) |
9th September 2010, 20:03 | #12 | Link |
Registered User
Join Date: Aug 2008
Location: The Land Of Dracula (Romania - EU)
Posts: 934
|
also use the last mkvtoolnix (4.3.0)...
_
__________________
if you ask a question and somebody give you the correct answer don't forget to leave a "thank you" note... Visit The Land Of Dracula (Romania - EU)! |
|
|