How to get metadata from videofile?

Hippi90 hippi90ub at gmail.com
Sat Oct 1 15:58:18 PDT 2011


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?

--
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.


More information about the gstreamer-devel mailing list