GStreamer: problems with seek and mux operations

scerveau scerveau at gmail.com
Wed Feb 9 16:15:46 UTC 2022


Dear Niccolo,

You might be interested to look into gst-editing-services

https://gstreamer.freedesktop.org/documentation/gst-editing-services/index.html?gi-language=c

Or you can play directly with nleurisource element which allows you to 
to record a part of source file to a file.

Here is an example of playback but you could also send it to a file:

gst-launch-1.0 "nleurisource uri=file:///my_file inpoint=0 
duration=1000000000 ! decodebin ! autovideosink"

Best regards.

Stephane



On 2/9/22 15:58, Bellaccini, Niccolo via gstreamer-devel wrote:
> Hi,
> 
> I'm trying to write a pipeline that reads a video from a source file, 
> seeks on that video and finally writes the seeked video to a local file.
> I used filesrc, decodebin, filesink and a muxer (like matroskamux or 
> mp4mux) as GStreamer elements.
> I noticed that with some muxer, like matroskamux, the seek operations 
> (as gst_element_seek_simple(...) method) fails and no seek is performed 
> on the final video. Instead, If I use for example another muxer (like 
> mp4mux or avimux) the seek on the final video is performed but this one 
> results not playable by any media player (since in practice is saved as 
> raw data not as video).
> Am I missing something? Do you know if is it possible to seek on a video 
> read from filesrc and save the seeked video (in playable format) on local?
> 
> I also send you in attachment the code I'm using for this task in case 
> it could be useful.
> Thank you,
> 
> Niccolò
> ------------------------------------------------------------------------
> PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING THIS EMAIL
> 
> VERIZON CONNECT CONFIDENTIALITY NOTICE
> This message is intended for the addressee only and may contain 
> confidential and/or privileged material. Any review, re-transmission, 
> dissemination, reliance upon or other use of this information by persons 
> or entities other than the addressee is prohibited. If you receive this 
> in error, please contact the sender and delete this message. Thank you.


More information about the gstreamer-devel mailing list