12 Replies Latest reply: Nov 22, 2011 3:45 PM by adninjastrator RSS

    Flash video on web page takes long very time to load before it starts playback

    ptownbro Community Member

      I just created a basic flash file to play a video on my web page and it's taking several minutes to load before it starts playback.

       

      I'm using progressive downlaod and the file is in *.mov format and is 84MB in size. At first that seemed large to me for web play back, but I thought it could handle it since I thought the way progressive download works is that it would start playing the first frame right away and progressively play other frames as they download. However, this seems to be downloading the whole file first (or a major part of it) before starting any playback at all.

       

      Is there some kind of setting I'm missing or is my understanding of the download incorrect and the file size is too large?

       

      Some vitals:

       

      - I'm using Flash Pro CS5

       

      - To create my flash file, I used the standard import video wizard and selected the a file that is "on my computer" and "load external video with playback component" and then, I selected one of the standard skins.

       

      - To deploy the vidoe on my webiste I have three files:

      1) swf file containing the FLV component

      2) the swf file related to skin

      3) the actual video (84MB, mov file)

       

      - Web page includes/embeds reference to swf file

        • 1. Re: Flash video on web page takes long very time to load before it starts playback
          adninjastrator Community Member

          Since the video is a QuickTime .mov file, most likely the problem is that the MOOV Atom is at the very end of the file. This is an index file that holds a measurement of how large the file is. Since that index file is at the very end, the entire file must download before the player can tell how large the file is compared to how much is already downloaded.

          Use software like Index Swapper to move the index file to the beginning of the video file:

          http://renaun.com/blog/code/qtindexswapper/

          Best wishes,

          Adninjastrator

          • 2. Re: Flash video on web page takes long very time to load before it starts playback
            ptownbro Community Member

            So, 80MB isn't too large of a file? And, could I use Adobe Media Encoder to encode it to a FLV or F4V file to so avoid that problem or to change the index?

            • 3. Re: Flash video on web page takes long very time to load before it starts playback
              ptownbro Community Member

              I've now encoded the video using Adobe Media Encoder and have converted the mov file into a f4v file.  This has reduced the file size down to 40MB or so.  However, the problem still persists. Any help would be greatly appreciated.  All I did was use standard import video wizard and CS5 and left all publishing setting as-is/default (Flash Player 10, actionscript 3.0, et ...).

               

              Here's the link to the video:

               

              http://upperhand.com/tv/video.aspx

              • 4. Re: Flash video on web page takes long very time to load before it starts playback
                ptownbro Community Member

                More information.  I tried to swap index to froont using the application you suggested and that did not work.  By the way, I think encoding it to F4V essentially did the same thing (when i tried qtp on the F4V file it said index was already in the front).  Anwya, the index swapper said it was successful, but I'm still experiencig the same playback issue.

                 

                One more thing... when I play the video / open the page from my local drive... c:/inetpub/wwwroot/mywebsite/video.html the video plays fine.  However, when I switcht to http://localhost/mywebsite/video.html the problem sitarts.  Same thing when I swtich from production site (hosted by 3rd party) www.mywebsite.com/video.html... I also have the problem.

                 

                Something with the http call cause the issue (may be obvious, but have no clue).

                • 5. Re: Flash video on web page takes long very time to load before it starts playback
                  ptownbro Community Member

                  Thanks for response, but that doesn't really answer my question.  The swf file is emedded in page not the actual flash video (FLV or F4V file).  To be clear it's a swf file with a FLV compenent withn it. That file is very small and is what is embedded in page.  The mov file is external to the swf and loads when called to play by FLV component.

                   

                  Also, note that generally speaking, flash video should not take a long time to start playback.  Go to almost any website which plays video. It most likely is being don via flash and they start instantly.

                  • 6. Re: Flash video on web page takes long very time to load before it starts playback
                    adninjastrator Community Member

                    I can't get the video to play in either FireFox or Internet Explorer.

                    Are you saying that if I wait long enough it will start to play .... from the link you posted?

                    Also, code says Flash player version 6.... which will not play .f4v

                    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"

                    second consideration is that some hosting services have not correctly set the MIME type for the .f4v video file type. Its a fairly new file type and unless someone else on that shared server has requested the change.... the host may not have gotten around to setting it yet.

                    http://en.wikipedia.org/wiki/MIME

                    You may want to check with hosting service just to be sure that's been taken care of.

                    When you transcoded to .f4v did you change the name/path in the FLVPlayback component?

                    What is the direct download address of the video file? Perhaps someone here will download and do further testing.

                    Best wishes,

                    Adninjastrator

                    • 7. Re: Flash video on web page takes long very time to load before it starts playback
                      ptownbro Community Member

                      Thanks for your response again. Looks like things have changed a bit to complicate this a little more.

                      adninjastrator wrote:

                       

                      Are you saying that if I wait long enough it will start to play .... from the link you posted?

                       

                      What you are implying here is correct. The file won't play no matter how long you wait.  Looks like it's because of the "source" file settings in the Import Wizard may now be incorrrect. This is why it's not playing in the new file. 

                       

                      • When I created my original Flash Video using a MOV file, during the import wizard, when asked "Where is your video file?" I selected the option "Already deployed to a web server...". Here I entered the url to where the video file is located on my production server.
                      • When I created the new Flash Video using F4V file, during the import wizard, when asked "Where is your video file?" I selected the option "On your computer". Here I selected the file from my local drive.

                       

                      Sorry for not pointing out the inconsistency earlier - I didn't think it mattered and plus I couldn't get the F4V file to import from the web server.

                       

                      Anyway, I've changed my object tag using the acutal published html that flash generates and have uploaded all source files to same location.

                       

                      http://www.upperhand.com/tv/video-intro.html

                       

                      To sum up the problem(s) I need help with:

                       

                      Issue #1 - When trying to import F4V file using import wizard, I cannot use "Already deployed to a web server..." as an option for the file location. I believe this is creating issue #2

                       

                      Issue #2 - For some reason, the F4V file will not load into the SWF file when it's published to my production server. 

                       

                      Issue #3 - When the above are resolved, I'm not certain if my orignal question/issue will be resolved...  browser tries to downlaod full file before any playback.  

                      • 8. Re: Flash video on web page takes long very time to load before it starts playback
                        adninjastrator Community Member

                        Things seem a little mixed up here so let's first ensure that all the files are where they should be. For example:

                        http://www.upperhand.com/tv/UpperHand_clips-introductory_offer-YouTube_sharing.f4v

                        returns "File not found".... in other words, your code says the .f4v file should be at that location but the server says it's not there.

                        <a href="UpperHand_clips-introductory_offer-YouTube_sharing.f4v">UpperHand_clips-introductory_offer-YouTube_sharing.f4v</a>

                        Double check that you have uploaded that file to the same folder as the skin .swf. If the .f4v file is actually there but the server cannot recognize it, contact your web hosting service about the MIME type for .f4vs.

                        Best wishes,

                        Adninjastrator

                        • 9. Re: Flash video on web page takes long very time to load before it starts playback
                          ptownbro Community Member

                          First, I have quadruple checked =) that the following files are all in the same directory:

                           

                          • video-cs5-f4v.swf
                          • SkinOverAllNoCaption.swf
                          • UpperHand_clips-introductory_offer-YouTube_sharing.f4v

                           

                          If you go to link I provided you'll see that near the top, I've provided links to the source .fla file and to the 3 files above as well.

                           

                          Second, I think the reason it said file was not there is because of the other item you pointed out: missing mime type for f4v file.  I worked with my hosting provider and we have now added the mime type for the f4v file and have restarted the website.  You should now be able to download or view that file independant of the flash player I built.

                           

                          Now, with that change we are still left with the same issues.  If you view the test page, the video never starts. Again, during setup in the import wizard I chose "On your computer" in the "Where is your video file?" option. As you already know this requires only that the video file be in the same relative path as the published swf file.  As noted above, I've verified that as true 4x. Plus, if you run swf independant from the web (not through browser but directly from local drive) it finds the file fine and runs correctly.

                          • 10. Re: Flash video on web page takes long very time to load before it starts playback
                            ptownbro Community Member

                            Partial Success!  Looks like your original suggestion about swapping the index to the front was the source of the problem after all.

                             

                            Putting together everythng you've said above I decided to try changing the source of my f4v file from "On your computer" to "Already deployed to a web server...".  Thinking since it can't find my file when importing it from local drive maybe it could if I provided the url to the video file on my production server instead. And... it works!

                             

                            Then, since that worked, I tried the original mov file that had the index swapped also chaning the source to "Already deployed to a web server...". And... it works also!

                             

                            So, it seems that after fixing/changing other issues (mime, source location, etc..) swapping the index on the mov file using the application you suggested worked.  And, using Adobe Media Encoder to switcht the mov file to a f4v also works since f4v indexes are at the front automtically (I assuming).

                             

                            Thanks for your time and efforts!

                             

                            P.S.

                            Still don't know why when imorting file from local drive doesn't work, but at least the other method works.  I'll close this discussion and start a new one about that another time.

                            • 11. Re: Flash video on web page takes long very time to load before it starts playback
                              ptownbro Community Member

                              Forgot to mention... To see results

                               

                              The following shows the f4v file (I assume indexes are at the beginning already) using the "Already deployed to a web server..." option for the "Where is your video file?" question from the import video wizard:

                               

                              http://www.upperhand.com/tv/video-intro-web.html

                               

                              The following shows the original mov file with the index swapped to the beginning using the "Already deployed to a web server..." option for the "Where is your video file?" question from the import video wizard:

                               

                              http://www.upperhand.com/tv/video-cs5-qtp-web.html

                               

                              Works in ie, chrome, and firefox.

                              • 12. Re: Flash video on web page takes long very time to load before it starts playback
                                adninjastrator Community Member

                                Glad you got it all working! sometimes it's a combination of little things like that!

                                Best wishes,

                                Adninjastrator