Videoscale aspect fill

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

Videoscale aspect fill

Johan Basore
This post was updated on .
Hello everyone,

I am using videoscale and filter to resize video.
But I can't aspect fill option, just it resize video with aspect fit.
Here are my videoscale codes.

*************************
GstElement *videoscale1 = gst_element_factory_make("videoscale", "videoscale1");
GstElement *filter1 = gst_element_factory_make("capsfilter", "filter1");

GstElement *filtercaps1 = gst_caps_new_simple("video/x-raw", "width", G_TYPE_INT, 200, "height", G_TYPE_INT, 400, nil);
g_object_set(G_OBJECT (filter1), "caps", filtercaps1, nil);
gst_caps_unref(filtercaps1);
gst_element_link_many(clrspace1, videoscale1, filter1, videomixer, nil);
*************************
Reply | Threaded
Open this post in threaded view
|

Re: Videoscale aspect fill

Alex Bolotin
Hi Johan,

There is a plugin called vodeocrop. Give it a try

To get some info on it type in terminal gst-inspect-1.0 videocrop

Best luck,
AlexB

2016-05-04 14:31 GMT+03:00 Johan Basore <[hidden email]>:
Hello everyone, I am using videoscale and filter to resize video. But I can't aspect fill option, just it resize video with aspect fit. Here are my videoscale codes. ************************* filtercaps1 = gst_caps_new_simple("video/x-raw", "width", G_TYPE_INT, 200, "height", G_TYPE_INT, 400, nil); g_object_set(G_OBJECT (filter1), "caps", filtercaps1, nil); gst_caps_unref(filtercaps1); gst_element_link_many(clrspace1, videoscale1, filter1, videomixer, nil); *************************

View this message in context: Videoscale aspect fill
Sent from the GStreamer-devel mailing list archive at Nabble.com.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



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

Re: Videoscale aspect fill

Hoël VASSEUR
In reply to this post by Johan Basore

Hi Johan, 

I think you could crop the video with videocrop before using videoscale.

Your pipeline would look to something like : videocrop ! videoscale ! capsfilter.

In videocrop you'll have to set top, bottom, right and left properties to the correct values.

In the capsfilter you'll set the final display resolution you want.

 

Hoël

 

 

Le 2016-05-04 13:31, Johan Basore a écrit :

Hello everyone, I am using videoscale and filter to resize video. But I can't aspect fill option, just it resize video with aspect fit. Here are my videoscale codes. ************************* filtercaps1 = gst_caps_new_simple("video/x-raw", "width", G_TYPE_INT, 200, "height", G_TYPE_INT, 400, nil); g_object_set(G_OBJECT (filter1), "caps", filtercaps1, nil); gst_caps_unref(filtercaps1); gst_element_link_many(clrspace1, videoscale1, filter1, videomixer, nil); *************************


View this message in context: Videoscale aspect fill
Sent from the GStreamer-devel mailing list archive at Nabble.com.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: Videoscale aspect fill

Arjen Veenhuizen
In reply to this post by Alex Bolotin
You can also try to set pixel-aspect-ratio=(fraction)1/1 in your capsfilter caps.
Reply | Threaded
Open this post in threaded view
|

Re: Videoscale aspect fill

Johan Basore
I set pixel-aspect-ratio to "1/1", but it is scale to fill modes.
I need aspect-fill modes.
Here is the result.