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

Discussion in 'Python' started by Dmitry Borisov, Aug 5, 2004.

  1. From: "CptPicard"
    Date: Thu, 05 Aug 2004 17:48:04 GMT
    Subject: Re: Re[2]: Need help on how to use Pymedia!

    > > 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 ?


    Yes it is.
    The code is located in pycar/audio/aplaylist.py class AudioFileList.getFileParams()
    The source for pycar is here: http://prdownloads.sourceforge.net/pymedia/pycar-1.0.0-pre2-src.zip
    Dmitry/
     
    Dmitry Borisov, Aug 5, 2004
    #1
    1. Advertising

  2. Dmitry Borisov

    CptPicard Guest

    "Dmitry Borisov" <> wrote in message
    news:...
    > From: "CptPicard"
    > Date: Thu, 05 Aug 2004 17:48:04 GMT
    > Subject: Re: Re[2]: Need help on how to use Pymedia!
    >
    > > > 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 ?

    >
    > Yes it is.
    > The code is located in pycar/audio/aplaylist.py class

    AudioFileList.getFileParams()

    Indeed!

    > The source for pycar is here:

    http://prdownloads.sourceforge.net/pymedia/pycar-1.0.0-pre2-src.zip
    > Dmitry/
    >
    >
     
    CptPicard, Aug 6, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?koi8-r?Q?=22?=Dmitry Borisov=?koi8-r?Q?=22=20?=

    ANN: PyMedia 1.2.1

    =?koi8-r?Q?=22?=Dmitry Borisov=?koi8-r?Q?=22=20?=, May 20, 2004, in forum: Python
    Replies:
    0
    Views:
    338
    =?koi8-r?Q?=22?=Dmitry Borisov=?koi8-r?Q?=22=20?=
    May 20, 2004
  2. Dmitry Borisov
    Replies:
    0
    Views:
    491
    Dmitry Borisov
    Jun 13, 2004
  3. CptPicard

    Need help on how to use Pymedia!

    CptPicard, Aug 5, 2004, in forum: Python
    Replies:
    4
    Views:
    437
    CptPicard
    Aug 5, 2004
  4. Dmitry Borisov

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

    Dmitry Borisov, Aug 5, 2004, in forum: Python
    Replies:
    1
    Views:
    630
    CptPicard
    Aug 5, 2004
  5. Dmitry Borisov

    ANN: PyMedia-1.2.3.0-pre2 is out

    Dmitry Borisov, Nov 4, 2004, in forum: Python
    Replies:
    0
    Views:
    348
    Dmitry Borisov
    Nov 4, 2004
Loading...

Share This Page