Page 1 of 1
Synchronizing audio and video
Posted: 29 Aug 2012 18:32
by radar
I have an .mp4 video file I created by using camtasia to screen capture a webinar. The problem I have is that the audio and video are not in sync. The audio seems to be, maybe, 60 sec or so ahead of the video. How can I correct this? I've tried entering -55 sec in the Synchronization tab of the Adjustments and Effects tool, but this did not seem to have any affect on the audio stream..
thanks
Re: Synchronizing audio and video
Posted: 29 Aug 2012 19:15
by Arite
If the audio is 60 seconds ahead of the video then you'll want to delay it by 60 seconds (so +60 seconds).
You might need to increase the file caching value to something bigger as well as the default of 300ms doesn't seem to be enough. I tried 20000ms (20 seconds).
To change the file caching value go to:
Tools >> Preferences >> (Select "All" for "show settings) >> Input / Codecs
And find the "File caching" value in the "Advanced" section.
Then instead of using the Adjustment and Effects dialog to change it, use the hotkeys. Hold "K" down to increase ("J" to decrease) the value by something lower than the caching value. Say 10/15 seconds (10s = 10000ms) if you went for 20000ms for caching. Let go and wait for VLC to catch up. Then do that again several times until you reach your desired delay of e.g. 55000ms.
Maybe the caching value doesn't make much difference, however too big a step doesn't seem to work, so vary it using the hotkeys by 10/15 seconds at a time.
However you may instead want to edit the file using something like Avidemux though as 60 seconds is a big delay.
Arite.
Re: Synchronizing audio and video
Posted: 02 Sep 2012 04:12
by radar
thanks for the suggestions. As you suspected, increasing the file caching did not help. Can you please explain what I should do to edit the file using Avidemux?
Thanks
radar
Re: Synchronizing audio and video
Posted: 02 Sep 2012 04:37
by Arite
So slowly increasing the delay by several seconds at a time using the "K" hotkey didn't work?
To do it using
Avidemux you import the video and change the audio from "Copy" to a codec you desire (the codec it's currently in is probably best). Then you can click on "Filters" and enter in a time shift (in ms). For example +60 seconds (so "60000") will play the first 60 seconds with the original out-of-sync sound, and then after that audio will start again/skip back to the beginning, hence being time shifted/delayed by 60 seconds.
Pick your ouput format of choice (again the same as the input is probably best), and go to "File >> Save >> Save Video..." etc. and call it what you want (with the file extension). When finished it should play in VLC OK. As it's might possibly still be a bit out of sync, you can use "K" ans "J" in VLC to adjust the audio delay it by a few seconds/milliseconds when playing it.
Cheers, Arite.
Re: Synchronizing audio and video
Posted: 02 Sep 2012 12:53
by userbg
Look. I was try recording [url=rtsp://31.13.218.243:1935/rtplive/nova_1000kbps.stream]This RTSP[/url] from any computer. The output file is MP4. I noticed that on every one computer VLC play MP4 video stream too much slow. While audio stream is playing normal (original). You can try some recording and will notice that MP4 is corrupt or maybe unplayable, because of VLC reason.
Re: Synchronizing audio and video
Posted: 03 Sep 2012 19:01
by userbg
Look. I was try recording [url=rtsp://31.13.218.243:1935/rtplive/nova_1000kbps.stream]This RTSP[/url] from any computer. The output file is MP4. I noticed that on every one computer VLC play MP4 video stream too much slow. While audio stream is playing normal (original). You can try some recording and will notice that MP4 is corrupt or maybe unplayable, because of VLC reason.
Is there solution for this?
Re: Synchronizing audio and video
Posted: 05 Sep 2012 02:57
by Arite
Look. I was try recording [url=rtsp://31.13.218.243:1935/rtplive/nova_1000kbps.stream]This RTSP[/url] from any computer. The output file is MP4. I noticed that on every one computer VLC play MP4 video stream too much slow. While audio stream is playing normal (original). You can try some recording and will notice that MP4 is corrupt or maybe unplayable, because of VLC reason.
This really belongs in a different topic as it's about a completely different issue (albeit the title being suitable).
However, your issue should be fixed by disabling clock synchronisation. To do this go to:
Tools >> Preferences >> (Select "All" for "Show settings") >> Input / Codecs
Then scroll down to the "Advanced" section and change the "Clock synchronisation" to "Disable". Click "Save" and try the stream again.
It may not be perfect as the audio may get out of sync with the video and it might need to rebuffer a few times - however the regular sync issue should go away.
Cheers, Arite.