17 March 2022

AC3 and EAC3 audio descriptors for MPEG-TS container

Added ability to set AC3 or EAC3 audio descriptors for MPEG-TS container. Added ability to set audio track disposition.

<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format> <!-- required -->
        <output>mpegts</output> <!-- required -->
        <atsc_ac3_descriptor>
            <full_svc>[0|1]</full_svc>
            <priority>[1|2|3]</priority>
            <mainid>[ServiceID]</mainid>
            <asvcflags>[BitFlag]</asvcflags>
            <language_code>[LanguageCode]</language_code>
        </atsc_ac3_descriptor>
        <atsc_eac3_descriptor>
            <audio_service_type>[ServiceType]</audio_service_type>
            <mainid>[ServiceID]</mainid>
            <language_code>[LanguageCode]</language_code>
        </atsc_eac3_descriptor>
        <audio_stream>
            <disposition>[visual_impaired|hearing_impaired]</disposition>
            <atsc_ac3_descriptor>
                <full_svc>[0|1]</full_svc>
                <priority>[1|2|3]</priority>
                <mainid>[ServiceID]</mainid>
                <asvcflags>[BitFlag]</asvcflags>
                <language_code>[LanguageCode]</language_code>
            </atsc_ac3_descriptor>
            <atsc_eac3_descriptor>
                <audio_service_type>[ServiceType]</audio_service_type>
                <mainid>[ServiceID]</mainid>
                <language_code>[LanguageCode]</language_code>
            </atsc_eac3_descriptor>
            <!-- audio_stream params -->
        </audio_stream>
        <audio_stream>
            <!-- audio_stream params -->
        </audio_stream>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "mpegts", // required
            "atsc_ac3_descriptor": {
                "full_svc": "[0|1]",
                "priority": "[1|2|3]",
                "mainid": "[ServiceID]",
                "asvcflags": "[BitFlag]",
                "language_code": "[LanguageCode]"
            },
            "atsc_eac3_descriptor": {
                "audio_service_type": "[ServiceType]",
                "mainid": "[ServiceID]",
                "language_code": "[LanguageCode]"
            },
            "audio_stream": [
                {
                    "disposition": "[visual_impaired|hearing_impaired]",
                    "atsc_ac3_descriptor": {
                        "full_svc": "[0|1]",
                        "priority": "[1|2|3]",
                        "mainid": "[ServiceID]",
                        "asvcflags": "[BitFlag]",
                        "language_code": "[LanguageCode]"
                    },
                    "atsc_eac3_descriptor": {
                        "audio_service_type": "[ServiceType]",
                        "mainid": "[ServiceID]",
                        "language_code": "[LanguageCode]"
                    }
                    // audio_stream params
                },
                {
                    // audio_stream params
                }
            ]
        }
    }
}
<?xml version="1.0"?>
<query>
    <userid><<id>></userid> <!-- required-->
    <userkey><<key>></userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <source>[SourceFile]</source> <!-- required-->
    <format> <!-- required -->
        <output>advanced_hls</output> <!-- required -->
        <destination>[DestFile]</destination> <!-- required -->
        <stream>
            <atsc_ac3_descriptor>
                <full_svc>[0|1]</full_svc>
                <priority>[1|2|3]</priority>
                <mainid>[ServiceID]</mainid>
                <asvcflags>[BitFlag]</asvcflags>
                <language_code>[LanguageCode]</language_code>
            </atsc_ac3_descriptor>
            <atsc_eac3_descriptor>
                <audio_service_type>[ServiceType]</audio_service_type>
                <mainid>[ServiceID]</mainid>
                <language_code>[LanguageCode]</language_code>
            </atsc_eac3_descriptor>
            <audio_stream>
                <disposition>[visual_impaired|hearing_impaired]</disposition>
                <atsc_ac3_descriptor>
                    <full_svc>[0|1]</full_svc>
                    <priority>[1|2|3]</priority>
                    <mainid>[ServiceID]</mainid>
                    <asvcflags>[BitFlag]</asvcflags>
                    <language_code>[LanguageCode]</language_code>
                </atsc_ac3_descriptor>
                <atsc_eac3_descriptor>
                    <audio_service_type>[ServiceType]</audio_service_type>
                    <mainid>[ServiceID]</mainid>
                    <language_code>[LanguageCode]</language_code>
                </atsc_eac3_descriptor>
                <!-- audio_stream params -->
            <audio_stream>
            <!-- stream params -->
        </stream>
        <stream>
            <!-- stream params -->
        </stream>
    </format>
</query>
{
    "query": {
        "userid": "<<id>>", // required
        "userkey": "<<key>>", // required
        "action": "[Action]", // required
        "source": "[SourceFile]", // required
        "format": {
            "output": "advanced_hls", // required
            "stream": [
                {
                    "atsc_ac3_descriptor": {
                        "full_svc": "[0|1]",
                        "priority": "[1|2|3]",
                        "mainid": "[ServiceID]",
                        "asvcflags": "[BitFlag]",
                        "language_code": "[LanguageCode]"
                    },
                    "atsc_eac3_descriptor": {
                        "audio_service_type": "[ServiceType]",
                        "mainid": "[ServiceID]",
                        "language_code": "[LanguageCode]"
                    },
                    "audio_stream": {
                        "disposition": "[visual_impaired|hearing_impaired]",
                        "atsc_ac3_descriptor": {
                            "full_svc": "[0|1]",
                            "priority": "[1|2|3]",
                            "mainid": "[ServiceID]",
                            "asvcflags": "[BitFlag]",
                            "language_code": "[LanguageCode]"
                        },
                        "atsc_eac3_descriptor": {
                            "audio_service_type": "[ServiceType]",
                            "mainid": "[ServiceID]",
                            "language_code": "[LanguageCode]"
                        }
                        // audio_stream params
                    }
                    // stream params
                },
                {
                    // stream params
                }
            ]
        }
    }
}
ParameterDescriptionAllowed ValuesDefault Value
dispositionAudio stream disposition typevisual_impaired, hearing_impairednone
atsc_ac3_descriptorAdd ATSC A/52 AC3 audio elementary stream descriptor in MPEG-TS container
full_svcIndicates whether or not this audio service is a full service suitable for presentation, or whether this audio service is only a partial service which should be combined with another audio service before presentation0 – partial service
1 – full service
1
priorityAudio service priority1 – Primary audio
2 – Other audio
3 – Not specified
1
mainidMain audio service identifierInteger number between 0 and 7 inclusive0
asvcflags8-bit field. Each bit (0–7) indicates with which main service(s) this service is associatedInteger number between 0 and 255 inclusive0
language_codeAudio stream languageValid ISO 639-2 language codenone
Value of <language /> parameter will be used if specified.
atsc_eac3_descriptorAdd ATSC A/52 E-AC3 audio elementary stream descriptor in MPEG-TS container
audio_service_typeAudio service type0 – Complete main
2 – Visually impaired
3 – Hearing impaired
5 – Commentary
6 – Emergency
7 – Karaoke
none
Value of <disposition /> parameter will be used if specified or disposition descriptor from source file.
asvcflags8-bit field. Each bit (0–7) indicates with which main service(s) this service is associatedInteger number between 0 and 255 inclusive0
language_codeAudio stream languageValid ISO 639-2 language codenone
Value of <language /> parameter will be used if specified.