5 Replies Latest reply on Mar 2, 2011 9:59 AM by adninjastrator

    Bake video into .swf? ..urgent!

    sirbull_2000

      Hi. I use Flash CS5 and want to bake a .h264-video into my .swf-file. What happens now is that the .swf-file is getting the video information from the original h.264-video file. The problem is that out client only can upload a .swf-file and not both video and .swf...

       

      Any suggestions of what I can do? This is quite urgent!

        • 1. Re: Bake video into .swf? ..urgent!
          Ice_Panther

          Hi,

           

          When you select the import video (file menu), you can select to "import to stage" and not embed the video in a FLVPlayback, as it currently does. It will import the video in a layer inthe current timeline, or in a MovieClip's timeline. However, be aware that :

          • It only works for FLV files (so using the VP6 or Sorenson codec, not H264 -> lower quality and/or bigger file size), so you'll have to convert the video first using Adobe Media Encoder (or the encoder of your choice)
          • When you do so, it doesn't include the video controls like the FLVPlayback does, so , if you need play/pause/etc buttons, you'll have to create them yourself in Flash and use ActionScript to make them work.
          • 2. Re: Bake video into .swf? ..urgent!
            sirbull_2000 Level 1

            Yeah. I managed to figure it out.. The problem is that the .flv-file is huge compared to a h.264 video file...

            • 3. Re: Bake video into .swf? ..urgent!
              adninjastrator Level 4

              I agree with the other suggestion... you can embed into timelime... but that's really not the best way to handle video files. Video files will progressive download, that is, they can start to play before the entire file is downloaded... .swf files do not always do that.. you may have to wait for the entire file to download.

              How about just using an absolute path in the FLVPlayback component. That is, so you just upload the .swf... and inside that .swf is the path to the .video file which you have uploaded to some other server.

              Not exactly an "all in one" solution, but a much better option than the "all in one" method.

              Best wishes,

              Adninjastrator

              1 person found this helpful
              • 4. Re: Bake video into .swf? ..urgent!
                sirbull_2000 Level 1

                That was a good idea. The only problem is that out clients severs security is so stict, that forwarding to another page is illegal... Too bad for us.

                • 5. Re: Bake video into .swf? ..urgent!
                  adninjastrator Level 4

                  OK, ...

                  as long as you know that embedding video directly in the the time line is a BAD idea if the video is more than 10 or 15 seconds long. Nobody does it, and requiring someone to "bake" a video into a .swf is "bad practice".

                  But, that being said, if you have to embed the video file into the time line, then you need to really understand video bitrate as it relates to display size so that you can minimize the final .swf file size.

                  Basically outside of Flash you will have to set the display dimensions to exactly what's needed in the Flash Doc, nothing greater.

                  Then you need to encode the video with the very lowest bitrate that will give acceptable quality at that display dimension.

                  From an old post:

                   

                  Video bit rate

                   

                  One of the principle of goal setting is to "Begin with the end in mind". In this case it'll be very hard to give good recommendations because the end is not defined. So I'll just make a few assumptions and you can correct me as needed.
                  First, I'll assume that since you are converting to Flash, you want to deliver this video over the Internet. If that's true, then we'll have to make some assumptions on the Internet connection download speeds of your potential viewers. Let's just say that most have at least a 1.5Mb connection or faster.
                  OK, that would mean that a video bitrate of half that should usually provide a video download that is not interupped by buffering (most of the time anyway). So assuming a video bitrate of 750kbps, what would the optimum display dimensions be?
                  Before we decide, here's a little info about bitrate. For highest quality playback, the video bitrate is tied directly to the display dimensions. That is, the larger the display, the more incoming data is required to properly display the video. Think of bitrate in terms of a can of paint. If you have 1 quart of paint, you might be able to do a very nice job on a 32 X 24 foot area. But if you try to stretch that same amount of paint out over a 64 X 48 foot area, the coverage will not be nearly as good and you get poor results.
                  In the same way, a video displayed at 640 X 480 pixels will require 4 times the bitrate as a video displayed at 320 X 240 pixels to produce the same quality. So for example a video with a bitrate of 100kbps, displayed at 160 X 120 will produce the same quality results as a video with a bitrate of 1600kbps if displayed at 640 X 480.
                  So to boil it all down, video bitrates of 750kbps, even up to 1000kbps can usually get delivered of the Internet on most high speed connections. Higher bit rates may work for really fast connections but will cause problems for viewers with slower connections. Video display size has a direct bearing on the final quality. In the 750 to 1000kbps range, display size should be kept around 450 or 500 width max (and whatever height the aspect ratio calls for). Yes it can be displayed larger, but the quality will suffer.
                  Sound like your audio settings are fine, especially for Internet delivery.
                  As for framerate, maintain the original raw video framerate for best results. So if the video was shot at 24fps, leave it.
                  As for video converters, do you have the Flash 8 Video Converter? It works just fine for video to be delivered over the Internet. Remember, you are taking a Cadillac version of video (h.264 HD) and stuffing it into a Chevy body to get it to work over the Internet.

                   

                  Also, let the client know that what's being asked is not a "Best Practice". Few if anyone uses the suggested method. And before the complete project is done, upload a test .swf with a video file embedded and see if it progressive downloads (starts to play after a few seconds of buffering) or if the entire .swf file must download first. Will a 15, 20, or 40 second wait as the file downloads even be acceptable?

                  Best of luck on the project!

                  Adninjastrator