I recently did some work on a product we're currently providing for danish realestate agencies, involving various, automated videoproduction.
We basically built a rendering engine for creating various types of video (for instance, for showing off images of a given property, while a speaker tells you about the details).
Anyway, one of the things I figured out, was that when someone uses Keynote for creating intro slides for a videoproduction that uses ffmpeg, you may be in a world of hurt.
We had 3 challenges:
We needed the intro slides to be the same framerate and quality as the rendered video.
We needed to convert the slides from Quicktime into raw AVI. The reason for this is, that if you want to append an intro to an existing video automatically, one of the best ways of doing so, is concatting. However, only specific formats can handle this, like for instance raw AVI.
The colors in our clients logos and slides should be the same as in Keynote (Something that compression often destroys).
Making Keynote play nice
When exporting something from Keynote, it basically wants to do so at 12 fps (Just like Flash). Also, it wants compression per default. We don't want this, as the entire production will be raw until the last given moment.
Anyway, start out by selecting File -> Export in Keynote. This should give you the following:
From here, select "Custom" under Formats. This will allow you to set up output and compression. You'll get this:
Here, choose "Settings", and you'll get this:
Now, as you may notice, I've selected Animation. This basically will output raw images in a series of a given number of frames (I've selected 25 fps). That's basically it, you'll get a pretty QT file, and you're good to go!
RAW converting FROM QT to avi using ffmpeg
One of the things I figured out, is that converting QuickTime movies on a Mac into raw AVI, may be annoying, when you want to keep the colors correct, as the slightest compression may destroy the colors.
Given the 25 fps. version I just exported, if I look at ffmpeg it will propably tell me that the fps is actually 50. "ffmpeg -i " on the file will give me something like this:
Seems stream 0 codec frame rate differs from container frame rate: 300.00 (300/1) -> 50.00 (50/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'introtest_720.mov': Duration: 00:00:10.00, start: 0.000000, bitrate: 2883 kb/s Stream #0.0(eng): Video: qtrle, rgb32, 1280x720, 50 tbr, 300 tbn, 300 tbc Stream #0.1(eng): Data: 0x0000 Stream #0.2(eng): Subtitle: text / 0x74786574, PAR 1:37 DAR 64:37
Now, this seems to be a container issue, as the Keynote export is QT contained. However, it's easily fixed when changing format to AVI. At this point in time I may want to use raw AVI, but as this takes up a lot of space, instead I'll do a highquality convert, and change the framerate, like so:
ffmpeg -r 50 -i introtest_720.mov -b 4096k -r 25 intro.avi
And there you have it, colorproof Keynote file, in highquality AVI.