• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Flash audio out of sync

New Here ,
Aug 14, 2011 Aug 14, 2011

Copy link to clipboard

Copied

Hi everyone,

I have an animation that I am exporting as either a .wav or .mov file then editing in different software but when I import the new file it is out of sync.  That sounds confusing so I will explain.

The project is a cartoon and a temp dialogue track was created before animation started.  Then that temp track was used to animate over and do lip synching.  Recently, actors have re-recorded the original temp dialogue track.  So, I need to export the original dialogue track out of Flash, use an editor, in this case Final Cut Pro, and replace the dialogue then export that as an audio file and bring it back into Flash. 

But it is always out of sync.  I have even exported a .wav file from Flash then immediately re-imported it and put it on the timeline and it is already out of sync. And it is the exact same audio! I don't even know how that could be possible. Surely if you export a wav from Flash and then re-import it, it should be exactly the same.

Does anyone have any ideas?

Cheers,

Rob

Views

34.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Oct 05, 2014 Oct 05, 2014

My youtube channel is here for those who want to see Ran D ass Studio Productions - YouTube

Votes

Translate

Translate
Mentor ,
Aug 14, 2011 Aug 14, 2011

Copy link to clipboard

Copied

Couple things, Flash uses "stream" or "event" sound:

"To Stream, or Not to Stream

Flash can handle sounds in two different ways, Stream or Event. A streamed sound plays as it comes into the computer. You dont have to wait for the entire file to download. An event sound must fully download before it plays, but is stored in the memory for later re-use.

After youve placed a sound into Flash, youll have to decide if the sound should stream or not."

http://www.awdsf.com/courseware/flash/flash6_sound.htm

Second, be sure that the frames per sec of the Flash doc EXACTLY matches that of the audio.

Flash high recommmends AGAINST embedding sounds into the timeline (unless they are very short), but I've not had any problems even keeping embedded video in sync with it's sound track as long as I set the Flash document frames per second to exactly match that of the audio.

So for example, a video (with audio) recorded at 29.97 fps, and embedded directly into the main time line would need to have the Flash doc fps set at 29.97 in order to keep the audio in sync with the video. The sound is only going to play correctly at one frame rate... too slow and the wwoorrddss wwiilll ddrraagg oouuttt. Toofastandtheywillsoundfunnybecausethefrquencyofthesoundhaschanged. Makes sense doesn't it?

So it's NOT the audio that's out of sync... there is one and only one frame rate that will work for the audio... it the animation that's out of sync. Change the Flash doc frame rate to exactly match the audio... then sync the animation to match that.

Best wishes,

Adninjastrator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 14, 2011 Aug 14, 2011

Copy link to clipboard

Copied

Thanks for replying!

I will check on the stream and event thing.  Which one would you recommend?  And how would they effect the sync?

The frame rate for the entrie project is 25fps and always has been but I know that audio doesn't technically have a frame rate so I don't think that could be the problem. And the .fla file plays fine within flash so it's definitely not frame rates. The audio was recorded separately at 44.1 khz 16-bit and then inserted into Flash and the animation completed around the audio.  We have split the audio file within Flash at some points because the timing wasn't right... maybe that's it but it seems like such an easy feature. It's strange because when we output an swf everything is exactly in sync. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 14, 2011 Aug 14, 2011

Copy link to clipboard

Copied

"Stream" sound should work best.

Since any one particular Flash project will have it's own special quarks and parameters... I can't say for sure why there are sound problems in your project. But I do stick by the theory that it's the animation, not the audio that's out of sync.

If the audio file is exactly 3 minutes long, you can not change that or the frequency of the sound will either drop (sound takes >3 min to play), lowering the pitch or the frequency will increase (sound takes <3min to play) causing a raise in pitch.

It's the animation that's out of sync, not the audio.

So if the audio seems to be lagging, falling behind the animation, reduce the frame rate of the Flash doc. If the audio seems to be running ahead of the animation, increase the Flash doc frame rate.

And it works just fine to use fractional framerates. If 25fps is too fast (audio lags) try 24.75 or 24.5. It won't cost anything to at least test this theory, just give it a try and see what happens.

Best wishes,

Adninjastrator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 14, 2011 Aug 14, 2011

Copy link to clipboard

Copied

I've set it to stream, thanks.

The animation is not out of sync though, it is perfectly in sync inside flash. And it is perfectly in sync when we export it as an swf. It is also perfectly in sync when we export as a .mov.  But if I export it as a .wav and then reimport for some reason Flash has moved it around and changed the length of the audio.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 14, 2011 Aug 14, 2011

Copy link to clipboard

Copied

Well I can't say for sure, but if you export as wave and have problems, then something has changed inside the audio file... so don't export as wave.

The process is apparently adding some dead space at the beginning of the audio, adding dead space at the end of the file, or changing the frequency. I don;t see what else it could be!

So why not test your wave file and take a close look at the waveform using an audio program like Audacity:

http://audacity.sourceforge.net/

You should be able to spot any alterations by looking closely at the waveform and comparing. Even a simple comparision of peaks and valleys at very specific times should help determine what changes have been made.

And if it turns out that Flash can't properly export the wave... oh well, don't use a wave file... or play with the file in Audacity to see if you can clear dead space at beginning of file, or alter the frequency to speed up, slow down the audio to match the original.

Best of luck!

Adninastrator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 14, 2011 Aug 14, 2011

Copy link to clipboard

Copied

Thanks.

I can see where the wav file is out of sync because Flash displays waveforms.  When the first line of dialogue comes in it is two frames out.

But i can't just not export as a wav, I have to either export as a .wav or an .mov to replace sound. I'm trying to get it to export properly, I can't just give up. 

Has anyone else encountered this problem?  Is there a fix?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 14, 2011 Aug 14, 2011

Copy link to clipboard

Copied

Yes, I've seen other posts that mention Flash does not export wave files correctly... adding some dead space at the start.

My suggestion.... use an audio program like Audacity for everything audio related. You can crop out that dead space at the beginning and then use the corrected version rather than the Flash export version of your wave file.

Give Audacity a look. I use it often to clean up and/or crop edit audio files.

Adninjastrator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 15, 2011 Aug 15, 2011

Copy link to clipboard

Copied

Not to be too nit picky, but in the true sense of the word, Flash will not sync with audio, event or stramonium. True synchronization uses time code to lock the audio to the video and performs checks and balances constantly to maintain synchronization. Flash does not do this. Flash mimics this by using the methods described so I've, matching frame rate s and lining up the start point as close as possible. It's not unlike what the Beatles did on certain recordings, having two identical recorders, one with the music and the other with the vocals - hitting play at the same time and mixing then down to a single track on a third recorder. The smallest discrepancy in motor speed would eventually throw the two sources out of sync, the longer the content the more out of sync it would become. Then Thera the issue of the Flash player and how consistent it is. The audio will always play at a uniform pace, but flash animations are not consistent. You may have a file that plays locally just fine, but put it up on the web and you may notice it goes out of sync very quickly. So you have two options. If your final project is Flash, use a series of short audio clips. If is video, sync your audio in the video editor - you may still have to break up the audio into separate pieces and visually line them up but you'll end up with a truly synced and consistent video.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 11, 2013 Jun 11, 2013

Copy link to clipboard

Copied

How can I use stream sound by using AS3 to keep the sound in sync with the animations. I should not use the timeline due to the fact that my program should be dynamic. I should load the sound externally and play it in sync with the timeline. Is this possible?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 05, 2014 Oct 05, 2014

Copy link to clipboard

Copied

Well yeah it worked for me then putting it in Mp3. P.S this was not easy too find out because i was too busy with sources not helping on the internet. When i did this it worked very well I have not had a problem ever since

by the way sorry for making you wait. and If you want you and friends can see my channel here comment if want me to do tutorials for things your having problems with the choice is yours my friend.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 05, 2014 Oct 05, 2014

Copy link to clipboard

Copied

My youtube channel is here for those who want to see Ran D ass Studio Productions - YouTube

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 01, 2018 Nov 01, 2018

Copy link to clipboard

Copied

Ay Yo... Thank you Bro, Massive Help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 04, 2021 May 04, 2021

Copy link to clipboard

Copied

LATEST

what if you import audio put it in timeline and make project as the sound goes after exporting it should be exactly as its in the project no metter what is the framerate or im wrong? 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 04, 2014 Aug 04, 2014

Copy link to clipboard

Copied

Hello I have the The Answer for Every one try and see. I tested it and it works so say thanks.works for every version of adobe Flash cc cs6 cs5

look below.Dwm 2014-08-04 16-27-58-19.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 28, 2016 Jan 28, 2016

Copy link to clipboard

Copied

Thanks Dude, you saved my animation life!!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2017 May 01, 2017

Copy link to clipboard

Copied

Dear Sir,

Thank you, thank you so much!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 01, 2017 May 01, 2017

Copy link to clipboard

Copied

The person you're thanking hasn't even logged in in a year and a half. Please don't dredge up ancient threads unless you have something to add to the discussion.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines