5 Replies Latest reply on Jan 11, 2011 8:37 AM by adninjastrator

    Cannot get SWF with imported video to play on server

    Follicle84-fQz38D

      I have had this issue for quite some time, but I never got around to looking into it until now.

       

      I am having an issue trying to get an SWF that features an imported video to play on our web server from its URL. About six months ago, I didn't have this issue. The only thing that has changed since then is that I have gone from Mac (Snow Leopard) to PC (Windows 7). I am using CS 5. I've attempted to perform that same action on the Mac in CS 4 without success.

       

      I do as I usually do: import the video (in this case an MP4 or F4V) into a Flash file and add a skin using Flash's "Import Video" function. I publish the file as an SWF and can get it to play on my hard drive. Once I place it on the web server, I can get the file to play by browsing to the server's contents in Windows Explorer and clicking on the SWF file. However, when I attempt to access the movie via its URL, the file will not play. The skin I chose shows up, but the status bar in between the "play" and "stop" buttons just looks like it's loading continuously.

       

      I've tried importing the video in several different formats, always with the same result. At first, I thought it was the MP4 file, but then I used Adobe Media Encoder to encode it into an F4V file with the same results. Everything plays fine locally (even from the web server). But when I attempt to access the video by its URL, it simply won't play.

       

      Any suggestions for what might be going on?

        • 1. Re: Cannot get SWF with imported video to play on server
          adninjastrator Level 4

          Is the .swf placed on a web page that is NOT in the same folder as the .swf?

          If so, then the path set inside the .swf to find the video file is not correct.

          When you place a .swf on a Web page which is in a different folder than the .swf, you are in effect removing the .swf from it physical folder and moving it to the same folder as the Web page. So then, of course the path to the video file needs to be changed RELATIVE to the Web page, not the physical location of the .swf.

          In other words, testing the .swf by clicking on it directly, SHOULD NOT work. That's because you have pathed the .swf to find the video file when on the WEB page, not it's physical location.

          Best wishes,

          Adninjastrator

          1 person found this helpful
          • 2. Re: Cannot get SWF with imported video to play on server
            Follicle84-fQz38D Level 1

            At this point, I'm not attempting to call up the SWF file on a webpage. I am trying to view the file by accessing its URL directly: i.e. mywebsite.com/video.swf, which opens the file in Flash Player within the browser. The reason I'm not placing the SWF on a webpage is because my supervisor wishes to link to the SWF directly using Sharepoint. So far, our Sharepoint server has been having the same issue as our web server (with this particular file only). He has been given three training videos, two SWFs and one MP4. In Sharepoint, he can link to the two SWF files successfully and they play just fine. However, the MP4 won't work. Therefore, he's asking me to convert it to an SWF so he can link to it in Sharepoint in the same manner as the other two.

             

            On another note: On our corporate website, I have about five videos that I converted to SWFs close to a year ago. Even though I present them to our visitors using a web page, I can access these old SWFs using their direct URL (like listed above) and they will play successfully on their own, which is odd. It seems like something has changed within the past several months that prevents newly created SWFs (with imported videos) from playing directly from their URL on a server.

             

            Here is a link to one of the older videos I converted: http://www.frontierkemper.com/video/dhi240.swf

             

            I'm not sure what's going on...

            • 3. Re: Cannot get SWF with imported video to play on server
              adninjastrator Level 4

              Yes you should be able to directly link to and play the .swf, download and play the file.

              If you are able to link to the file (and not gettting a "File not found" error message), then most likely the problem is that the video file is an mp4, not a .flv.

              Not all Flash players will play the mp4, especially since you are not embedding a special player on a web page but relying on the default Flash Web browser plug-in. The Flash application CS4 or 5, is not necessarily the same as the Flash player that while be used when opening the .swf in a Web browser.

              My guess is that if you convert that mp4 to a .flv, the problem will disappear.

              Best wishes,

              Adninjatrator

              • 4. Re: Cannot get SWF with imported video to play on server
                Follicle84-fQz38D Level 1

                Got it! Still a little puzzled as to why the method I was using didn't work, but at least the problem is taken care of. Here's what I did:

                 

                After I converted the MP4 video to an FLV, I imported the FLV into the Flash file a little differently. Instead of browsing to the file on my hard drive, I first placed the FLV file on our web server and chose to stream the movie instead. I finished up the Flash file as usual by adding a skin interface and converted it to an SWF. It plays successfully when accessed by its URL on our web server and in SharePoint.

                 

                For now, it looks like the solution is streaming the FLV from a web server. However, I still think it should work when the video is imported from a hard drive (at least it used to).

                 

                I appreciate all of the information you provided.

                • 5. Re: Cannot get SWF with imported video to play on server
                  adninjastrator Level 4

                  Glad you got it working. Good Job!!

                  Just to clarify a couple things for future reference.

                  The reason the mp4 didn’t play was because it was an mp4, not an flv. Attempting to play the video in a .swf does not “convert” it into a .swf, it’s still a mp4 (or .flv)  Both are external files that stay external, they are just loaded into the .swf video player in order to display the video.

                  In this case as well as the other example link you posted, the .swf is just the player, it is NOT the video. Neither the other flvs or the mp4 have been “converted” to .swf, they are still the same, flv or mp4.

                  In the case of the older videos, you chose a format that worked with your .swf video player, the .flv format. In the case of the mp4, it doesn’t work with your .swf video player.

                  To verify for yourself that the .flv is separate and has not been converted to a .swf, go to your server and rename this file “FK_DHI240.flv” to “FK_DHI240B.flv” and then test the link you posted, it will not play the video, even though no changes were made to the .swf.

                  Any flv can be played from the hard drive just as easily as from a server, given a .swf video player that is correctly pathed to find the .flv video file.

                  As for “streaming” the flv from a Web server, technically that means that you are using a Flash Media Server to do true streaming, which is most likely not the case.

                  A better choice would be to choose “progressive download” when you are importing the video into Flash.

                  But glad it’s all working. Hopefully next time will go smoother.

                  Best wishes,

                  Adninjastrator