473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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


Thank you for your help!

"Lawrence Oluyede" <ra***@dot.com> wrote in message
news:3x****************************@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: py***********@lists.sourceforge.net
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/

Jul 18 '05 #1
1 1491

"Dmitry Borisov" <jb***@mail.ru> wrote in message
news:ma**************************************@pyth on.org...

Thank you for your help!

"Lawrence Oluyede" <ra***@dot.com> wrote in message
news:3x****************************@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:

py***********@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/

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: CptPicard | last post by:
Hi, I am currently trying to use pymedia so to get the following informations (author, song title, ...) from a mp3 file. The documentation I downloaded is quite limited : It gives some clues on...
1
by: Dmitry Borisov | last post by:
From: "CptPicard" Date: Thu, 05 Aug 2004 17:48:04 GMT Subject: Re: Re: Need help on how to use Pymedia! > > Here is the code which will give you what you need( from pycar ). It is > modified to...
6
by: Paul Moore | last post by:
Does anyone know of a Python library which handles sound file formats (MP3, Ogg, FLAC are the three I'm nost interested in). I'd like something that can manipulate "metadata" - stuff like artist,...
5
by: Ashot | last post by:
Hi, I need to write a video analysis tool which extracts statistics from microsocope video. Essentially what I need is to translate the video data into numerical matrices. I have been using...
1
by: Ron Provost | last post by:
Hello, I'm developing a piece of software to assist illiteraate adults to learn to read. I'm trying to figure out how, if possible, to make audio playback asynchrnous but still controllable. ...
2
by: danielmcbrearty | last post by:
Hi Old hand at perl, giving python a try. Trying to get pymedia running on my winxp box. Have installed activestate python 2.4 and pymedia using precompiled installers. Problem is it SEEMS...
1
by: Lad | last post by:
Hi, Can anyone answer the following questions? Question 1. Can pyMedia create/convert FLV format? I explain in details. As I would like to publish videos for viewing in a browser , I need a...
0
by: Carlos Leite | last post by:
Is there any other option to analyze audio frequencies? Or Any here try to use pymedia to a simple audio FingerPrint. A cant understand what the information the asBands() really giveme....
8
by: Martin | last post by:
Hi, I need to extract a frame from a wmv file and save it as a jpg. In fact I need to extract a frame from each one of a collection of several thousand wmv files, but that's beside the point. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.