Frame resolution settings in gstreamer pipeline
Mohammad, Jamal M
MohammadJamal.Mohiuddin at ncr.com
Fri Feb 2 09:50:53 UTC 2018
Thanks for your help..
The caps has changed to 1024,768 but the display is not full screen.
-----Original Message-----
From: Antonio Ospite [mailto:ao2 at ao2.it]
Sent: Friday, February 02, 2018 3:11 PM
To: gstreamer-devel at lists.freedesktop.org
Cc: Mohammad, Jamal M <MohammadJamal.Mohiuddin at ncr.com>
Subject: Re: Frame resolution settings in gstreamer pipeline
On Fri, 2 Feb 2018 04:37:10 +0000
"Mohammad, Jamal M" <MohammadJamal.Mohiuddin at ncr.com> wrote:
> Hi Guys,
>
> I am streaming my laptop screen on my IP based display using gstreamer.
> Here is the pipeline on both ends:
>
> Laptop:
> C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -v dx9screencapsrc !
> queue ! videoconvert ! x264enc ! "video/x-h264,profile=baseline" !
> h264parse config-interval=-1 ! rtph264pay pt=96 config-interval=-1 !
> udpsink host=<ipaddr> port=5004 sync=true
>
[...]
> I need to convert this to the resolution of IP Display, I modified the pipeline on the laptop to following:
> C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -v dx9screencapsrc !
> video/x-raw, width=1024,height=768,framerate=30/1 !queue !
> videoconvert ! x264enc ! "video/x-h264,profile=baseline" ! h264parse
> config-interval=-1 ! rtph264pay pt=96 config-interval=-1 ! udpsink
> host=<IPAddress> port=5004 sync=true
>
> It fails with the following error:
> WARNING: erroneous pipeline: could not link dx9screencapsrc0 to
> queue0, dx9screencapsrc0 can't handle caps video/x-raw,
> width=(int)1024, height=(int)768, framerate=(fraction)30/1
>
> Looking at the caps of dx9screencapsrc using gst-inspect-1.0, it has cap for width and height.
> How can I acheive my requirement of capturing the whole screen but
> converting it to 1024x768
>
The dx9screencapsrc element may define caps for width and height, but your instance only accepts some values for it, you should see the values in the output of "gst-launch-1.0 -v" if you look close enough.
So requesting invalid values on the source element will make caps negotiation to fail.
What you really want to do here is to *resize* the captured 1920x1080 frame down to 1024x768 before encoding it, and that can be done with the videoscale element:
gst-launch-1.0.exe -v dx9screencapsrc ! queue ! videoconvert ! videoscale ! video/x-raw,width=1024,height=768 ! x264enc ...
Ciao,
Antonio
--
Antonio Ospite
https://urldefense.proofpoint.com/v2/url?u=https-3A__ao2.it&d=DwICAg&c=gJN2jf8AyP5Q6Np0yWY19w&r=4h__2a8-7N65qoDnmtsyGh_QYq3kPCn-Loy2L0LHnCs&m=kCnVF3RJC-HQMatVBVA0ElpzZ6jvmU-gTyjHhjKH95A&s=6YX4r3Vzk51QYD59fwOIklf7Pzz2pkc3D9m2TT5suDU&e=
https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_ao2it&d=DwICAg&c=gJN2jf8AyP5Q6Np0yWY19w&r=4h__2a8-7N65qoDnmtsyGh_QYq3kPCn-Loy2L0LHnCs&m=kCnVF3RJC-HQMatVBVA0ElpzZ6jvmU-gTyjHhjKH95A&s=Jxjd0777746yBGcgWNzF0vKTAj-fh6vgNLb6X2Fyey0&e=
A: Because it messes up the order in which people normally read text.
See https://urldefense.proofpoint.com/v2/url?u=http-3A__en.wikipedia.org_wiki_Posting-5Fstyle&d=DwICAg&c=gJN2jf8AyP5Q6Np0yWY19w&r=4h__2a8-7N65qoDnmtsyGh_QYq3kPCn-Loy2L0LHnCs&m=kCnVF3RJC-HQMatVBVA0ElpzZ6jvmU-gTyjHhjKH95A&s=xTS5sZAKaR_th2MAfIb8NWqEcVe333OPy5wOLm7octw&e=
Q: Why is top-posting such a bad thing?
More information about the gstreamer-devel
mailing list