Mp3 file problems

RandomAccessFile theFile = new RandomAccessFile(soundFile,"r");
byte[ ] buf = new byte [128];
long length = theFile.length() -128;
if (length<0){
System.out.println("File too short for ID3 tags!");
//setNullStrings();
return false;
theFile.seek(theFile.length()-128);
theFile.readFully(buf);
if ((buf[0] =="T" && (char)buf[1] =="A" && (char)buf[2]=="G")){
if (buf [3] ==0 &&buf[33] ==0){
//setNullStrings();
return false;
else {
songTitle = new String(buf,3,30);
     artist = new String(buf,33,30);
return true;
}

BTW your using the old ID3 tag record layout, there is a newer variable one that isn't limited to 128 bytes, so if your problem is that your song info isn't showing up, thats probably the reason why.

Similar Messages

  • Mp3 file problem

    i am trying to retrieve the song title and artist name from the ID3 tags of mp3 files...
    i have been trying to use the following code but i am stuck
    RandomAccessFile theFile = new RandomAccessFile(soundFile,"r");
    byte[ ] buf = new byte [128];
    long length = theFile.length() -128;
    if (length<0){
    System.out.println("File too short for ID3 tags!");
    //setNullStrings();
    return false;
    theFile.seek(theFile.length()-128);
    theFile.readFully(buf);
    if ((buf[0] =="T" && (char)buf[1] =="A" && (char)buf[2]=="G")){
    if (buf [3] ==0 &&buf[33] ==0){
    //setNullStrings();
    return false;
    else {
    songTitle = new String(buf,3,30);
         artist = new String(buf,33,30);
    return true;
    Any suggestions will be appreciated.

    Without trying to speak for
    anyone, the "reinventing the wheel" comment had do to
    with your having problems writing code for which there
    are already a set of nifty classes already available
    that do exactly what you're trying to do.You got that right
    To some folks, that seems like a big waste of time and
    effort.To every sensible human beeing i hope. Writing the same code, creating lots of bugs in the proccess and not giving a damn about libraries that are already available and tested does not make sense in this solar system

  • Problem with mp3 files after upgrading to iTunes 8.0

    I have the following problem in iTunes after installing the 8.0 version:
    I have noticed that certain (mp3 in this case) files do not play or download Album Cover from iTMS.
    These files were in normal condition at least 1 day ago, before the update and I can still find them in my iPhone which has not been sync since the iTunes update.
    Things I've done before posting:
    1. Checked the files that they still exist in their original location as they are set in iTunes preferences.
    2. Those files can be played either in Quick Time or in Finder Quick View (and Real Player and VLC).
    3. I have restored the mp3 files from Time Machine but no solution found.
    4. I have backed up and erased and created a new iTunes Library and tried to import them again on an empty library but nothing happened.
    5. The files existed in iTunes (without Artwork which they did have previously) but I could not play them (double-click etc). Then I removed them, I cannot add them again (either by 'Add to Library' or by drag-drop)
    6. Of course, I did a volume repair and permissions repair by booting from the OSX install DVD.
    (edit) 7. I moved the files on my MacBook Pro and tried to add them in the iTunes there (completely empty and different library). This also had no result...
    So after all these, the files are still not accepted in the iTunes but they still exist (and are playable) in my iPhone after yesterday's sync.
    Any ideas? because i'm running short atm
    Message was edited by: Periclesm

    Had the same problem with the new update. I finally got back to my previous version by using system restore. After the restore I had to go to the "All Programs" list and click on Quicktime and iTunes individually to allow them to re-configure, then had to restart the computer again. After that all's well. My lbrary was intact.
    I tried everything to get the newest version to work, including completely uninstalling my current versions of QT and iTunes, then downloading the latest directly from the Apple website, but, after 3 attempts, nothing worked. Guess I'll have to wait for the next update and try again.
    By the way, your library is not actually stored in iTunes--it is stored in your Music folder, so you should not lose anything by uninstalling iTunes if you need to.

  • I recently updated my macbook, i don't know if that has any effect to my recent problem, but when i try to download and save .mp3 files from the internet, like i have done in the past, it downloads but not as an mp3 file, its "blank"

    i recently updated my macbook, i don't know if that has any effect to my recent problem, but when i try to download and save .mp3 files from the internet, like i have done in the past, it downloads but not as an mp3 file, its "blank" and when i try to open it, i can't? I NEED HELP !

    Here is the download page

  • I have 2 iphones syncing on one computer and on the same apple ID. Before i updatad my Itunes to the last available update and my Iphones to 5.01 i had no problem draging jpg. and mp3 files into my iphones DCIM folder (the picture folder that opens when c

    I have 2 iphones syncing on one computer and on the same apple ID.
    Before i updatad my Itunes to the last available update and my Iphones to 5.01
    i had no problem draging jpg. and mp3 files into my iphones DCIM folder (the picture folder that opens
    when conecting to Itunes). Since my updates Itune wont let me drag and drop any files' even pictures that
    were taken with my Iphone on 4.3.3.
    Please help as we have no itunes music in Israel, only apps and i cant copy any of my old music from my computer
    to my iphones.
    If it helps, i am using a pc with 32 bit windows 7.
    Other from the obove Itunes works fine and does sync pictures from my computer to my Iphone from "my pictures" folder.
    Thank you for your time
    Yoni Bliss
    [email protected]

    The title of my initial post is a bit misleading. I already took a chance deleting one of the iPhones, hoping if I deleted the wrong one, I can still reauthorize it (all with the same Apple ID acct, so not subject to 90-day waiting period, right?) The iTunes database just updated itself, and it says I have 4 "devices" "in the Cloud", but 5 "computers" associated w my account. How can I find out what computers are associated? Isn't there a list I can see? I dont have a clue what computers they might be. If I use the  "Deauthorize All" option, is it a pain to add them all back in. I assume I would have to log in from each computer to reauthorize each one. Would I have to be running the newest OS or version of iTunes to reauthorize? I think I have a PowerBook G4 Titanium with an older OS and iTunes. I'd like to keep that authorized, if possible.

  • Two problems with MP3 files for interactive PDFs

    1. I'm putting in two interview excerpts for an interactive pdf. Last week when I tried to import the first MP3, I got the "cannot place this file. No filter found for requested operation" error message. I don't know anything about sound files, so I just tried To MP3 from the App store, which converted my MP3 file to another MP3 file, I guess. The new file worked fine.
    I got the second file today and had the same problem. I sent the following urls (http://indesignsecrets.com/forum/general-indesign-topics/how-to-place-an-mp3-file-into-ind esign-cs5-which-was-edited-with-audacity-and-converted-with-switch, http://indesignsecrets.com/forum/general-indesign-topics/no-filter-found-for-requested-ope ration-mp3) I found that seem to describe similar problems to our sound guy at work.He tried lowering the bit rate, but it didn't do any good. So when I got home, I tried To MP3, and it solved the problem again.
    Does anybody know why this is happening?
    2. Once I had the first sound file in place, I wanted to replace the small gray box that Acrobat puts in. Bob Levine suggested
    http://indesignsecrets.com/hiding-sound-files-in-an-interactive-pdf.php
    which worked great, but I needed some way to control the audio. I tried a variation of Steven Werner's suggestions in
    http://indesignsecrets.com/hiding-sound-files-in-an-interactive-pdf.php
    It was working fine, when I had just a play and pause button, but when I added a resume, the play button just stopped working. I tried all sorts of variations, getting rid of the double actions in the buttons, starting new files, new buttons, but the play button just didn't work. In my last test, the play button worked, but only after I had pressed resume. So I am completely stumped.
    Any suggestions would be welcome. Thanks.
    I'm using InDesign 7.0.4, Mac OSX 10.6.8
    Chris

    OK, I should have thought more  before I answered.
    So I see that Media Encounter does import audio files but it only exports video. However, I did a test with making a video file from the MP3, importing that video into InDesign, reducing the video, using the multi-function buttons, and everything worked fine. I got the warning message that the "interactive elements are clipped in ways that PDF files cannot reproduce" but it didn't interfere with playing it back. Still, I feel as if I'm cheating and something is going to come back and haunt me.
    The disadvantage is that the video files are larger than the audio.
    Chris

  • When I click on my desktop Mp3 files appear... Any have this problem or a solution?

    Recently my macbook pro has been acting weird. First when I tried clicking on harddrive on desktop, mp3 files popped up. That stopped happening but now when I click on desktop, mp3 files continue to appear. anyone have this problem in the past or have any solutions or suggestions? Thanks

    Delete the shortcut you have on the desktop and then go to C:\Program Files\Mozilla Firefox.
    Then right click '''firefox.exe''' and choose ''Send To'' and then ''Desktop (create shortcut)''.

  • Problem saving mp3 files from the internet

    Hi
    I'm having problems saving mp3's from internet sites. Whenever i find an mp3 which I wanna download, and I press the ctrl button as choose "save as", it oly saves as an internet link file ( called something like web.archive) does anyone have an idea how i solve this problem? Another thing is if i click the mp3 file it opens in quicktime, but there is no save as options..
    Best Regards
    Mark

    No that is not the problem, it works with windows and I have done it before, just not with a mac

  • [solved]Problem with mp3 files on WRT610N (NAS)

    I recently installed a usb-HD to my wireless router LINKSYS WRT610N Firmware Version: 1.00.03 B15. Then i wanted to change names and also delete some mp3-files. But any mount[.cifs] would not give me write access to those files. I googled a lot and found many issues (even on the linksys forum) on theis topic.
    But the reason is that the linksys router will not give write access to any mp3 (and posibly other music) files. Any other type (txt, doc, exe ...) I can create, modify and delete. I see no obvious reason why this is so, but this could be a problem with other NAS's as well. It have really confused me for quite some time misbelieving it was an issue with archlinux as some other posts suggest, but it is not.
    Linksys is not helpful. So for me the solution is to connect the usb-HD to my linuxbox and make the nescesary changes here. This is not an elegant solution but at least now I know who to blame.

    Thank you for posting your solution; this may be very helpful for other users experiencing the same problem.

  • ITunes / iPod having problems with lyrics in MP3 files and not with M4A ?

    Over the last two month (without this forum) I believed sometimes to be the only one having a weird problems with iTunes lyric format structure.
    Now after more than 50h of investigations interesting results appear.
    The field of trouble:
    a) People are not able to delete lyrics in iTunes
    b) People discover that iTunes and their iPod/iPhone do not show the same lyrics
    c) it seems that the lyrics of certain songs can't synchronised with the iPod
    d) it seems that the problem in iTunes can appear more than one times that itunes corrupts the contents of lyrics in a way that:
    e) the text structure is damaged, no more line breaks, no empty lines between text sections.
    After all my suspicion is: All of this trouble can be caused by one problem:
    iTunes (at least latest version 9.0.3 (15) has a -unkonwn- problem with the lyric-text structure in MP3-files. It seems that iTunes does not have the same problems if the file is in M4A-file format, created by apple-store files being downloaded, or CDs being converten in iTunes using the build in AAC-converter!
    Converting "infected" files (via AAC) to M4A are clean again (on iTunes and iPod) showing no more one of the trouble ahead. The ghost is eliminated. Everything synchronizes as it should be.
    And I for myself have to convert more than 3000 songs now... to ged rid of this nightmare.
    Now I'm very curious of You experiences. Can You confirm my suspicion? Or have You had similar problems with Your M4A-files too?
    - Best Regards ThomasK_DJ, south Germany

    Try this -> http://mp3val.sourceforge.net/ to verify and fix MP3 files.
    Also, it could be the version of the ID3 tags.
    Select a song in iTunes then go to iTunes menu Advanced -> Convert ID3 tags and select a different version and see what happens.

  • HP G56 intermitte​nt sound problem - e.g you tube/MP3 files play for 10 seconds then stop.

    HP G56 intermittent sound problem - e.g you tube/MP3 files play for 10 seconds then stop.  I have made sure that the latest sound driver is installed and this makes no difference. The laptop is new so there is no other software on it other than the pre-installed stuff operating on windows 7.  In sound options all looks well and the device is said to be working properly.  Even the sound test in device manager sometimes works and sometimes doesnt. 

    karl6792 wrote:
    HP G56 intermittent sound problem - e.g you tube/MP3 files play for 10 seconds then stop.  I have made sure that the latest sound driver is installed and this makes no difference. The laptop is new so there is no other software on it other than the pre-installed stuff operating on windows 7.  In sound options all looks well and the device is said to be working properly.  Even the sound test in device manager sometimes works and sometimes doesnt. 

  • Having problem with playing audiobook .mp3 files

    I have downloaded some audiobook mp3 files. I can transfer them fine to the Ipod, but when I choose the file to play, it goes through all the steps right up to the playing of the mp3 file, then the backlight shuts off, the screen wipes out and the white apple logo comes on and reboots into the main menu screen list.
    As long as I continue to choose these audiobook mp3 files the Ipod will continue to reboot and not play the file.
    I have downloaded the same audiobooks on 2 different occasions, and the same thing happens. The files do play through the iTunes library list from my computer.
    Any ideas on how to solve this?? I don't have any problems playing any of the other audio book mp3 files that I have dragged and dropped onto the Ipod.

    http://docs.info.apple.com/article.html?artnum=304490

  • .mp3 files that used to play now say 'the file is corrupt' but they play fine in google crome. Do you have problems with your default mp3 player?

    I've posted a number of mp3 file links on our website. All have been functioning and playing well until this week, they are no longer playing when clicked on. The new tab opens, thinks, then says that the "video cannot be played because the file is corrupt". These files are able to be downloaded and played from individual computers and will play fine in other browsers - such as Google Chrome.
    Not sure if there is an issue with Firefox default mp3 player?

    I assume that this is because of the way the MP3 file is encoded.
    Sample rate: 22050 Hz
    Bitrate: 32 kb/s
    If I open the file in a tab then I see a media player, but inspecting the page source shows a video tag with no source attribute, so Firefox seems to have a problem with decoding the media header despite the audio/mpeg content type.
    I don't know what to do about this apart from playing the file in an external player or play the file via an object or embed tag to make Firefox use a plugin.
    Using a bookmarklet like this to force an audio tag doesn't work as well:
    <pre><nowiki>data:text/html,<audio src="%S" controls>
    </nowiki></pre>

  • Problems importing .mp3 files to itunes

    I'm having problems importing .mp3 files to itunes, it's importing the song name tage with "artist - song title" when it should just be the song title?

    Chad, 
    Glad to hear that Steve's script was helpful.
    As to the bug, I don't know.  The problem you report is not common.  Usually when iTunes displays artist-title in the Name field, it is either an untagged MP3 or a WAV file, but in those cases it does not correct itself when you give it a kick.  Between that and the non-refresh problem you report, I think there is something else going on besides a tagging issue.  At your convenience, you may want to reinstall the newest iTunes, and see if it helps.
    Anyway, enjoy the music!
    Ed

  • Docked problem when copying mp3 files to zen mi

    Hi there,
    The os of my zen micro 5 G is crashed weeks ago. Now I am finally able to reload the os and update the firmware to the newest one.
    When using creative source to copy mp3 files to zen micro, the lcd shows "docked" without only response. The customer support's answer is that there is most probly a problem of hardware.
    Is it true? Or is there any suggestions to handle such docked problem? Actually, this problem existed on the first day of using it.
    I am restalling firmware now.
    Thanks!

    Lai,
    I'm sorry but what dock problem are you referring to When accessing the player using MediaSource or Media Explorer, it's normal that the player shows a docking picture indicating that it's linking with the software.
    Jason

Maybe you are looking for

  • Dotmac e-mail not being received by some

    I have a variety of e-mail accounts, which use a couple of different servers (relay through my ISP). Within the past week, I have sent a series of e-mails from my non-dotmac account to folks with a dotmac account... I get the sent acknowledgement, bu

  • Rental Obj.Occupancy Stat shown as Reserved even after Lease Deed is closed

    Hi All, We r having a problem. Few of the rental objects occupancy status is going to "reserved" after the expiry of an existing lease deed. Normally it goes into Vacant. After going into reserved it is not allowing us to change it back to "Vacant" g

  • Qosmio G10-133 has no sound

    Hi just new to forum so bare with me. Bought my g10 recently and carried out system restore as instructed on update documents: 1 product recovery cd-rom 2 qosmioplayer recovery cd-rom 3 qosmioplayer update cd-rom 4 qosmio update cd-rom. Notebook has

  • Select data from database via XML

    I want to select data for display and insert data to tables via XML, and I want to do this from a browser. I am using "Oracle8i Enterprise Edition Release 8.1.7.4.0" on HP-UX server with "JServer Release 8.1.7.4.0.". The oracle documentation says I n

  • Copy and Paste Error Using Dymo Printer

    I have small issue, I export invoices for my shop to Adobe Reader XI I then Copy and Paste the names and addresses to my Dymo Labelwriter 450 to make address labels. I am using Mac with OS X My Invoices have the Font, ADAM.CG, this is my default for