Get tags from a music file

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

Get tags from a music file

clepto
Hello, i dont know if i am writing to the correct mailing list, so if i am not i apologize, this is my first time writing in lists

I want to get the tags from i music file using gstreamer and python, i have read some example using dbus and gobject but i cant make it correct!
So can you help and explain me all the steps i must make to get the tags from a file using dbus or any other way..
If possible i dont want to use gobject!

Thanks you!

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

Re: Get tags from a music file

Stefan Sauer
On 02/20/2012 08:06 PM, Χρήστος Τριανταφύλλης wrote:
Hello, i dont know if i am writing to the correct mailing list, so if i am not i apologize, this is my first time writing in lists

I want to get the tags from i music file using gstreamer and python, i have read some example using dbus and gobject but i cant make it correct!
So can you help and explain me all the steps i must make to get the tags from a file using dbus or any other way..
If possible i dont want to use gobject!

like this:
http://cgit.freedesktop.org/gstreamer/gst-python/tree/examples/gst-discover

Stefan

Thanks you!
_______________________________________________ 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: Get tags from a music file

clepto
thanks this is very good! but what about the artist of the song and album?
can i get them using discoverer?

2012/2/21 Stefan Sauer <[hidden email]>
On 02/20/2012 08:06 PM, Χρήστος Τριανταφύλλης wrote:
Hello, i dont know if i am writing to the correct mailing list, so if i am not i apologize, this is my first time writing in lists

I want to get the tags from i music file using gstreamer and python, i have read some example using dbus and gobject but i cant make it correct!
So can you help and explain me all the steps i must make to get the tags from a file using dbus or any other way..
If possible i dont want to use gobject!

like this:
http://cgit.freedesktop.org/gstreamer/gst-python/tree/examples/gst-discover

Stefan

Thanks you!
_______________________________________________ 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



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

Re: Get tags from a music file

Stefan Sauer
On 02/21/2012 06:32 PM, Χρήστος Τριανταφύλλης wrote:
thanks this is very good! but what about the artist of the song and album?
can i get them using discoverer?
Yes, try it. There is also a c-version that should be installed with gstreamer called gst-discoverer-0.10.
(and my enhanced gui version at http://cgit.freedesktop.org/~ensonic/gst-mediainfo/)

Stefan


2012/2/21 Stefan Sauer <[hidden email]>
On 02/20/2012 08:06 PM, Χρήστος Τριανταφύλλης wrote:
Hello, i dont know if i am writing to the correct mailing list, so if i am not i apologize, this is my first time writing in lists

I want to get the tags from i music file using gstreamer and python, i have read some example using dbus and gobject but i cant make it correct!
So can you help and explain me all the steps i must make to get the tags from a file using dbus or any other way..
If possible i dont want to use gobject!

like this:
http://cgit.freedesktop.org/gstreamer/gst-python/tree/examples/gst-discover

Stefan

Thanks you!
_______________________________________________ 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


_______________________________________________ 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: Get tags from a music file

clepto
is there any documentation about discoverer that i can read?

i will check your app ;)

Στις 21 Φεβρουαρίου 2012 9:26 μ.μ., ο χρήστης Stefan Sauer <[hidden email]> έγραψε:
On 02/21/2012 06:32 PM, Χρήστος Τριανταφύλλης wrote:
thanks this is very good! but what about the artist of the song and album?
can i get them using discoverer?
Yes, try it. There is also a c-version that should be installed with gstreamer called gst-discoverer-0.10.
(and my enhanced gui version at http://cgit.freedesktop.org/~ensonic/gst-mediainfo/)

Stefan



2012/2/21 Stefan Sauer <[hidden email]>
On 02/20/2012 08:06 PM, Χρήστος Τριανταφύλλης wrote:
Hello, i dont know if i am writing to the correct mailing list, so if i am not i apologize, this is my first time writing in lists

I want to get the tags from i music file using gstreamer and python, i have read some example using dbus and gobject but i cant make it correct!
So can you help and explain me all the steps i must make to get the tags from a file using dbus or any other way..
If possible i dont want to use gobject!

like this:
http://cgit.freedesktop.org/gstreamer/gst-python/tree/examples/gst-discover

Stefan

Thanks you!
_______________________________________________ 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


_______________________________________________ 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



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

Re: Get tags from a music file

clepto
no? ok thanks for your help!

Στις 21 Φεβρουαρίου 2012 10:21 μ.μ., ο χρήστης Χρήστος Τριανταφύλλης <[hidden email]> έγραψε:
is there any documentation about discoverer that i can read?

i will check your app ;)

Στις 21 Φεβρουαρίου 2012 9:26 μ.μ., ο χρήστης Stefan Sauer <[hidden email]> έγραψε:

On 02/21/2012 06:32 PM, Χρήστος Τριανταφύλλης wrote:
thanks this is very good! but what about the artist of the song and album?
can i get them using discoverer?
Yes, try it. There is also a c-version that should be installed with gstreamer called gst-discoverer-0.10.
(and my enhanced gui version at http://cgit.freedesktop.org/~ensonic/gst-mediainfo/)

Stefan



2012/2/21 Stefan Sauer <[hidden email]>
On 02/20/2012 08:06 PM, Χρήστος Τριανταφύλλης wrote:
Hello, i dont know if i am writing to the correct mailing list, so if i am not i apologize, this is my first time writing in lists

I want to get the tags from i music file using gstreamer and python, i have read some example using dbus and gobject but i cant make it correct!
So can you help and explain me all the steps i must make to get the tags from a file using dbus or any other way..
If possible i dont want to use gobject!

like this:
http://cgit.freedesktop.org/gstreamer/gst-python/tree/examples/gst-discover

Stefan

Thanks you!
_______________________________________________ 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


_______________________________________________ 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




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

Re: Get tags from a music file

Tim-Philipp Müller-2
On Thu, 2012-02-23 at 17:29 +0200, Χρήστος Τριανταφύλλης wrote:
> no? ok thanks for your help!
>
>         is there any documentation about discoverer that i can read?

There's documentation for the C API:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstdiscoverer.html

GstDiscoverer will give you one or more tag lists (GstTagList), which is
where you get most other metadata information from, such as artist,
title, track number, etc.

Cheers
 -Tim


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

Re: Get tags from a music file

clepto
ok i will look into it later!
if i face a problem i will replay here!

2012/2/23 Tim-Philipp Müller <[hidden email]>
On Thu, 2012-02-23 at 17:29 +0200, Χρήστος Τριανταφύλλης wrote:
> no? ok thanks for your help!
>
>         is there any documentation about discoverer that i can read?

There's documentation for the C API:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstdiscoverer.html

GstDiscoverer will give you one or more tag lists (GstTagList), which is
where you get most other metadata information from, such as artist,
title, track number, etc.

Cheers
 -Tim


_______________________________________________
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: Get tags from a music file

clepto
i have written this 

import pygtk
import gobject
gobject.threads_init()
import pygst
import gst
from gst.extend import discoverer
import gst.pbutils

f = "/home/chris/music.mp3"

newitem = gst.pbutils.Discoverer(50000000000)
info = newitem.discover_uri("file:///home/chris/music.mp3")
tags = info.get_tags()
print tags


dont pay attetion at the imports!
it works but the result is <GstTagList at 0x9fbf138>
how i can make it into a list?

Στις 23 Φεβρουαρίου 2012 5:47 μ.μ., ο χρήστης Χρήστος Τριανταφύλλης <[hidden email]> έγραψε:
ok i will look into it later!
if i face a problem i will replay here!


2012/2/23 Tim-Philipp Müller <[hidden email]>
On Thu, 2012-02-23 at 17:29 +0200, Χρήστος Τριανταφύλλης wrote:
> no? ok thanks for your help!
>
>         is there any documentation about discoverer that i can read?

There's documentation for the C API:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstdiscoverer.html

GstDiscoverer will give you one or more tag lists (GstTagList), which is
where you get most other metadata information from, such as artist,
title, track number, etc.

Cheers
 -Tim


_______________________________________________
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: Get tags from a music file

Tim-Philipp Müller-2
On Thu, 2012-02-23 at 20:51 +0200, Χρήστος Τριανταφύλλης wrote:

> it works but the result is <GstTagList at 0x9fbf138>
> how i can make it into a list?

Something like this should print the tags:

for tag_name in tags.keys():
  print tag_name, ' = ', tags[tag_name]

 Cheers
  -Tim


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

Re: Get tags from a music file

clepto
that worked!!
thank you very much!
you saved me from a lot of trouble!

2012/2/23 Tim-Philipp Müller <[hidden email]>
On Thu, 2012-02-23 at 20:51 +0200, Χρήστος Τριανταφύλλης wrote:

> it works but the result is <GstTagList at 0x9fbf138>
> how i can make it into a list?

Something like this should print the tags:

for tag_name in tags.keys():
 print tag_name, ' = ', tags[tag_name]

 Cheers
 -Tim


_______________________________________________
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: Get tags from a music file

clepto
how i can check if the tags['artist'] is an empty tag? (no artist)

Στις 23 Φεβρουαρίου 2012 9:12 μ.μ., ο χρήστης Χρήστος Τριανταφύλλης <[hidden email]> έγραψε:
that worked!!
thank you very much!
you saved me from a lot of trouble!


2012/2/23 Tim-Philipp Müller <[hidden email]>
On Thu, 2012-02-23 at 20:51 +0200, Χρήστος Τριανταφύλλης wrote:

> it works but the result is <GstTagList at 0x9fbf138>
> how i can make it into a list?

Something like this should print the tags:

for tag_name in tags.keys():
 print tag_name, ' = ', tags[tag_name]

 Cheers
 -Tim


_______________________________________________
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: Get tags from a music file

clepto
i used try - except!!
thanks!

Στις 29 Φεβρουαρίου 2012 6:31 μ.μ., ο χρήστης Χρήστος Τριανταφύλλης <[hidden email]> έγραψε:
how i can check if the tags['artist'] is an empty tag? (no artist)

Στις 23 Φεβρουαρίου 2012 9:12 μ.μ., ο χρήστης Χρήστος Τριανταφύλλης <[hidden email]> έγραψε:

that worked!!
thank you very much!
you saved me from a lot of trouble!


2012/2/23 Tim-Philipp Müller <[hidden email]>
On Thu, 2012-02-23 at 20:51 +0200, Χρήστος Τριανταφύλλης wrote:

> it works but the result is <GstTagList at 0x9fbf138>
> how i can make it into a list?

Something like this should print the tags:

for tag_name in tags.keys():
 print tag_name, ' = ', tags[tag_name]

 Cheers
 -Tim


_______________________________________________
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