473,378 Members | 1,378 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,378 software developers and data experts.

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

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/p...0-pre2-src.zip
Dmitry/
Jul 18 '05 #1
1 1558

"Dmitry Borisov" <jb***@mail.ru> wrote in message
news:ma**************************************@pyth on.org...
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/p...0-pre2-src.zip 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:
> > Thank you for your help! > > "Lawrence Oluyede" <raims@dot.com> wrote in message > news:3x8w4pqd3emo.15wp1jkrwkqua.dlg@40tude.net... > > In data Thu, 05 Aug 2004 02:28:48 GMT, CptPicard ha...
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. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.