10 Replies Latest reply on Mar 14, 2009 4:38 PM by D.Davydov

    constroll video download bitrate

    D.Davydov
      Hi everyone,

      I have the following problem:
      I'm developing a portfolio site for myself and publish some video.
      For playback I use
      NetConnection()
      NetStream()
      in self-coded player.
      The problem is that during progressive load video does not play smooth and it's absolutely not possible to watch it unless it's fully downloaded. It's very annoying.
      Bitrate is quite small, around 500kbps (total size of each video file is usually around 5-10 Mb).
      What I though is that if I could limit download bitrate to, say, 600 kbps, I would get rid of these problems and would still have video downloading fast enough to be played on-line.
      Is it possible or what are the options?

      Thanx for the help!
      Cheers,
      Denis

      p/s/ buffering is 10 seconds I believe, but I doubt it has something to do with the problem.
      p/p/s/ web page is: www.red-art.eu
      you can check the problem on any video in the REELS category.
      p/p/p/s/ however, i'm not sure that solution exists, because vimeo.com seems to have the same problem
      (e.g. http://www.vimeo.com/1627220 )
        • 1. Re: constroll video download bitrate
          kglad Adobe Community Professional & MVP
          1. you can determine the user's download rate before your video starts. (you need a preloader on your site's opening anyway.)

          2. you can execute your netstream's play() method and use an onMetaData method to determine the videos duration, pause your netstreams play and start a timer.

          3. determine how long you need to wait to be confident the video will completely download by the time play completes and after waiting that length of time, unpause the netstream.
          • 2. constroll video download bitrate
            D.Davydov Level 1
            Thank you for your reply, but I don't really get the point:

            1. I would like to limit user's download rate, but not determine it.
            Don't get why i need a preloader? In case I want to wait unless video is fully downloaded I can easily do it just by moving MOOV ATOM to the end of the file, but the point is to play it progressively (means while it's downloading).

            2. I use an onMetaData for other issues, that's clear that I can get a duration from it.

            3. is it the same as waiting video to be completely downloaded and then playing it? I think it can be done much easier with something like BitesLoaded and TotalBites without any timers and speed checking.

            But as I said, that's not a solution I'm looking for, I want it to be progressively playing smoothly while it is downloading.
            Maybe I'm missing your idea?

            Cheers,
            Denis
            • 3. Re: constroll video download bitrate
              kglad Adobe Community Professional & MVP
              the point is to allow smooth playback.

              1. your server is already limiting the rate it serves files and that's the problem, not the solution. and you will be streaming it if you follow my comments.

              3. no.
              • 4. constroll video download bitrate
                D.Davydov Level 1
                ok, sorry that I didn't got it from the first time, I'm not a pro in flash-programming.

                Can I ask you some detailed questions then?

                1. you mean input preloader on main flash and once it's loaded by the user calculate his download rate from the time spent on loading?
                2. is clear
                3. you mean the time I need to wait is:
                size /"user's download rate" ?

                Thank you for your help.
                Denis.
                • 5. Re: constroll video download bitrate
                  kglad Adobe Community Professional & MVP
                  1. exactly. you need a preloader display there anyway because it takes so long for anything meaningful to display.

                  3. almost. you can start play before the file completely downloads (and you thereby will be streaming it). you just want to be relatively sure your stream will be completely downloaded when its end is being displayed. so, your pause time should be something like:

                  waitTime=(fileSize-streamDuration*dlRate)/dlRate
                  • 6. Re: constroll video download bitrate
                    D.Davydov Level 1
                    Dear kglad,
                    I implemented your advises but there is no effect. I will check it by printing waiting time and download rate into an edit field, but I'm sure they are meaningfull.
                    Just for any case I post again the link to the web: www.red-art.eu ("reels" category).
                    You said the problem is because flash limits downloading rate, these advises are know-how to overcome this?

                    Best regards,
                    Denis.

                    • 7. Re: constroll video download bitrate
                      kglad Adobe Community Professional & MVP
                      flash doesn't limit download rate. download rate is determined by the user's connection and your server.
                      • 8. Re: constroll video download bitrate
                        D.Davydov Level 1
                        I know, but it's not about download rate. The clip is downloading faster than it is played but while downloading
                        it just does not play smooth and it is not comfortable to watch it until it's fully downloaded.
                        • 9. Re: constroll video download bitrate
                          kglad Adobe Community Professional & MVP
                          what makes you say "The clip is downloading faster than it is played"?
                          • 10. constroll video download bitrate
                            D.Davydov Level 1
                            Because I have a download indicator in self-programmed player
                            (white dots are getting red when the clip is downloading;
                            and I can tell, say, it's 5sec playing from the begging whereas it's downloaded up to 60sec)
                            I guess if you have a look the web, you will probably tell what is the problem.

                            Cheers,
                            Denis