Multilingual Videos

A standard multilingual video has multiple audio tracks for each language. GFx::Video::Video allows users to handle the multilingual movie data effectively by using the ActionScript video extensions. For example, consider a video that has both English and Spanish stereo audio. When playing this video, an audio track can be selected for each language. To select an audio track, use audioTrack extension from NetStream.

Example: ns.audioTrack = 2;

Figure 12: A multilingual video

Multilingual surround sound videos are videos that have a common 5.1 audio track and multiple language tracks. Though the language track can be switched along with surround sound, only one surround sound track can be used with multiple language tracks. This sharing of a single sound track in multiple surround videos reduces the movie size. GFx::Video::Video supports two different playback features as follows.

  1. Center Channel Replacement
  2. SubAudio Playback

Center Channel Replacement

As mentioned above, the multilingual surround sound video reduces the movie file size to support many languages. Multilingual surround videos have a common 5.1 audio track and monaural voice tracks for each language. Usually, the monaural voice track is played instead of the original center track of 5.1 channel audio. When playing multilingual surround sound video, the 5.1 audio track and monaural voice tracks need to be selected separately.

If music or sound effects are to be played from the center channel, these must be mixed with the voice track in advance.

Example:

 ns.audioTrack = 0; // main 5.1 audio track
 ns.voiceTrack = 5; // mono audio track

If the main track is not 5.1 audio or the voice track is not monaural, the setting of the voice track will be ignored. If the same main audio track is set as the voice track, the center channel will be played normally.

Figure 13: Center Channel Replacement

SubAudio Playback

When using SubAudio Playback feature, applications can playback another track with main track simultaneously through GFx::Video::Video. To be exact, GFx::Video::Video outputs sound data through an additional sound interface as well as the main track. Therefore, applications can perform multilingual surround sound playback by outputting the SubAudio track as a voice track.

Example:

ns.audioTrack = 0;  // main audio track
ns.subAudioTrack = 6;   // secondary audio track

Please note that SubAudio Playback feature allows you to have independent volume control for main audio track and subaudio track. This can be done by using the extended syntax of Sound.setVolume()

Example:

var audio:Sound = new Sound(this);
audio.setVolume(80, 50);       // set volume for main and subaudio tracks

Figure 14: SubAudio Playback