Streaming a very large swf

I have created an intro to our gaming clan site.
Unfortunetly my little project is now at 33Mb :(
I am wondering if its possible to "stream" this so people don't have to sit there for 5 minutes downloading it all... however I do want the music I have to be "synched" up.
I do have a pre-loader currently checking to see if the last frame is loaded.

The fla contains about 17 movieclips of our Quake team in action.
The main sound is contained out side of all these clips.

A total of 1:48 seconds for the entire fighting sequence which is how long I made the mp3 clip.

I am not a flash mx pro expert... but try me... any ideas?
BTW our little gaming clan, although around 5+ years, doesn't have the resources for a streaming server or anything fancy like that.

http://www.xhale.net/!DEMOS/xhale_2005b.html

Any help would be appreciated.

RAD {:-()>
LVL 1
RADWeb DeveloperAsked:
Who is Participating?
 
Jakob_EConnect With a Mentor Commented:
Hmm I just posted but where did it go?

Anyways what I wanted to say was:


I think the only way to make this work is by drastic reducing your file size.If we just try to split up your movie then
in the end where is the TV effect. Eventhough Billystyx is right in his argument I don't see it fixing a filesize  of 33Mb.

Now how can we workarround this... I made a google search using "cl_avidemo 20" as keyword and this came up:
http://www.force-temple.com/jk2/?go=viewguide&id=19

From what I see it's possible to make your demo into a movie using a program called "Quake Video Maker"
http://www.edgefiles.com/file.x?id=/force-temple.com/www/files/QVM-1.3-Setup.exe

If this can be done, then with a movie on our hand we can convert the demo into .flv (Flash Video) and hereby
reaching a filesize not killing bandwidth*.
* Like fitting a  45 seconds interview including speek 420x300 into a 850kb file (still looking and sounding good )

Also if visitors are using flash player 7 you can make your presentation progressive (aaaallmost streaming)

Try give it a shot and post back when you succeed, then I'm sure we are able to guide you the rest of the way.

Jakob E




 





0
 
BillystyxCommented:
You need to load your movies as separate swfs into the main swf as and when you need them. This will limit inital download time so people don't get bored:)

use loadMovie or loadMovieNum for this, and probably the moviecliploader class for the preloader on each of the separate swfs.

Ask more questions if you need so we know what you already know and what you don't etc

Billystyx

0
 
Jakob_ECommented:
I'm sure we can help you loose a coupple of bytes ;)

First by using the methods Billystyx suggested and my guess using a
better compression for your action sequence.

A coupple of questions:
1)   What version of flash are you using MX, MX2004 or MX2004Pro?
2)   How did you add the fight sequence to the movie?  
      - Was it using the movie import to .flv or....
3)   Am I right when I say that your audience is mostly your clan members
      - To know what we can ask from your visitors (Flashplayer 7 etc.)
4)   Do you have a link to your source file(s)... I guess it must be heeeavy
     

Jakob E



0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
CerfCommented:
Well RAD,
I have to say that a 33MB swf should not be an intro...

My ISP is very slow at the moment, so after I saw that a 10minutes dowload was 4% I decided to cancel.

There are several reasons that might influence your intro's size.

+ very heavy images or a secuence of them
+ very long mp3
+ a high quality video

who knows,

Now what you need to do is to spot what is giving you the hard time on space so we can work it, or suggest you how to work it.

Cërf.
0
 
BillystyxCommented:
If that link is the setup, then it would be very easy to break into four different segment using loadMovie:) (Didn't see it till now - sorry). And as cerf says, your 1 % of 3000000000 (or whatever!)
is kind of discouraging.:)
Feedback from RAD?

Billystyx
0
 
RADWeb DeveloperAuthor Commented:
OK - I have optimized all the images to the quality that I am not willing to go under.
In photoshop that was a 36% of 100%.
The Mp3, like I said, is whittled down to 1:48 seconds, its not a .wav ... its a mp3 compressed as much as it will compress, can't remove size from that either. Besides that is NOT the question I asked. Its 33 MB because I made it that big, and removing anything is not going to happen. What I am asking is a way to stream this or break it up into 4 or 8 mini movies that will seemless flow.

I am using Flash mx2004pro.

my .fla has 2800+ items in it. so no I will not publish it.

yes, visitors are mainly my clan members and at least 12 other clans and their members and people looking to see what I can do in flash. To me, they best be having the latest flash installed because most people in our gaming circle are very computer savy and know how to upgrade their flash players. That is a non issue to me.

so, now I have 16 movie clips inside my swf. Is there a way to take, say 3 or 4 and bundle them into their own swf then inside the main swf call up all the external swf's in order WHILE still playing from the main SWF (music and other base graphics)

RAD
0
 
RADWeb DeveloperAuthor Commented:
I culled the "fighting images" using  "cl_avidemo 20" command, which will take 20 screenshots a second and makes them a .png . I then batch process and reduce size, adjust levels and saturation then optimize and save as a .jpg . I tried the image size at 400 px (80mb fla) then at 200 px (too small) and arrived at 300 pixels wide as the best viewing/optimized setting. Each fight sequence has between 50 and 300 frames. Unfortunetly this can not be avoided. A lot of clans demos run between 75 and 250 MB, so ours, although I called it an intro, is relatively small in comparison. I will be setting a new precident by having a demo as our intro. And again the reason no one has done this before is the same reason Cerf stopped the downloading. So lets break the mold and find me a way to do this.

RAD thanks!
0
 
BillystyxCommented:
Yes, but if you have 16 separate movies, then put each one into it s own swf, this will significantly reduce the size of the download. All your base graphics and sounds and mcs that are part of the intro can stay in the main swf.
load the movies using loadMovieNum like this
loadMovieNum("myswf1.swf",1);
this loads to level 1 the first mc.
You can do it once and when you are ready to move on to another, you can set _level1._visible=false;
so that if the user wants to go back to that one it is already loaded and they can get there quickly, by you setting the _visible property back to true.
Use the moviecliploader class to load each movie and set up an appropriate loader bar to show each clip is loading.

If you need help with that we can answers questions you might have as you go.

I understand there is a certain level of quality below which you don't want to go, so you should cut all the 16 clips out in separate swfs first and see how big that makes your initial swf. If it seems ok, then you just need to implement the loading of each swf.
keeping track of such stuff can sometimes be easier using an array to store them and their levels in.
Like
myMovies=[["movie1.swf",1],["movie2.swf",2]];
referenced with
_level0.myMovies[0][0];//giving value of "movie1.swf"

Billystyx

you will need to decide specific from here, and figure out what you need to know (look up the moviecliploader class at macromedia for a start - it is quite simple once you start using it.
Any more qs please ask
0
 
RADWeb DeveloperAuthor Commented:
billystyx

"so that if the user wants to go back to that one it is already loaded and they can get there quickly, by you setting the _visible property back to true.
Use the moviecliploader class to load each movie and set up an appropriate loader bar to show each clip is loading."

If thats the case, when a user goes back a clip or two or to the beggining, how does the music stay in synch, at that point they clicked to 'go back' the music would either start over or stop or continue playing. All three of those scenerios do not sound good to me.

the 'moviecliploader class' I am not fully understanding. if its showing a progress bar for each individual movie.. how does that make for continuos playback?

RAD
0
 
BillystyxCommented:
I see what you mean - try out jakob's ideas first - I was not aware it was the one movie you were looking to break up:)
0
 
RADWeb DeveloperAuthor Commented:
ok I believe I have the jpg sequences in order, they are loaded into QVM and I added my sound track to the QVM and told it to compress it to 64% and output an avi file that was 33mb...
is the big savings in download time going to come from this application or will it be in the application of avi to flv?
0
 
RADWeb DeveloperAuthor Commented:
... oops accidently hit enter... :(

Anyways, I uploaded the avi to my test folder here:
http://xhale.net/test/xhale_2005.avi

     Now fooling around in flash b4 bed, I opened a template called video presentation or something to that effect, and I inserted my avi into the video section of the 3 layered flash template and hit ctrl + enter to see it... it played, but the video quality was far lower then I expected and would not want to show the video sequence if it was that bad of quality.

     Is this going towards what you all were mentioning in making the video a flv? I am probably missing steps and could even be doing the compleatly wrong thing.

    So what do I do now with my avi, I think should be the only question I ask :)

RAD {:-()>
0
 
RADWeb DeveloperAuthor Commented:
lol, I got the avi in a regular flash doc and exported using the highest quality they offer the dsl 700 box, and exported as a swf... got it to 6mb .. however the quality is still a tad under what I would require...

RAD
0
 
RADWeb DeveloperAuthor Commented:
on the other end of the scale I got the video at 100% quality, alas, 64 mb!!! holy *&%$@ :(
I tried 75% quality yet remained 64 mb..
I'm trying a higher compression rate on the QVM initial avi and see if a reduction there will generate a smaller end swf size other wise what good is it if they still have to download 30 tonow 65! yikes!

RAD
0
 
RADWeb DeveloperAuthor Commented:
ok I found a quality and compression for the first and second stages of making it a swf.

50% on the QVM using a indeo 5.1 codec and then the resulting 26mb avi goes into flash at 50% I believe I used and got a 16mb swf this time.

http://xhale.net/test/x.swf

loadmovie (x.swf);

Is the above line all I need to load the movie? Also will this make my main movie (the base of the tv set and all its functions disapear while the x.swf is playing/loading? Because that ruins the whole tv effect if so.

Comments?

Thank you,

RAD
0
 
Jakob_EConnect With a Mentor Commented:


It's been weekend and I've been playing around... and found a way to solve your problem!


Since this post is a bit long you might want to take a look at the sample I made....
Just to decide whether the rest is actually worth reading :)

  http://www.offliners.dk/takeaway/experts-exchange/xhale_01.asp
  (Includes a link to the source files)



Now what did I do.....

First I decompiled your .swf file, saving the images and sound.
- This off course you don't need to do.

---------------------------------------------------------------------------
Result: 6 sound files and some 2096 images (about 42Mb)  
---------------------------------------------------------------------------

Since I ripped your movie all images were named image1,
image2 etc. including also the intro part with the spinning x.

Well all but the fight sequence I deleted leaving 2040 images.
I found the images a bit pale so I did a batch job in
Photoshop adjusting brightness: -30 and contrast: +30
- This took about 30 minutes

---------------------------------------------------------------------------
Result: 2040 images (about 95Mb due to my quality settings)  
---------------------------------------------------------------------------

Now I'm about where you are, then here is what to do:

1)    First start by naming the images so they are in sequence (like: image1, .... , image2040)  

2)    If you haven't done it yet download the Quake Video Maker (QVM):
       http://www.edgefiles.com/file.x?id=/force-temple.com/www/files/QVM-1.3-Setup.exe

3)    Install and open QVM

4)    Add a new scene (Arrow Icon)
5)    In the "Sequence Folder:" select the folder containing your images
11)  In the "Sequence Format:" type in image#.jpg  (# will be replaced by 1-9)
12)  Click the "Scan Frames" button then you'll get a preview of the first 9 images
13)  Click the "Apply" button

14)  Create a new scene
15)  In the "Sequence Format:" type in image##.jpg  (## will be replaced by 10-99)
16)  Click "Scan Frames" then "Apply"

17)  Create a new scene
18)  In the "Sequence Format:" type in image###.jpg  (### will be replaced by 100-999)
19)  Click "Scan Frames" then "Apply"

20)  Create a new scene
21)  In the "Sequence Format:" type in image####.jpg  (### will be replaced by 1000-2040)
22)  Click "Scan Frames" then "Apply"

You now have 4 scenes containing all your images
     
23)  QVM offers an option of adding soundtrack to the movie but I found it very poor...  so leave it out.
     
24)  Go to the top menu and select "Movie > Settings"

25)  After selecting an output folder and file name (XHALE_QVM.avi) I entered the following
       settings: 25fps., width 320, height:240

26)  Generate movie by clicking the filmstrip icon

---------------------------------------------------------------------------
Result: XHALE_QVM.avi (about 460Mb. hmm It's going the wrong way)
---------------------------------------------------------------------------

Next step I used PowerDirectorPro to add the sound (the music)
I'll not go into details on how since you may not have this
application .

Anyway, having added the sound I saved the movie as XHALE_SOUND.avi

---------------------------------------------------------------------------
Result: XHALE_SOUND.avi (about 305Mb... a bit better)
---------------------------------------------------------------------------

27)  Open Flash (MX02004Pro) and create a new movie

28)  Select "File > Import >Import to stage" or simply by pressing ctrl+R

29)  Select the movie XHALE_SOUND.avi

30)  This will open the Video Import Wizzard that allows you to convert
       the avi movie into flash video (.flv)

31)  In the wizzard you can change the encoding on both compression
       colour and dimensions. I'll leave the settings to you since I used an
       external editor for this step (Sorenson Squeeze)

32)  After having converted your movie to .flv go to tle library (ctrl+L)

33)  Right click the XHALE_SOUND file, select Properties > Export
       and export the flv as XHALE_FLV.flv

---------------------------------------------------------------------------
Result: Depending on your selections you now have a file of about
           3-7Mb which still seems rather large...
---------------------------------------------------------------------------

Fortunately this is .flv... It's able to stream and can be played progressive if flashplayer 7
is installed on the client.

Since you don't have the streaming option I'll show you how to make a progressive
presentation using the MediaDisplayComponent:

1)  Create a new movie in flash and open the Components panel (ctrl+F7)

2)  Find the MediaDisplay component and drag it to the stage

3)  Select the MediaDisplay on the stage and open the Component Inspector (alt+F7)

4)  In the Component Inspector ego to the URL and enter the relative path to  
     your "XHALE_FLV.flv" file

5)  Save your movie and hit F12... look how they run :)

---------------------------------------------------------------------------

Epilogue:

There is so much more but I feel this answer already have grown very large and
going on about the MediaDisplay Component would be exceeding this topic.
In order to keep good EE search results (helping others), I suggest you make
a new question about the MDC (If any :)

  Best of luck,
  Jakob E


0
 
RADWeb DeveloperAuthor Commented:
ok,
    Jakob: "Result: XHALE_QVM.avi (about 460Mb. hmm It's going the wrong way)"
              "Result: XHALE_SOUND.avi (about 305Mb... a bit better)"
   
     I did post earlier that I got the avi file from QVM at 26mb and it looked good.
However your insight into creating the actual .flv I can surely use!
The quality was too fuzzy for me to make out the enemys dying name which is, in my eyes,  an important thing to view in these clans demos, otherwise ya can't really brag about killing the bot that 100 others have killed! haha
I was up late reading my flash mx bible...
I will post now what I think is my solution could be and maybe someone can clarify it for me, because it didn't really work for me.

     I think in my main fla, I would put in some action script attached to a button like:

function loadSWF() {
      loadMovieNum("x.swf", "holder");
}


     Then create an empty movieclip with a "holder" (a rectangle the same size as my movie I am loading) and then name it "holder" . I then tried and placed it on my main fla's timeline. Supposedly this will turn into the main fighting sequnce swf when the timeline runs by it. But It was late, I might have missed out on important things...

But thats the direction I need to go in.
My main fla, loads the fight into the center of the tv screen and possibly offers the option to play where it will either then stream or beging displaying the pre-loader and loading the 6mb swf.
There is the other button that would skip the loading of the fight sequence and goto the main url and site of xhale.

RAD
0
 
RADWeb DeveloperAuthor Commented:
actually now that I think about it, it mentioned loading the overlapping movie (fight seq.) to the next level "1" and into the empty holder clip. Somewhere I am lost.

RAD
0
 
RADWeb DeveloperAuthor Commented:
Weeeee he says to himself all giddy.... I hope this works for you all, try this and let me know your results:
http://xhale.net/test/xhale_2005b.html

All I did was read this page here: http://www.flashbax.com/loadmovie.htm
and I was able to finally put, two and 2 together!

I really hope your results were as good as mine! but then again - I am home and when I get to work on monday and punch it up, I may not see what I intended :(... crosses fingers..

RAD
0
 
Jakob_ECommented:
Hi RAD,

It looks good and is running ok (ADSL 1024Kpbs) I'll check the sound when I get home (no speakers at work).
From what I see, I think you gotten very far from where you once were, thumbs up!

Just to make a few comments to your last remarks.
I might have been a little harsh on my compression (4.25Mb) you can achive much by alowing a few more Mb.
Why did I not do so... It's simply a matter of space on my webhotel and also because I thought of it as an intro/teaser
running while presenting your team members etc.... Then, when done there would be buttons to launch
HQ versions of your fights.

When doing an intro it's very important to make sure that as many as possible are able see
your work. Then if interested, they'll wait longer for the HQ goodies you have :)

Finally a comment on your new version I'think you reached a size that doesn't require a load fight button, just
make it start playing and add a skip button. About usability, if you are having control buttons to your movie like
stop and start, try to keep them closer to the movie that's where you want to keep focus.

Once again a very good improvement,
Jakob E


 






 


0
 
RADWeb DeveloperAuthor Commented:
ok one thing I noticed while at work as did another member, is that the movie (fight sequence) stops a few times during play (but will eventually continue) with no music synch problems.
I was wondering why I am not seeing the pre-loader do its job. Could it be something about layers? I have no clue :(

RAD
0
 
Jakob_ECommented:
I didn't notice any timelapse, but then again nor did I see any preloader.

My guess is that your preloader isn't connected to your movie, saying what happens
is that you movie simply starts playing after loading the first frames.

While playing flash continues to load the remaining frames. If the playing progress
catches up with the loading of the remaining frames you'll experience a pause as
flash needs to get content loaded.

Jakob E

0
 
RADWeb DeveloperAuthor Commented:
can I work around this? Maybe by sticking another pre-loader somewhere?

RAD
0
 
Jakob_ECommented:
Can you post the script for your preloader.

You might also concider to use the MovieClipLoader to gain more control on your load process.
I made a small post on the MCL here (solution 2):
http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_21383254.html

Jakob E
0
 
Jakob_ECommented:
One more thing...

Could you do me the favor of posting the question about the preloader in a new post.
Just to keep this from becoming our personal discussion forum on all things flashy ;)

I guess the moderators of EE would like this.. making the solutions more searchable,
and hereby perhaps of help to others.
 
Jakob E  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.