<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>answering in-line.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thank you, I try like this:<br>
ges-launch-1.0 \<br>
+clip ./poc_backgroup.mp4 layer=2 \<br>
+clip ./poc_backgroup.mp4 inpoint=2 duration=3 layer=1 set-posx 100<br>
set-posy 100 set-width 200 set-height 200 +effect "agingtv" \<br>
+clip ./shoe.mp4 inpoint=7 duration=2 layer=0 set-posx 400 set-posy<br>
400 set-width 200 set-height 200 \<br>
--outputuri=file:////home/qingfu.cqf/gst-poc/hi.mp4 -e<br>
video/quicktime:x264enc:audio/x-opus<br>
It worked fine. <br>
<br>
I have some other queuestion:<br>
1.How can I use nvdec for decoder?<br></blockquote><div><br></div><div>Well, you should make sure it has the highest rank so it is picked.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2. I need to implement some filter between clips, such as clip 1's alpha<br>
change from 255 -> 0 and clip 2's alpha change from 0 -> 255 in 3 seconds,<br>
how can I do that by ges?<br></blockquote><div><br></div><div>You can interpolate the `alpha` child property of the video source, you can find an example here:</div><div><br></div><div><a href="https://github.com/cfoch/GESSamples/blob/master/interpolation/interpolation.py">https://github.com/cfoch/GESSamples/blob/master/interpolation/interpolation.py</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
3. for appsrc:// do you have some more example? I don't understand .<br></blockquote><div><br></div><div>I do not think we have an example for that but it is doable.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
After some tests, I find that I can't use gst_element_seek() for seek for<br>
multiple input souce, <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Maybe I can use gessrc as a gstelement to build the pipeline? such as:<br>
<br>
gessrc(backgroup.mp4 9-15s) -- \<br>
-------------> mixer<br>
-->encoder... <br>
gessrc(fga.mp4 3-8s) --- /<br></blockquote><div><br></div><div>GES mixes the layers, so if I understand correctly what you are trying to do, what you want is something like:</div><div><br></div><div>```<br></div><div>ges-launch-1.0 \</div><div> +clip fga.mp4 inpoint=3.0 duration=5.0 layer=0 # foreground layer \<br></div><div> +clip background.mp4 inpoint=9.0 duration=6.0 layer=1 # background layer<br></div><div> ```</div><div><br></div><div>You will need to write a small program to replicate that timeline to be able to interpolate the alpha.<br></div><div><br></div><div>- Thibault<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thibault Saunier-4 wrote<br>
> Hi,<br>
> <br>
> On Sun, Aug 30, 2020 at 9:57 PM xmufzy <<br>
<br>
> xmufzy@<br>
<br>
> > wrote:<br>
> <br>
>> Thank you , I known it's easier with ges, but I don't known how to change<br>
>> the<br>
>> encoder to nvenc, and hown can I export the data from ges to app sink, or<br>
>> import data from appsrc.<br>
>><br>
> <br>
> You can check the EncodingProfile[0] API to enforce a certain encoder, on<br>
> the command line you could even do for example<br>
> `video/quicktime:nvenc:audio/x-opus`.<br>
> <br>
> You can set your sinks as you would do with `playbin` if you use<br>
> GESPipeline, or you can use GESTimeline as any bin if you need more<br>
> control. For appsrc you can use the `appsrc://` protocol for your clips<br>
> and<br>
> then work from there, or you can subclass `GES[Video|Audio]Source` to<br>
> implement exactly what you need.<br>
> <br>
> - Thibault<br>
> <br>
> [0]<br>
> <a href="https://gstreamer.freedesktop.org/documentation/pbutils/encoding-profile.html" rel="noreferrer" target="_blank">https://gstreamer.freedesktop.org/documentation/pbutils/encoding-profile.html</a><br>
> <br>
> <br>
>> Nicolas Dufresne-5 wrote<br>
>> > Le jeudi 27 août 2020 à 08:14 -0500, xmufzy a écrit :<br>
>> >> If we can do 2 segment seek for the element<br>
>> >><br>
>> >><br>
>> >> pipeline change :<br>
>> >> filesrc(backgroup.mp4) --> qtdemux --> h264dec --> queue --\<br>
>> >><br>
>><br>
>> >> --> mixer -->x264enc --> filesink<br>
>> >> filesrc(fga.mp4) --> qtdemux --> h264dec -->queue ---------/<br>
>> >><br>
>> >> if I need mix fga.mp4 3~8s, and backgroup.mp4 9~14s, I try to use 2<br>
>> >> gst_element_seek(SEGMENT) for that, but failed<br>
>> ><br>
>> > This is easier done with ges-launch-1.0 (from gst-editing-services).<br>
>> ><br>
>> > ges-launch-1.0 +clip background.mp4 inpoint=9.0 duration=5.0 \<br>
>> > +clip fga.mp4 inpoint=3.0 duration=5.0 \<br>
>> > --smart-rendering --outputuri=file:///tmp/test.mp4<br>
>> ><br>
>> > You can live preview the edit by removing the render options (last<br>
>> > line).<br>
>> ><br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
>> >> _______________________________________________<br>
>> >> gstreamer-devel mailing list<br>
>> >><br>
>><br>
>> > gstreamer-devel@.freedesktop<br>
>><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>
>> ><br>
>> > _______________________________________________<br>
>> > gstreamer-devel mailing list<br>
>><br>
>> > gstreamer-devel@.freedesktop<br>
>><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>
>><br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
>> _______________________________________________<br>
>> gstreamer-devel mailing list<br>
>> <br>
<br>
> gstreamer-devel@.freedesktop<br>
<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>
>><br>
> <br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
<br>
> gstreamer-devel@.freedesktop<br>
<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>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><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></div></div>