[gst-devel] reading meta-data information

Daniel Lenski dlenski at gmail.com
Sun Oct 21 00:53:10 CEST 2007


On Thu, 18 Oct 2007 19:42:45 +0530, Vinod Nanjaiah wrote:
> When I used "mad" instead of "decodebin" to playback the same media file
> and print meta data it gave the following stream-info, but none of the
> previous ones.
>      	duration: 252000000000
> 	bitrate: 278876
> 	layer: 3
> 	mode: stereo
> 	emphasis: none
> 	audio codec: MPEG-1 layer 3
> 
> What is the best way to playback a media file and also display ALL the
> metadata info?

You need to put an id3demux in your pipeline... from GStreamer's 
perspective, the mad module only decodes the audio, while id3demux finds 
and extract tags/metadata.

For example:

gst-launch -t filesrc location=foo.mp3 ! id3demux ! mad ! \
  audioconvert ! autoaudiosink

That will get you all the tags, assuming they're in ID3 format... there 
are also modules for APE tags and other things.  If you use decodebin, it 
figures out what the file contains and dynamically constructs the right 
pipeline to decode its contents, handy!  If you enable debugging info, 
you can find out what pipeline decodebin constructs.

Hope that helps.

Dan





More information about the gstreamer-devel mailing list