Hello! I am trying to learn this framework by tutorial on official site and i need some help. How can i retrieve metadata from videofile, like resolution, codec, bitrate etc.? If i understand right, i need to create such pipeline: filesrc->demuxer->fakesink, add "pad-added" signal handler to demuxer, link new pads with fakesink, get list of capabilities from them, and then i can get metadata from this caps, right? In tutorial to get properties from caps such code is used:
str = gst_caps_get_structure (caps, 0); if (!gst_structure_get_int (str, "width", &width) || !gst_structure_get_int (str, "height", &height)) { g_print ("No width/height available\n"); return; } g_print ("The video size of this set of capabilities is %dx%d\n", width, height); Where can i find a list of properties of caps? And how can i determine which cap is audio or video? |
On 10/02/2011 12:58 AM, Hippi90 wrote:
> Hello! I am trying to learn this framework by tutorial on official site and i > need some help. How can i retrieve metadata from videofile, like resolution, > codec, bitrate etc.? Use the GstDiscoverer API. Try via gst-discoverer-0.10 <uri> on the commandline and look at the tools source code to see how to use it. Stefan > If i understand right, i need to create such pipeline: > filesrc->demuxer->fakesink, add "pad-added" signal handler to demuxer, link > new pads with fakesink, get list of capabilities from them, and then i can > get metadata from this caps, right? In tutorial to get properties from caps > such code is used: > > str = gst_caps_get_structure (caps, 0); > if (!gst_structure_get_int (str, "width", &width) || > !gst_structure_get_int (str, "height", &height)) { > g_print ("No width/height available\n"); > return; > } > > g_print ("The video size of this set of capabilities is %dx%d\n", > width, height); > > Where can i find a list of properties of caps? And how can i determine which > cap is audio or video? > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-get-metadata-from-videofile-tp3863933p3863933.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > 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 |
Thank you for your piece of advice, but i have problem with building an application with GstDiscoverer. My OS is Fedora 15, i try to compile: gcc -o gst-discoverer gst-discoverer.c `pkg-config --libs --cflags gstreamer-0.10`. And i receive "undefined reference" for all GstDiscoverer functions as a result. gstreamer-devel and gstreamer-plugins-base-devel packages are installed. What did i forget?
|
On 10/05/2011 01:43 PM, Hippi90 wrote:
> Thank you for your piece of advice, but i have problem with building an > application with GstDiscoverer. My OS is Fedora 15, i try to compile: gcc > -o gst-discoverer gst-discoverer.c `pkg-config --libs --cflags > gstreamer-0.10`. And i receive "undefined reference" for all GstDiscoverer > functions as a result. gstreamer-devel and gstreamer-plugins-base-devel > packages are installed. What did i forget? pkg-config --list-all | grep gstreamer shows all gst devel modules gcc -o gst-discoverer gst-discoverer.c `pkg-config --libs --cflags gstreamer-0.10 gstreamer-pbutils-0.10` should work. Stefan > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-get-metadata-from-videofile-tp3863933p3874175.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > 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 |
In reply to this post by Hippi90
At 2011-10-02 06:58:18,Hippi90 <[hidden email]> wrote: >Hello! I am trying to learn this framework by tutorial on official site and i >need some help. How can i retrieve metadata from videofile, like resolution, >codec, bitrate etc.? If i understand right, i need to create such pipeline: >filesrc->demuxer->fakesink, add "pad-added" signal handler to demuxer, link >new pads with fakesink, get list of capabilities from them, and then i can >get metadata from this caps, right? In tutorial to get  ;properties from caps >such code is used: use the gst-inspect-0.10 to show the caps.
You could use the gst_caps_to_string api to print the caps in the "pad-added" signal handler. _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |