Synchronize gnlcompositions without gnltimeline

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Synchronize gnlcompositions without gnltimeline

Ralph
I'm using gnonlin for playback of video files. In my pipeline I have two gnlcomposition objects: one for video and the other for audio.  When I played standard resolution XVID files the synchronization between audio and video was satisfactory, but now when I started playing high resolution H264 files the video lags behind the audio noticably.  How can I synchronize audio and video without using gnltimeline object?  My application is WPF C# and I'm using C# Bindings and OSSBuild (GStreamer WinBuilds v0.10.7, Beta 04), unfortunately those libraries are very old and gnonlin doesn't contain gnltimeline.
Reply | Threaded
Open this post in threaded view
|

Re: Synchronize gnlcompositions without gnltimeline

Jason Gerard DeRose-2


On Thu, Sep 6, 2012 at 11:24 AM, Ralph <[hidden email]> wrote:
I'm using gnonlin for playback of video files. In my pipeline I have two
gnlcomposition objects: one for video and the other for audio.  When I
played standard resolution XVID files the synchronization between audio and
video was satisfactory, but now when I started playing high resolution H264
files the video lags behind the audio noticably.  How can I synchronize
audio and video without using gnltimeline object?  My application is WPF C#
and I'm using C# Bindings and OSSBuild (GStreamer WinBuilds v0.10.7, Beta
04), unfortunately those libraries are very old and gnonlin doesn't contain
gnltimeline.

AFAIK, gnltimeline is an element that hasn't existed in gnonlin for quite some time (googling suggests it hasn't been present since GStreamer 0.8). So you're already using the correct, modern element with gnlcomposition.

In my experience, the sync is okay doing playback with gnonlin, but depending on how far you are from a keyframe, the playback will hang as you switch from one segment of video to the next, and sometimes it will never catch up with the audio.

To fix this, gnonlin would need to preroll the next video segment while playing the current one, which should give smooth, uninterrupted playback on multi-core systems fairly easily.

Based on how gnonlin works, it shouldn't really be able to introduce sync problems itself, unless you build your compositions incorrectly. But there could be sync issues with the particular codecs and containers you're working with.

If you can, try the same test on a faster computer, see if that improves things.
 


--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Synchronize-gnlcompositions-without-gnltimeline-tp4656185.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Synchronize gnlcompositions without gnltimeline

Ralph
Back to HD video.
My machine is very fast, my software supports only 6 channels, but I am pretty sure it can play much more HD videos simultaneously (I remember I could play 25 standard resolution videos at a time).  When I play the H.264 video in VLC the synchronisation is pretty good (the lag unnoticeable for most of people), but when playing the same file with GStreamer (one audio and one video gnlcomposition in the pipeline) the video lags about 6-7 frames behind the audio.  I thought the audio and video sink should be synchronised, but they definitely aren't.