Video synchronization

enricom enri_marne87 at msn.com
Mon May 21 01:43:34 PDT 2012


Well... I already tried many times but I failed to receive a precise video
position. In my opinion that code returns the position of the video player,
so if it's receiving frames at constant rate it's good (it works if the file
I'm playing is on my hard disk). 
But in my case I have a rtp source, and it happens that the video player
shows the first frame, then there's a delay (so the first frame freezes) and
after that it goes on displaying the successive frames correctly. But I
found that during that delay the timer of the video player goes on...so for
example if we have timestamp = 0 shown at video player position = 0 , then
there's that delay and timestamp 0.04 is shown at video player position =
0.8 (it's only an example)...and so I'm losing reference between my
timestamp and the video player position...

Anyway by querying the video player position (with a DEFAULT format) and
checking buffers passing the identity just before the player I'm able to
correctly identify  the timestamp that is shown (of course not with an
infinite precision, but enough for audio/video synchronization that is what
I want to achieve).

Thank you for your help!



Tim-Philipp Müller-2 wrote
> 
> On Sat, 2012-05-19 at 12:25 +0100, Tim-Philipp Müller wrote:
> 
>> I presume just querying the current playback position using:
>> 
>>   GstFormatTime format = GST_FORMAT_TIME;
>>   gin64 duration;
>>   if (gst_element_query_position (pipeline, &format, &dur)) {
>>     g_print ("Position: %" GST_TIME_FORMAT "\n", GST_TIME_ARGS (dur));
>>   } else {
>>     g_print ("Could not query position.\n");
>>   }
> 
> Err, make that gint64 pos; and &pos and GST_TIME_ARGS(pos)
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at .freedesktop
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 


--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Video-synchronization-tp4631756p4647868.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list