Hello
I am trying to get the caps provided by rtph264py (as example) to construct the corresponding sdp file in [1]. I partially manage to get something: 1) i connect the pad of rtph264pay to caps notification; 2) callback notify_caps prints the caps, by doing get_caps def notify_caps(self, pad, caps): caps = pad.get_caps() print caps The result is: application/x-rtp, media=(string)video, payload=(int)[ 96, 127 ], clock-rate=(int)90000, encoding-name=(string)H264 I need the other caps (sprops parameter sets, etc...) to build the sdp file. How can i get these ? I managed to do so by using an interactive shell (ipython) through pad.get_negociated_caps(), but i don't know how to do this in my application. Thanks for any help; Florent [1] http://code.google.com/p/gstmanager/source/browse/trunk/gstmanager/bins/rtpencodingbin.py ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Have you tried running gst-launch with the -v option for verbose output?
This should provide you the information needed to set your caps.
|
In reply to this post by Florent THIERY-2
Within the notify::caps callback function try print the caps as below.
caps = GST_PAD_CAPS (pad); g_print ("Caps = %s\n, gst_caps_to_string (caps)); Refer the link below for more info: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-get-caps On Wed, May 27, 2009 at 8:45 PM, Florent <[hidden email]> wrote: Hello ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
I'm not sure if this will solve your issue but I'd been getting the caps from the udpsink linked to the payloader. However, some recent changes to gst-plugins-bad (in git) have made it so these caps are always null, and I haven't had the chance to diagnose the issue further. But at least with the last release, calling gst_pad_get_negotiated_caps on the udpsink's sink pad worked for me.
-Tristan 2009/5/28 Jyoti <[hidden email]> Within the notify::caps callback function try print the caps as below. -- Tristan Matthews email: [hidden email] web: http://tristanswork.blogspot.com ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Jyoti-2
> Within the notify::caps callback function try print the caps as below.
> > caps = GST_PAD_CAPS (pad); > g_print ("Caps = %s\n, gst_caps_to_string (caps)); > > Refer the link below for more info: > http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-get-caps Thanks for the info. However, i use pygst, and the closest equivalent i used returned the same caps as when i do get_pad boefore negociation. Flo ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Tristan Matthews-2
> I'm not sure if this will solve your issue but I'd been getting the caps
> from the udpsink linked to the payloader. However, some recent changes to > gst-plugins-bad (in git) have made it so these caps are always null, and I > haven't had the chance to diagnose the issue further. But at least with the > last release, calling gst_pad_get_negotiated_caps on the udpsink's sink pad > worked for me. For me, get_negociated_caps returns None when used inside my application. It does return the correct caps when i do it using an interactive shell. Anyone having tried to do this from python ? FLo ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Florent THIERY-2
On Monday 01 June 2009 21:59:23 Florent wrote:
> > Within the notify::caps callback function try print the caps as below. > > > > caps = GST_PAD_CAPS (pad); > > g_print ("Caps = %s\n, gst_caps_to_string (caps)); > > > > Refer the link below for more info: > > http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/G > >stPad.html#gst-pad-get-caps > > Thanks for the info. However, i use pygst, and the closest equivalent > i used returned the same caps as when i do get_pad boefore > negociation. > > Flo > with pygst, you can try set a callback on the pad whose negotiated caps you are interested in: mypad.set_setcaps_function(mypad_src_set_caps) then you define mypad_src_set_caps: def mypad_src_set_caps(pad, caps): capstr = caps.to_string() print capstr return TRUE The callback is called just before the buffer is pushed through the pad, when the caps is newly negotiated. HTH, waiming ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi
> with pygst, you can try set a callback on the pad whose negotiated caps you > are interested in: > > mypad.set_setcaps_function(mypad_src_set_caps) > > then you define mypad_src_set_caps: > > def mypad_src_set_caps(pad, caps): > capstr = caps.to_string() > print capstr > return TRUE > > The callback is called just before the buffer is pushed through the pad, when > the caps is newly negotiated. Thanks a lot, this is what i was looking for ! Cheers FLorent ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Florent THIERY-2
Can you please tell how exactly you got those caps from a command line shell? I'm new to gstreamer. Say, I can create a pipeline fine but dont know how to access or modify RTP params like 'sprop-paramater-set' etc. Also, can I find the 'rtph264pay' help or documentation somewhere? <quote author="Florent THIERY-2"> > I'm not sure if this will solve your issue but I'd been getting the caps > from the udpsink linked to the payloader. However, some recent changes to > gst-plugins-bad (in git) have made it so these caps are always null, and I > haven't had the chance to diagnose the issue further. But at least with the > last release, calling gst_pad_get_negotiated_caps on the udpsink's sink pad > worked for me. For me, get_negociated_caps returns None when used inside my application. It does return the correct caps when i do it using an interactive shell. |
Within the notify::caps callback function try print the caps as below.
caps = GST_PAD_CAPS (pad); g_print ("Caps = %s\n, gst_caps_to_string (caps)); Refer the link below for more info: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-get-caps On Sat, Dec 19, 2009 at 1:55 PM, Farah <[hidden email]> wrote:
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks Jyoti. What I'm trying to do is this: I am using gstreamer to stream h.264 files from a server to a client over RTP. The pipelines I create are: Sender: gst-launch-0.10 filesrc location=akiyo.264 ! video/x-h264 ! rtph264pay pt=96 mtu=1024! udpsink host=203.12.12.12 port=42050 sync=false Receiver: gst-launch-0.10 udpsrc port=" +this.port + " ! rtph264depay ! h264parse ! filesink location=rec_akiyo.264 I encode the sent file using the H.264 reference software with 'Slice mode' enabled and different schemes of slice-structures used. I want that each of the packets should contain one slice of the encoded video. Also, all the slices are not in the raster-scan order and so, packets wont be received to the receiver in the decoding order. The RFC 3984 specifies that I should use STAP-B packets with 'interleaved mode' of RTP enabled when NAL units are out of the decoding order. Now, 'rtph264pay' does not expose any of the properties that could specify to the payloader the NAL unit type (STAP-B) or set the 'interleaved mode' even though running the commands with -v param does give some caps that contain 'sprop-parameter-set'. Since 'interleave mode' is also a part of the 'sprop-parameter-set', I was wondering if there is a way to SET these parameters instead of just GETing them with -v. Also, I'm not sure if the functionality is even implemented in the 'rtph264pay' for interleave mode. So, I wanted to ask if this payloader implements the whole of rfc 3984 or not.
Please note that I am using gstreamer from linux shell (as can be seen from the pipelines). I would like best not to have to go into changing the gstreamer but if it is necessary, please guide me. Thanks. From: Jyoti <[hidden email]> To: Discussion of the development of GStreamer <[hidden email]> Sent: Sat, December 19, 2009 3:13:56 PM Subject: Re: [gst-devel] Getting the complete caps from rtph264pay Within the notify::caps callback function try print the caps as below. caps = GST_PAD_CAPS (pad); g_print ("Caps = %s\n, gst_caps_to_string (caps)); Refer the link below for more info: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-get-caps On Sat, Dec 19, 2009 at 1:55 PM, Farah <[hidden email]> wrote:
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Farah
> Can you please tell how exactly you got those caps from a command line
> shell? I'm new to gstreamer. Say, I can create a pipeline fine but dont > know how to access or modify RTP params like 'sprop-paramater-set' etc. > Also, can I find the 'rtph264pay' help or documentation somewhere? use gst-launch -v ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |