Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

MP3 processing question

Thread view: 
Questman - 19 Jan 2006 19:43 GMT
Hello everyone,

Does anyone know an approach I could take to look at MP3 files in a
directory and :

a) determine the song length (e.g. 3 minutes 47 seconds)
b) "crop" the song (for example, take from 1 minute 00 seconds through 2
minutes, 00 seconds and discard the rest)
c) downconvert the bitrate (from 320k, say, to 64k)?

I'm working on a project that aims to automate creation of "preview"
snippets and I'd love to use Java for it.

Thanks!

Rick
Snyke - 19 Jan 2006 21:11 GMT
Well once stripped the id3 tags the data after that is just divided
into blocks. I seem to remember that if you have a 128 kbps song you
can take the length of the file in bits and simply divide it by
128*1024 and you'll get the length in seconds.
MP3 files are pretty tollerant about cutting, just try to get a full
block size and then everything should play fine. As for the
downsampling I don't know any good library, maybe you can find the
bindings for the LAME library somewhere out there ;-)

Greets,
Snyke
Monique Y. Mudama - 19 Jan 2006 23:48 GMT
> Well once stripped the id3 tags the data after that is just divided
> into blocks. I seem to remember that if you have a 128 kbps song you
> can take the length of the file in bits and simply divide it by
> 128*1024 and you'll get the length in seconds.

Unless of course you have a variable bit rate MP3 .... (I avoid them;
VBR did horrible things to a sample song I tried, and now I'm scared
of it).

Signature

monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

Luc The Perverse - 20 Jan 2006 02:28 GMT
>> Well once stripped the id3 tags the data after that is just divided
>> into blocks. I seem to remember that if you have a 128 kbps song you
[quoted text clipped - 4 lines]
> VBR did horrible things to a sample song I tried, and now I'm scared
> of it).

VBR works quite well with the latest LAME codec.

However I'm currently in the process of comparing side by side high quality
Vorbis, MP3 and Lossless audio and am astounded by the difference.

I'm thinking of switching to a lossless codec for all my music.   I use FLAC

--
LTP

:)
Oliver Wong - 19 Jan 2006 21:14 GMT
> Hello everyone,
>
[quoted text clipped - 8 lines]
> I'm working on a project that aims to automate creation of "preview"
> snippets and I'd love to use Java for it.

   You can either find a library for manipulating mp3 files, or try to
parse the information yourself. To do the former, do a google search for
"java mp3". To do the latter, do a google search for "mp3 format".

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.