示例#1
0
def _create_base_hls_manifest(name, manifest_name, output_id, output_path):
    """
    Creates the structure of a basic HLS manifest object
    """
    hls_manifest = HlsManifest(
        manifest_name='{}.m3u8'.format(manifest_name),
        outputs=[
            Utils.build_encoding_output_with_absolute_path(
                output_id=output_id, output_path=output_path)
        ],
        name=name)
    return manifest_api.hls.create(hls_manifest=hls_manifest)
def _create_hls_master_manifest(name, output, output_path):
    # type: (str, Output, str) -> HlsManifest
    """
    Creates the HLS master manifest.

    :param name: The HLS Manifest name
    :param output: The output resource to which the manifest will be written to
    :param output_path: The path where the manifest will be written to
    """
    manifest = HlsManifest(name=name,
                           outputs=[
                               _build_encoding_output(output=output,
                                                      output_path=output_path)
                           ])

    return bitmovin_api.encoding.manifests.hls.create(hls_manifest=manifest)
示例#3
0
def _create_hls_manifest(name, output, output_path):
    # type: (str, Output, str) -> HlsManifest
    """
    Creates a HLS manifest

    <p>API endpoint:
    https://bitmovin.com/docs/encoding/api-reference/sections/manifests#/Encoding/PostEncodingManifestsDash

    :param name: the resource name
    :param output: the output of the manifest
    :param output_path: the output path where the manifest is written to
    :return: the created manifest
    """
    hls_manifest = HlsManifest(name=name,
                               outputs=[
                                   _build_encoding_output(
                                       output=output, output_path=output_path)
                               ])

    return bitmovin_api.encoding.manifests.hls.create(
        hls_manifest=hls_manifest)