Need help on how to use Pymedia!

CptPicard jpmorichon at earthlink.net
Thu Aug 5 13:48:04 EDT 2004


"Dmitry Borisov" <jbors at mail.ru> wrote in message
news:mailman.1208.1091724751.5135.python-list at python.org...
>
> >
> > Thank you for your help!
> >
> > "Lawrence Oluyede" <raims at dot.com> wrote in message
> > news:3x8w4pqd3emo.15wp1jkrwkqua.dlg at 40tude.net...
> > > In data Thu, 05 Aug 2004 02:28:48 GMT, CptPicard ha scritto:
> > >
> > > > Could someone give me a more detailed documentation on pymedia or
some
> > clues
> > > > on how to get the information I need ?
> > >
> > > AFAIK Pymedia cannot extract ID3 infos from MP3 (altough you can study
by
> > > yourself the ID3 format a inspect the raw info of the file), anyway
the
> > web
> > > is full of ID3 tools for python such as:
> > > http://id3-py.sourceforge.net/
>
> Please use this mailing list to get support on pymedia:
pymedia-users at lists.sourceforge.net
> It will make sure you get the quick response.

I will do so!

>
> The documentation is a little scarce at the moment and I'm working on the
tutorial to compensate that.

Good news!

>
> Here is the code which will give you what you need( from pycar ). It is
modified to match what you need and therefore not tested.:
>
>     f= open( <file_name>, 'rb' )
>     dec= acodec.Decoder( <file_extension> )
>     s= f.read( 20000 )
>     fr= dec.decode( s )
>     # Hardcoding for mp3 IDv1 tags
>     if not dec.hasHeader() and <file_extension>== 'mp3':
>       f.seek( -128, 2 )
>       dec= acodec.Decoder( 'mp3' )
>       dec.decode( f.read( 128 ) )
>
>     print dec.getInfo()

I appreciate your support.
I understand that this is a piece of code specially written for fixing my
problem but where could I find such example in pycar ? I looked for Decoder
in the pycar source code (pymedia*-src) and found no match.

Do you include support for tag IDv2 too ?

>
> Hope this helps.
> Dmitry/
>





More information about the Python-list mailing list