Ejemplo n.º 1
0
def init_bitmovin_api():
    global bitmovin_api
    if bitmovin_api is None:
        bitmovin_api = BitmovinApi(api_key=Config.BITMOVIN_API_KEY,
                                   tenant_org_id=Config.BITMOVIN_TENANT_ORG_ID,
                                   logger=BitmovinApiLogger())

    return bitmovin_api
  <li>command line arguments (eg BITMOVIN_API_KEY=xyz)
  <li>properties file located in the root folder of the JAVA examples at ./examples.properties
      (see examples.properties.template as reference)
  <li>environment variables
  <li>properties file located in the home folder at ~/.bitmovin/examples.properties (see
      examples.properties.template as reference)
</ol>
"""

EXAMPLE_NAME = "FixedBitrateLadder"
config_provider = ConfigProvider()
bitmovin_api = BitmovinApi(
    api_key=config_provider.get_bitmovin_api_key(),
    # uncomment the following line if you are working with a multi-tenant account
    # tenant_org_id=config_provider.get_bitmovin_tenant_org_id(),
    logger=BitmovinApiLogger())


def main():
    encoding = _create_encoding(
        name=EXAMPLE_NAME, description="Encoding with multiple MP4 muxings")

    http_input = _create_http_input(host=config_provider.get_http_input_host())
    input_file_path = config_provider.get_http_input_file_path()

    output = _create_s3_output(
        bucket_name=config_provider.get_s3_output_bucket_name(),
        access_key=config_provider.get_s3_output_access_key(),
        secret_key=config_provider.get_s3_output_secret_key())

    aac_audio_configuration = _create_aac_audio_configuration()
Ejemplo n.º 3
0
 *
 * <p>Configuration parameters will be retrieved from these sources in the listed order:
 *
 * <ol>
 *   <li>command line arguments (eg BITMOVIN_API_KEY=xyz)
 *   <li>properties file located in the root folder of the JavaScript examples at ./examples.properties
 *       (see examples.properties.template as reference)
 *   <li>environment variables
 *   <li>properties file located in the home folder at ~/.bitmovin/examples.properties (see
 *       examples.properties.template as reference)
 * </ol>
"""

EXAMPLE_NAME = "CencDrmContentProtection"
config_provider = ConfigProvider()
bitmovin_api = BitmovinApi(api_key=config_provider.get_bitmovin_api_key(), logger=BitmovinApiLogger())


def main():
    encoding = _create_encoding(name=EXAMPLE_NAME, description="Example with CENC DRM content protection")

    http_input = _create_http_input(host=config_provider.get_http_input_host())
    input_file_path = config_provider.get_http_input_file_path()

    output = _create_s3_output(
        bucket_name=config_provider.get_s3_output_bucket_name(),
        access_key=config_provider.get_s3_output_access_key(),
        secret_key=config_provider.get_s3_output_secret_key()
    )

    # Add an H.264 video stream to the encoding