Multiple Audio Tracks

Learn how to use Multiple audio Tracks with Live 2.0

Multiple audio tracks using Video Cloud

  1. While Creating a New Channel, scroll down to the Audio Tracks section.
  2. Fill in the Language Code, PID, and Label.

  3. Click Add Audio Track

  4. Once all audio tracks have been added, Click Save
  5. You can see both your audio tracks and your audio renditions in the Live Channel Details and the Renditions section, respectively.

Multiple audio tracks using the API

You can create a Brightcove Live Channel that supports multiple audio tracks using the Live API.
To configure multiple audio tracks correctly:

  • Ensure your encoder is configured with the appropriate audio PIDs (Packet Identifiers) for each audio track you intend to stream.

  • The input_selectors defined in your Live API request must reference those same audio PIDs.

  • The output.input_selector_name in your job configuration must match the audio_pids name defined in the input selectors.

API Request

To create the Live Channel, send a POST request to the following endpoint:

        
            https://api.live.brightcove.com/v2/accounts/{your_account_id}/jobs
        
    

Below is an example of a request body for creating a Live Channel with multiple audio tracks:

        
        {
            "name": "Multiple Audio tracks 3",
            "description": "Created via API",
            "type": "event",
            "region": "us-east-1",
            "input": {
                "protocol": "srt",
                "audio_pids": [
                    {
                        "name": "english",
                        "pid": 475
                    },
                    {
                        "name": "french",
                        "pid": 476
                    }
                ],
                "fixed_ingest_ip": false
            },
            "outputs": {
                "video": [
                    {
                        "label": "hls270p",
                        "height": 270,
                        "width": 480,
                        "bitrate": 450000,
                        "codec": "h264",
                        "codec_options": {
                            "level": "3",
                            "profile": "main"
                        },
                        "framerate": "30/1",
                        "num_b_frames": 3,
                        "num_reference_frames": 4,
                        "keyframe_rate": 0.5,
                        "sample_aspect_ratio": "1:1",
                        "decoder_buffer_size": 675000,
                        "max_bitrate": 540000
                    },
                    {
                        "label": "hls360p",
                        "height": 360,
                        "width": 640,
                        "bitrate": 780000,
                        "codec": "h264",
                        "codec_options": {
                            "level": "3",
                            "profile": "main"
                        },
                        "framerate": "30/1",
                        "num_b_frames": 3,
                        "num_reference_frames": 4,
                        "keyframe_rate": 0.5,
                        "sample_aspect_ratio": "1:1",
                        "decoder_buffer_size": 1170000,
                        "max_bitrate": 936000
                    },
                    {
                        "label": "hls540p",
                        "height": 540,
                        "width": 960,
                        "bitrate": 1500000,
                        "codec": "h264",
                        "codec_options": {
                            "level": "3.2",
                            "profile": "main"
                        },
                        "framerate": "30/1",
                        "num_b_frames": 3,
                        "num_reference_frames": 4,
                        "keyframe_rate": 0.5,
                        "sample_aspect_ratio": "1:1",
                        "decoder_buffer_size": 2250000,
                        "max_bitrate": 1800000
                    },
                    {
                        "label": "hls720p",
                        "height": 720,
                        "width": 1280,
                        "bitrate": 2400000,
                        "codec": "h264",
                        "codec_options": {
                            "level": "4",
                            "profile": "high"
                        },
                        "framerate": "30/1",
                        "num_b_frames": 3,
                        "num_reference_frames": 4,
                        "keyframe_rate": 0.5,
                        "sample_aspect_ratio": "1:1",
                        "decoder_buffer_size": 3600000,
                        "max_bitrate": 2880000
                    },
                    {
                        "label": "hls1080p",
                        "height": 1080,
                        "width": 1920,
                        "bitrate": 4500000,
                        "codec": "h264",
                        "codec_options": {
                            "level": "4.2",
                            "profile": "high"
                        },
                        "framerate": "30/1",
                        "num_b_frames": 3,
                        "num_reference_frames": 4,
                        "keyframe_rate": 0.5,
                        "sample_aspect_ratio": "1:1",
                        "decoder_buffer_size": 6750000,
                        "max_bitrate": 5400000
                    }
                ],
                "audio": [
                    {
                        "label": "english",
                        "input_selector_name": "english",
                        "language_code": "eng",
                        "codec": "aac",
                        "bitrate": 128000,
                        "sample_rate": 48000
                    },
                    {
                        "label": "french",
                        "input_selector_name": "french",
                        "language_code": "fra",
                        "codec": "aac",
                        "bitrate": 128000,
                        "sample_rate": 48000
                    }
                ]
            },
            "manifest": {
                "name": "playlist",
                "segment_duration_seconds": 6,
                "playlist_window_seconds": 30,
                "hls": {}
            },
            "maintenance_preferences": {
                "day": "WEDNESDAY",
                "start_time": "02:00"
            },
            "playback_rights_id": "primary"
        }