how to cut the first 10 frames of a video file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to cut the first 10 frames of a video file

ynjiun
I try to cut out the first 11 frames of a.mov and then convert it to b.h264.

This is my hack solution:
ges-launch-1.0 +clip a.mov i=0.36 -f video/x-matroska:video/x-h264 -o b.mp4
gst-launch-1.0 filesrc location=b.mp4 ! matroskademux ! h264parse !
video/x-h264,stream-format=byte-stream !  filesink location=b.h264

I wonder if there is a simpler one pipeline solution or not. Please help.
Thanks a lot.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to cut the first 10 frames of a video file

Andy Robinson
On 19/01/2021 04:33, ynjiun wrote:
> I try to cut out the first 11 frames of a.mov and then convert it to b.h264.
> I wonder if there is a simpler one pipeline solution or not. Please help.
> Thanks a lot.
I wrote a plugin to do something like this, here is the source:

https://www.seventhstring.com/resources/videosection.zip

I am not a GStreamer developer and there are probably many things wrong
with it, but it works for my purposes.

Regards,
Andy Robinson, Seventh String Software, www.seventhstring.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: how to cut the first 10 frames of a video file

Tim Müller
In reply to this post by ynjiun
Hi,

> I try to cut out the first 11 frames of a.mov and then convert it to
> b.h264.
>
> This is my hack solution:
> ges-launch-1.0 +clip a.mov i=0.36 -f video/x-matroska:video/x-h264 -o
> b.mp4
> gst-launch-1.0 filesrc location=b.mp4 ! matroskademux ! h264parse !
> video/x-h264,stream-format=byte-stream !  filesink location=b.h264
>
> I wonder if there is a simpler one pipeline solution or not. Please
> help. Thanks a lot.

Something like this should work:

gst-launch-1.0 filesrc location=file.mp4 ! qtdemux ! h264parse !
video/x-h264,alignment=au ! identity eos-after=11 ! h264parse !
video/x-h264,stream-format=byte-stream ! filesink location=frames.h264

Cheers
 Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: how to cut the first 10 frames of a video file

Thornton, Keith
In reply to this post by Andy Robinson
Hi,
have you tried
gst-launch-1.0 -v -e filesrc location=a.mp4 num-buffers=10 ! qtdemux ! queue ! h264parse ! filesink location=b.h264
Gruesse

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel <[hidden email]> Im Auftrag von Andy Robinson
Gesendet: Dienstag, 19. Januar 2021 11:44
An: [hidden email]
Betreff: Re: how to cut the first 10 frames of a video file

On 19/01/2021 04:33, ynjiun wrote:
> I try to cut out the first 11 frames of a.mov and then convert it to b.h264.
> I wonder if there is a simpler one pipeline solution or not. Please help.
> Thanks a lot.
I wrote a plugin to do something like this, here is the source:

https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.seventhstring.com%2Fresources%2Fvideosection.zip&amp;data=04%7C01%7C%7C972339b116e84f65628608d8bc6fb6aa%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637466535279642901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ZdfWOn%2FJSmhNxlT1k%2FFss5KxdHY3pNsAreg5WP7dw2E%3D&amp;reserved=0

I am not a GStreamer developer and there are probably many things wrong with it, but it works for my purposes.

Regards,
Andy Robinson, Seventh String Software, https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.seventhstring.com%2F&amp;data=04%7C01%7C%7C972339b116e84f65628608d8bc6fb6aa%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637466535279642901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=byVanFuEiEALsRhdXaI%2FCel%2B%2FpNGkLCwJFCfw9N5Ezo%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&amp;data=04%7C01%7C%7C972339b116e84f65628608d8bc6fb6aa%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637466535279642901%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Aepdz8E3vT61IecGpMATXkUp2DnlZobBgAfhiJnrklg%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: how to cut the first 10 frames of a video file

ynjiun
great. It works to cut the first 10 frames and convert.

How about if I want to remove the first 10 frames and convert the rest of
the video? That is the new video will not have the first 10 frames. Thanks a
lot for your help again.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel