-
Hi all,
I have a dilemma.
I have an animated short that is about 3-4 mins long. With just the graphics alone the preload is 5.6 sec on a 28.8.
Now when I put the audio in the preload is 46 secs. I need to figure out a way to bring the preload down to no higher than 15 sec on a 28.8.
I have tried to load the sound as a separate SWF into an dummy movie clip. And the preload of the Sound.swf is 0.1 sec. The problem I have
is that the graphics load and plays and the audio starts out of synch and then chokes. And all the while the graphics keep playing (as they should) but the audio
stops to load.
The audio is 11k mono wav and the flash audio stream compression is set to 16k fast
I have a preloader that loads the sound.swf while the graphics are preloading
tellTarget ("/dummy") {
loadMovie ("VO.swf", "/dummy");
}
and when the graphics are loaded
tellTarget ("/dummy") {
gotoAndPlay (2);
}
it works great locally but on a test machine with a 28.8 the audio is out of synch.
I'm at a loss. What can I do?
Curse you all who have 28.8's
:)
thanx
bean
-
A thought...use "if frame is loaded" to hold graphics movie, until a good chunk of the audio file is loaded, then use "tell target" from the audio swf to the graphics swf, i.e the "tell target" commands are in the audio swf.
If the audio is not music, and you have a brief moment of silence, it is possible to use "if frame is loaded" to pause the movie in the middle briefly, to let the rest of the audio load.
-
Add :
You cannot sync an external sound.swf to your main movie . It must be in the main timeline . Sounds will always be huge when it comes to web .
-
I know you can't sync an external sound.swf to a movie. But there has to be a way to make them load up and run parallel to each other.
I'll try what magiksound suggested.
but how much control do you have to a loaded .swf in a blank MC?
-
Have you considered writing a *.smi file to sync the audio track with the flash movie. The finished product will them play in the Real Player. Your audio buffering should only take 15 secs or so.
Good luck.
-
nope, the Client won't allow that one.
But doesn't Director use a better audio compression? VOX or sumthin?
What does flash use? Cause its really crappy. Its great for small sounds. It would be nice if flash used the same type of compression as Director or Streammaker.
But that is only wishful thinking. We have to play with the cards we're dealt, I guess.
-
well, I have to disagree GMF, If you put a "tell target" every 10 frames or so in a streaming audio swf, syncing the main timeline, syncing works quite well, in addtion if you have a tween intensive section you can let the sync down for a moment to actually see CPU intensive content, and pick the sync up a moment latter, for this reason I prefer this method to main timeline audio streaming.
-
Thats fine with me, magiksound but it would be a bigtime job to make it with a 3-4 min long song ,but it can be done with your way.
[Edited by GmF on 05-04-2001 at 03:59 PM]
-
P.S make a tut and add it :)
-
:::bowing low::::thanks venerable master, perhaps I shall
-
That would be great, we all learn something new every day (atleast me) and you proved that in your last post. There are things in life that you dont think about atall .
-
I have thought long and hard, but my math skills and action scripting are not up to this task: instead of tell targets in each frame, what about a "call" action, which would have a loop, which would re-set a varible for the "tell target" frame each loop through. This way instead of having to hand write all those tell targets, just paste frames (say 10")with one "call" action, as fast as you can click at a keyboard. or a 10 frame embeded movie clip, with a "call" action could sync forever. Perhaps some action scripting, math wizard can add the missing link?
-
Guess what , i m not a "fan" of actionscripting myself (yet) but i still learn . Read read and read , trail and error , trail and error .:D
-
It is possible to get the _currentframe of the audio.swf and set the _currentframe of the graphics to corrospond with the audio.swf
But isn't that the same as putting the audio track on the main stage of the graphics?
Or will this bring preload down?
I guess I'll try that.
test test test:)
-
It sounds possible (no pun intended) I am a flash4 user really, and I have not used those commands, BUT the reason I load the audio seperatly is so I can have my graphics already loaded,so when I load the audio swf as a frame action, it can stream away all by its lonesome, see? Streaming audio takes much toying with, and beware of AOL, strong tendency to freeze machines while streaming large files for no apparent reason.
-
I don't know if I can help cutting the preload time down to 15secs, but you can sync a loaded audio file to the graphics.
First you must preload all the graphics for the animation. Make a little loop that checks for a _framesloaded.
Once the graphics are loaded you can start loading your audio.swf into any level. The audio swf must be formatted with a streaming sound, and contain a stop action in the first frame.
Set the global property for sound buffer time to zero. Since the audio swf has a stop command in the first frame you can handle the buffer time with action cript. Just check the the _framesloaded on the level you load the audio swf into. If 5-15 frames are loaded you can execute an action to sync the graphics and audio.
Tell you main timeline to play or break out of a loop. And tell the level you loaded the sound into to goto and play frame 2. The streaming sound in the level will force the frame rate of your main timeline in level 0. The trick is starting the graphics sequence and audio level at the same time.
Jason
-
Jason,
just how do you checkframes across levels? (flash4) I've been trying to make it work and I can't seem to get the syntax correct.
Tahnks
-
the syntax for a target level is
_level#/
To check framesloaded in level 100 the command is
GetProperty ("_level100/", _framesloaded )
to target a movie clip in level 100
_level100/movieclip
To target the main timeline from a level
_level0/
-
-
So I got that code working just fine, but that brings me to another commen problem, why does the browser freeze up shortly past the "checkframe" ie the movie preloads 100k, starts streaming, but freezes shorthly past playing that 100k, I noticed download streaming freezes also, this seems to be a commen problem with large streaming files. any idea why, or what is happening?
Thanks
-
The global property call "Sound buffer time" is set to 5 by default.
This mean that's the streaming sound will not play until 5 second have been preloaded.
-
yes, I understand that, and as per your instructions, set it to 0, and used my perloader to load aprox. 25 seconds of sound, the crash is happens right after the movie plays to that point.
-
I'm not familiar with that problem, and I stream large audio files, sometimes as long as 10 minutes. Perhaps it is a coding issue.
-
well, I forgot to add it works fine with a dgital connection the problem occurs with 28.8 and somtimes with 56, thanks for your help, a most excellent thread
-
Well, I must say this is a great thread.
I'm having some trouble with the looping script.
In the first frame I have the sound.swf loading into _level20. Then there is a small 2 second animation so that I can time the loading. then in frame 48 I have this script:
if (getProperty ("_level20", _framesloaded )=100) {
gotoAndPlay (50);
tellTarget ("_level20") {
play ();
}
}
gotoAndPlay (2);
Well, this works on a high speed connection. But on a 28.8
the music does not play.
What am I doing wrong?
I tried putting in an else before the gotoAndPlay (2);
but that didn't work.
Thanx for your help
Bean
-
two possible sugestions:
1. place " goto and Play 2 " outside your "If" statement
2. if your level 20 audio swf is in a pre-loader loop, a "Play" action will not kick it out, use a "goto lable".
If I have understood your method correctly...
-
check this out
In my neverending tests and research, I noticed one thing.
this may be common knowledge to all you streaming audio peoples but it was news to me.
I have been trying to make this 3 1/2 minute animation to stream on a 28.8 and preload at 15 secs. And I was trying all the suggestions in this thread.
It wasn't working for me. I finally tried just playing the audio.swf on my test machine to see how it would stream. And I discovered something very interesting. My test machine is connected at 19.2 to ensure the best possible test (and because the presets were only 19.2, 38 and 57). And the aduio was choking. I was perplexed why this is.
Finally I realized that the aduio was taking all the cache. It was the compression settings in flash's Publish settings. I had them set to 16kbps (fast). And that was the reason it was choking on the test machine. It made no difference what size the audio was or what the compression settings it had before it was imported into flash.
I tried it at 8kbps (best) and it worked without a glitch. It also brought my preload down from 40sec to 4.6:) What a difference.
I know 8kbps sounds bad. But this one only has Voice over.
What else can I do?
If anyone has a better suggestion, I'm all ears. Because I would prefer it to be set to 16kbps.
Thanx
Bean
[Edited by MrBean on 05-14-2001 at 02:02 PM]
-
hmmm, I wonder if this is the cause of older machines freezing while loading large audio files???
-
yes
Sound is data intensive. The quality of the sound output and length of playback factor prominently into the amount of data required. Sounds with higher sample rates (22.5Khz and above) retain a greater degree of quality, but almost always require too much data to realistically stream sound to the Flash player on time over a 28.8Kbps modem. Flash utilizes compression to help reduce the size of the data - but even the maximum compression allowed in Flash may not be sufficient to deliver high quality audio over longer periods of time. Here are some tips to use sound more efficiently:
Use the lowest bit-depth and sample rate acceptable to achieve the smallest data size.
Sound quality deteriorates as the sample rate declines, so you may find lower sample rates yield more even playback but also poorer quality audio. Try to find a happy medium between quality and data size.
Keep sounds short.
Flash doesn't have the same type of compression capabilities as Shockwave streaming audio, so it is ill suited as a means to deliver longer audio programs. You may use smaller sounds looped to achieve longer audio playback because a smaller amount of sound data is downloaded once and used repeatedly.
Watch the size report closely for clogging of data near keyframes.
The Event synch option delivers the sound data all at once when needed for playback; Stream synch delivers the sound data over the specified series of frames. Watch the size report closely for clogging of data near keyframes and use the "preloading" techniques to trim down the amount of data needed per frame or per second.