A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: syncing problems in flash... need help

  1. #1
    Junior Member
    Join Date
    Aug 2001
    Posts
    14
    hey all,
    i am making these demos for a company, and what it is is a movie running at 60 fps, and playing different sound files.
    i am having horrible problems syncing the image files to the sounds. when i ran in the flash player this morning it ran incredibly fast and overlapped, however when i ran it in IE it was incredibly slow and was stalling. Is there someway i can get a happy medium?

    thanks, john

  2. #2
    GAME ON!!!! megatoon's Avatar
    Join Date
    Jun 2001
    Location
    The Lonely End of the Rink
    Posts
    3,481
    Did you set the sound to Stream in the sound panel?

    The other option is too cut the the sound file up set each section to Stream. And then line them up in Flash.

  3. #3
    Junior Member
    Join Date
    Aug 2001
    Posts
    14
    i tried using stream but the sound quality isn't what we want it to be... the quality of the sound is very important in this case, and i guess the stream lowers sound quality?...

    thanks for your help, john

  4. #4
    GAME ON!!!! megatoon's Avatar
    Join Date
    Jun 2001
    Location
    The Lonely End of the Rink
    Posts
    3,481
    id you try steaming off of the main time line. Not inside an MC. You can also adjust the export settings by right clicking the sound icon(s) in the library.

    With your sound set to event it will never line up on all machine. Evcent plays independant of the main timeline.

  5. #5

    Arrow

    Is it possible to make it just use the encoding that is currently used for the imported MP3 and not have to reencode the sound? If not, "fast, medium, and best" aren't very informative. Could someone translate these to geek terms, please?

  6. #6
    Ok, I changed the settings on the sounds themselves and it made no difference whatsoever (I tried exporting with and without the override settings checked). I changed the streaming quality in the export window and that made a difference, but that affected ALL the streaming clips. There's one clip in particular that I'm having trouble with. When I have it set to event, it sounds fine, but I can't get it to sync correctly. When I have it set to stream it sounds like, "YesszzzzzzzBshss POP POP crklzzzzbshss pshshplblzzzzz*POP**krklbnklsh." I mean, it's BAD. Fisher Price microphones produce better quality sound bits. It's even worse than those drive-thrus at McD's. It's like, "AHHH! TURN IT OFF! MY EARS!" bad.

    After I upped the quality, it was like, "Yeszz POP*crackle*It'sz time..." Why is there so much static and popping when I have it set to stream, but not with event? Is there any way to get around this?

  7. #7
    GAME ON!!!! megatoon's Avatar
    Join Date
    Jun 2001
    Location
    The Lonely End of the Rink
    Posts
    3,481
    Ya this is known problem with sreraming. I've dealt with it many times. Have no idea what causes it. I'll look up a thread on hissing in the Sound Forum and post back the link.

    The only way I've been able to fix it is by putting all the sounds on the main timeline, not inside an MC. Or jsut having to give up and re-record the sound.


  8. #8
    GAME ON!!!! megatoon's Avatar
    Join Date
    Jun 2001
    Location
    The Lonely End of the Rink
    Posts
    3,481
    This is a quote from GMF our resident sound expert:
    Use wavs for best quality
    And a "little" add :

    How can I get the best sound quality?

    In order to get the best quality sound for the smallest file size and performance hit, you must consider what the content of the sound is. Too often, movies use a blanket 8-bit 22kHz sound format when that may not be appropriate. But first, you must realize what each factor means when recording sound.

    First, sound recorded in a computer is digital. This means that a replica of the sound is being recorded as opposed to analog which makes an actul copy of the sound wave. As a developer, you need to be aware of two crucial elements and how they affect your piece.

    Bit depth - This is the detail of any particular sample. The higher the bit depth, the more detail each sample has of the sound. This gives greater accuracy and, more importantly, less noise.
    Sampling rate - The number is measured in kHz, but is actually the number of times per second that the sound is sampled. At each of those intervals, that particular place in the sound is recorded. A sample is taken
    So a sound recorded at 16 bits and 44.1 kHz is actually a sound that has been sampled 44,100 times per second and each sample has a bit depth of 16 bits.

    Bit Depth

    Bit depth is the detail of the sound samples. The higher bit depth, the more detail and less room for noise or muddiness. Sounds recorded at 8 bit typically have more noise (hiss) than sounds recorded at 16 bit. If you are recording voice alone, there will be gaps and pauses between words and sentences which can accentuate any noise in your sound. Generally, a higher bit depth is recommended for voice in order to keep your sound "clean".

    Sampling Rate

    Sampling rate is a bit more complex. You need to consider what your needs are. Keep in mind that the human ear can hear things in a range of approximately 20-20,000Hz. Anything above 20,000kHz cannot be heard by humans (while sounds below 20Hz cannot be heard per se, they can be felt assuming that your sound system can output at that frequency). A range of 20 - 20,000Hz is the general rule of thumb although this can vary somewhat among individuals.

    Nyquist's Theorem says that you need to record your sound at a sampling rate of double that of the dynamic range you are trying to achieve. If you want your sound to have a range of 20 - 20,000kHz, then you need to record it with a sampling rate of at least 40,000Hz. A sampling rate of 44.1kHz is commonly used to achieve a full dynamic range - CD audio quailty.

    What it all means

    Now that you've had a crash course in digital audio, you need to apply it to your piece. File size and quality are important. While it is easy to assign a blanket bit depth and sampling rate to all of your sounds, your sound quality might not benefit from this strategy. Instead, weigh the differences each provides.

    Voice - For voice, a higher bit depth to eliminate hiss and muddiness is preferable to achieve a clean sound. But 16-bit audio files are twice as large as comparable 8-bit sound files. You can usually make the tradeoff in sampling rate, by cutting it down. Recording voice does not require the same frequency range as music. There is no booming bass or higher highs. The human voice is pretty much mid-range. So if you establish that the frequency range does not need to go any higher than 5,000Hz, Nyquist's Theorem says to record the sound with a sampling rate of 11kHz. If your talent has a deeper voice or tends to fluctuate in range, then a range of 11kHz can be achieved by recording at 22kHz. Keep in mind that this will double your file size.

    Music - For better sounding music, the bit depth is not as important as the sampling rate. Since music is continuous with no noticeable pauses or gaps similar to what you'd find in voice, hiss and muddiness can often be masked by the nature of the sound. So a lower depth of 8 bit can sound nearly as good as 16 bit, but without the doubled file size. Since most music has a wide dynamic range, then the sound needs to be recorded with this in mind. A lower bit depth such as 11kHz will produce a very flat, undynamic sound, not unlike that coming out of a transistor radio. The highs will be cut off and the bass will be nonexistant or even distorted. 44kHz is CD audio quality and sounds quite good on a good system. But the file size is quadruple that of a sound recorded at 11kHz and most computer systems have small speakers that can't generate the quality you are looiking for. So a happy medium is 22kHz. This is radio quality which is good for applications most of the time.

    Summary

    For voice, focus on bit depth to reduce noise, hiss, and muddiness. Sampling rate is usually a secondary concern. For music, focus on sampling rate since the nature of music can mask the degradation of a lower bit depth.

    Things to Consider

    File size is always halved if you cut the bit depth or sampling rate in half. In other words, you won't get a smaller file by cutting the bit depth in half than you would if you cut the sampling rate in half. You will get the half the size of the original regardless of which one you cut.
    An 8-bit 44.1kHz sound is the same size as a 16-bit 22.050kHz sound.
    A 16-bit 11.025 kHz sound is the same size as an 8-bit 44.1kHz sound
    Most people don't have sound systems on their computers that can pump out a 16-bit 44kHz sound the way you want them to hear it. Unless you know your target audience has this capability, there is no sense in doing it.
    File size is not the only thing to consider when chopping sounds. Performance is also affected by bit depth and sampling rate. As expected, higher bit depths and sampling rates require more system resources to process, possibly degrading the performance of other elements in the piece. So if your animation speed is crucial at that moment, consider dropping the sound quality.
    Director for windows has one sound channel. We employ macromix.dll to mix Director's 8 sound channels into one. But if you try to mix sounds of different bit depths, two performance hits can result:
    The sounds will be resampled to match each other. A 44kHz sound may suddenly have the same range as the 11kHx sound you are trying to play at the same time.
    Due to the time it takes to mix the sounds, there can be a noticeable delay bertween the time the command to play the sound is issued and when it actually begins to play.
    For more information specifically regarding this issue, please see TechNote 3191, Windows and Multichannel Sound.
    For purposes of simplicity, sampling rates in this techNote are referred to in their simplest values such as 44kHz. This is not entirely accurate and to keep things standard for the widest compatibility across different sound cards, you should limit yourself to the following sample rates:
    44.1kHz
    22.050kHz
    11.025kHz
    Any variation from these sample rates can produce unexpected results and may not be comptible with Director's import filters.
    Or the Sound Forum FAQ:
    http://board.flashkit.com/board/show...hreadid=299918

    May find something in this thread also



  9. #9
    Senior Moderator ®
    FK´s Banning Machine ™
    GMF ™'s Avatar
    Join Date
    Feb 2000
    Location
    Oslo, Norway
    Posts
    5,697

    megatoon

    thanks for the credit

  10. #10
    Senior Moderator ®
    FK´s Banning Machine ™
    GMF ™'s Avatar
    Join Date
    Feb 2000
    Location
    Oslo, Norway
    Posts
    5,697

    60 fps ???

    P.S There isnt a PC or MAC on this planet that can force itself to play animation and sound at that framerate in a good way. Dot go over 20 if you dont know the way on how to stream good.

  11. #11
    "Anything above 20,000kHz cannot be heard by humans" *giggle* I wouldn't think so.

    Anyway, this is a sound clip I downloaded, so there's no way I can re-record it. I still don't understand why it gets all crappy sounding when I stream it, even with the same or better settings than it was on event. Also, why can't I specify the export quality for each clip? It wants to use the global settings no matter what

    (and I'm only running my movie at 12fps, just so ya know... flash should really take advantage of OpenGL or something -- these simple animations/effects would be able to run at 200+fps).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center