Streaming mp3 length - how to get it

Hi
I am using as2 to stream some mp3s. At the moment I have an attribute within the xml for giving me the length.
I guess the length for the mp3s is buried in the mmp3 file somewhere. If I load the files in totally first, then I can get at the info (ID3 is it?) however, this doesn't work for streaming them . Or rather, I can't make it work! (I have found posts which suggest making an estimate if you know how much has downloaded in so many seconds and you know the length etc etc - but this is exactly that - an estimate!)
So my question is how do I get the length of an mp3 clip that I am going to stream?
THanks

after a few seconds of streaming you can estimate the duration of your sound (s) by using:
s.getBytesTotal()*60*s.duration/(1000*s.getBytesLoaded())

Similar Messages

  • I just purchase an IPhone5C to upgrade from my IPhone4, but I do not know how to get all of my photos that were on ICloud on my Photo Stream (875 photos), on to my new phone. I thought that since my 5C can see Icloud that all photos would be there...

    I just purchase an IPhone5C to upgrade from my IPhone4, but I do not know how to get all of my photos that were on ICloud on my Photo Stream (875 photos), on to my new phone. I thought that since my 5C can see Icloud that all photos would be there... Can someone help me get the pics from my Iphone4 to the 5C?

    Photostream in the cloud only keeps photos from the last 30 days (subject to a 1,000 photo limit). When photostream syncs the photos to your device they will stay there (subject to a 1,000 photo limit) until deleted, which means you may well have more photos in your photostream album on your device than there are in photostream in the cloud.
    The consequence of this is that if you turn photostream off and on again on your device (or enable it for the first time), it will only be populated with photos from the last 30 days, which may not be all the photos that were previously in the photostream album on that device.

  • I used to see a monthly "Feb 2014" photo stream category in my library for each month.  Now all of my photo stream photos (from my iPhone) are under "iCloud" under "Sharing" and I don't know how to get my pix out of there and separate them into libraries

    My computer has changed how it accepts photos from my phone.  They used to post into a library by the month and year, e.g., "Feb 2014 photo stream," but now all of the photos from my phone for the past year or so are lumped together into the "Shared" section under "photo stream." I did not put them there (that I know of) and now don't know how to get them out and into a library where I can categorize them. 

    The monthly events "Feb2014" will show you all photos that have been imported from "My Photo STream", if you have enabled "Automatic Import" in the "Preferences > iCloud" tab.
    The albums you are seeing under "iCloud" are the "Shared Photo Streams" and "My Photo Stream". To import from your "Shared Streams" drag the photos frommthe Shared Streams album to the Projects in the library panel.

  • How to get Length in pixel of a String in j2ee??

    Hi guys, im having a problem trying to find out how to get pixels from a string length, but in j2ee, i've researched, but everyone said to use Graphics2D, but since im using j2ee, i dont know how to use this.
    For example i found this piece of code, but this doesnt work for me:
    public void paint(Graphics g) {
    Graphics2D g2d = (Graphics2D)g;
    Font font = new Font("Serif", Font.PLAIN, 12);
    FontMetrics fontMetrics = g2d.getFontMetrics();
    int width = fontMetrics.stringWidth("aString");
    int height = fontMetrics.getHeight();
    How to get g2d, if i dont have a graphics to send it to the method??
    I would be really happy if anyone could send me a example using a javabean.
    How to do this guys???? please help me with this guys,thanks.
    yellr

    im working on a good explanation for this question, im trying to send pics of my programso you understand me pretty well. But a general idea, its im creating dynamically components, like labels, textFields, dropDowns, etc. My problem comes when im adding to form the labels, these labels are going to show the descripcion of the component, which it could be a textField, dropDown, textArea etc.
    I put all these components on a gridPanel, for each row i can have severals componets,
    I have a gridPanelGeneral which have all other gridPanels, this gridPanelGeneral have gridPanelRow+"numRow"
    This gridPanelRow+"numRow" can have severals components which show like columns.
    Sincerely i would like to put pictures of the program, so that way you will understand my problem, i need to set the label.setStyle(width:"+numPixelesOfDescriptionOfComponent+"px). To put these labels well, because the user cant see very well the description of the component when i have severals components, each component does have a label for its description. descriptionOfComponent is a string thats why i need to get the pixels of the string.
    One question, how do i do put pics on this forum??
    Edited by: yellr on Oct 30, 2007 9:56 AM

  • How to get the length of apex_item in javascript?

    Hello all
    I am having a tabular report using apex_item, I want to know how can i get the length of the item in javascript? like we do in pl/sql using apex_application.g_f01.count().
    and one more thing, when I go to certain page, tab of that page is getting disabled, what should I do to make tab available always whether I am on that page or on any other page.
    Thanks
    Tauceef

    Hi Oli
    Thanks for replying, In my first question actually I am validating the report values in javascript for that I need the length of the apex_item to run the loop that many times.
    Like we can get the length using apex_application.g_f011.count in pl/sql process how to get the length in the javascript, is there a way for that?
    I got the answer for the second question, this is the one.
    Thanks
    Tauceef

  • How to get file input stream from the client machine by JSF Fileupload API?

    Dear Friends,
    How to get the file input stream from the client machine by JSF HtmlFileupload or fileupload API. At present, if i execute the file upload code in the client machine, it is able to get the local path of the file and looking for the file in server machine. So i am getting FileNotFoundException.
    E.g., If a file is located at client machine at following location means "C:\Test\Test.txt",
    uploadClass.getFileuploadComponent().getFilename().toString() returns "C:\Test\Test.txt". But it is looking for that file in server and throwing FileNotFoundException.
    Please post your replies soon.
    Thanks,
    JP

    Depends on which version of JSF you're using. If JSF 1.2, I wouldn't even bother trying to hack this into JSF itself unless you can use something like Seam 2 or richfaces.
    http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_fileUpload.html
    http://docs.jboss.org/seam/2.2.1.CR3/reference/en-US/html/controls.html#d0e29259 (look for s:fileUpload)
    But if I were you, a simple non-jsf form with a servlet works best for taking file uploads.
    As for JSF 2.0, there are other ways of getting it done.
    http://balusc.blogspot.com/2009/12/uploading-files-with-jsf-20-and-servlet.html

  • How to get mp3s from the cd to my iPhone library in iTunes when I hook the phone up to my iMac

    Always before I hook the iphone up to the imac and open up itunes it recognized the phone and synced. Then you click on the phone and you had a choice of "on this phone" and it would show the folders and songs on the phone. Now, when I hook it up it, it will recognize and sync, but there is no "on this phone" choice and I do not know how to get songs or mp3's from my cd that is in the computer drive to my iphone in itunes. Where did this choice go? How do I get things from a disc to my phone?

    Your post is confusing to me because I don't understand the process you are describing.  Normally, you would import your CD music into iTunes, then sync your iPhone to iTunes, capturing the music on your iPhone.  The "On This Phone" tab would be irrelevant.
    Anyway, you can see "On This Phone" by pressing the iPhone icon toward the top of the iTunes window when the iPhone is plugged into iTunes.  "On This Phone" is a tab toward the rear (the "Summary" tab is at the front).

  • My itunes no longer has the 'internet' tab for free streaming radio.  Any ideas how to get it back?

    I recently downloaded the itunes program to a new computer with Windows 7 and I notice that the 'internet' tab feature is missing from the icons.  The internet feature allowed you to browse all the different types of music, talk radio, etc. online and free stream.  I still have it available on my old Windows XP professional computer, however.
    Anyone know how to get that feature on the Windows 7?

    I actually found the answer to this in another discussion!  Thanks anyway!

  • How to get length of a data field

    Hi Experts,
    How to get length of a data field. For example data field /BIC/0COSTCENTER length is 9. and the entry in the table is /BIC/0COSTCENTER = 1000 only. How to get the lenth of value in the table.
    Any help greatly appreciated. Thanks.
    Best Regards,
    Suresh.

    Below is example  code
    Data: var1(10) type c value '2500',
          var2 type i.
    var2 = Strlen( var1 ).
    write var2.
    <b>Reward Points for helpful answers</b>
    Satish

  • My photo stream has stopped working, any idIeas how to get it back up.

    My  Photos are not being sent to my pc and i get a message that says photo stream.exe has stopped working.  Does anyone know how to get it back up??

    Make sure your network connection is online.

  • How to get live stream name

    Dear all!
    I use ffmepg to push a livestream to my flash media server. Then I want to catchup live stream to file.
    /opt/ffmpeg-1.1.1/bin/ffmpeg -i udp://238.1.1.2:1234 -filter:v yadif -acodec libfaac -ac 2 -ar 44100 -b:a 96k -af volume=5 -b:v 1000k -c:v libx264 -preset fast -pix_fmt yuv420p -s 720x476 -r 25 -threads 0 -t 300 -f flv "rtmp://10.84.70.120/dvrcast_origin/vtv22"
    After, I create an application that main.asc file is:
    application.onConnect = function (){
            name = Stream.name();
            stream = Stream.get(name);
            if(stream){
            stream.record();
    I can not catch live stream to file.
    Can you show me how to get a live stream name?
    Thanks!

    The error only appeare when there is no stream name in output.
    rtmp://10.84.70.120/dvrcast_origin/   --> error
    rtmp://10.84.70.120/dvrcast_origin/vtv22 --> ok.
    1. Could you re-try using the -ru option? for realtime publish?
    2. Have you compiled the ffmpeg with rtmp libraries?
         I can publish without error as the format above. So it is not problem.
    3. Are you able to record the udp stream onto the disk? (to verify there are no problems with the input stream? --> I've test with input without FMS. It's ok.
    4. Are there any error messages logged in FMS? (core logs/application logs)
    There is no error log file in logs/ folder.
    When I test with Flash media live encoder. I press "record" button. Everything is ok.
    The problem only appeare when I put stream with ffmpeg .
    Is there special anyconfig that effect it?

  • How to get length of data on column with long datatype

    How to get length of data on column with long datatype without using pl/sql block

    ...another reason not to use LONG datatype for columns.
    Oracle advises to switch to LOB columns instead
    SQL> create table t
      2  (x long)
      3  /
    Table created.
    SQL> insert into t values (rpad ('x', 10000, 'x'))
      2  /
    1 row created.
    SQL> alter table t
      2  modify x clob
      3  /
    Table altered.
    SQL> desc t
    Name                                      Null?    Type
    X                                                  CLOB

  • How to get the IP address of a new stream?

    Can anyone tell me how to get the IP address from which a newly detected RTP stream is being sent, especially when a NewReceiveStreamEvent is posted? Or, is it possible to do so?
    Thanks in advance.

    My RTPConnector follows the example from the JMF home page here: http://java.sun.com/products/java-media/jmf/2.1.1/solutions/RTPConnector.html
    I have not done any measurement regarding the performance of my RTPConnector implementation compare to that of the default but I did find some way to deal with the bursty nature of the default RTP transmission which caused some problem with 3rd party apps that don't handle jitter well. I created a 20ms timer that acts as a gatekeeper that allows the transmitter to send RTP packets. Unfortunately Java timers aren't very precise.
    I also improved upon (I think I did anyway) the efficiency of the default (IBM) ULaw encoder as discussed here: http://forum.java.sun.com/thread.jspa?threadID=597011
    My problems with performance issues were mainly in the speed at which processors and players are created and realized on slower PC's.

  • How to get MP3 to pla automatically

    I have minimal experience with action scripting. I was able
    to script a play button and a stop button but I cant figure out how
    to get the mp3 to play automatically.
    Id like the mp3 to load when the page opens while retaining
    the ability to operate the play and stop button oncce youre the swf
    is playing.
    Thanks for any help....

    Sorry about the typo before load -> loadSound
    To get music to play frame page to page when a new HTML file
    is loaded is very straight forward with Frames, but if you want to
    avoid them then you will have to store information about the
    current position of the sound file and then read it back in on the
    next page.
    You can use SharedObjects (do a search in Help for
    sharedobjects) for this but remember that your sound will stop and
    then start as the HTML pages unload and then load.
    There is also a post on this forum by RFsantos who is trying
    to do the samething. You might try seeing if he got the
    SharedObjects to work.
    Tim

  • How to stream mp3's in gmail?

    In the past, I used to be able to just click on mp3's in gmail to have them stream. A few years ago, this stopped working in firefox. The streaming window pops up, but it never plays (see image).
    Is there any way to stream mp3's in gmail with just one click? I have projects where I will need to stream 100's of mp3s. This may end my long run with firefox if it can't be fixed.

    Okay, I reopened the test message that worked for me in November 2013 and as you say, it is not working now. I sent a new test message to my Gmail account, and same problem.
    There seem to be two issues:
    * Firefox sometimes does not get a redirect to the media. Closing the black screen and clicking again may bypass this. (First screen shot.)
    * The audio is not auto-starting in Firefox when the media loads successfully, which makes the control bar useless. If you use a script command to trigger the media to play, the control bar starts working normally. (Second screen shot.)
    This is annoying. Because Google's scripts are normally very complex, I don't think I'll be able to figure out why the media isn't autostarting.
    If no solution is discovered, as a workaround, you could manually trigger the player using a bookmarklet, or possibly autostart it using a Greasemonkey userscript (probably a new script, unless someone has already posted one).
    The bookmarklet would be as follows:
    (1) Select and copy the following line of script:
    javascript:void(document.querySelector("audio").play());
    (2) Right-click a convenient location on your Bookmarks Toolbar or Bookmarks Menu and choose New Bookmark.
    (3) Paste the script into the Location field. Then in the name field, you can type Gmail Play or any name you like.
    (4) Click the Add button
    You would try clicking the bookmarklet after the player appears.

Maybe you are looking for