VideoHelp Forum




+ Reply to Thread
Results 1 to 24 of 24
  1. Hi. I'm using MKVEGUI to extract files from some MKV files I downloaded, and it seems to work fine. But when I compare the video and audio tracks, I find that the video is about 4 minutes shorter than the audio, even though both seem to be intact. Can anyone help me with this?
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    MKV supports VFR (Variable Frame Rate), if you have such a file and you assume that the video is CFR then the length won't match the audio.
    Quote Quote  
  3. Originally Posted by celtic_druid
    MKV supports VFR (Variable Frame Rate), if you have such a file and you assume that the video is CFR then the length won't match the audio.
    Thanks. It seems, however, that the MKVEGUI is doing that on its own, because I haven't configured it. Do you know how I should configure it so that the resulting AVI file from the extraction will match the audio length?
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    The avi container doesn't support VFR so it has no choice and neither do you. The extracted avi simply won't match the audio.
    Quote Quote  
  5. Originally Posted by celtic_druid
    The avi container doesn't support VFR so it has no choice and neither do you. The extracted avi simply won't match the audio.
    Ok. Thanks a lot, Celtic Druid. I just don't understand why people would choose the MKV format if it presents this problem. But I just saved me a lot of trouble trying to solve the problem.
    Quote Quote  
  6. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    What do you mean? You don't know why they used mkv? If you have a VFR source then surely it makes sense to use mkv so you can keep it VFR? mkv is no the problem. The problem is that you have a VFR source, when you don't want one.

    Also I never said that it wasn't possible to have an avi that was in sync, just that the extracted video would never match. It is possible to convert to an avi, you have to re-encode the video though, changing the framerate.
    Quote Quote  
  7. Originally Posted by celtic_druid
    What do you mean? You don't know why they used mkv? If you have a VFR source then surely it makes sense to use mkv so you can keep it VFR? mkv is no the problem. The problem is that you have a VFR source, when you don't want one.

    Also I never said that it wasn't possible to have an avi that was in sync, just that the extracted video would never match. It is possible to convert to an avi, you have to re-encode the video though, changing the framerate.
    Ok. But don't know how to recode the avi to syc it with the audio files. I'm not really very well into these things yet.
    Quote Quote  
  8. My problem is that I don't know how to recode the avi so that it will match the audio. My audio files have 23'42" and the subtitle file matches them. However, the avi file, when extracted from the mkv, has only 18'42".
    Quote Quote  
  9. Member pchan's Avatar
    Join Date
    Mar 2003
    Location
    Singapore
    Search Comp PM
    @ikarishinji,
    You can use Virtualdubmod to demux the video and audio to wav. Then use Virtualdubmod to mux the video and wav file.

    Edit - when you demux the video - use direct stream and demux audio use full processing. if there is a window pop up when you first load your video file and asking you to fix the audio, just close it and don't fix it.
    Quote Quote  
  10. Thanks for the tip, pchan. Sorry for the ignorance, however, but how do I do that? I know how to demux files in Virtualdubmod, but not how to do the other way around.
    Quote Quote  
  11. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    That won't change the fact that the video and audio won't be the same length though.

    You could open the mkv using AVISynth with directshowsource(). If you check the AVISynth docs on directshowsource it even mentions VFR mkv's. Other option is to use the time codes from the mkv and set it all up manually.
    Quote Quote  
  12. Member pchan's Avatar
    Join Date
    Mar 2003
    Location
    Singapore
    Search Comp PM
    @celtic_druid,
    I was having audio sync problem several days ago converting from Divx to MPEG2 using TMPEGEnc. Convert the audio to wav format and it encoded OK.

    @ikarishinji41,
    Assuming you already demux the video and audio, you will have a demuxed video file without audio and an audio file in wav format. Open the demuxed video file from Virtualdubmod and click Streams and select Stream List and add the wav file. Go to Video and select Direct Stream Copy. Finally, go to file and select Save As.... ... you have Divx with wav audio.
    Quote Quote  
  13. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    DivX is based on avi, as such it doesn't support VFR video. Your problem would have been VBR mp3 audio, which TMPGEnc has never handled well.
    Quote Quote  
  14. I just finished encoding the video and audio with Virtualdubmod using DivX compression and an option to match the video and audio length. I got an avi file with audio, and it's now the same length of the audio (25:43) but they still don't match. the video still runs much faster than the audio. Then, I tried pchan's suggestion and muxed them using direct stream copy. Same result.
    Quote Quote  
  15. Member pchan's Avatar
    Join Date
    Mar 2003
    Location
    Singapore
    Search Comp PM
    @ikarishinji41,
    Did you demux the audio to wav format using full processing ?
    Quote Quote  
  16. Tried to, but as it would generate too large a file, I gave up.
    Quote Quote  
  17. Member pchan's Avatar
    Join Date
    Mar 2003
    Location
    Singapore
    Search Comp PM
    Yes, wav file is large. Usually, it's around 200~300M bytes for a 1.5hr video clip. I muxed it back to Divx and encoded to MPEG2 with TMPEGEnc.
    Quote Quote  
  18. No, I mean, when I use full processing for the video it gets to more than 18GB. But even when I got the video and audio to be the same length (23:42) they're still out-of-sync. As I don't know how to use scripts, I'm also unable to try Avisync.
    Quote Quote  
  19. Member pchan's Avatar
    Join Date
    Mar 2003
    Location
    Singapore
    Search Comp PM
    @ikarishinji41,
    I not sure you have already tried what I have suggested. Demuxed the video using direct stream and audio to wav using full processing. Finally, mux video and audio. Then, you do the encoding.

    I did that for clips that are out of sync.
    Quote Quote  
  20. I don't know how to mux them together. I have never done that. As for extracting them, I have to do it with MKVEGUI because VirtualDubMod won't even open the MKV files I have.
    Quote Quote  
  21. I tried adding the audio stream which I converted from aac (that VirtualDubMod doesn't reckognize) to wave to the Stream List. Them I saved the file using Direct Stream Copy. Audio and video are still out-of-sync by almost a minute.
    Quote Quote  
  22. Member
    Join Date
    Jun 2005
    Location
    Penang, Malaysia
    Search Comp PM
    Originally Posted by celtic_druid
    What do you mean? You don't know why they used mkv? If you have a VFR source then surely it makes sense to use mkv so you can keep it VFR? mkv is no the problem. The problem is that you have a VFR source, when you don't want one.

    Also I never said that it wasn't possible to have an avi that was in sync, just that the extracted video would never match. It is possible to convert to an avi, you have to re-encode the video though, changing the framerate.
    I'm having this problem with MKV file too.. Could you please elaborate this further..? Reencode the AVI file again after I extract it out from the MKV file and how do I change the framerate?
    Quote Quote  
  23. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Well you would need to look at the time codes then create an AVISynth script splitting it up based on the time codes and creating a CFR of ~120fps. So the 23.976fps sections get 5 duplicate frames, the 29.97fps sections 4, etc. Easier I would think would be AVISynth with directshow source and convert fps. There is even an example refering to VFR source files in the AVISynth docs.
    Quote Quote  
  24. Can anyone tell me how I can recode an avi file so that it'll get from 20min13s to 24min13s duration? That's the ratio difference between my video and audio files.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!