GStreamer: problems with seek and mux operations

stefan cervo scerveau at gmail.com
Fri Feb 11 22:31:14 UTC 2022


Hey Niccolo,

You definitively have to investigate into the gst-editing-services.
You can combine clips with desired timeline such as a video editing software.

Check the documentation:

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

Regards.

Stéphane 
> Le 11 févr. 2022 à 19:58, Bellaccini, Niccolo <niccolo.bellaccini at verizonconnect.com> a écrit :
> 
> 
> Hey  Stéphane,
> 
> Thank you again for all the information.
> So, let me try to explain what I am doing.
> First of all, I want to take a video from a source and save it to local files, splitting the files depending on a maximum time threshold that I choose. I do this using GStreamer as a C library and building an ad-hoc pipeline; and it works pretty good for now. 
> Basically the pipeline I made it's similar to this one (using the gst-launch tool): > gst-launch-1.0 videotestsrc ! video/x-raw,width=1280,height=720,framerate=30/1 ! avenc_mpeg4 ! splitmuxsink location=video%02d.mkv max-size-time=60000000000
> 
> Now, from another program, I want to retrieve one or two consecutive videos (and I want also to concatenate them in that case) previously saved, seek on the video given a certain start and end position, and save the final video on the local disk as .mkv or .mp4 video (actually, I want to send the final video to an AWS S3 bucket but I think that is not the point).
> 
> As I said, the problem occurs when I try to seek on the video (read by splitmuxsrc GStreamer element) and save it to local file, the final video is not playable with any media player (furthermore when I use matroskamux as muxer I noticed that the seek function gst_element_seek_simple(...) returns me false and no seek is performed on the video).
> 
> Best regards,
> 
> Niccolò
> 
>> On Fri, Feb 11, 2022 at 6:31 PM stefan cervo <scerveau at gmail.com> wrote:
>> Hey Niccolo,
>> 
>> You can give a try to install this package to get nleurisource: 
>> 
>> https://packages.ubuntu.com/focal/ges1.0-tools
>> 
>> Regarding the splitmuxsrc scenario could you explain in details what you’d like to achieve ?
>> 
>> Best regards
>> 
>> Stéphane.
>> 
>> 
>>>> Le 11 févr. 2022 à 17:16, Bellaccini, Niccolo <niccolo.bellaccini at verizonconnect.com> a écrit :
>>>> 
>>> 
>>> Hi Stephane,
>>> 
>>> Thank you very much for the reply. I will surely take a look into gst-editing-services as soon as possible. 
>>> I have tried to run the basic pipeline using the nleurisource element but it does not work for me because my installation doesn't have the NLE plugin on my GStreamer installation (I installed GStreamer on Ubuntu 20.04 following the instructions here https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c). Is there still the NLE plugin?  
>>> I will try in the meanwhile to search about it or maybe to download, compile and install the plugin by myself; and just for information, is there anything similar to the nleurisource element which takes into account multiple files like the splitmuxsrc element?
>>> 
>>> Best regards,
>>> 
>>> Niccolò
>>> 
>>>> On Wed, Feb 9, 2022 at 3:58 PM Bellaccini, Niccolo <niccolo.bellaccini at verizonconnect.com> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220211/a1a2a013/attachment.htm>


More information about the gstreamer-devel mailing list