How can i force to end all streams (or pipeline) at a specific timestamp

Nicolas Dufresne nicolas.dufresne at gmail.com
Wed Feb 24 18:24:21 UTC 2016


That's because this pipeline is not live, the video data will be
accumulated in the queue, so when you send eos, you may be ahead of
time on the audio. You may drop the queues (might not be perfect, but
it's simple), or use a pad probe to monitor each src position. When the
time of the produced buffer is passed the range you want, you can send
eos on that branch.

The being said, you need to track segment event, and use that segment
to convert the timesteamp in something meaningful (running time or
stream time, depending on what you really want).

good luck,
Nicolas

Le mercredi 24 février 2016 à 08:09 -0800, hammerwerfer a écrit :
> Hi,
> my pipeline has an audio stream (filesrc with mp3 file with a length
> of 3
> minutes) and a video stream (appsrc, image/jpeg ! queue jpegdec !
> videoconvert ... etc.). The appsrc get it's data frame by frame, via
> the
> need-data signal callback:
> 
> When all images are fed to the appsrc (after 200 frames) i want to
> stop
> everything. For the appsrc i emit the "end-of-stream" signal. But the
> pipeline still runs until the audio stream has finished, so the
> resulting
> video file has the same duration like the input audio stream.
> If i emit an eos-signal to the audioconverter
> (self.audioConv.send_event(Gst.Event.new_eos() right after
> src.emit("end-of-stream")) as well the audio stream stops. Almost
> like i
> wanted it. But the audio stream stops to early. The video takes 8
> seconds
> (200 frames @ 25fps) and the audio stops after 5 seconds. Probably
> due to
> buffers or queues. I guess i need somehow to stop the pipeline at a
> specific
> timestamp. But how? I hope someone can give me a hint.
> 
> Thanks,
> Jens
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble
> .com/How-can-i-force-to-end-all-streams-or-pipeline-at-a-specific-
> timestamp-tp4676025.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160224/1e47cbee/attachment.sig>


More information about the gstreamer-devel mailing list