View Single Post
Dorian Gray
Veteran Member
 
Join Date: May 2005
Location: Paris, France
 
2006-02-21, 12:47

Quote:
My primary concerns here are storing these video clips on my hard drive, and being able to pull screencaps. For screencaps I guess I'll need more keyframes.
Yes, messing with video requires a huge (and preferably fast) hard disk, no getting around that! If you do decide to buy an external, try to get one with FireWire (faster than USB 2.0). As for screen captures, the keyframe interval won't affect your ability to do that (if QuickTime can play a frame, you can pause it on that frame and take a screen shot). Keyframes are just the frames that the codec has recorded in full. For subsequent frames (between keyframes) the codec just records the frame differences from the previous frame: eventually (over many frames) the differences accumulate to the extent that a new keyframe is needed or the quality will gradually creep away from optimum. When you select 100 as your keyframe interval, the codec will force a new keyframe every 100 frames, as well as every time the frame changes significantly (for example, on camera changes in films).

When you randomly start playing a video somewhere in the middle, QuickTime has to find the previous keyframe (which might be up to 99 frames earlier (with a keyframe interval of 100) if you're unlucky!), then calculate the frame after the keyframe based on the encoded instructions, followed by the next frame, etc., for 99 frames. Only then can QuickTime present the frame you randomly selected and start playing. This is why there is sometimes a pause of a second or two when you start playback in the middle of a video, particularly with processor-intensive codecs such as H.264. It therefore makes sense that if you want short seek times, you need a lower keyframe interval. But storing a keyframe takes much more space than the instructions for changes from the previous frame, especially in scenes where the only movement is someone's talking mouth, for example. So for a given file size, a balance must be struck to get the best quality, and this varies depending on the video material. Experiment with keyframe intervals of between 1 and 6 seconds (calculate based on frame rate) to see what works best for your video material.

This is one reason why MPEG-4, etc. are bad authoring codecs. You can't just remove whatever frames you feel like, because you may be removing a keyframe that was the starting point for a series of instructions for creating a frame a couple of seconds down the line. With Apple Motion JPEG A, on the other hand, you can add or remove frames wherever you wish, because each frame is independent of the others. In effect, every frame is a keyframe. So it's good for removing commercials.

The three steps you mention are correct (just make sure the quality slider is at 100% for Apple Motion JPEG A in MPEG Streamclip if you want best quality). You're also correct about using QuickTime for the final conversion (from Apple Motion JPEG A to H.264), although technically you could use any encoder that opens .MOV files. QuickTime Pro is great for encoding, although it doesn't give as much fine control as applications like Sorenson Squeeze 4.

If you're using the 1 GHz PowerBook in your signature, you'll find it will take several hours to make the intermediate encode in MPEG Streamclip, and probably over a day to encode the final H.264 video if you use multi-pass. You might also want to experiment to see if the PowerBook has enough power to smoothly play back 1500 kbps H.264 video at that frame size (it will be touch and go). It would make sense to encode a ten-second clip to see if you're satisfied with the quality, etc., before doing the big encode. Time how long it takes for QuickTime to encode the 10 second clip to give you an idea how long the entire 42-minute thing will take.

Of course the beauty of OS X is that you'll be able to use your computer normally while it's encoding away in the background, or put it to sleep to travel, etc.
  quote