<div dir="ltr">Hello,<div><br></div><div>You can use GES[0] for that, or with master `nleurisource` has been fixed to work standalone and you can do:<br><br>  gst-launch-1.0 nleurisource uri=file://path/to/file inpoint=$(TRIMMING_POINT) caps=video/x-h264 duration=$(DURATION_YOU_WANT) ! h264parse ! mp4mux ! filesink<br></div><div><br></div><div>Regards,</div><div><br></div><div>Thibault<br></div><div><br></div><div>[0] <a href="https://gstreamer.freedesktop.org/documentation/gst-editing-services/" target="_blank">https://gstreamer.freedesktop.org/documentation/gst-editing-services/</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 17, 2020 at 11:50 PM Pascal Jacquemart <<a href="mailto:pascal@fluffyspider.com" target="_blank">pascal@fluffyspider.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hi everyone,<br>
<br>
I am trying to trim a mp4 video file, but having some issues with<br>
something that simple.<br>
<br>
I am running the following pipeline:<br>
  filesrc ! qtdemux ! h264parse ! mp4mux ! filesink<br>
<br>
At this stage, it creates an exact clone of the original video<br>
<br>
Then I figured out I should do the following:<br>
 - Start the pipeline in PAUSED state<br>
 - Issue a SEEK with FLUSH and KEY_UNIT flags<br>
 - Put the pipeline to PLAYING state<br>
 - Wait for the EOS message<br>
<br>
This does not work. The created file seems to be the right size but it<br>
does not play.<br>
<br>
After few experiments, I can create the trimmed video but only when I<br>
start the whole pipeline in PLAYING state. Then the file is valid but I<br>
can see the very first few frames of the original video before the<br>
trimmed part.<br>
<br>
My sample code is in here: <a href="https://trinket.io/python/185bdb1678" rel="noreferrer" target="_blank">https://trinket.io/python/185bdb1678</a><br>
I might be missing something obvious?<br>
<br>
Thanks,           Pascal<br>
<br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>