VideoHelp Forum




+ Reply to Thread
Results 1 to 27 of 27
  1. Member
    Join Date
    Sep 2008
    Location
    Planet Snack!
    Search Comp PM
    I am trying to get an MKV file I converted in sync with its audio, and so that it is playable on my standalone Divx Player.

    What I did was that I used MKVExtract GUI to extract the video and audio from the MKV. I then used mpegmodifier to unpack the bitstream of the video file (MediaInfo says its a packed xvid) and Spesoft Audio Convertor to convert the OGG audio file to MP3. After that, I used VirtualDubMod to combine the audio with the video but the final AVI has the audio out of sync. It is not obvious in the beginning, but seem to progressivly increase until by the seventh minute, you notice it.

    In the end, I want to be able to get the audio in sync but I don' t know how. Any suggestion would be aprreciated.
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    that will be vfr.

    the easiest way is to install avisynth.

    open notepad
    write
    directshowsource("moviename.mkv", fps=23.976, convertfps=true)
    set the predominant framerate at fps. probably 23.976
    save file as 'movie'avs' under the same directory as the mkv.
    treat 'movie.avs' as your video now.

    import into vdub,
    set encoder to xvid.
    set audio encoder to lame mp3.
    encode.


    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  3. Member
    Join Date
    Sep 2008
    Location
    Planet Snack!
    Search Comp PM
    45tripp or anybody who knows...

    When I am using VirtualDubMod to encode to XVID, does anyone know what settings I should use? I want to keep the same quality of the video but I see that when I press configure, there are a bunch of different options. I want this video to be compatible with my standalone divx player, but I don't know what setting to choose. Should I also disable the packed bitstream option?

    ...adalect
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    encode with a targer quantizer,
    set it to 2 or 3.

    defaults should be ok.

    Should I also disable the packed bitstream option?
    only you and your player know...

    you could always drop b frames.


    tripp
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  5. Member
    Join Date
    Sep 2008
    Location
    Planet Snack!
    Search Comp PM
    Uh... another problem...

    I had earlier reencoded the OGG audio in VDM and saved it as a MP3 when I was trying to solve this problem solo and decided just to add that audio instead of reencoding the original in VDM. In another guide for making XVID encodes compatible with standalones, it said to select a bitrate so I did that instead.

    The end result was that the audio was still out of sync.

    So does anybody think I should go with the original instructions above this post or there is something else I have to do...

    Thanks in advance.
    Quote Quote  
  6. Did you encode the video with the script? You should follow 45tripp's instructions

    use mediainfo to determine what the fps should be, use that for the script (e.g. it might have been a PAL source, then it would be 25, not 23.976)
    Quote Quote  
  7. Banned
    Join Date
    Jun 2007
    Location
    UNREACHABLE
    Search Comp PM
    Vorbis audio ??? I'm afraid you'll have to extract it into a standalone OGG file,
    open this latter in Winamp, convert it to a stereo WAV with the "Disk Writer Plugin",
    and finally use LAME for getting a perfectly-synced audio track. I really hope you
    don't need to go through this whole insane job
    Quote Quote  
  8. Member
    Join Date
    Sep 2008
    Location
    Planet Snack!
    Search Comp PM
    I had some free time today so I decided to give the instructions a shot.

    So I open up the script but VDM ends up giving me a error saying "No video stream found."

    I then open the original .mkv and it gives me a warning saying:
    - MKV: Subtitle stream(4) contains overlapping subtitles. SOme of them may nob e kept when editing.
    - MKV: The video may have a variable framerate. If so we strongly advise you to use another tool to safely process your file

    What do I do now?
    Quote Quote  
  9. Member
    Join Date
    Sep 2008
    Location
    Planet Snack!
    Search Comp PM
    PS - I am quite sure that the script was typed properly
    Quote Quote  
  10. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    you download mkvtoolnix,
    import the mkv into mkvmerge,
    select and tick only video and audio,
    remux.
    try process again with the new mkv.

    if it fails, check codecs
    "I'll give you five dollars if you let me throw a rock at you"
    Quote Quote  
  11. Member
    Join Date
    Sep 2008
    Location
    Planet Snack!
    Search Comp PM
    ...uh...

    How do you import the video?

    And 45tripp, thanks for your generous help so far.
    Quote Quote  
  12. Member
    Join Date
    Sep 2008
    Location
    Planet Snack!
    Search Comp PM
    Never mind. I was using an outdated version.
    Quote Quote  
  13. Member
    Join Date
    Sep 2008
    Location
    Planet Snack!
    Search Comp PM
    An edited post. I had another problem but fixed it. Ignore this post.
    Quote Quote  
  14. Member
    Join Date
    Sep 2008
    Location
    Planet Snack!
    Search Comp PM
    Well... the converted video now works. So I say thanks to everybody who has contributed to this post and those who helped me.

    ...I now just wonder why the original mkv doesn't work with the script in VDM... I guess that doesn't matter though...
    Quote Quote  
  15. Member
    Join Date
    Aug 2010
    Location
    Adelaide - Australia
    Search Comp PM
    download PAZERA FLV TO AVI converter. its a freeware ad converts your mkv files to avi without any problem and its very fast as well. it wot let you select the mkv files using the file open method, you have to select the mkv files in your folder and drag into the pazera screen.

    all you have to do is to know what settings you want to convert to as some dvd players with divx capability wont always read all avi files.

    you can also download DP Media Info 1.05 to find out your current avi spec and adjust pazera to use the same settings.

    although today i had problems converting mkv to avi with this program it caused audio/video out of sync issues but it wont be the issue with the program, must be my system because it was workig fine yesterday.

    you dont need to use all those complex programs and multiple programs to do one job. Pazera will do it all at one-go!
    Quote Quote  
  16. Use Avidemux it'll import flv mkv avi ..... unpack the bitstream if that's what you want and convert in sync with correct framerate, output formats are AVI, MPEG-PS/TS, MPEG VIDEO, MP4, FLV,MKV.
    Last edited by dylz; 13th Feb 2011 at 04:02.
    Quote Quote  
  17. Originally Posted by dylz View Post
    Use Avidemux it'll import flv mkv avi ..... unpack the bitstream if that's what you want and convert in sync with correct framerate, output formats are AVI, MPEG-PS/TS, MPEG VIDEO, MP4, FLV,MKV.
    What would be the "correct framerate"? I have this problem on several files that were batch-transcoded from different formats to mkv to consolidate container... then I later found out that sync got progressively lost on all those files between audio and video. Start is in sync but as it progresses to playback audio gets more and more out of sync to the point that the video becomes unwatchable.

    How can this thing be fixed (and better yet avoided) when doing transcoding? I am on mac and I would buy an application that would prevent having to deal with such issues as archiving my videos it's becoming more of an hassle than it needs to be. I could also use an app in Win/Lin via virtualbox, so far I've tried many free demos and didn't deliver... not to mention that there seem to be many applications I've tried that are likely the same codebase, just rebranded to increase market reach (although that's a waste of users' time since trying times over to fix a problem with the same non-delivering application will have the same outcome because the underlying program is nearly identical... some even have the same UI like iSkysoft and Aimersoft).

    Any and all suggestions welcome! Thanks in advance.
    Quote Quote  
  18. Member Heliooos's Avatar
    Join Date
    Nov 2008
    Location
    Czech Republic
    Search Comp PM
    Hi guys,
    I have the same problem. I have MKV movie and trying it to convert to MPEG-4 ASP (XVID) to be able to play it on standalone DVD player.

    First I tried Avidemux 2.5.6, which I often use, but there is the audio sync problem. I checked the file with MediaInfo and found that the MKV has the mentioned framerate 23,976 and Avidemux correctly set this. However, after converting to AVI with MP3 audio, there is the sync problem.

    Also tried MeGUI, which failed too and Handbrake, which was the only SW to be able to save SD version with correct sound, but not that needed AVI but m4v.

    Should I resample fps to 25.00 or somehow convert the audio?

    thanks
    Quote Quote  
  19. Maybe Handbrake's variable frame rate option helped. I've been battling converting a bunch of MKVs and having the same audio sync problems with most of them. It turned out in my case (I'm fairly sure) the MKVs are 25fps but there's several frames which have twice the usual duration (or frames are missing), but when re-encoding the video, the encoded version has frames which are all evenly spaced at 40ms apart (25fps), which puts the audio out of sync.

    I don't know if that's your problem but I eventually worked out how to correctly convert the framerate using DirectShow (even though the input and output were both 25fps). If you open the video using MeGUI and DirectShowSource, after you've saved MeGUI's script you can open it with notepad and modify it to look something like this (23.976fps in your case):

    DirectShowSource("E:\video.mkv", fps=23.976, convertfps=true)

    The parts in blue are what you'll need to add.

    More likely you'll have opened and indexed the video with MeGUI using ffmsindex, and a kind forum user pointed me in the right direction there yesterday. The script will need to have the blue bits added to look something like this:

    FFVideoSource("E:\video.mkv", fpsnum=23.976, fpsden=1)

    If it's using FFmpegSource2 instead of FFVideoSource, which I think it may if ffms2 is handling the audio then it'll be something like:

    FFmpegSource2("E:\video.mkv", atrack=-1, fpsnum=23.976, fpsden=1)

    Hopefully that'll help you, or you can try the ffms2 user guide here:
    http://ffmpegsource.googlecode.com/svn/trunk/doc/ffms2-avisynth.html
    I only started on it yesterday so I'm probably not far in front of you when it comes to understanding it...

    Or, if you're converting from MKV to MKV you can probably extract the video timecodes from the original MKV using MKVCleaver and add them to the encoded version (MKV) so you don't need to worry about the above, but it looks as though, like me, you're converting to AVI so that wouldn't help.
    Quote Quote  
  20. I hate it when I miss the obvious..... continuously..... re my previous post....

    Heliooos,
    If you open a video by first opening MeGUI's AVS Script creator rather than from the File/Open menu, and you choose a video as the "Video Input", MeGUI won't default to opening the video using the file indexer, it'll first ask you how you want to open it (One Click, File Indexer, or DirectShow). If you select DirectShow, after MeGUI opens the preview window, you can switch to the AVS Script Creator's "Filters" tab, and there's a method there for selecting the desired frame rate.

    In your case it'll probably default to 23.976, and if you look at the "Script" tab, you'll see MeGUI has already added the frame rate conversion stuff for you. Just remember if something like ffdshow is doing the DirectShow encoding, make sure all it's filters are disabled... unless of course you know you want to use them.

    Indexing the MKV and converting the frame rate is possibly the better option as indexing tends to be more reliable than DirectShow, but you'll have to add the frame rate stuff manually. I'm not sure why MeGUI doesn't have the same frame rate option regardless of the method used to open the video, but generally DirectShow is fine anyway. In fact I kind of wonder why frame rate conversion isn't automatically added to the script by default. If the original video is "x" fps and the output is "x" fps, including frame rate conversion should have no effect, but for those times you're converting video which has a variance in the frame rate for some reason......
    I might ask the MeGUI developers about that one.
    Quote Quote  
  21. Member Heliooos's Avatar
    Join Date
    Nov 2008
    Location
    Czech Republic
    Search Comp PM
    hi, guys,
    after a lot of experiments with those scripts (I was also planning to try SUPER), a friend recommended to try Freemake Video Converter and it really works!

    I only had to specify the output options - resolution, codec, output FPS, container and conversion profile and to save this as custom profile. After that I only added the MKV video, clicked on Conversion/To AVI and let the computer work. After some time I had AVI file with correct audio track, no need to play with demuxing etc.

    Tried the AVI file on my TV with usb media support and no problem. So for me it is solved. I also found Freemake very easy and friendly for DVD ripping - can use the same conversion profile for AVI as I prepared for the HD to SD conversion.

    Hope this information will be also helpful for other people.
    Quote Quote  
  22. Thanks will try freemake on my next conversion thanks for reporting your experience with it, much appreciated!

    Cheers!
    Quote Quote  
  23. Member
    Join Date
    Jun 2010
    Location
    New Zealand
    Search Comp PM
    Yes its really is a jungle out there

    All I want is an easy to use program that converts most formats to avi with no sound sych problems (or losing the sound all together)

    Why is it so complicated?
    Quote Quote  
  24. Member
    Join Date
    Jun 2010
    Location
    New Zealand
    Search Comp PM
    Originally Posted by dylz View Post
    Use Avidemux it'll import flv mkv avi ..... unpack the bitstream if that's what you want and convert in sync with correct framerate, output formats are AVI, MPEG-PS/TS, MPEG VIDEO, MP4, FLV,MKV.
    You have obviously been lucky so far.

    Avidemux does lose sound sych and sometimes loses the sound all together.
    Quote Quote  
  25. AnyVideoConverter is easy to use and very good at maintaining audio sync. Just go into it's options and wind the audio sync setting up to maximum, then under the audio section (where you set up the actual encode) change the audio sync method from 'basic" to default".
    Quote Quote  
  26. Member
    Join Date
    Jun 2010
    Location
    New Zealand
    Search Comp PM
    Originally Posted by hello_hello View Post
    AnyVideoConverter is easy to use and very good at maintaining audio sync. Just go into it's options and wind the audio sync setting up to maximum, then under the audio section (where you set up the actual encode) change the audio sync method from 'basic" to default".
    Thanks for that, I was just about ready to give up on Anyvideoconverter, as I have been losing the sound half way through so many videos lately, especially when I chose a higher bit rate.

    But I will try your suggestions.
    Quote Quote  
  27. No problem. I'm not sure why you should lose the sound completely, but please let us know if it solves the audio sync issue.
    Quote Quote  



Similar Threads

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