Difference between revisions of "Encode video"

From Second Life Wiki
Jump to navigation Jump to search
Line 10: Line 10:


== Initial setup ==
== Initial setup ==
# Download [http://www.apple.com/quicktime/download/ Apple QuickTime] and upgrade it to [http://store.apple.com/us/product/D3380Z/A QuickTime Pro]. (Unless you already have an app that encodes through QuickTime like Apple Final Cut Pro or Adobe Premiere Pro.)
# Download [http://www.apple.com/quicktime/download/ Apple QuickTime] and upgrade it to [http://store.apple.com/us/product/D3380Z/A QuickTime Pro] (US$30). (Unless you already have an app that encodes through QuickTime like Apple Final Cut Pro or Adobe Premiere Pro.)
# Open the movie file in QuickTime Player. (In other apps, usually found as an option in the '''File''' menu).
# Open the movie file in QuickTime Player. (In other apps, usually found as an option in the '''File''' menu).
# In QuickTime Player, use '''File menu''' > Export'''.
# In QuickTime Player, use '''File menu''' > Export'''.

Revision as of 11:28, 9 June 2009

This guide will help you learn how to encode video to be playable in Second Life. There are many ways to do this, but this is among the simplest.

Chances are you have a movie file you want to show, but it's too big, or not in the right format to work inworld. This guide empowers you to make a single movie file that is:

  1. Playable in Second Life at a reasonable balance between filesize and quality — so you can share it with friends and colleagues!
  2. Playable on iPod and similar mobile devices.
  3. Playable cross-platform on most modern computers with most video players (including VLC and Windows Media Player).
  4. Perfectly uploadable to YouTube, Vimeo, and other web video services.
  5. AWESOME. (I hope.)

Initial setup

  1. Download Apple QuickTime and upgrade it to QuickTime Pro (US$30). (Unless you already have an app that encodes through QuickTime like Apple Final Cut Pro or Adobe Premiere Pro.)
  2. Open the movie file in QuickTime Player. (In other apps, usually found as an option in the File menu).
  3. In QuickTime Player, use File menu > Export.
  4. Change the Export dropdown to Movie to MPEG-4.
  5. To the right of the dropdown, click Options. Unfortunately, QuickTime doesn't let you make a list of custom presets, but you can use Most Recent Settings. You can always refer back here if you get lost.

If your movie file doesn't open in QuickTime or your video editor, you'll need an intermediary transcoder. I don't have a solid recommendation outside of using Sony Vegas to read predominantly Windows-based formats, like FRAPS, and make them QuickTime-friendly — any suggestions for one? Add it here.

Settings

Here's the settings you'll want to use, and why. You can tweak any one of these if you know better, but it's a good baseline, one that's been used hundreds of times and refined by Torley.

  • File Format: MP4
    • NOT "MP4 (ISMA)"

Video tab

  • Video Format: H.264
    • A popular codec that offers high-quality at small filesizes.
  • Data Rate: 1152 kbits/sec
    • I chose "1152" because along with audio, it's a fine balance. Make this lower (like 200 kbits/sec) if your video is a mostly-static slideshow, or if there's lots of motion, make it higher (like 2000 kbits/sec). Don't go too high above this unless you know everyone watching the video is on a superfast broadband connection. Otherwise, they'll have to wait a long time for the video to buffer, and it'll repeatedly pause as it struggles to keep up — annoying! Remember that we suggest "768 kbps" (audio + video combined) as the minimum for playing audiovisuals in SL. While many broadband connections are faster, err on the side of an enjoyable experience.
  • Optimized for: Download
  • Image Size: 640x480 (or less)
    • Exceeding 640x480 means your video won't play on iPods.
  • Uncheck Preserve aspect ratio using: Letterbox.
  • Frame Rate: Current
    • Lower this if you want to sacrifice smooth motion for higher individual frame quality. For reference, I've used 20 or 24 FPS for my video tutorials, and don't suggest going below 15 — it looks like a slide show.
  • Key Frame: Automatic
  • Click Video Options to bring up a dialog.
    • Restrict profile(s) to: Baseline
      • Uncheck Main (and Extended if need be), otherwise it won't play on iPod.
    • Encoding Mode: Best quality (Multi-pass)

Audio tab

These settings will give near-CD-quality sound.

  • Audio Format: AAC-LC (Music)
  • Data Rate: 128 kbps
    • Lower this if sound isn't so important, 64 kbps @ stereo has swishy artifacts but is tolerably listenable.
  • Channels: Stereo
    • If the original source is mono, simply make it so.
  • Output Sample Rate: 44.100 kHz
    • Similarly, if the original is lower-fidelity, lower it. You actually shouldn't be able to increase this if the source is at, say, 22.050 kHz.
  • Encoding Quality: Best

Streaming tab

  • Simply leave "Enable streaming" unchecked. This is for server-side streaming, and doesn't apply to general SL purposes.

Your settings should look like this:

For advanced users

You can apply most of the above to other encoders that support QuickTime. A common problem with encoders is their usability are crap and they offer too many options without telling you what they do, and on top of that, their presets aren't optimized as they could be. And sometimes they're missing one or more of the essential options above, making it a chore to test and get good results.

That being said, if you know something more elegant, add it here! ________ :)

Common problems

"I have to wait for the whole movie to load in SL, why?"

It's likely because the movie isn't optimized for "Fast Start" within-seconds playback. The above guide makes that moot; re-encode earlier movies as necessary.

See also

  • [[Play Media] - Info on how to actually play movies in Second Life, after you've got them encoded.