Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re[2]: Need help on how to use Pymedia!

Reply
Thread Tools

Re[2]: Need help on how to use Pymedia!

 
 
Dmitry Borisov
Guest
Posts: n/a
 
      08-05-2004

>
> Thank you for your help!
>
> "Lawrence Oluyede" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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: http://www.velocityreviews.com/forums/(E-Mail Removed)
It will make sure you get the quick response.

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

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()

Hope this helps.
Dmitry/

 
Reply With Quote
 
 
 
 
CptPicard
Guest
Posts: n/a
 
      08-05-2004

"Dmitry Borisov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> >
> > Thank you for your help!
> >
> > "Lawrence Oluyede" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > 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:

(E-Mail Removed)
> 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/
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Do U use >>>>>perl -e 'use re debug;/REGEX/' so U can help?? robertospara Perl Misc 14 12-10-2006 10:45 AM
re_---need help Network Adapters!!!! NEED HELP!!!! hedayatniac@gmail.com Computer Support 4 08-13-2006 01:03 AM
Error - System.Data.OleDb.OleDbException: Could not use ''; file already in use. - please help Learner ASP .Net 6 02-16-2006 09:29 AM
Help with "Couldn't Use '(unknown)'; File Already in Use" error Ian U ASP General 4 09-23-2004 12:51 PM



Advertisments