Do These Timestamps, Durations, and Offsets Look Correct??

William Metcalf wmetcalf at niftytv.com
Tue Aug 16 15:03:11 PDT 2011


Hello All,

I am very new to Timestamps and Offsets, and I do not really know what 
all problems to look for..  I have a pipeline that is essentially as 
follows (the actual pipeline is in a C application)

- gst-inspect -v appsrc ! videorate ! identity ! glimagesink appsrc ! 
audiorate ! identity ! autoaudiosink

An excerpt of the output of the identity elements is posted below.  The 
video and the audio that are produced are not in sync.  As best I can 
tell from my research, gstreamer handles synchronization of video and 
audio as long as the timestamps are correct.  Because my audio and video 
are not synced, I am pretty sure that there must be some problem with 
the timestamps below but I am not exactly sure what I am looking for.  
It seems like each timestamp = previous timestamp + duration which seems 
correct to me, but I am completely clueless as to what the offset and 
offset_end mean, and why they always increase.  If these timestamps are 
correct, what are some other steps I can take to synchronize my audio 
and video?

/GstPipeline:NFTVideoConverter/GstIdentity:NFTAudioIdentity: 
last-message = "chain   ******* (NFTAudioIdentity:sink)i (6404 bytes, 
timestamp: 0:00:01.234807256, duration: 0:00:00.036303855, offset: 
54455, offset_end:  56056, flags: 0) 01D4C268"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTVideoIdentity: 
last-message = "chain   ******* (NFTVideoIdentity:sink)i (699840 bytes, 
timestamp: 0:00:00.366666666, duration: 0:00:00.033333334, offset: 11, 
offset_end:  12, flags: 1) 01795950"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTAudioIdentity: 
last-message = "chain   ******* (NFTAudioIdentity:sink)i (6408 bytes, 
timestamp: 0:00:01.271111111, duration: 0:00:00.036326530, offset: 
56056, offset_end:  57658, flags: 0) 01D4C058"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTVideoIdentity: 
last-message = "chain   ******* (NFTVideoIdentity:sink)i (699840 bytes, 
timestamp: 0:00:00.400000000, duration: 0:00:00.033333333, offset: 12, 
offset_end:  13, flags: 1) 017959A8"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTAudioIdentity: 
last-message = "chain   ******* (NFTAudioIdentity:sink)i (6404 bytes, 
timestamp: 0:00:01.307437641, duration: 0:00:00.036303855, offset: 
57658, offset_end:  59259, flags: 1) 01D4C000"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTVideoIdentity: 
last-message = "chain   ******* (NFTVideoIdentity:sink)i (699840 bytes, 
timestamp: 0:00:00.433333333, duration: 0:00:00.033333333, offset: 13, 
offset_end:  14, flags: 1) 01795B08"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTAudioIdentity: 
last-message = "chain   ******* (NFTAudioIdentity:sink)i (6408 bytes, 
timestamp: 0:00:01.343741496, duration: 0:00:00.036326531, offset: 
59259, offset_end:  60861, flags: 0) 01795F28"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTVideoIdentity: 
last-message = "chain   ******* (NFTVideoIdentity:sink)i (699840 bytes, 
timestamp: 0:00:00.466666666, duration: 0:00:00.033333334, offset: 14, 
offset_end:  15, flags: 1) 01795C10"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTAudioIdentity: 
last-message = "chain   ******* (NFTAudioIdentity:sink)i (6408 bytes, 
timestamp: 0:00:01.380068027, duration: 0:00:00.036326530, offset: 
60861, offset_end:  62463, flags: 0) 01795ED0"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTVideoIdentity: 
last-message = "chain   ******* (NFTVideoIdentity:sink)i (699840 bytes, 
timestamp: 0:00:00.500000000, duration: 0:00:00.033333333, offset: 15, 
offset_end:  16, flags: 1) 01795B60"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTAudioIdentity: 
last-message = "chain   ******* (NFTAudioIdentity:sink)i (6404 bytes, 
timestamp: 0:00:01.416394557, duration: 0:00:00.036303855, offset: 
62463, offset_end:  64064, flags: 0) 01795E78"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTVideoIdentity: 
last-message = "chain   ******* (NFTVideoIdentity:sink)i (699840 bytes, 
timestamp: 0:00:00.533333333, duration: 0:00:00.033333333, offset: 16, 
offset_end:  17, flags: 1) 01795950"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTAudioIdentity: 
last-message = "chain   ******* (NFTAudioIdentity:sink)i (6408 bytes, 
timestamp: 0:00:01.452698412, duration: 0:00:00.036326531, offset: 
64064, offset_end:  65666, flags: 0) 01795E20"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTVideoIdentity: 
last-message = "chain   ******* (NFTVideoIdentity:sink)i (699840 bytes, 
timestamp: 0:00:00.566666666, duration: 0:00:00.033333334, offset: 17, 
offset_end:  18, flags: 1) 01795A00"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTAudioIdentity: 
last-message = "chain   ******* (NFTAudioIdentity:sink)i (6404 bytes, 
timestamp: 0:00:01.489024943, duration: 0:00:00.036303855, offset: 
65666, offset_end:  67267, flags: 0) 01795DC8"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTVideoIdentity: 
last-message = "chain   ******* (NFTVideoIdentity:sink)i (699840 bytes, 
timestamp: 0:00:00.600000000, duration: 0:00:00.033333333, offset: 18, 
offset_end:  19, flags: 1) 01795A58"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTAudioIdentity: 
last-message = "chain   ******* (NFTAudioIdentity:sink)i (6408 bytes, 
timestamp: 0:00:01.525328798, duration: 0:00:00.036326530, offset: 
67267, offset_end:  68869, flags: 1) 01D4C000"
/GstPipeline:NFTVideoConverter/GstIdentity:NFTVideoIdentity: 
last-message = "chain   ******* (NFTVideoIdentity:sink)i (699840 bytes, 
timestamp: 0:00:00.633333333, duration: 0:00:00.033333333, offset: 19, 
offset_end:  20, flags: 1) 01795C10"

Thank you all for your help,
William





More information about the gstreamer-devel mailing list