Getting pad capabilities from PIPELINE.

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

Getting pad capabilities from PIPELINE.

ak.ashwini
Hi All,

   I want to the get the negotiated caps of a pad, to find the resolution (width and height) and frame-rate of the video.

My pipeline looks like

 filesrc->mpegtsdemux->decodebin->ffmpegcolorspace->videoscale->xvimagesink.

In this pipeline I am scaling my video to 1280x720 resolution from 704x480

When I get the "src" or "sink" pad of ffmpegcolorspace and print the caps from that, the width and height are returned as 1280x720 and not the original one 704x480.

Can someone please tell me where am I going wrong.

Thanks,
Ashwini Kumar

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

Re: Getting pad capabilities from PIPELINE.

Mike Mitchell
I don't understand the problem as you described it.

Have you tired: gst-launch -v --gst-plugin-spew

In your psuedo pipeline, the scaling is last, so the video will still be 704x480 until after videoscale.  But it's my understanding you needs caps at the output of video scale to tell it to upscale. If you provide that it will probably do what you want.

Mike Mitchell





On Thu, Oct 6, 2011 at 9:33 PM, Ashwini Sharma <[hidden email]> wrote:
Hi All,

   I want to the get the negotiated caps of a pad, to find the resolution (width and height) and frame-rate of the video.

My pipeline looks like

 filesrc->mpegtsdemux->decodebin->ffmpegcolorspace->videoscale->xvimagesink.

In this pipeline I am scaling my video to 1280x720 resolution from 704x480

When I get the "src" or "sink" pad of ffmpegcolorspace and print the caps from that, the width and height are returned as 1280x720 and not the original one 704x480.

Can someone please tell me where am I going wrong.

Thanks,
Ashwini Kumar

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



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

Re: Getting pad capabilities from PIPELINE.

ak.ashwini
My aim is to get the original video size. Thats why I get the caps at ffmpegcsp. But I get the size 1280x720 which should not be the case until after videoscale.

My doubt is why i am getting the size 1280x720 at ffmpegcsp, which is placed before the videsocale. 

Any reason to that?

-Ashwini

On Fri, Oct 7, 2011 at 1:57 PM, Mike Mitchell <[hidden email]> wrote:
I don't understand the problem as you described it.

Have you tired: gst-launch -v --gst-plugin-spew

In your psuedo pipeline, the scaling is last, so the video will still be 704x480 until after videoscale.  But it's my understanding you needs caps at the output of video scale to tell it to upscale. If you provide that it will probably do what you want.

Mike Mitchell





On Thu, Oct 6, 2011 at 9:33 PM, Ashwini Sharma <[hidden email]> wrote:
Hi All,

   I want to the get the negotiated caps of a pad, to find the resolution (width and height) and frame-rate of the video.

My pipeline looks like

 filesrc->mpegtsdemux->decodebin->ffmpegcolorspace->videoscale->xvimagesink.

In this pipeline I am scaling my video to 1280x720 resolution from 704x480

When I get the "src" or "sink" pad of ffmpegcolorspace and print the caps from that, the width and height are returned as 1280x720 and not the original one 704x480.

Can someone please tell me where am I going wrong.

Thanks,
Ashwini Kumar

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



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



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

Re: Getting pad capabilities from PIPELINE.

Mike Mitchell
Perhaps because unless the state playing already, videorate will not have decided what scale to negotiate yet.  Why do you need to know the caps that are negotiated automatically ?

Mike Mitchell




On Fri, Oct 7, 2011 at 1:57 AM, Ashwini Sharma <[hidden email]> wrote:
My aim is to get the original video size. Thats why I get the caps at ffmpegcsp. But I get the size 1280x720 which should not be the case until after videoscale.

My doubt is why i am getting the size 1280x720 at ffmpegcsp, which is placed before the videsocale. 

Any reason to that?

-Ashwini

On Fri, Oct 7, 2011 at 1:57 PM, Mike Mitchell <[hidden email]> wrote:
I don't understand the problem as you described it.

Have you tired: gst-launch -v --gst-plugin-spew

In your psuedo pipeline, the scaling is last, so the video will still be 704x480 until after videoscale.  But it's my understanding you needs caps at the output of video scale to tell it to upscale. If you provide that it will probably do what you want.

Mike Mitchell





On Thu, Oct 6, 2011 at 9:33 PM, Ashwini Sharma <[hidden email]> wrote:
Hi All,

   I want to the get the negotiated caps of a pad, to find the resolution (width and height) and frame-rate of the video.

My pipeline looks like

 filesrc->mpegtsdemux->decodebin->ffmpegcolorspace->videoscale->xvimagesink.

In this pipeline I am scaling my video to 1280x720 resolution from 704x480

When I get the "src" or "sink" pad of ffmpegcolorspace and print the caps from that, the width and height are returned as 1280x720 and not the original one 704x480.

Can someone please tell me where am I going wrong.

Thanks,
Ashwini Kumar

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



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



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



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

Re: Getting pad capabilities from PIPELINE.

ak.ashwini
Its for some other requirement of my app where in I need to display the resolution and framerate.



On Fri, Oct 7, 2011 at 3:02 PM, Mike Mitchell <[hidden email]> wrote:
Perhaps because unless the state playing already, videorate will not have decided what scale to negotiate yet.  Why do you need to know the caps that are negotiated automatically ?

Mike Mitchell





On Fri, Oct 7, 2011 at 1:57 AM, Ashwini Sharma <[hidden email]> wrote:
My aim is to get the original video size. Thats why I get the caps at ffmpegcsp. But I get the size 1280x720 which should not be the case until after videoscale.

My doubt is why i am getting the size 1280x720 at ffmpegcsp, which is placed before the videsocale. 

Any reason to that?

-Ashwini

On Fri, Oct 7, 2011 at 1:57 PM, Mike Mitchell <[hidden email]> wrote:
I don't understand the problem as you described it.

Have you tired: gst-launch -v --gst-plugin-spew

In your psuedo pipeline, the scaling is last, so the video will still be 704x480 until after videoscale.  But it's my understanding you needs caps at the output of video scale to tell it to upscale. If you provide that it will probably do what you want.

Mike Mitchell





On Thu, Oct 6, 2011 at 9:33 PM, Ashwini Sharma <[hidden email]> wrote:
Hi All,

   I want to the get the negotiated caps of a pad, to find the resolution (width and height) and frame-rate of the video.

My pipeline looks like

 filesrc->mpegtsdemux->decodebin->ffmpegcolorspace->videoscale->xvimagesink.

In this pipeline I am scaling my video to 1280x720 resolution from 704x480

When I get the "src" or "sink" pad of ffmpegcolorspace and print the caps from that, the width and height are returned as 1280x720 and not the original one 704x480.

Can someone please tell me where am I going wrong.

Thanks,
Ashwini Kumar

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



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



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



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



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

Re: Getting pad capabilities from PIPELINE.

timothybean
Were you able to get this to work?
Reply | Threaded
Open this post in threaded view
|

Re: Getting pad capabilities from PIPELINE.

Tim-Philipp Müller-2
In reply to this post by ak.ashwini
On Fri, 2011-10-07 at 14:27 +0530, Ashwini Sharma wrote:

> My aim is to get the original video size. Thats why I get the caps at
> ffmpegcsp. But I get the size 1280x720 which should not be the case
> until after videoscale.
>
>
> My doubt is why i am getting the size 1280x720 at ffmpegcsp, which is
> placed before the videsocale.
>
>
> Any reason to that?

Not sure I understand the problem. Could you provide us with the output
of:

  gst-launch -v filesrc ....

?

Cheers
 -Tim


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