A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: streaming video in MX...HOW??

  1. #1
    hello,
    I have 5 or 6 different video clips that are each about 20 megs. I need to deliver these through flash to the end user at their request. Does anyone know the best way to stream video into Flash and what format works the best?
    Or for that matter...any good tutorials or books?
    thanks,
    morgan

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    120
    are you devliering over the web?
    if so, you will need to convert the video files into flash movies, .swf that is.
    are you going to import the movie files into flash mx,
    or do you have a third party tool such as flix, or soresopn pro to turn the video files into .swf (flash movies?)

    most people dont stream it as such, (flash just loads each frame as it arrives, there isnt to my knowledge a way to intelligently strem depending on bandwidth)
    mot people
    use a preloader so that you get a buffer loaded, (say 30% of the movie)
    that guesstimates the time it will take for it to load,
    depends on whether it is modem or broadband etc.
    uding a preloader, which is just some kind of looping graphic that plays until a certain amount has loaded.
    could you give a little more detail on how you are devliering this?
    cheers
    ss

  3. #3
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Thanks secondsign, congrats on making senior!

    Flash steams by default, that's what it does. You can stream one of two ways. Either import your clips to the movie and publish with everything inside (which will cause Flash to figure out for itself when there is enough infomation to begin playing regardless of bandwidth) or load the movies dynamically by creating seperate .swf's and using the loadMovie() method, thus loading to a _level - once again taking advantage of streaming. If you load to an MC, your entire file must download before it will begin playing.

    For the first method you can just use the standard preloader (many tutes on how to do this). This gets a little trickier with the second method - but you can create preloaders for this method as well by targeting the _level you are loading to for you preloader information.

    _level2.getBytesTotal();
    _level2.getBytesLoaded(); and so forth.

    5G

  4. #4

    com server

    Thanks guys...appreciate the response.

    Was wondering...can Flash comm Server do what I want? Also, are there any products out there like Flash Comm Server...except not so PRICEY???

    thanks,
    morgan

  5. #5
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    If you want to go that route you may look into the V-cast feature with Sorenson Squeeze. I think it's 20 bucks a month.

    http://www.sorenson.com

    5G

  6. #6
    Senior Member
    Join Date
    Jun 2000
    Posts
    120
    yeah, wat wheels said
    sorry i didnt xplain wel at all.

    wheels, when you do the load movie into level trip,
    do you normally use this without preload and let mx video data "stream" in? does this work for you?
    i have only ever used the the load into mc method when dealing with load mov. for video swf 's
    so i not to sure on this other methods.
    do you find that without preloading and going into a level works well interms of playback
    say for a 2000 frame Broadband video swf? what woudl you normally do?
    cheers
    ss

  7. #7
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Pretty much,

    If you take a look at a video .swf in the debugger you'll notice that is has a _soundbuftime property set to the default (5) - just like a streaming sound .swf. So streams are slightly buffered automatically. This is usually enough buffer if you have your kbp/s set right. I don't think it actually waits 5 seconds, I think they just added it to make sure it checked it's own progress.

    Anyway, I just run everything around 250 kbp/s to make sure I cover those nasty DSL modems and a litte bit more to cover network trafic. The video just starts right away when the main movie has loaded - there is a slight pause because of the _soundbuf time thing, I think you could set it in the main movie if you want, or just try to set the variable on the first frame if you make your own .swf (or use Flix).

    Fortunately, the only clients I have been building video for, only want broadband and have no desire to post alternate content. But if I had to, it wouldn' t be that hard.

    You could just measure the bandwidth of the viewer and send the right size video by just setting a variable based on how fast things are going while you preload the main movie. I think this is what Sorenson offers with their V-cast service. I believe it takes care of sending the right size movie depending on the connection. Kind of like QuickTime Streaming Server (RTSP).

    Take a look at my code in the unofficial FAQ http://board.flashkit.com/board/show...hreadid=356715 There's a _level preloader in there somewhere, it's a text output not progress bar.

    I'm going to check out V-cast, Flash isn't supposed to allow content from a URL outside of your directory - so I'm curious as to how it works.

    5G (that was a long one).

    If all else fails, try something else - experience is knowledge gained from mistakes.

  8. #8
    Senior Member
    Join Date
    Jun 2000
    Posts
    120
    thanks heaps
    long is good

    i have always loaded into an mc, cos it seemed easier, withplacement and stuff, but then of course have to argue with preloaders.
    have been so mainc trying to get it to work that i havent fully understood this side of it., oh a revalation. an idiot i am.
    of to look at your stuff.
    are your sites that you do private? or are there examples that can be viewd?
    cheers
    ss

  9. #9
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    Mostly buried in other work, I do a lot of proof of concept. I'll have one of mine going live next week. I'll post the link.

    Here's a streaming song sampler I did a while back:

    http://www.tcinternet.net/users/5guys/shanehenry/

    This streams to a _level.

    5G
    [Edited by Wheels on 08-31-2002 at 10:41 AM]

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