12 Replies Latest reply on Jul 28, 2006 1:01 PM by BobMelnyk

    Help with video encoding

    BobMelnyk Level 1
      Hello,

      I was wondering if anyone can explain the difference between "Progressive download from web server", and "Streaming from Flash Video Stream Service." What is the real difference, and why would I choose one optionover the other? Also, when encoding the video, which codec option should I choose? What is the difference between On2VP6 and Sorenson Spark? Why would I select one or the other? Thanks for any insight.

      Bob
        • 1. Re: Help with video encoding
          Nickels55 Level 2
          Progressive download from web server - This is when you publish the video on a normal web server. The video will start to download and buffer, then begin to play before the movie is completely downloaded. The downside to this methos is that the video is cached on the users hard drive.

          Streaming from Flash Video Stream Service - this is true streaming from a communication server. You need to host your video files on a flash communication server and this is supposed to be very expensive. The pros to this method are that there can be different sizes of video dependent on the users maximum download speed. Also the movie is safe from being stolen from the users cache. This is an option for big companies with lots of money and viewers of the content.

          Here is a decent article on the subject:
          http://www.mediacollege.com/video/streaming/overview.html

          Sorenson Spark is an older codec which can be viewed in player 6 or 7. On2V6 is newer and requires the viewer to have Flash Player 8 or 9 installed. On2vp6 is a much better compression codec.
          • 2. Re: Help with video encoding
            BobMelnyk Level 1
            Nickels55,

            Thanks for the reply. I'm just curious...I chose the Streaming option when encoding my video instead of the Progressive download, but I do not have a flash communication sever - I just uploaded the .flv to my regular server. It seemed to work basically the same as when I selected Progressive download. Any idea what is happening here? Does it just default to Progressive download since it is coming from a normal server?

            Also, when I have a longer video (15-20 minutes), there is sometimes a lag time of up to around 5-10 seconds before the video begins. Is there a way to code a preloader to recognize when the video is ready to begin playing, so the user sees something happening before the video starts? Thanks again.

            Bob
            • 3. Re: Help with video encoding
              Nickels55 Level 2
              I have never chosen the Streaming option so I don't know how it works. I always select progressive because that is how the files are going to be published.

              As for the 5-10 second lag, that is the buffer. You can change the buffer amount to anywhere from .01 second up to 45 seconds or more using the Component Properties window. What I like to do is add a layer below the layer containing the video playback component, and put the text "Please Wait While the Video Loads..." on it. While the video is loading the movie area in the component isn't visible, so you can see the text behind it. Once enough is loaded and the video starts, the window covers up the text.

              Here is an example:
              http://www.lsac.org/lsac.asp?url=/VideoStreams/africanamerican/AfricanAmerican.html&chapte r=1
              • 4. Re: Help with video encoding
                BobMelnyk Level 1
                Nickels55,

                Thanks for all your help!

                Bob
                • 5. Re: Help with video encoding
                  Nickels55 Level 2
                  No problem, if you have any more questions you know where to find me.

                  Good Luck!
                  • 6. Re: Help with video encoding
                    BobMelnyk Level 1
                    Hi Nickels55,

                    I did come up with some other questions. After following your advice, things are working very well - for the most part. The one problem I see now is this. The system is hosted on a server in Poughkeepsie, New York. I am being told that users located in Singapore can not use the system. The video starts/stops, is choppy, etc. Basically unuseable. I'm assuming this is some sort of bandwidth/network problem where there is just too much networking to go through from the Poughkeepsie server to the server in Singapore. I tried installing the system on another company server which is more of a "global" server than the one in Poughkeepsie. When trying to run from this other server, I had another problem. Within my Flash movie, I have an addListener event which detects when the video is finished playing, and goes to the next frame, which goes to another url which plays the next video in the playlist. This works great from the Poughkeepsie server, but on the new server it plays about 15 seconds of the first 4:00 video and thinks it is finished and goes to the next video. Very strange. I'm at a loss for what is happening. Any insight would be greatly appreciated. Thanks again for all your help so far!

                    Bob
                    • 7. Re: Help with video encoding
                      Nickels55 Level 2
                      Here is the code that I use to "listen" for the video ending. It looks like this:
                      --------------------------
                      vid.contentPath = "movie.flv"; //Name of 1st video based on url variable
                      vid.setBufferTime(20); //sets buffer to 20 seconds before playing

                      var vidList : Object = new Object();

                      vidList.complete = function() {
                      vid.contentPath = "movie2.flv"; //next video
                      vid.setBufferTime(20);
                      }
                      vid.addEventListener ("complete",vidList);
                      stop();
                      --------------------------
                      There are many variations that I have of this code for multiple videos. That code is just waits for one video to end then it loads in the second video.

                      It sounds like you need to buffer your video longer. There also seems to be a problem with your listener object on the second video. You might have to post some of your AS code for further help.
                      • 8. Re: Help with video encoding
                        BobMelnyk Level 1
                        Hi,

                        I resolved the problem with the video not completing properly. There must have been a problem uploading the .flv to the new server. I uploaded it again and it is working fine now. So, my only problem now is that the system works fine except users in the Asia-Pacific area accessing it are unable to view the videos due to problems with the video stopping/starting, etc. My guess is this is due to all the network that exists between New York and there. Does that make sense? Thanks.

                        Bob
                        • 9. Re: Help with video encoding
                          Nickels55 Level 2
                          Increase the buffer size. The video stops when it runs out of info and restarts when it has enough buffer to continue. By increasing the buffer size you add to the initial time it takes for the video to start. This should get rid of the stop start problem. Try a buffer of 15 seconds, then 30, then worst case maybe even 45 seconds. It is trial and error really at this point.
                          • 10. Re: Help with video encoding
                            BobMelnyk Level 1
                            Nickels55,

                            Thanks, I 'll give that a shot. For those who are local and are currently not experiencing any problems, that will not affect them, right? The video will not wait the 30 seconds to start if there is no need to, right?

                            Bob
                            • 11. Re: Help with video encoding
                              Nickels55 Level 2
                              Incorrect! That will affect all viewers of the video.

                              The buffer doesn't equat to wait time. A 5 second buffer could take half a second or 2 minutes if the user is on 12k dial up modem. Buffer is how much of the movie is loaded on the user's cache before it starts playing.

                              What will happen is that the video will not play until 30 seconds worth of content is downloaded into the users cache. For local users this shouldn't take long. It does take longer to preload 30 seconds worth of video then it does to load .01 seconds worth of video.

                              You might want to split the content from local and oversea users, or just make the buffer like 15 seconds. On a cable modem that takes about 3-5 seconds to buffer that far ahead, which isn't much.

                              Hope that is clear now what a buffer is and how it works. Your oversea viewers are getting enough info for the video to play, but the dl speed isn't keeping up with the movie playing so it runs out of data and stops. Then it loads more info, plays and runs out of data again and stops.
                              • 12. Re: Help with video encoding
                                BobMelnyk Level 1
                                Ah, I think I understand now. While it does affect everyone, those on the local LAN or a cable modem will probably not see to much impact. But those overseas, while waiting a bit for the video to start, may get enough pre-loaded so that the buffering can keep up with the playing and they will be ok once it starts (hopefully :-)). Thanks again.