WMV audio sync issues with the frame rate. While most video would normally be 29.97, WMVs either run at a variable frame rate (VFR) or run at 29.00. It's very annoying.
So, there's a few things to try. The first being that if you can avoid using WMV as an intermediate file format, avoid it.
Otherwise....
Try this: http://www.videohelp.com/tools/AsfBin
If that doesn't help, try importing the WMV into windows movie maker, and export as a DV-AVI.
Get yourself a copy of FFmpeg. See the bottom of this post on how to do that.
Whether the video lags behind the audio or vice-versa, it doesn't really matter. The basic command is as follows. We will pass the input twice, as can be seen by two -i
options, then delay one input, and merge them back together.
ffmpeg -i in.flv -itsoffset offset -i in.flv -map 1:0 -map 0:1 -c copy out.flv
Here, offset
is the delay in seconds, e.g. 1.5
or 0.35
. This value has to be positive, so if your audio is lagging behind the video, we will have to offset the video. This is shown in the above example. Similarly, if the video is lagging behind the audio, we will have to offset the audio.
So, how do you choose whether to delay audio or video? Well, since we've delayed the whole in.flv
, we'll just pick the audio or video streams and merge them with the original audio or video streams. This is done in the -map
options.
Basically, map
has two numbers. The one before the colon specifies the input file number (starting at 0), and the second number specifies the input file stream (also starting at 0).
So, to delay the audio, use the following two options:
-map 1:0
means: Take the first stream from the second input file, (video from the original file)
-map 0:1
means: Take the second stream from the first input file (audio from the delayed file)
Turn it around if you have to delay your video:
-map 0:0
means: Take the first stream from the first input file (video from the delayed file)
-map 1:1
means: Take the second stream from the second input file (audio from the original file)
Finally -c copy
will simply tell FFmpeg to copy the video and audio bitstreams. This means that there will be no encoding process. This makes the command ultra-fast and you won't even lose any quality in the process. If, however, you run into synchronization errors, then you should leave out -c copy
and let FFmpeg re-encode the input.
You can get the latest stable FFmpeg version through Homebrew.
Open a Terminal and enter:
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
See the installation requirements as well. You have to install the Commandline Tools for Xcode if you haven't. You will need an Apple ID for that.
Once Homebrew is installed, install FFmpeg:
brew install ffmpeg
Once that is done, we can use FFmpeg to fix your video.
Best Answer
Avidemux should do it without problems, which one are you using?
Try the latest SVN build MuldeR builds, I've never had a problem of not synced audio with it.
Anyway, as the container is mp4 mp4box may come handy. I suggest you use the latest development build (0.4.6 at the time of writing). If you need a GUI frontend for it, take a look at YAMB or My MP4box GUI.
I you don't mind the container, I suggest Matroska (it's quite flexible, scalable and adds little overhead as a container). Use MKVToolnix if you decide to use that container.