I am using GES to create a "picture in picture" type of video. I have a large video in the background and a small video in the foreground corner. This is working perfectly.
Now, for the video in the foreground, I don't want the entire surface area of the video to be displayed. I only want it to display a sub-rectangle of that foreground video. By the way, I have already determined that the xpos, ypos, width, height proprties of GESVideoSource will scale the video (and they represent the position of the video on the destination canvas). So they don't behave in a way that would allow me to take the sub-rectangle.
My question is: Is there an easy way to take the sub-rectangle of the foreground video using GES? How?
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Thu, 29 Mar 2018 20:57:37 -0700
David Ing <[hidden email]> wrote: > I am using GES to create a "picture in picture" type of video. I have a > large video in the background and a small video in the foreground corner. > This is working perfectly. > > Now, for the video in the foreground, I don't want the entire surface area > of the video to be displayed. I only want it to display a sub-rectangle of > that foreground video. > > By the way, I have already determined that the xpos, ypos, width, height > proprties of GESVideoSource will scale the video (and they represent the > position of the video on the destination canvas). So they don't behave in > a way that would allow me to take the sub-rectangle. > > My question is: Is there an easy way to take the sub-rectangle of the > foreground video using GES? How? You can use a "videocrop" effect and combine it with the scaling transformation. In pitivi it is quite easy to do: 1. add the "videocrop" effect to the *unscaled* video; 2. set the cropping properties, and adjust the transformation width and height accordingly to keep the original content aspect ratio; 3. once you are satisfied you can optionally scale the clip further. Changing the crop properties after 3. is not very intuitive IMHO, as the properties would be affected by the scaling ratio, that's why I recommended to crop the unscaled video in 1. I've never done it from code. I'd paste a ges-launch-1.0 example too but the parsing of the +effect argument seems to be broken, or at least I couldn't figure out how to pass properties. I filed a bug about that: https://bugzilla.gnome.org/show_bug.cgi?id=794837 Ciao, Antonio -- Antonio Ospite https://ao2.it https://twitter.com/ao2it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Fri, 30 Mar 2018 12:57:17 +0200
Antonio Ospite <[hidden email]> wrote: > On Thu, 29 Mar 2018 20:57:37 -0700 > David Ing <[hidden email]> wrote: > [...] > > My question is: Is there an easy way to take the sub-rectangle of the > > foreground video using GES? How? > > You can use a "videocrop" effect and combine it with the scaling > transformation. > [...] > I'd paste a ges-launch-1.0 example too but the parsing of the +effect > argument seems to be broken, or at least I couldn't figure out how to > pass properties. > Here is an example using ges-launch-1.0: https://git.ao2.it/experiments/gstreamer.git/blob/HEAD:/shell/ges-videocrop-effect.sh Ciao, Antonio -- Antonio Ospite https://ao2.it https://twitter.com/ao2it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing? _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks Antonio! On Fri, Mar 30, 2018 at 9:17 AM, Antonio Ospite <[hidden email]> wrote: On Fri, 30 Mar 2018 12:57:17 +0200 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |