Forum Topic: Audio Sync Problems in Flash 8

(301 views • 9 replies)

This topic is 1 page long.

<< < > >>
Questioning

altffour

Reply To Post Reply & Quote

Posted at: 1/13/07 10:58 PM

altffour LIGHT LEVEL 07

Sign-Up: 02/26/04

Posts: 120

Hello newgrounds!

I've been working for quite some time on a rather large project which has turned out to be around 11 and a half minutes long. I use 10 scenes total and the frame rate is 24fps. Total amount of frames is roughly 16,500. I think this information might be able to help you help me with my problem.

When my flash movie is exported, the audio become terribly unsynced over time, and at the end is off by around half a second. The audio moves slower than the animation itself. I don't want to release my project in this state because it greatly decreases any comic value it might have had because the visuals and audio do not match up- and the hours I have put into lip sync are worthless when it doesn't fit with the audio.

I've tried the start stop code solution, and it didn't work although it did make it better. Does anyone know of any alternative solutions for this problem?

Thanks in advance.


None

Trunks

Reply To Post Reply & Quote

Posted at: 1/13/07 11:01 PM

Trunks DARK LEVEL 22

Sign-Up: 07/31/05

Posts: 4,134

Hey there altffour!

There's something I use in a lot of my (scrapped) animations to make sound sync: the silent loop. I use a program such as audacity to generate a couple seconds of no sound at all (complete silence) and loop that sound over and over again when there is no sound currently going on. If there is a song going on in the background or something, I tend to loop it throughout the whole thing.

That usually works for me, and good luck.

'05 users for the win :3

BBS Signature

None

altffour

Reply To Post Reply & Quote

Posted at: 1/13/07 11:18 PM

altffour LIGHT LEVEL 07

Sign-Up: 02/26/04

Posts: 120

At 1/13/07 11:01 PM, Trunks wrote:
That usually works for me, and good luck.

I will certainly try this, but I'm curious to why it would work. Does flash turn all of the sounds into a single mp3 when you export or something? If so, wouldn't the scene transitions then make it so the audio got ahead instead of behind?


None

altffour

Reply To Post Reply & Quote

Posted at: 1/14/07 06:24 AM

altffour LIGHT LEVEL 07

Sign-Up: 02/26/04

Posts: 120

That suggestion did not work, thanks anyways. Is there any other ways to try to fix it?


None

deltatsunami

Reply To Post Reply & Quote

Posted at: 1/14/07 11:13 AM

deltatsunami LIGHT LEVEL 11

Sign-Up: 12/31/05

Posts: 707

convert everything (animation, and sound) into a single movieclip. on the first frame of the movie clip, add the action _root.stop(); on the last frame: _root.play();
then drag the movie clip onto the stage and have its x and y be 0,0

then it should work. flash does that all the time if you have too many frames, or too many scenes, or too long of an mp3 file.


None

Xen0m0rph

Reply To Post Reply & Quote

Posted at: 1/16/07 09:13 AM

Xen0m0rph EVIL LEVEL 09

Sign-Up: 08/28/06

Posts: 21

Hi, I have exactly the same problem as altffour!
( I was going to make a new post in the forum, but decided to make a search first, and discovered this *quite recent* thread!)

Some background information: I'm making a music video, so I have this 4 minutes long mp3 that runs through all the clip (about 6000 frames in a single scene @24 fps).
I laid the mp3 on its own layer in the main timeline with "Stream" Sync Option. On the other layers I started to work on the graphics - very minimal stuff up to now: I just set some simple graphical indications that act like "placeholders" in the timeline in order to facilitate my next steps with the storyboard (as the video will need to be in perfect sync with the music!).

Now, if I directly play the clip in Flash 8 (Control > Play, or press Enter) everything is right: my placeholders will pop-up on the screen in perfect sync with the music.

But when I publish the movieclip to swf (or "test" it with Ctrl+Enter, which is the same), the audio will slowly but steadily drift with respect to the video, reaching a significant lag by the end of the clip (as altffour noticed, the lag is roughly 0.5 sec over 10000 frames, and the audio is "slower" than the video, so that any graphical event happen before the intended time).

I tried both Trunks' and deltatsunami suggestions (thanks guys), but unfortunately they didn't work... :'-(

So is there anyone that stumbled upon this issue and have other suggestions?

@altffour: if you happen to find a solution, please let me know. I'll do the same.


None

Xen0m0rph

Reply To Post Reply & Quote

Posted at: 1/17/07 08:48 AM

Xen0m0rph EVIL LEVEL 09

Sign-Up: 08/28/06

Posts: 21

Update report.

Still banging my head on the wall.

As stated before, tried start/stop sync options, silent loops, embedding in clip, with no success.

I also tried many different mp3 compressions (i.e. compressing the sound at different kbps), with no effect on the synchronization issue (while you can still clearly hear sound quality degradation for lower kbps figures).

Now my understanding is that when you publish the clip with a streamed audio clip, Flash will create a single mp3 track that will play in BG while your movieclip is reproduced on screen. Now, it appears that the Flash player will stream the audio to the soundcard with a different timing with respect to the movie.

What I am now wondering is whether this timing difference is dependent on the hardware (so that different users will experience different un-synch-ing phenomena), or this difference is rather a sort of "constant".
In the latter case, there is a quick and dirty workaround that consists in adding/removing some frames here and there from the movieclip in order to re-synch it with the music.
Of course if we are in the former case, this re-synch will work only on my computer... so it is useless if I want to share my clip e.g. on Newgrounds...

Any thoughts?


None

Celarent

Reply To Post Reply & Quote

Posted at: 1/17/07 01:28 PM

Celarent NEUTRAL LEVEL 07

Sign-Up: 04/15/06

Posts: 13

I got the same problem too, nocieable on my last flash (luckily music synched to another beat)
Tried splitting the mp3, using the null sound method and shifting the music to event mode, but no success. Looking foward to any solution here. (havent tried Deltatsunami's method though, I should give it a try)

BBS Signature

None

Xen0m0rph

Reply To Post Reply & Quote

Posted at: 1/18/07 07:51 AM

Xen0m0rph EVIL LEVEL 09

Sign-Up: 08/28/06

Posts: 21

Hi Celarent,
welcome in the club! ;-)

I had a PM exchange with altffour. He told me he eventually elected to throw in some addidional frames to re-synch the video to the audio.

I think I'll do the same.
And to be 100% safe, as soon as I have some spare time, I'll make some tests on two or three different PCs to make sure that this re-synch trick works right on all of them (i.e. the timing difference is not hardware dependent).


None

Xen0m0rph

Reply To Post Reply & Quote

Posted at: 1/19/07 12:49 PM

Xen0m0rph EVIL LEVEL 09

Sign-Up: 08/28/06

Posts: 21

Hi all,
latest update from my side.

I tried my clip in two versions (original, and re-synched by adding frames) on two different computers. Both are laptops, but from quite different vendors.
The result is that the clips are played in exactly the same way on both computers! The drift appears to be non-hardware dependent.
Then I guess that the trick is OK. In the clip I am authoring, I just have to insert an additional frame every about 800 frames of the original clip to keep the video synched with the music.

PS @Celarent:
I lately discovered that the clip you refer to as "my last flash" is nothing but Future O_O;;;
And I was a bit surprised because I remember that, as soon as you released it, I watched it several times (5R-ing it all of them, lol) AND I DIDN'T NOTICE ANY DRIFT!
Now I watched it once again and I was able to clearly spot it (sort of you have to know it's there to see it).
As you say, you've been lucky as your regularly pulsating images will get out of synch with the main beat, but will synch anyway with "secondary" beats of the music.
If you had any lip-synch in the clip, probably this would have been an issue to address... ;-)
Anyways, that's a clip worth kudos independently of this, and I 5R-ed it once again this time.
:-D


All times are Eastern Daylight Time (GMT -4) | Current Time: 03:03 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!