24 to 30 fps... uh... is this right?

General Moho topics.

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Post Reply
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

24 to 30 fps... uh... is this right?

Post by heyvern » Mon Mar 20, 2006 11:10 am

I made a booboo.

I have been working in 24 fps... and I really should have been working in 30 fps.

So I changed it. Then all of my lip synch is off because Papagayo was in 24 fps... since moving things in PGO kind of zaps all of your custom adjustments...

... ick... I was looking at fixing 7 solid total minutes of lip synched dialogue... several hours of work... so...

30fps = 125% x 24fps.

I calculated the new length of the animation and rescaled the whole document in Moho to the new frame ending point...

Holy cow if it didn't work perfectly. Although I will have to redo this process for any changes to the .dat file.

<sigh>

-----------

I guess my question is this... I am going to be outputting this for DVD/TV. Do I need to go through all this? Could I just out put to 24fps? Would this convert to DV format for burning DVD video?

... I keep thinking a few dropped frames wouldn't be a problem but I don't want to jump through hoops on the end process if I should fix it at this point.

Am I better off switching everything to 30 fps now? Getting it over with so to speak? Fixing the lip synch so it is right?

-Vern
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern » Mon Mar 20, 2006 12:08 pm

The PGO file format is a piece of cake.

I was able to open one of my smaller files in a text editor and change all the frame references to match 30fps and reopen it fine in Papagayo. Everything was absolutely perfect... now 30 fps instead of 24.

I was wondering... I am pretty good with JavaScript... and a touch of pearl... I don't think grep could do this...

All that would be needed is some kind of simple iteration to multiply the frame numbers times the percentage of increase/decrease and round up/down the frame numbers for the switch layers in the PGO file to match a new FPS.

In my case it was 24 to 30... 125%. If the result ended in .5 or lower rounded down... higher rounded up.

The tricky part is finding the frame numbers in the file rather than the "count" for the number of words... phonemes etc. Can't just run through and change all the numbers...

If no one has played with this... or has a solution... I might give it a shot. Maybe PHP would be better... hmm...

-Vern
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed » Mon Mar 20, 2006 12:21 pm

There really shouldn't be any problem with the lipsyncing if you rerender your 24 fps animation to 30 fps (or vice versa).

The Moho tutorial file 5.2 was made at 30 fps. I converted the MP3 into WAV, imported the DAT file for this tutorial and exported as 30 fps with QuickTime compression None. Next, I rerendered the file as a 24 fps QT movie with Sorenson Video 3 compression, using MPEG Streamclip (a free program available for both Mac OS X and Windows XP).

Here's the resulting rerendered animation on YouTube:
http://www.youtube.com/watch?v=S5P5IjUfj_I
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern » Mon Mar 20, 2006 7:13 pm

Thanks Rasheed...

Not sure what you are demonstrating... but... that clip is way too short to show the offset of the different FPS. 24 to 30 or 30 to 24 won't show up in that example.

If your project is 600 frames... and you render at 24 fps... it is still 600 frames.... 30 fps will go by 125% faster than 24 fps... but the audio is the same length.

Moho and Papagayo doesn't "stretch" the frame placement (I don't know of any animation program that does in this case). It just changes how fast or slow the frames go by.

Now that I think about it... I really should fix the FPS now before I get to a final render stage. It won't hold me up too much since I can scale the Moho frames easily enough on the existing files.

If I don't fix it now I may have the same frame rate audio synch problem with the rendered video I am having with the audio.

I am writing some asp code for my home network to convert my PGO files.

The numbers that need to change are always in the same spot on the appropriate line of the PGO file code. I just have to iterate through those and spit out text I can save as a new file. It is so simple it is funny... but I am not one of those programming gurus... so it takes me some effort to figure it out.

-Vern
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed » Mon Mar 20, 2006 11:33 pm

MPEG Streamclip seems to adjust the number of frames and thus keeps the audio in sync. I tried MPEG Streamclip on a clip of a public domain Popeye animation. The original had a frame rate of 29.97 fps. There was no noticable difference in lip sync between a 24 fps and a 30 fps version.

The original Popeye clip I took was 2:03 long (or roughly 3690 frames). According to your reasoning, in the 24 fps version, the imagery should take 154 s to display and the sound 123 s to play, but, in reality, both took 123 s. I think this is accomplished by either dropping or merging frames.

The lipsync or sound effects didn't suffer at all and the image quality either, because AFAIK most of it was animated on twos.

Of course, for ultraprecise animation, it is better to animate at the proper frame rate, but if you need several frame rates, or you have made a mistake and don't have time to redo the whole movie, you can get away with programs like MPEG Streamclip. Of course, you have to "hide" the lesser precision when you use multiple frame rates (e.g. for PAL and NTSC versions of your animation) with artistic solutions.

Animation is an applied art, which asks for practical solutions. Perfection is not always feasable within the limited time and budget of an animation project. Even Disney cut corners if it didn't harm the quality of the final product.
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern » Tue Mar 21, 2006 6:39 am

--------
Edit

Rasheed. The difference with changing the video compression is that the frames are "doubled" or "deleted". With Moho it isn't time based but frame based. I thought about it and decided it wasn't worth the risk going down that path... sooo....

-----------

I did it!

Wrote some JS script in HTML with a form.

I just paste the PGO file as text into the form box and hit enter... it increases all the proper numbers from 24 to 30 fps. Then I just save the generated code as .PGO and it opens right up.

The only problem is it only works in firefox. I am on a mac and neither Safari or IE 5.2 will interpret the JS code properly... specifically running a function inside string.replace(). Probably a workaround but who cares. It works in FireFox.

YeeHaaa!

It should convert the other way as well... or with other FPS rates... but... repeated use will degrade the translation... after a few passes the number rounding will probably have an adverse effect.

This is great. I spent a lot of time adjusting many of the words and subtle switch layers in Papagayo... you touch the top levels and all those tweaks disappear. I hated the thought of having to open and fix 38 lip synch files.

I will still have to modify a few Moho files... but not 38... only about 5.

-Vern
User avatar
slowtiger
Posts: 5492
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger » Tue Mar 21, 2006 12:38 pm

Very interesting way to fix this problem, indeed. The canonical way to deal with it, as I know, include these 3 solutions:

1. Work in correct frame rate from the very beginning. OK, everybody has missed this option at least once, I suppose ...

2. Convert the frame rate of the finished Video-plus-sound output file. This is a standard procedure in content handling between US and European TV (30 versus 25 fps), in both directions. They do it with everything, the result depends very much of the character of the imagery. Life action doesn't suffer much from it. Animation can survive gracefully if it is not too fast. Fast Animation suffers a lot sometimes because in this process two frames are blended into one, which leads to a kind of double vision or blur effect, or, depending on the method of transfer, frames are dropped entirely - chances are high that it hits your all-important keyframes or extremes, thus sucking any dynamics off your animation. But since this method is a standard procedure, gve it a try because it's fast.

3. Instead of slowing down or speeding up the animation, do the same with the sound! Hey, it's animation after all, and maybe your sound wasn't intended to be very realistic from the start. Furthermore, nowadays, with time stretching, it's possible to alter the timing of the sound without changing its pitch. This is a standard procedure as well.

You invented method Nr 4 with that script, congratulations!
Post Reply