[vlc-devel] dynamically syncing live video and audio
Feurstein, Michael
Michael.Feurstein at wu.ac.at
Mon Jul 4 09:20:39 CEST 2011
Hi,
I'm using VLC and ffmpeg to stream separate video and audio streams (VLC), merge them (ffmpeg), sync them (VLC or ffmpeg?) and prepare them for HTTP Live Streaming delivery with HTML5 by using Apple's mediastreamsegmenter. Streaming works, merging works. Only thing I can't get a hold of is syncing video and audio.
At the moment I'm measuring the time it takes ffmpeg to open the video stream in order to determine the correct value to use with VLC for -audio-desync. This works but seems unreliable based on the underlying running system.
Is there a way to read out the first presentation time stamps (pts) for video and audio in order to resync them? I've been trying to analyze the verbose (-vvv) output for VLC but couldn't pin point the exact start of the video. My idea would be to try to calculate the out of syncness based on the pts or the actual start of each stream.
If I need to change something in the source could someone tell me where the pts is read/calculated so I could just output it? If you guys have any other ideas on how I could accomplish this I'd be happy to hear about them.
This is part of my master thesis, and I'm kinda stuck with the live syncing here - so any input is very much appreciated.
Thanks
-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110704/d67540ea/attachment.html>
More information about the vlc-devel
mailing list