{{LEFT}}

MPEG2 Decoding

Previzion has the ability to decode multiple MPEG2 videos at the same time for use as textures on elements inside scenes.  However due to some quirks in MPEG2’s history  as a broadcast format not a file format Previzion can have a hard time accurately determining the length of MPEG2 clips if they don’t have audio tracks embedded in them. This is very important for scenes with multiple clips that must loop and play back in sync. “Blu-Ray” encoding settings encode separate audio and video files which do not work well for Previzion to accurately time.

The easiest solution is to encode MPEG2 files with audio tracks embedded in them.  The audio track can be completely silent, but they must be there for Previzion to accurately display clip length.

Recommended Settings

For most applications, the number of MPEG2 streams that Previzion can decode simultaneously will depend on the frame rate, bitrate and type of bitrate.  Sometimes the complexity of a CG scene’s shaders also affect the number of video streams.  For example, at 24 fps ( or 23.976 fps), without using too many shaders/textures, Previzion can decode up to 8 HD video plates.  At higher frame rates, that number is lower.

A rough ballpark number of MPEG2 streams per frame rates can be seen as:

 

Frame Rate (in fps)Max Number of Simultaneous HD Streams
23.98 (24)6 to 10
256 to 10
29.974 to 5
60i2 to 3

 

Adobe After Effects

In Adobe After Effect CS5 or later, on top of checking  the “Audio Output” option, there is a “Multiplexing” option in the audio settings under MPEG2 Options that allows to embed audio to the video file directly from After Effects without the need for going through Adobe Media Encoder.  From your Render Queue, select the output format to:

  • Format: MPEG2
  • Activate Video Output with:
    • Channels: RGB
    • Depth: Millions of Colors
    • Color: Premultiplied (Matted)
  • Activate Audio Output and select Format Options…:
    • Under tab “Multiplexer,” select Mutiplexing: MPEG2 with Bitrate type: Constant.
    • Under tab “Audio,” select Audio Format MPEG and Audio Layer MPEG-1, Layer II Audio.
    • Actual sample rate, stereo/mono and bit depth do not matter for the purposes of Previzion.

After Effects Audio Multiplexing

Please note that the MPEG2 video that comes out of After Effects may not be playable in Quicktime, but it is playable in WMP, VLC and other media players.

NOTE: The transcoding options below require that the source video file already has audio in it. Either re-export the file with audio enabled or open the file in your NLE (Final Cut Pro, Avid, Premier Pro, etc.) and export it with audio enabled.

Apple Compressor

In Apple Compressor “MPEG-2 Program Stream” preset works out-of-the-box.  Make sure that the original source file already has audio before reaching Compressor.  Either re-export the file with audio enabled from the source or open the file in Final Cut Pro (or equivalent NLE) and export it with audio.

Sorenson Squeeze

In Sorenson Squeeze we recommend using “HD 1080p”.

Adobe Media Encoder

In Adobe’s Media Encoder “MPEG2” is the only one that has embedded audio with the video track.

{{RIGHT}}

Decoding Progressive MPEG2

Previzion decodes progressive MPEG2 video as one would expect — it decodes one frame of MPEG2 video for each incoming frame of live action video.

Decoding Interlaced MPEG2

When Previzion’s video format is set to 1080/59.94i interlaced video, the system tracks the camera and lens motion and renders the background at 59.94 times/second.

To match this motion, Previzion decodes MPEG2 files as normal, and then uses either the odd or the even lines of the MPEG2 image and line doubles them to create the background texture for that field. Thus, to match the look of interlaced camera motion, the MPEG2 files should also be of an interlaced source format.

 Using MPEG2 with Alphas

Previzion has the ability to decode multiple streams of  videos and, by using our custome CgFx shadder, you can assign an alpha video to match another MPEG2 video stream.  For more information about MPEG2 and Alpha channel visit our Transparent Video section.