How to get metadata from videofile?

Stefan Sauer ensonic at hora-obscura.de
Tue Oct 4 13:02:59 PDT 2011


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
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list