How to extract tags from a stream without playing it?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to extract tags from a stream without playing it?

phngcv
Hello everybody,

I am trying to write a music manager application and would like to get the stream tags (artist, album, etc...) and display it to the users. However, I don't know how to do this. I have read the GStreamer Manual but the section about tags reading is not presented carefully in there. Therefore, I just want to know which GStreamer functions I need to use to read the tags from the media files without opening them. 

Thank you for reading my message! I hope you guys have a good weekend!


Best regards,


Phong Cao

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to extract tags from a stream without playing it?

Arun Raghavan
On Fri, 2011-06-10 at 14:05 -0400, Phong Cao wrote:
> Hello everybody,
>
>
> I am trying to write a music manager application and would like to get
> the stream tags (artist, album, etc...) and display it to the users.
> However, I don't know how to do this. I have read the GStreamer Manual
> but the section about tags reading is not presented carefully in
> there. Therefore, I just want to know which GStreamer functions I need
> to use to read the tags from the media files without opening them.

For exactly what you need, take a look at:
https://bugzilla.gnome.org/show_bug.cgi?id=564749

For something more immediate:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstdiscoverer.html

Cheers,
Arun

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: How to extract tags from a stream without playing it?

phngcv
In reply to this post by phngcv
Thank you Arun,

I decided to try out the GstDiscoverer. I already included necessary header. However, it ould not be compiled:

g++ -g /home/phongcao/C/dingo-draft.cc -o /home/phongcao/C/dingo-draft `pkg-config --cflags --libs gtk+-2.0 gstreamer-0.10`

/home/phongcao/C/dingo-draft.cc: In function ‘void import_media_activated(GtkMenuItem*, GtkListStore*)’:
/home/phongcao/C/dingo-draft.cc:57: error: ‘GstDiscoverer’ was not declared in this scope
/home/phongcao/C/dingo-draft.cc:57: error: ‘discoverer’ was not declared in this scope
/home/phongcao/C/dingo-draft.cc:57: error: ‘gst_discoverer_new’ was not declared in this scope
/home/phongcao/C/dingo-draft.cc:59: error: ‘gst_discoverer_discover_uri’ was not declared in this scope
/home/phongcao/C/dingo-draft.cc:59: error: ‘gst_discoverer_info_get_tags’ was not declared in this scope

Is there anything wrong with the way I compile the source with GstDiscoverer?

On Sat, Jun 11, 2011 at 1:53 AM, <[hidden email]> wrote:
Send gstreamer-devel mailing list submissions to
       [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
       http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
or, via email, send a message with subject or body 'help' to
       [hidden email]

You can reach the person managing the list at
       [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gstreamer-devel digest..."


Today's Topics:

  1. Re: How to extract tags from a stream without playing it?
     (Arun Raghavan)
  2. How to show song's information into GtkTreeView? (Phong Cao)


----------------------------------------------------------------------

Message: 1
Date: Fri, 10 Jun 2011 14:49:42 -0700
From: Arun Raghavan <[hidden email]>
Subject: Re: How to extract tags from a stream without playing it?
To: [hidden email]
Message-ID: <1307742584.4513.7.camel@snowflake>
Content-Type: text/plain; charset="UTF-8"

On Fri, 2011-06-10 at 14:05 -0400, Phong Cao wrote:
> Hello everybody,
>
>
> I am trying to write a music manager application and would like to get
> the stream tags (artist, album, etc...) and display it to the users.
> However, I don't know how to do this. I have read the GStreamer Manual
> but the section about tags reading is not presented carefully in
> there. Therefore, I just want to know which GStreamer functions I need
> to use to read the tags from the media files without opening them.

For exactly what you need, take a look at:
https://bugzilla.gnome.org/show_bug.cgi?id=564749

For something more immediate:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstdiscoverer.html

Cheers,
Arun



------------------------------

Message: 2
Date: Sat, 11 Jun 2011 01:53:18 -0400
From: Phong Cao <[hidden email]>
Subject: How to show song's information into GtkTreeView?
To: [hidden email], [hidden email],
       [hidden email],
       [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hello everybody,

I am trying to develop a small music manager using GTK+ and GStreamer.
However, I am currently unable to display the stream information (like
artist, title, album, etc...) on the GtkTreeView.

I do not know if anyone here has any experience developing software like
this. But the idea behind this software is that when you click File -> Open
and then choosing a file from the GtkFileChooser, that music file will be
imported into the GtkListStore.

Attached with this email is the source code of the program. I think the
problem relates to either GstTagList I used or GtkListStore.

Thank you for helping me with this problem. I hope you guys have a good day!


Best regards,


Phong Cao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110611/c5364428/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dingo-draft.cc
Type: text/x-c++src
Size: 19218 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110611/c5364428/attachment.cc>

------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


End of gstreamer-devel Digest, Vol 5, Issue 28
**********************************************


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
smo
Reply | Threaded
Open this post in threaded view
|

Re: How to extract tags from a stream without playing it?

smo
hi

 i think i had the same problem than you, everything is fine now, look here (it s in pygtk but i think you ll understand..):

http://www.jezra.net/blog/use_python_and_gstreamer_to_get_the_tags_of_an_audio_file

good luck

works great for me !

thx to the gstreamer devs too


On 11/06/2011 10:18, Phong Cao wrote:
Thank you Arun,

I decided to try out the GstDiscoverer. I already included necessary header. However, it ould not be compiled:

g++ -g /home/phongcao/C/dingo-draft.cc -o /home/phongcao/C/dingo-draft `pkg-config --cflags --libs gtk+-2.0 gstreamer-0.10`

/home/phongcao/C/dingo-draft.cc: In function ‘void import_media_activated(GtkMenuItem*, GtkListStore*)’:
/home/phongcao/C/dingo-draft.cc:57: error: ‘GstDiscoverer’ was not declared in this scope
/home/phongcao/C/dingo-draft.cc:57: error: ‘discoverer’ was not declared in this scope
/home/phongcao/C/dingo-draft.cc:57: error: ‘gst_discoverer_new’ was not declared in this scope
/home/phongcao/C/dingo-draft.cc:59: error: ‘gst_discoverer_discover_uri’ was not declared in this scope
/home/phongcao/C/dingo-draft.cc:59: error: ‘gst_discoverer_info_get_tags’ was not declared in this scope

Is there anything wrong with the way I compile the source with GstDiscoverer?

On Sat, Jun 11, 2011 at 1:53 AM, <[hidden email]> wrote:
Send gstreamer-devel mailing list submissions to
       [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
       http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
or, via email, send a message with subject or body 'help' to
       [hidden email]

You can reach the person managing the list at
       [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gstreamer-devel digest..."


Today's Topics:

  1. Re: How to extract tags from a stream without playing it?
     (Arun Raghavan)
  2. How to show song's information into GtkTreeView? (Phong Cao)


----------------------------------------------------------------------

Message: 1
Date: Fri, 10 Jun 2011 14:49:42 -0700
From: Arun Raghavan <[hidden email]>
Subject: Re: How to extract tags from a stream without playing it?
To: [hidden email]
Message-ID: <1307742584.4513.7.camel@snowflake>
Content-Type: text/plain; charset="UTF-8"

On Fri, 2011-06-10 at 14:05 -0400, Phong Cao wrote:
> Hello everybody,
>
>
> I am trying to write a music manager application and would like to get
> the stream tags (artist, album, etc...) and display it to the users.
> However, I don't know how to do this. I have read the GStreamer Manual
> but the section about tags reading is not presented carefully in
> there. Therefore, I just want to know which GStreamer functions I need
> to use to read the tags from the media files without opening them.

For exactly what you need, take a look at:
https://bugzilla.gnome.org/show_bug.cgi?id=564749

For something more immediate:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstdiscoverer.html

Cheers,
Arun



------------------------------

Message: 2
Date: Sat, 11 Jun 2011 01:53:18 -0400
From: Phong Cao <[hidden email]>
Subject: How to show song's information into GtkTreeView?
To: [hidden email], [hidden email],
       [hidden email],
       [hidden email]
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

Hello everybody,

I am trying to develop a small music manager using GTK+ and GStreamer.
However, I am currently unable to display the stream information (like
artist, title, album, etc...) on the GtkTreeView.

I do not know if anyone here has any experience developing software like
this. But the idea behind this software is that when you click File -> Open
and then choosing a file from the GtkFileChooser, that music file will be
imported into the GtkListStore.

Attached with this email is the source code of the program. I think the
problem relates to either GstTagList I used or GtkListStore.

Thank you for helping me with this problem. I hope you guys have a good day!


Best regards,


Phong Cao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110611/c5364428/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dingo-draft.cc
Type: text/x-c++src
Size: 19218 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110611/c5364428/attachment.cc>

------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


End of gstreamer-devel Digest, Vol 5, Issue 28
**********************************************

_______________________________________________ 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
Reply | Threaded
Open this post in threaded view
|

Re: Re: How to extract tags from a stream without playing it?

Tim-Philipp Müller-2
In reply to this post by phngcv
On Sat, 2011-06-11 at 04:18 -0400, Phong Cao wrote:

> I decided to try out the GstDiscoverer. I already included necessary
> header. However, it ould not be compiled:
>
> g++ -g /home/phongcao/C/dingo-draft.cc -o /home/phongcao/C/dingo-draft
> `pkg-config --cflags --libs gtk+-2.0 gstreamer-0.10`
>
> ...
> /home/phongcao/C/dingo-draft.cc:57: error: ‘GstDiscoverer’ was not
> declared in this scope
> ...
>
> Is there anything wrong with the way I compile the source with
> GstDiscoverer?

If you pass gstreamer-0.10 to pkg-config, that'll only get you the core
GStreamer includes and library, there are other non-core
gstreamer-*-0.10 packages with further functionality. GstDiscoverer
lives in one of those. Add "gstreamer-pbutils-0.10" to the modules list
in pkg-config.

 Cheers
  -Tim



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel