Video and data synchronization

gotsring gotsring at live.com
Tue Dec 1 03:22:15 UTC 2020


Ah, I understand your scenario better now. When you say "reverse playback",
do you mean playing in reverse, or jumping back to a previous time, then
playing from that point?

When I did frame-by-frame video synchronization, I used something like this:

filesrc ! decodebin ! queue ! appsink

In the appsink, I had a function that kept track of the time of each video
frame (and any metadata), and only pulled from the pipeline when the next
frame was needed. The queue right before the appsink was just to hold a
bunch of decoded frames up to some limit.
Once a frame was needed, the appsink pushed the frame data to a separate
process to analyze and render the frame. Ultimately, the rendering was done
by OpenCV, so this was not a complete GStreamer solution, nor did it allow
for rewinding or scrubbing through the video file.


For your scenario, I would probably try something like:

rtpsrc ! (whatever decoding you have) ! queue2 ! autovideosink

I think you can either put a blocking pad probe right before the video sink
or just pause the entire pipeline if you need to wait for data to arrive.
Queue2 should allow you to post messages to the bus so that you can monitor
how full it's getting and wait for data as needed.

Unfortunately, I do not have that much experience with GStreamer, so
hopefully this helps, but feel free to PM me and I'll do the best I can.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list