Syncing streams to clock in the middle of pipeline

Alexey Chernov 4ernov at gmail.com
Mon Sep 2 13:00:13 PDT 2013


Hello,

I faced some rare use case, seems I need to sync streams against pipeline 
clock in the middle of it instead of on the sink elements. Here's a pipeline:

Audio: appsrc -> aacparse -> queue   \
                                                          mpegtsmux -> appsink
Video: appsrc -> h264parse -> queue / 


The problem is that there seem to be GST_FORMAT_BYTE segment after 
mpegtsdemux, and appsink synchronization is literally useless. The pipeline 
pulls my data through appsrc and push it to appsink as fast as it can. And I 
need it to pull data at the realtime playback speed, as if there were sinks in 
the end with 'sync'=true. Pulling from appsink at desired rate doesn't match 
as in this case I got artifacts and incostistent playback at the very end of 
the chain where I transmit data from appsink through the network.

Is there any element or technique to sync streams to pipeline clock somewhere 
in the middle of it, where GST_FORMAT_TIME segment still exists (somewhere 
after queue elements)?

I looked at multiqueue element and its 'sync-by-running-time' property, but 
it's described to 'Synchronize deactivated or not-linked streams by running 
time' and it seems to be for some broken streams and not for my use case.

Thanks in advance for any help!

Best regards,
Alexey Chernov


More information about the gstreamer-devel mailing list