A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Preloader for Progressive Download FLV

  1. #1
    Special Agent drumatic's Avatar
    Join Date
    Aug 2000
    Location
    nyc
    Posts
    120

    Preloader for Progressive Download FLV

    Ok, I'm using an .flv rendered inside a single frame .swf holding the FLVPlayback component, Flash 8. I'm using the progressive download over HTTP version of the .flv.

    I've read through the threads here extensively, but it appears all the intel so far is for streaming FLVs.

    Recommendations for progressive download?

    As I understand it - bufferTime is largely irrelevant for progressive downloads and independent tests seem to confirm that.

    I have presently just set autoPlay to false - users start the movie when they want, just by coincidence generally having given the movie enough time before starting to get all the way through without interruption.

    With autoPlay at true, the movies almost always require buffering on first viewing.

    Ideally, an intelligent preloader would say autoPlay = true after XX% of .flv is loaded.

    Second best would be simply say autoPlay = yes after X seconds of load.

    Many thanks for any help.
    | KeMeK | drumatic | Threshold Theater | KeMeK Technology |

    ::If you don't know, learn; If you know, teach::

  2. #2
    Senior Member
    Join Date
    Oct 2002
    Posts
    211
    In my opinion, no preloader is worth a damn except an adaptive preloader. Everything else is just guesswork.

    By adaptive preloader I mean one that "sniffs" the users' connection speed then buffers enough to ensure continuous playback, then auto-starts when the buffer is big enough.

    So a dial-up user would have their connecion sniffed and the buffer would probably be something like 95%. A fast cable speed might be sniffed as faster than the bit rate of the video, so the video would start to play immediately.

    I wish I could figure out how to make one of these myself, but for noe the adaptive preloader in Flix is the only good one I know.

    Try the demo.

  3. #3
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    When you are loading an flv using the netConnection /netStream objects etc this IS progressive downloading.

    You can check out my free xml-driven player at http://www.experiments.flashmatics.co.uk/ and see how the streaming/progress bar looks.

    The netStream object DOES allow you define how much you would like to buffer before the movie starts playing . If you have a netstream object ns then simply do :

    ns.setBufferTimer(seconds);

    You can make an intelligent preloader by first getting the duration of the video. For e.g suppose it is 400 secs and you want it to start playing after 20% has loaded. Then what you want is for it to start playing after 20/100 * 400 seconds = 80secs

    so all you would need to do is setBufferTime(80);

    (In fact i use this technique on my website in the videos section. According to what bandwidth you click it will buffer different percentages of the movie)

    Yeah obviously if its VERY long videos like a whole movie or massive conferences then of course you would want to use real-time streaming. But for general use this is more than suitable.

    Regarding an adaptive preloader its not too hard either. When you view videos even on yahoo it asks you to click the 'i see the video button' to detect your internet speed. You can easily mimick this in flash by downloading a small video of say 400 - 500 kb or an invisible jpg behind the scenes and then determing the time it took to load and hence you can find out how many Kbs the users connection is downloading at.
    Last edited by silentweed; 05-22-2006 at 04:26 AM.
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  4. #4
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    silentweeds solution is the best method to use when an adaptive preloader is not available.

    The adaptive method he describes is a good in-between method to use, especially useful if you need to determine the clients connection speed to deliver the right format - but I don't like the idea of having to download useless data, even more of an issue when you're client is on dial-up.

    I'd like to see an adaptive method that utilizes all of these, detection of bandwidth, assignment of stream size, then adaptively buffer and play when enough data is present.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center