How to get Audio File properties

M

Manix

Can someone tell me which class I should look for to be able to get
and set the properties of an audio File (right-click on a file.
properties. resume - all the infos stocked there).

The thing is, I want to modify these properties in different audio
files with a java program I've created

Thank You
 
A

Andrew Thompson

Manix said:
Can someone tell me which class I should look for to be able to get
and set the properties of an audio File (right-click on a file.
properties. resume - all the infos stocked there).

No it isn't. Windows does not do a 'bad' job of bringing up
that information, but it brings up incorrect times for VBR
MP3s. There would be other sound formats for which it
has no idea (that is 'no idea it is a sound format', let alone
the parameters with which it was encoded).
The thing is, I want to modify these properties in different audio
files with a java program I've created ...

Your new to this, I take it?

1) There are a plethora of sound formats.
2) Java is not especially good at dealing with that plethora.
3) OSs only understand the sound formats they have been
programmed to understand, unless they have some 'internet
based mechanism' to get new formats as they are
encountered (Win. does that - very clever).
4) Conversion of (e.g.) a 320Kbps MP3 to a mono, 8 bit,
16KHz, U-law encoded WAV is no simple matter. The
sound needs to be decoded from the old format, and encoded
in the new. Further, what do you do with the stereo tracks?
Merge them into a single mono track? Use 'left' only?

If you want to continue with this, look into the JavaSound API
(javax.sound.sampled, in J2SE since 1.3) or the JMF (extra,
mostly obsolete, abandoned API for media).

But ultimately, I do not think this is a good project
for Java, beginners in Java, or beginners in media,
and it is a lot more work (coding) than you think.
 
M

Manix

No it isn't. Windows does not do a 'bad' job of bringing up
that information, but it brings up incorrect times for VBR
MP3s. There would be other sound formats for which it
has no idea (that is 'no idea it is a sound format', let alone
the parameters with which it was encoded).


Your new to this, I take it?

1) There are a plethora of sound formats.
2) Java is not especially good at dealing with that plethora.
3) OSs only understand the sound formats they have been
programmed to understand, unless they have some 'internet
based mechanism' to get new formats as they are
encountered (Win. does that - very clever).
4) Conversion of (e.g.) a 320Kbps MP3 to a mono, 8 bit,
16KHz, U-law encoded WAV is no simple matter. The
sound needs to be decoded from the old format, and encoded
in the new. Further, what do you do with the stereo tracks?
Merge them into a single mono track? Use 'left' only?

If you want to continue with this, look into the JavaSound API
(javax.sound.sampled, in J2SE since 1.3) or the JMF (extra,
mostly obsolete, abandoned API for media).

But ultimately, I do not think this is a good project
for Java, beginners in Java, or beginners in media,
and it is a lot more work (coding) than you think.

I'm not sure that you get what I want to modify... sorry if I
misexplained myself...
I don't want to modify the audio properties (mp3 to wav nor stereo to
mono, or things like these)
I just want to modify the file properties of an mp3
If only I could send a printscreen of what I'm talking about, I'm sure
it would make this a bit easier to explain...

I'll try to send it by email to you...
 
A

Andrew Thompson

Manix wrote:
...
I'll try to send it by email to you...

Don't do that. I do not welcome email about problems from
usenet. Unless you want consultancy.

Find somewhere on the net to upload it/them, and link.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top