About Scaleform Video
Scaleform Video is a high-resolution, high sound-quality video playback system that supports multiple platforms. It helps create high-quality movies that conform to the highest global standards while making the best use of each platform's special characteristics. It also offers advanced features, such as multilingual voices and subtitles, for games that will be sold in multiple regions.
Scaleform Video supports creating CRI movie data using H.264 video codec for Xbox One and PS4. The H.264 video codec helps create high quality and high compression movie playback and supports development of a cross-platform game title without knowing the differences.
Scaleform Video installs the video encoder to: C:\Program Files\Autodesk\Scaleform\GFx SDK 4.6\Bin\Tools\VideoEncoder
Scaleform Video installs a video demo to:
C:\Program Files\Autodesk\Scaleform\GFx SDK 4.6\Bin\Data\AS2\Video
This demo includes a window with three different video players which can play separate video files. This directory also includes some Flash Files and Video Files related to the demo, including some pre-encoded USM files which may be used for testing. Run videodemo.swf in the Scaleform Player to try out the demo.
There are several sample files for use with this tutorial located in the same directory as the encoder software. Use these samples when following the tutorial steps.
- getting_started_with_video_tutorial.fla – This is the original Flash file containing everything outlined in this tutorial.
- getting_started_with_video_tutorial.swf – This is the published version of the Flash file.
- sample.avi – A sample video for encoding.
- sample_audio.wav – Sample audio for encoding.
- sample_cue_points.txt – Sample cue points for encoding
- sample_subtitles.txt – Sample subtitles for encoding.
There are several files inside the Scaleform Encoder directory which are critical to its operation.
- Medianoche.exe — This is the command line encoder.
- MedianocheH264.exe — This is the command line encoder supporting H.264 video codec.
- ScaleformVideoEncoder.exe — This is the graphical front end of the encoder (described in this document.)
- TMPGLib.dll — This is the heart of the encoder.
- VideoEncoderUtil.dll — This is a necessary library for ScaleformVideoEncoder.exe
- VideoPlayer.swf — This is the graphical video player which allows for the control of the output video file when Preview is pressed in the Scaleform Video Encoder window.
High-Quality Movie Playback High-quality movies can be played back using simple APIs. Playback of movies at full-spec high definition (HD) resolution (e.g., 1080p) is also possible.
Supports Multilingual Voices and Subtitles Multiple voices and subtitles can be put in a single movie. This reduces the total cost to develop games being sold in multiple regions.
Professional-Level Encoding with Easy Operations An easy-to-use encoding tool is included with the SDK package.
Scaleform® Video, powered by CRI Movie™ is a premium module that allows developers to add high performance video playback capabilities to their interactive content through Adobe Flash®. Use Scaleform Video to playback extremely high quality, high definition, and noise free videos on a variety of next-generation platforms. Playback videos: full screen, windowed, on a texture in a 3D game engine or with transparency. Utilize video in your interactive content for a variety of applications including: intro logos, main menus, in game HUDs, as in-game textures, as in game video screens, full screen cinematic cut scenes, loading screen and much more. There is little to no additional work necessary to play in-game videos because Scaleform Video is already fully integrated into Scaleform™ 4.5. Scaleform Video is based on the popular and award-winning CRI Movie™ codec, but with significant workflow enhancements and full integration into Adobe Flash.
- Video and Audio formats: Most commonly used video and audio formats such as AVI and WAV are supported by the encoder.
- Multiplatform Support: Scaleform Video is supported on all major platforms including Xbox 360, PS3, PC and Wii, freeing programmers from having to be concerned with hardware-specific dependencies.
- Optimum Encoding for different platforms: During encoding, optimum parameters can be applied, which take into account a platform's characteristics and video quality/compression rate.
- Subtitles: Multiple subtitle tracks for the same movie supported. This enables users to create subtitle tracks for different languages in separate files and each subtitle can have different start and end time. The multi-language text is automatically localized correctly using the Scaleform font configuration system.
- Alpha Channel Support: Users can create "virtual transparency" in their movies with embedded alpha enabling per-pixel transparency as well as whole-movie transparency. This allows users to create a variety of creative effects.
- Render to Texture: Movies can be rendered on in game textures that can be drawn on 3D surfaces, enabling users to integrate video directly into the game.
- Audio Tracks: Multiple audio tracks (up to 32) per video are supported. This enables the user to have voiceovers in multiple languages.
- Switching Audio Tracks: Users can switch between different audio tracks in ActionScript™ using Scaleform 4.5 Flash extensions.
- Localization Support: The ability to switch audio tracks and subtitle tracks at runtime in ActionScript enables localization support in Scaleform Video. This is an exciting new feature that will make it possible to easily organize and maintain UI videos for customers speaking different languages.
- Surround Sound Support: Each audio track can be mono/stereo or 5.1ch surround sound.
- Multilingual Surround Sound: Center-Channel data in surround sound can be replaced with the voice track. This allows users to easily play voice tracks with surround audio material.
- Seeking Ability: Using Scaleform Video, users can seek to a specific time value in the video stream. The seek value can be specified with respect to the beginning of the stream or with respect to the current position. The user can both rewind or go forward (using positive and negative seek values)
- Cue Points: A cue point is any significant moment in time occurring within a video clip. Cue points enable you to access different segments in a video clip. Using Scaleform Video Encoder, you can embed cue points directly in the USM file. The cue points can then be used as cue points in Flash. When an embedded cue point is reached in the video, an ActionScript event is triggered and all the information associated with the cue point is passed to user. This allows you to set up a navigation menu, seek to specific events in the video and make your videos interactive.
Scaleform Video converts video movies into the Scaleform CRI Video Format which end in a USM file extension. In order to play a USM video file, just drag and drop it onto the icon for the Scaleform Media Player which should have been installed to the desktop. Alternatively, open up a Scaleform Player and drag and drop the USM onto the open window.
Try dragging and dropping C:\Program Files\Autodesk\Scaleform\GFx SDK 4.6\Bin\Data\AS2\Video scaleform_logo.usm onto the player to see it in action.
Figure 1: Scaleform Video Workflow
The workflow needed to produce an in-game video is as follows:
- Integrate the Scaleform Video API into the game engine.
- Export the video to AVI format from Adobe Premiere or the preferred video encoding suite.
- Convert the AVI video to USM format using the Scaleform Video Encoder.
- Create an Adobe Flash SWF file that incorporates the USM encoded video.
- Set up any additional ActionScript to control the video, subtitles, cue points, etc.
- Import the published SWF file into the game.
- Play the SWF file in the game using the methods available in the game engine.
Note: Do not attempt to embed a USM video file into the Flash file, but instead reference it via ActionScript. Once the video is set up and plays in game, iteration on the video may be done without needing to update anything in the Flash file by re-encoding the video to the same physical location and filename on the hard drive.