def setUp(self):
        super(TransferJobToAzureTestCase, self).setUp()
        self.maxDiff = None

        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0,
                                                bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0,
                                                bitrate=512000,
                                                profile='Main',
                                                preset='premium',
                                                height=480,
                                                width=640)
        encoding_profile = EncodingProfile('API Test Profile',
                                           [video_stream_config],
                                           [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        job = Job(
            input_id=self.input.input_id,
            encoding_profile_id=self.encoding_profile.encoding_profile_id,
            manifest_types=self.manifests)
        self.job = create_job(job)
        output = AzureOutput(
            name='Azure Test Output Python',
            account_name=azure_output_config.get('accountName'),
            account_key=azure_output_config.get('accountKey'),
            container=azure_output_config.get('container'),
            prefix=azure_output_config.get('prefix'))
        self.output = create_output(output)
    def setUp(self):
        super(TransferJobToGCSTestCase, self).setUp()
        self.maxDiff = None

        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0, bitrate=512000,
                                                profile='Main', preset='premium', height=480, width=640)
        encoding_profile = EncodingProfile('API Test Profile', [video_stream_config], [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        job = Job(
            input_id=self.input.input_id,
            encoding_profile_id=self.encoding_profile.encoding_profile_id,
            manifest_types=self.manifests
        )
        self.job = create_job(job)
        output = GCSOutput(
            name='Python Test Output',
            access_key=gcs_output_config.get('accessKey'),
            secret_key=gcs_output_config.get('secretKey'),
            bucket=gcs_output_config.get('bucket'),
            prefix=gcs_output_config.get('prefix'),
            make_public=False
        )
        self.output = create_output(output)
Beispiel #3
0
    def setUp(self):
        super(TransferJobToGCSTestCase, self).setUp()
        self.maxDiff = None

        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0,
                                                bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0,
                                                bitrate=512000,
                                                profile='Main',
                                                preset='premium',
                                                height=480,
                                                width=640)
        encoding_profile = EncodingProfile('API Test Profile',
                                           [video_stream_config],
                                           [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        job = Job(
            input_id=self.input.input_id,
            encoding_profile_id=self.encoding_profile.encoding_profile_id,
            manifest_types=self.manifests)
        self.job = create_job(job)
        output = GCSOutput(name='Python Test Output',
                           access_key=gcs_output_config.get('accessKey'),
                           secret_key=gcs_output_config.get('secretKey'),
                           bucket=gcs_output_config.get('bucket'),
                           prefix=gcs_output_config.get('prefix'),
                           make_public=False)
        self.output = create_output(output)
    def setUp(self):
        super(TransferJobToFTPTestCase, self).setUp()
        self.maxDiff = None

        inputUrl = 'http://eu-storage.bitcodin.com/inputs/Sintel.2010.720p.mkv'
        input = Input(inputUrl)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0, bitrate=512000,
            profile='Main', preset='standard', height=480, width=640)
        encoding_profile = EncodingProfile('API Test Profile', [video_stream_config], [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        job = Job(self.input.input_id, self.encoding_profile.encoding_profile_id, self.manifests)
        self.job = create_job(job)
        self.ftp_configuration = {
            'name': 'Python API Test FTP Output',
            'host': ftp_config.get('host', None),
            'username': ftp_config.get('username', None),
            'password': ftp_config.get('password', None),
            'passive': True
        }
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive')
        )
        self.output = create_output(output)
    def setUp(self):
        super(AutoTransferJobToS3TestCase, self).setUp()
        self.maxDiff = None

        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0, bitrate=512000,
                                                profile='Main', preset='premium', height=480, width=640)
        encoding_profile = EncodingProfile('API Test Profile', [video_stream_config], [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        self.s3_configuration = {
            'name': 'Python API Test Output',
            'host': s3_output_config.get('host', None),
            'access_key': s3_output_config.get('access_key', None),
            'secret_key': s3_output_config.get('secret_key', None),
            'bucket': s3_output_config.get('bucket', None),
            'prefix': s3_output_config.get('prefix', None),
            'region': s3_output_config.get('region', None),
            'make_public': False
        }
        output = S3Output(
            name=self.s3_configuration.get('name'),
            host=self.s3_configuration.get('host'),
            access_key=self.s3_configuration.get('access_key'),
            secret_key=self.s3_configuration.get('secret_key'),
            bucket=self.s3_configuration.get('bucket'),
            prefix=self.s3_configuration.get('prefix'),
            region=self.s3_configuration.get('region'),
            make_public=self.s3_configuration.get('make_public')
        )
        self.output = create_output(output)
    def setUp(self):
        super(TransferJobToAzureTestCase, self).setUp()
        self.maxDiff = None

        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0, bitrate=512000,
                                                profile='Main', preset='premium', height=480, width=640)
        encoding_profile = EncodingProfile('API Test Profile', [video_stream_config], [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        job = Job(
            input_id=self.input.input_id,
            encoding_profile_id=self.encoding_profile.encoding_profile_id,
            manifest_types=self.manifests
        )
        self.job = create_job(job)
        output = AzureOutput(
            name='Azure Test Output Python',
            account_name=azure_output_config.get('accountName'),
            account_key=azure_output_config.get('accountKey'),
            container=azure_output_config.get('container'),
            prefix=azure_output_config.get('prefix')
        )
        self.output = create_output(output)
    def setUp(self):
        super(AutoTransferJobToFTPTestCase, self).setUp()
        self.maxDiff = None

        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0, bitrate=512000,
                                                profile='Main', preset='premium', height=480, width=640)
        encoding_profile = EncodingProfile('API Test Profile', [video_stream_config], [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        self.ftp_configuration = {
            'name': 'Python API Test FTP Output',
            'host': ftp_output_config.get('host', None),
            'username': ftp_output_config.get('username', None),
            'password': ftp_output_config.get('password', None),
            'passive': True
        }
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive')
        )
        self.output = create_output(output)
    def setUp(self):
        super(AutoTransferJobToFTPTestCase, self).setUp()
        self.maxDiff = None

        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0,
                                                bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0,
                                                bitrate=512000,
                                                profile='Main',
                                                preset='premium',
                                                height=480,
                                                width=640)
        encoding_profile = EncodingProfile('API Test Profile',
                                           [video_stream_config],
                                           [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        self.ftp_configuration = {
            'name': 'Python API Test FTP Output',
            'host': ftp_output_config.get('host', None),
            'username': ftp_output_config.get('username', None),
            'password': ftp_output_config.get('password', None),
            'passive': True
        }
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))
        self.output = create_output(output)
Beispiel #9
0
 def setUp(self):
     super(DeleteGCSOutputTestCase, self).setUp()
     output = GCSOutput(name='Python Test Output',
                        access_key=gcs_output_config.get('accessKey'),
                        secret_key=gcs_output_config.get('secretKey'),
                        bucket=gcs_output_config.get('bucket'),
                        prefix=gcs_output_config.get('prefix'),
                        make_public=False)
     self.output = create_output(output)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host='',
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))

        with self.assertRaises(BitcodinBadRequestError):
            result = create_output(output)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host='i.am.a.invalid.host.bitmovin.net/myinvalidfolder',
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))

        with self.assertRaises(BitcodinBadRequestError):
            result = create_output(output)
    def runTest(self):
        output = GCSOutput(name='Python Test Output',
                           access_key=gcs_output_config.get('accessKey'),
                           secret_key=gcs_output_config.get('secretKey'),
                           bucket=gcs_output_config.get('bucket'),
                           prefix=gcs_output_config.get('prefix'),
                           make_public=False)

        self.output = create_output(output)
        self.assertEquals(self.output.name, output.name)
        self.assertEquals(self.output.bucket, output.bucket)
 def setUp(self):
     super(DeleteGCSOutputTestCase, self).setUp()
     output = GCSOutput(
         name='Python Test Output',
         access_key=gcs_output_config.get('accessKey'),
         secret_key=gcs_output_config.get('secretKey'),
         bucket=gcs_output_config.get('bucket'),
         prefix=gcs_output_config.get('prefix'),
         make_public=False
     )
     self.output = create_output(output)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host='i.am.a.invalid.host.bitmovin.net/myinvalidfolder',
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive')
        )

        with self.assertRaises(BitcodinBadRequestError):
            result = create_output(output)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host='',
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive')
        )

        with self.assertRaises(BitcodinBadRequestError):
            result = create_output(output)
Beispiel #16
0
    def runTest(self):
        output = AzureOutput(
            name='Azure Test Output Python',
            account_name=azure_output_config.get('accountName'),
            account_key=azure_output_config.get('accountKey'),
            container=azure_output_config.get('container'),
            prefix=azure_output_config.get('prefix'))

        self.output = create_output(output)
        self.assertEquals(self.output.name, output.name)
        self.assertEquals(self.output.container, output.container)
Beispiel #17
0
    def runTest(self):
        output = S3Output(name=self.s3_configuration.get('name'),
                          host=self.s3_configuration.get('host'),
                          access_key=self.s3_configuration.get('access_key'),
                          secret_key=self.s3_configuration.get('secret_key'),
                          bucket='',
                          prefix=self.s3_configuration.get('prefix'),
                          region=self.s3_configuration.get('region'),
                          make_public=self.s3_configuration.get('make_public'))

        with self.assertRaises(BitcodinBadRequestError):
            result = create_output(output)
    def test_create_ftp_output(self):
        output = bitcodin.FTPOutput(
            "API Test FTP Output",
            settings.ftp_config["host"],
            settings.ftp_config["username"],
            settings.ftp_config["password"],
            True,
        )

        output_result = bitcodin.create_output(output)

        self.assertEqual(output_result.type, "ftp")
    def runTest(self):
        output = AzureOutput(
            name='Azure Test Output Python',
            account_name=azure_output_config.get('accountName'),
            account_key=azure_output_config.get('accountKey'),
            container=azure_output_config.get('container'),
            prefix=azure_output_config.get('prefix')
        )

        self.output = create_output(output)
        self.assertEquals(self.output.name, output.name)
        self.assertEquals(self.output.container, output.container)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))

        self.output = create_output(output)
        self.assertEquals(self.output.name, output.name)
        self.assertEquals(self.output.host, output.host.split('/')[0])
        self.assertEquals(self.output.passive, output.passive)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive')
        )

        self.output = create_output(output)
        self.assertEquals(self.output.name, output.name)
        self.assertEquals(self.output.host, output.host.split('/')[0])
        self.assertEquals(self.output.passive, output.passive)
    def runTest(self):
        output = GCSOutput(
            name='Python Test Output',
            access_key=gcs_output_config.get('accessKey'),
            secret_key=gcs_output_config.get('secretKey'),
            bucket=gcs_output_config.get('bucket'),
            prefix=gcs_output_config.get('prefix'),
            make_public=False
        )

        self.output = create_output(output)
        self.assertEquals(self.output.name, output.name)
        self.assertEquals(self.output.bucket, output.bucket)
Beispiel #23
0
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive'))
        self.output = create_output(output)
        self.assertIsNotNone(self.output.output_id)

        delete_output(self.output.output_id)
        with self.assertRaises(BitcodinNotFoundError):
            get_output(self.output.output_id)
    def runTest(self):
        output = S3Output(
            name=self.s3_configuration.get('name'),
            host=self.s3_configuration.get('host'),
            access_key=self.s3_configuration.get('access_key'),
            secret_key=self.s3_configuration.get('secret_key'),
            bucket='',
            prefix=self.s3_configuration.get('prefix'),
            region=self.s3_configuration.get('region'),
            make_public=self.s3_configuration.get('make_public')
        )

        with self.assertRaises(BitcodinBadRequestError):
            result = create_output(output)
    def runTest(self):
        output = FTPOutput(
            name=self.ftp_configuration.get('name'),
            host=self.ftp_configuration.get('host'),
            basic_auth_user=self.ftp_configuration.get('username'),
            basic_auth_password=self.ftp_configuration.get('password'),
            passive=self.ftp_configuration.get('passive')
        )
        self.output = create_output(output)
        self.assertIsNotNone(self.output.output_id)

        delete_output(self.output.output_id)
        with self.assertRaises(BitcodinNotFoundError):
            get_output(self.output.output_id)
Beispiel #26
0
 def setUp(self):
     super(GetFTPOutputTestCase, self).setUp()
     self.ftp_configuration = {
         'name': 'Python API Test FTP Output',
         'host': ftp_output_config.get('host', None),
         'username': ftp_output_config.get('username', None),
         'password': ftp_output_config.get('password', None),
         'passive': True
     }
     output = FTPOutput(
         name=self.ftp_configuration.get('name'),
         host=self.ftp_configuration.get('host'),
         basic_auth_user=self.ftp_configuration.get('username'),
         basic_auth_password=self.ftp_configuration.get('password'),
         passive=self.ftp_configuration.get('passive'))
     self.output = create_output(output)
    def test_create_s3_output(self):
        output = bitcodin.S3Output(
            "Api Test S3 Output",
            settings.aws_config["host"],
            settings.aws_config["access_key"],
            settings.aws_config["secret_key"],
            settings.aws_config["bucket"],
            settings.aws_config["prefix"],
            settings.aws_config["region"],
            True,
        )

        output_result = bitcodin.create_output(output)

        self.assertEqual(output_result.type, "s3")
        self.assertTrue(output_result.make_public)
 def runTest(self):
     output = S3Output(
         name=self.s3_configuration.get("name"),
         host=self.s3_configuration.get("host"),
         access_key=self.s3_configuration.get("access_key"),
         secret_key=self.s3_configuration.get("secret_key"),
         bucket=self.s3_configuration.get("bucket"),
         prefix=self.s3_configuration.get("prefix"),
         region=self.s3_configuration.get("region"),
         make_public=self.s3_configuration.get("make_public"),
     )
     self.output = create_output(output)
     self.assertEquals(self.output.name, self.s3_configuration["name"])
     self.assertEquals(self.output.bucket, self.s3_configuration.get("bucket"))
     self.assertEquals(self.output.prefix, self.s3_configuration.get("prefix"))
     self.assertEquals(self.output.region, self.s3_configuration.get("region"))
     self.assertEquals(self.output.make_public, self.s3_configuration.get("make_public"))
 def runTest(self):
     output = S3Output(
         name=self.s3_configuration.get('name'),
         host=self.s3_configuration.get('host'),
         access_key=self.s3_configuration.get('access_key'),
         secret_key=self.s3_configuration.get('secret_key'),
         bucket=self.s3_configuration.get('bucket'),
         prefix=self.s3_configuration.get('prefix'),
         region=self.s3_configuration.get('region'),
         make_public=self.s3_configuration.get('make_public')
     )
     self.output = create_output(output)
     self.assertEquals(self.output.name, self.s3_configuration['name'])
     self.assertEquals(self.output.bucket, self.s3_configuration.get('bucket'))
     self.assertEquals(self.output.prefix, self.s3_configuration.get('prefix'))
     self.assertEquals(self.output.region, self.s3_configuration.get('region'))
     self.assertEquals(self.output.make_public, self.s3_configuration.get('make_public'))
    def setUp(self):
        output = GCSOutput(
            name='Python Live GCS Output',
            access_key=gcs_output_config.get('accessKey'),
            secret_key=gcs_output_config.get('secretKey'),
            bucket=gcs_output_config.get('bucket'),
            prefix=gcs_output_config.get('prefix'),
            make_public=False
        )
        self.output = bitcodin.create_output(output)

        audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=1, bitrate=512000,
                                                profile='Main', preset='premium', height=480, width=640)
        encoding_profile = EncodingProfile('API Live Test Profile', [video_stream_config], [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        super(CreateLiveStreamTestCase, self).setUp()
 def setUp(self):
     super(GetFTPOutputTestCase, self).setUp()
     self.ftp_configuration = {
         'name': 'Python API Test FTP Output',
         'host': ftp_config.get('host', None),
         'username': ftp_config.get('username', None),
         'password': ftp_config.get('password', None),
         'passive': True
     }
     output = FTPOutput(
         name=self.ftp_configuration.get('name'),
         host=self.ftp_configuration.get('host'),
         basic_auth_user=self.ftp_configuration.get('username'),
         basic_auth_password=self.ftp_configuration.get('password'),
         passive=self.ftp_configuration.get('passive')
     )
     self.output = create_output(output)
    def setUp(self):
        super(TransferJobToS3TestCase, self).setUp()
        self.maxDiff = None

        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0, bitrate=512000,
                                                profile='Main', preset='premium', height=480, width=640)
        encoding_profile = EncodingProfile('API Test Profile', [video_stream_config], [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        job = Job(
            input_id=self.input.input_id,
            encoding_profile_id=self.encoding_profile.encoding_profile_id,
            manifest_types=self.manifests,
            speed='standard'
        )
        self.job = create_job(job)
        self.s3_configuration = {
            'name': 'Python API Test Output',
            'host': s3_output_config.get('host', None),
            'access_key': s3_output_config.get('access_key', None),
            'secret_key': s3_output_config.get('secret_key', None),
            'bucket': s3_output_config.get('bucket', None),
            'prefix': s3_output_config.get('prefix', None),
            'region': s3_output_config.get('region', None),
            'make_public': False
        }
        output = S3Output(
            name=self.s3_configuration.get('name'),
            host=self.s3_configuration.get('host'),
            access_key=self.s3_configuration.get('access_key'),
            secret_key=self.s3_configuration.get('secret_key'),
            bucket=self.s3_configuration.get('bucket'),
            prefix=self.s3_configuration.get('prefix'),
            region=self.s3_configuration.get('region'),
            make_public=self.s3_configuration.get('make_public')
        )
        self.output = create_output(output)
 def setUp(self):
     super(DeleteS3OutputTestCase, self).setUp()
     self.s3_configuration = {
         'name': 'Python API Test Output',
         'host': s3_output_config.get('host', None),
         'access_key': s3_output_config.get('access_key', None),
         'secret_key': s3_output_config.get('secret_key', None),
         'bucket': s3_output_config.get('bucket', None),
         'prefix': s3_output_config.get('prefix', None),
         'region': s3_output_config.get('region', None),
         'make_public': False
     }
     output = S3Output(name=self.s3_configuration.get('name'),
                       host=self.s3_configuration.get('host'),
                       access_key=self.s3_configuration.get('access_key'),
                       secret_key=self.s3_configuration.get('secret_key'),
                       bucket=self.s3_configuration.get('bucket'),
                       prefix=self.s3_configuration.get('prefix'),
                       region=self.s3_configuration.get('region'),
                       make_public=self.s3_configuration.get('make_public'))
     self.output = create_output(output)
    def setUp(self):
        output = GCSOutput(name='Python Live GCS Output',
                           access_key=gcs_output_config.get('accessKey'),
                           secret_key=gcs_output_config.get('secretKey'),
                           bucket=gcs_output_config.get('bucket'),
                           prefix=gcs_output_config.get('prefix'),
                           make_public=False)
        self.output = bitcodin.create_output(output)

        audio_stream_config = AudioStreamConfig(default_stream_id=0,
                                                bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=1,
                                                bitrate=512000,
                                                profile='Main',
                                                preset='premium',
                                                height=480,
                                                width=640)
        encoding_profile = EncodingProfile('API Live Test Profile',
                                           [video_stream_config],
                                           [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        super(CreateLiveStreamTestCase, self).setUp()
 def setUp(self):
     super(DeleteS3OutputTestCase, self).setUp()
     self.s3_configuration = {
         'name': 'Python API Test Output',
         'host': s3_output_config.get('host', None),
         'access_key': s3_output_config.get('access_key', None),
         'secret_key': s3_output_config.get('secret_key', None),
         'bucket': s3_output_config.get('bucket', None),
         'prefix': s3_output_config.get('prefix', None),
         'region': s3_output_config.get('region', None),
         'make_public': False
     }
     output = S3Output(
         name=self.s3_configuration.get('name'),
         host=self.s3_configuration.get('host'),
         access_key=self.s3_configuration.get('access_key'),
         secret_key=self.s3_configuration.get('secret_key'),
         bucket=self.s3_configuration.get('bucket'),
         prefix=self.s3_configuration.get('prefix'),
         region=self.s3_configuration.get('region'),
         make_public=self.s3_configuration.get('make_public')
     )
     self.output = create_output(output)
    def setUp(self):
        super(TransferJobToS3TestCase, self).setUp()
        self.maxDiff = None

        inputUrl = 'http://eu-storage.bitcodin.com/inputs/Sintel.2010.720p.mkv'
        input = Input(inputUrl)
        self.input = create_input(input)
        audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)
        video_stream_config = VideoStreamConfig(default_stream_id=0, bitrate=512000,
            profile='Main', preset='standard', height=480, width=640)
        encoding_profile = EncodingProfile('API Test Profile', [video_stream_config], [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        job = Job(self.input.input_id, self.encoding_profile.encoding_profile_id, self.manifests)
        self.job = create_job(job)
        self.s3_configuration = {
            'name': 'Python API Test Output',
            'host': aws_config.get('host', None),
            'access_key': aws_config.get('access_key', None),
            'secret_key': aws_config.get('secret_key', None),
            'bucket': aws_config.get('bucket', None),
            'prefix': aws_config.get('prefix', None),
            'region': aws_config.get('region', None),
            'make_public': False
        }
        output = S3Output(
            name=self.s3_configuration.get('name'),
            host=self.s3_configuration.get('host'),
            access_key=self.s3_configuration.get('access_key'),
            secret_key=self.s3_configuration.get('secret_key'),
            bucket=self.s3_configuration.get('bucket'),
            prefix=self.s3_configuration.get('prefix'),
            region=self.s3_configuration.get('region'),
            make_public=self.s3_configuration.get('make_public')
        )
        self.output = create_output(output)
bitcodin.api_key = 'YOU API KEY'

# Create an output for your live stream data
date = datetime.datetime.today()
prefix = "%s%d%d%d%d%d%d" % ('livestream', date.year, date.month, date.day, date.hour, date.minute, date.second)

output = bitcodin.GCSOutput(
    name='Livesteam Output',
    access_key='Your GCS access key',
    secret_key='Your GCS secret key',
    bucket='Your bucket name',
    prefix=prefix,
    make_public=True
    )

output = bitcodin.create_output(output)

# Configure your live stream encoding profile

# Configure video representations
video_configs = list()

# 3 Mbit, 1920x1080, Full HD
video_configs.append(bitcodin.VideoStreamConfig(
    default_stream_id=0,
    bitrate=3000000,
    profile='Main',
    preset='premium',
    height=1080,
    width=1920
))
encoding_profile_obj = bitcodin.EncodingProfile('API Test Profile', video_configs, audio_configs)
encoding_profile_result = bitcodin.create_encoding_profile(encoding_profile_obj)

manifests = ['mpd', 'm3u8']

output_obj = bitcodin.S3Output(
    name='MY S3 Output Profile',
    host='YOUR AWS HOST',
    access_key='YOUR AWS ACCESS KEY',
    secret_key='YOUR AWS SECRET KEY',
    bucket='YOUR AWS BUCKET NAME',
    prefix='PATH/TO/MY/DESIRED/OUTPUT/DESTINATION/',
    region='YOUR AWS REGION',
    make_public=False
)
output_result = bitcodin.create_output(output_obj)


# Simply give a output_id to the job configuration to which the results should be copied when the job is finished.
job = bitcodin.Job(
    input_id=input_result.input_id,
    encoding_profile_id=encoding_profile_result.encoding_profile_id,
    manifest_types=manifests,
    output_id=output_result.output_id
)
job_result = bitcodin.create_job(job)

while job_result.status != 'Finished' and job_result.status != 'Error':
    job_result = bitcodin.get_job(job_result.job_id)
    print(job_result.to_json())
    sleep(5)
# Set your API key
bitcodin.api_key = 'YOU API KEY'

# Create an output for your live stream data
date = datetime.datetime.today()
prefix = "%s%d%d%d%d%d%d" % ('livestream', date.year, date.month, date.day,
                             date.hour, date.minute, date.second)

output = bitcodin.GCSOutput(name='Livesteam Output',
                            access_key='Your GCS access key',
                            secret_key='Your GCS secret key',
                            bucket='Your bucket name',
                            prefix=prefix,
                            make_public=True)

output = bitcodin.create_output(output)

# Configure your live stream encoding profile

# Configure video representations
video_configs = list()

# 3 Mbit, 1920x1080, Full HD
video_configs.append(
    bitcodin.VideoStreamConfig(default_stream_id=0,
                               bitrate=3000000,
                               profile='Main',
                               preset='premium',
                               height=1080,
                               width=1920))
# 1,5 Mbit, 1280x720, 720p
Beispiel #40
0
]

encoding_profile_obj = bitcodin.EncodingProfile('API Test Profile',
                                                video_configs, audio_configs)
encoding_profile_result = bitcodin.create_encoding_profile(
    encoding_profile_obj)

manifests = ['mpd', 'm3u8']

output_obj = bitcodin.AzureOutput(name='Azure Test Output Python',
                                  account_name='yourAzureAccountName',
                                  account_key='yourAzureAccountKey',
                                  container='yourAzureContainer',
                                  prefix='yourDesiredPrefixInsideTheContainer')

output_result = bitcodin.create_output(output_obj)

# Simply give a output_id to the job configuration to which the results should be copied when the job is finished.
job = bitcodin.Job(
    input_id=input_result.input_id,
    encoding_profile_id=encoding_profile_result.encoding_profile_id,
    manifest_types=manifests,
    output_id=output_result.output_id)
job_result = bitcodin.create_job(job)

while job_result.status != 'Finished' and job_result.status != 'Error':
    job_result = bitcodin.get_job(job_result.job_id)
    print(job_result.to_json())
    sleep(5)

print(job_result.to_json())