def setUp(self):
        super(CreateJobWithVideoCroppingTestCase, self).setUp()
        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
        )
        cropping_config = CroppingConfig(
            top=100,
            bottom=100,
            left=5,
            right=50
        )

        encoding_profile = EncodingProfile(
            name='API Test Profile',
            video_stream_configs=[video_stream_config],
            audio_stream_configs=[audio_stream_config],
            cropping_config=cropping_config
        )
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
    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(CreateJobKeepAspectRatioTestCase, self).setUp()
        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        video_configs = list()

        video_configs.append(VideoStreamConfig(
            default_stream_id=0,
            bitrate=4800000,
            profile='Main',
            preset='premium',
            height=600,
            width=1920
        ))
        video_configs.append(VideoStreamConfig(
            default_stream_id=0,
            bitrate=2400000,
            profile='Main',
            preset='premium',
            width=1024
        ))
        video_configs.append(VideoStreamConfig(
            default_stream_id=0,
            bitrate=1200000,
            profile='Main',
            preset='premium',
            height=720
        ))

        audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)

        encoding_profile = EncodingProfile('API Test Profile', video_configs, [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
    def setUp(self):
        super(CreateJobWithWatermarkTestCase, self).setUp()
        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
        )
        watermark_config = WatermarkConfig(
            image_url='http://bitdash-a.akamaihd.net/webpages/bitcodin/images/bitcodin-bitmovin-logo-small.png',
            bottom=200,
            right=100
        )

        encoding_profile = EncodingProfile(
            name='API Test Profile',
            video_stream_configs=[video_stream_config],
            audio_stream_configs=[audio_stream_config],
            watermark_config=watermark_config
        )
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
    def setUp(self):
        super(CreateJobWithDeinterlacing, self).setUp()
        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(
            name='API Test Profile',
            video_stream_configs=[video_stream_config],
            audio_stream_configs=[audio_stream_config]
        )
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
 def setUp(self):
     super(CreateJobPlayreadyWidevineDrmTestCase, self).setUp()
     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.drm_config = PlayreadyWidevineCombinedDrmConfig(
         key='100b6c20940f779a4589152b57d2dacb',
         pssh=
         'CAESEOtnarvLNF6Wu89hZjDxo9oaDXdpZGV2aW5lX3Rlc3QiEGZrajNsamFTZGZhbGtyM2oqAkhEMgA=',
         kid='eb676abbcb345e96bbcf616630f1a3da',
         la_url=
         'http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&ContentKey=EAtsIJQPd5pFiRUrV9Layw==',
         lui_url=None,
         ds_id=None,
         custom_attributes=None,
         method='mpeg_cenc')
    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(CreateJobWidevineDrmTestCase, self).setUp()
     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.drm_config = WidevineDrmConfig(
         provider='widevine_test',
         signing_key=
         '1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9',
         signing_iv='d58ce954203b7c9a9a9d467f59839249',
         request_url='http://license.uat.widevine.com/cenc/getcontentkey',
         content_id='746573745f69645f4639465043304e4f',
         method='mpeg_cenc')
    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)
Exemple #10
0
    def setUp(self):
        super(CreateJobWithWatermarkTestCase, self).setUp()
        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)
        watermark_config = WatermarkConfig(
            image_url=
            'http://bitdash-a.akamaihd.net/webpages/bitcodin/images/bitcodin-bitmovin-logo-small.png',
            bottom=200,
            right=100)

        encoding_profile = EncodingProfile(
            name='API Test Profile',
            video_stream_configs=[video_stream_config],
            audio_stream_configs=[audio_stream_config],
            watermark_config=watermark_config)
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
    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(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)
Exemple #13
0
    def setUp(self):
        super(CreateJobKeepAspectRatioTestCase, self).setUp()
        input_url = test_video_url
        input = Input(input_url)
        self.input = create_input(input)
        video_configs = list()

        video_configs.append(
            VideoStreamConfig(default_stream_id=0,
                              bitrate=4800000,
                              profile='Main',
                              preset='premium',
                              height=600,
                              width=1920))
        video_configs.append(
            VideoStreamConfig(default_stream_id=0,
                              bitrate=2400000,
                              profile='Main',
                              preset='premium',
                              width=1024))
        video_configs.append(
            VideoStreamConfig(default_stream_id=0,
                              bitrate=1200000,
                              profile='Main',
                              preset='premium',
                              height=720))

        audio_stream_config = AudioStreamConfig(default_stream_id=0,
                                                bitrate=192000)

        encoding_profile = EncodingProfile('API Test Profile', video_configs,
                                           [audio_stream_config])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
    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 test_create_job(self):
        input_obj = bitcodin.Input(url='http://users.skynet.be/fa046054/home/P22/track12.mp3')
        input_result = bitcodin.create_input(input_obj)

        video_configs = list()
        video_config1 = bitcodin.VideoStreamConfig(default_stream_id=0, bitrate=1024000, profile='Main',
                                                   preset='standard', height=768, width=1024)
        video_config2 = bitcodin.VideoStreamConfig(default_stream_id=1, bitrate=512000, profile='Main',
                                                   preset='standard', height=480, width=640)
        video_configs.append(video_config1)
        video_configs.append(video_config2)

        audio_configs = list()
        audio_config = bitcodin.AudioStreamConfig(default_stream_id=0, bitrate=192000)
        audio_configs.append(audio_config)

        encoding_profile = bitcodin.EncodingProfile('API Test Profile', [], audio_configs)
        encoding_profile_result = bitcodin.create_encoding_profile(encoding_profile)

        manifests = ['mpd', 'm3u8']

        job = bitcodin.Job(input_result.input_id, encoding_profile_result.encoding_profile_id, manifests, 'standard')

        job_result = bitcodin.create_job(job)
        self.assertEqual(job_result.status, 'Enqueued')
Exemple #16
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)
Exemple #17
0
 def setUp(self):
     super(CreateJobPlayreadyDrmInvalidConfigTestCase, self).setUp()
     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.drm_config = PlayreadyDrmConfig(k_id=None,
                                          key=None,
                                          key_seed=None,
                                          la_url=None,
                                          lui_url=None,
                                          ds_id=None,
                                          custom_attributes=None,
                                          method='mpeg_cenc')
    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)
Exemple #19
0
    def setUp(self):
        super(CreateJobWithMultipleAudioStreamsTestCase, self).setUp()
        input_url = test_video_url_multiple_audio_streams
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config_0 = AudioStreamConfig(default_stream_id=0,
                                                  bitrate=192000)
        audio_stream_config_1 = AudioStreamConfig(default_stream_id=1,
                                                  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_0, audio_stream_config_1])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        self.audio_meta_data = {}

        audio_stream_config_0_meta_data = AudioMetaData(0, 'de', 'Just Sound')
        audio_stream_config_1_meta_data = AudioMetaData(
            1, 'en', 'Sound and Voice')

        self.audio_meta_data = [
            audio_stream_config_0_meta_data, audio_stream_config_1_meta_data
        ]
Exemple #20
0
    def setUp(self):
        super(GetJobTestCase, 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)
 def setUp(self):
     super(CreateJobPlayreadyDrmTestCase, self).setUp()
     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.drm_config = PlayreadyDrmConfig(
         k_id='746573745f69645f4639465043304e4f',
         key=None,
         key_seed='XVBovsmzhP9gRIZxWfFta3VVRPzVEWmJsazEJ46I',
         la_url='http://playready.directtaps.net/pr/svc/rightsmanager.asmx',
         lui_url=None,
         ds_id=None,
         custom_attributes=None,
         method='mpeg_cenc')
    def test_create_job(self):
        input_obj = bitcodin.Input(url="http://eu-storage.bitcodin.com/inputs/Sintel.2010.720p.mkv")
        input_result = bitcodin.create_input(input_obj)

        video_configs = list()
        video_config1 = bitcodin.VideoStreamConfig(
            default_stream_id=0, bitrate=1024000, profile="Main", preset="standard", height=768, width=1024
        )
        video_config2 = bitcodin.VideoStreamConfig(
            default_stream_id=1, bitrate=512000, profile="Main", preset="standard", height=480, width=640
        )
        video_configs.append(video_config1)
        video_configs.append(video_config2)

        audio_configs = list()
        audio_config = bitcodin.AudioStreamConfig(default_stream_id=0, bitrate=192000)
        audio_configs.append(audio_config)

        encoding_profile = bitcodin.EncodingProfile("API Test Profile", video_configs, audio_configs)
        encoding_profile_result = bitcodin.create_encoding_profile(encoding_profile)

        manifests = ["mpd", "m3u8"]

        job = bitcodin.Job(input_result.input_id, encoding_profile_result.encoding_profile_id, manifests)

        job_result = bitcodin.create_job(job)
        self.assertEqual(job_result.status, "Enqueued")
 def setUp(self):
     super(CreateJobDrmTestCase, self).setUp()
     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']
     self.drm_config = DrmConfig(
         system='widevine',
         provider='widevine_test',
         signing_key=
         '1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9',
         signing_iv='d58ce954203b7c9a9a9d467f59839249',
         request_url='http://license.uat.widevine.com/cenc/getcontentkey',
         content_id='746573745f69645f4639465043304e4f',
         method='mpeg_cenc')
    def test_create_input(self):

        input_obj = bitcodin.Input(url="http://eu-storage.bitcodin.com/inputs/Sintel.2010.720p.mkv")
        input_response = bitcodin.create_input(input_obj)

        self.assertEqual(input_response.url, "http://eu-storage.bitcodin.com/inputs/Sintel.2010.720p.mkv")
        self.assertEqual(input_response.filename, "Sintel.2010.720p.mkv")
        self.assertEqual(input_response.input_type, "url")
 def setUp(self):
     super(CreateJobAudioOnlyTestCase, self).setUp()
     input_url = "http://bitbucketireland.s3.amazonaws.com/audiosample.mp3"
     input = Input(input_url)
     self.input = create_input(input)
     audio_stream_config = AudioStreamConfig(default_stream_id=0, bitrate=192000)
     encoding_profile = EncodingProfile('Audio Only Test Profile', [], [audio_stream_config])
     self.encoding_profile = create_encoding_profile(encoding_profile)
     self.manifests = ['m3u8', 'mpd']
 def setUp(self):
     super(CreateJobInvalidDataTestCase, self).setUp()
     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)
Exemple #27
0
    def runTest(self):
        input = AzureInput(account_name=azure_input_config.get('accountName'),
                           account_key=azure_input_config.get('accountKey'),
                           container=azure_input_config.get('container'),
                           url=azure_input_config.get('url'))

        self.input = create_input(input)

        self.assertEquals(self.input.filename, input.url)
        self.assertEquals(self.input.status, 'CREATED')
 def setUp(self):
     super(CreateJobIncompleteDataTestCase, self).setUp()
     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)
Exemple #29
0
    def setUp(self):
        super(CreateJobTestCase, self).setUp()

        input_url = test_video_url
        input = Input(url=input_url, skip_analysis=True)

        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']
    def runTest(self):
        input = S3Input(access_key=s3_input_config.get('access_key'),
                        secret_key=s3_input_config.get('secret_key'),
                        host=s3_input_config.get('host'),
                        bucket=s3_input_config.get('bucket'),
                        region=s3_input_config.get('region'),
                        object_key=s3_input_config.get('object_key'))

        self.input = create_input(input)

        self.assertEquals(self.input.host, input.host)
        self.assertEquals(self.input.bucket, input.bucket)
        self.assertEquals(self.input.region, input.region)
        self.assertEquals(self.input.status, 'CREATED')
 def setUp(self):
     super(GetJobListTestCase, self).setUp()
     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)
    def setUp(self):
        super(TransferJobToNonExistentOutputTestCase, 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)
 def setUp(self):
     super(CreateJobHLSEncryptionTestCase, self).setUp()
     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.hls_encryption_config = HLSEncryptionConfig(
         key='cab5b529ae28d5cc5e3e7bc3fd4a544d',
         method='SAMPLE-AES',
         iv='08eecef4b026deec395234d94218273d'
     )
    def runTest(self):
        input = S3Input(
            access_key=s3_input_config.get('access_key'),
            secret_key=s3_input_config.get('secret_key'),
            host=s3_input_config.get('host'),
            bucket=s3_input_config.get('bucket'),
            region=s3_input_config.get('region'),
            object_key=s3_input_config.get('object_key')
        )

        self.input = create_input(input)

        self.assertEquals(self.input.host, input.host)
        self.assertEquals(self.input.bucket, input.bucket)
        self.assertEquals(self.input.region, input.region)
        self.assertEquals(self.input.status, 'CREATED')
 def setUp(self):
     super(GetJobListTestCase, self).setUp()
     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)
Exemple #36
0
 def setUp(self):
     super(CreateJobInvalidDataTestCase, self).setUp()
     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)
    def test_create_drm_job(self):
        input_obj = bitcodin.Input(url="http://eu-storage.bitcodin.com/inputs/Sintel.2010.720p.mkv")
        input_result = bitcodin.create_input(input_obj)

        video_configs = list()
        video_config1 = bitcodin.VideoStreamConfig(
            default_stream_id=0, bitrate=1024000, profile="Main", preset="standard", height=768, width=1024
        )
        video_config2 = bitcodin.VideoStreamConfig(
            default_stream_id=1, bitrate=512000, profile="Main", preset="standard", height=480, width=640
        )
        video_configs.append(video_config1)
        video_configs.append(video_config2)

        audio_configs = list()
        audio_config = bitcodin.AudioStreamConfig(default_stream_id=0, bitrate=192000)
        audio_configs.append(audio_config)

        encoding_profile = bitcodin.EncodingProfile("API Test Profile", video_configs, audio_configs)
        encoding_profile_result = bitcodin.create_encoding_profile(encoding_profile)

        manifests = ["mpd", "m3u8"]

        drm_config = bitcodin.DrmConfig(
            system="widevine",
            provider="widevine_test",
            signing_key="1ae8ccd0e7985cc0b6203a55855a1034afc252980e970ca90e5202689f947ab9",
            signing_iv="d58ce954203b7c9a9a9d467f59839249",
            request_url="http://license.uat.widevine.com/cenc/getcontentkey",
            content_id="746573745f69645f4639465043304e4f",
            method="mpeg_cenc",
        )

        job = bitcodin.Job(
            input_id=input_result.input_id,
            encoding_profile_id=encoding_profile_result.encoding_profile_id,
            manifest_types=manifests,
            speed="standard",
            drm_config=drm_config,
        )

        job_result = bitcodin.create_job(job)
        self.assertEqual(job_result.status, "Enqueued")
    def setUp(self):
        super(CreateJobWithMultipleAudioStreamsTestCase, self).setUp()
        input_url = test_video_url_multiple_audio_streams
        input = Input(input_url)
        self.input = create_input(input)
        audio_stream_config_0 = AudioStreamConfig(default_stream_id=0, bitrate=192000)
        audio_stream_config_1 = AudioStreamConfig(default_stream_id=1, 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_0,
                                                                                       audio_stream_config_1])
        self.encoding_profile = create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']
        self.audio_meta_data = {}

        audio_stream_config_0_meta_data = AudioMetaData(0,  'de', 'Just Sound')
        audio_stream_config_1_meta_data = AudioMetaData(1,  'en', 'Sound and Voice')

        self.audio_meta_data = [audio_stream_config_0_meta_data, audio_stream_config_1_meta_data]
 def setUp(self):
     super(CreateJobWidevineDrmInvalidConfigTestCase, self).setUp()
     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.drm_config = WidevineDrmConfig(
         provider=None,
         signing_key=None,
         signing_iv=None,
         request_url=None,
         content_id=None,
         method=None
     )
Exemple #40
0
 def setUp(self):
     super(CreateJobWithSpecificSegmentLengthTestCase, self).setUp()
     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(
         name='API Test Profile',
         video_stream_configs=[video_stream_config],
         audio_stream_configs=[audio_stream_config],
         segment_length=2)
     self.encoding_profile = create_encoding_profile(encoding_profile)
     self.manifests = ['m3u8', 'mpd']
    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(CreateJobPlayreadyWidevineDrmTestCase, self).setUp()
     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.drm_config = PlayreadyWidevineCombinedDrmConfig(
         key='100b6c20940f779a4589152b57d2dacb',
         pssh='CAESEOtnarvLNF6Wu89hZjDxo9oaDXdpZGV2aW5lX3Rlc3QiEGZrajNsamFTZGZhbGtyM2oqAkhEMgA=',
         kid='eb676abbcb345e96bbcf616630f1a3da',
         la_url='http://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&ContentKey=EAtsIJQPd5pFiRUrV9Layw==',
         lui_url=None,
         ds_id=None,
         custom_attributes=None,
         method='mpeg_cenc'
     )
 def setUp(self):
     super(CreateJobPlayreadyDrmInvalidConfigTestCase, self).setUp()
     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.drm_config = PlayreadyDrmConfig(
         k_id=None,
         key=None,
         key_seed=None,
         la_url=None,
         lui_url=None,
         ds_id=None,
         custom_attributes=None,
         method='mpeg_cenc'
     )
    def setUp(self):
        super(CreateJobTestCase, self).setUp()
        input_url = 'http://bitbucketireland.s3.amazonaws.com/at_test/mono_streams.mkv'
        input = bitcodin.Input(input_url)
        self.input = bitcodin.create_input(input)

        audio_configs = [
            bitcodin.AudioStreamConfig(
                default_stream_id=0,
                bitrate=192000
            ),
            bitcodin.AudioStreamConfig(
                default_stream_id=1,
                bitrate=128000
            )
        ]

        video_stream_config = bitcodin.VideoStreamConfig(default_stream_id=0,
                                                         bitrate=512000,
                                                         profile='Main',
                                                         preset='premium',
                                                         height=480,
                                                         width=640)

        encoding_profile = bitcodin.EncodingProfile('API Merge Audio Multi Profile',
                                                    [video_stream_config],
                                                    audio_configs)

        self.encoding_profile = bitcodin.create_encoding_profile(encoding_profile)
        self.manifests = ['m3u8', 'mpd']

        merge_audio_channel_config12 = bitcodin.MergeAudioChannelConfig([1, 2])
        merge_audio_channel_config34 = bitcodin.MergeAudioChannelConfig([3, 4])

        self.merge_audio_channel_configs = [merge_audio_channel_config12, merge_audio_channel_config34]

        audio_meta_data12 = bitcodin.AudioMetaData(0, 'en', 'Channel 1 and 2 merged')
        audio_meta_data34 = bitcodin.AudioMetaData(1, 'en', 'Channel 3 and 4 merged')

        self.audio_meta_data = [audio_meta_data12, audio_meta_data34]
Exemple #45
0
 def setUp(self):
     super(CreateJobHLSEncryptionTestCase, self).setUp()
     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.hls_encryption_config = HLSEncryptionConfig(
         key='cab5b529ae28d5cc5e3e7bc3fd4a544d',
         method='SAMPLE-AES',
         iv='08eecef4b026deec395234d94218273d')
    def setUp(self):
        super(CreateJobAzureInputTestCase, self).setUp()

        input = AzureInput(account_name=azure_input_config.get('accountName'),
                           account_key=azure_input_config.get('accountKey'),
                           container=azure_input_config.get('container'),
                           url=azure_input_config.get('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']
Exemple #47
0
    def runTest(self):
        input = S3Input(access_key=s3_input_config.get('access_key'),
                        secret_key=s3_input_config.get('secret_key'),
                        host=s3_input_config.get('host'),
                        bucket=s3_input_config.get('bucket'),
                        region=s3_input_config.get('region'),
                        object_key=s3_input_config.get('object_key'))

        self.input = create_input(input, True)

        async_input_status = get_async_input_status(self.input.input_id)
        while async_input_status.status != 'CREATED':
            async_input_status = get_async_input_status(
                async_input_status.input_id)
            self.assertNotEqual(async_input_status.status, 'ERROR')
            print(async_input_status.to_json())
            sleep(5)

        self.input = get_input(self.input.input_id)
        self.assertEquals(self.input.host, input.host)
        self.assertEquals(self.input.bucket, input.bucket)
        self.assertEquals(self.input.region, input.region)
        self.assertEquals(self.input.status, 'CREATED')
Exemple #48
0
    def setUp(self):
        super(CreateJobS3InputTestCase, self).setUp()

        input = S3Input(access_key=s3_input_config.get('access_key'),
                        secret_key=s3_input_config.get('secret_key'),
                        host=s3_input_config.get('host'),
                        bucket=s3_input_config.get('bucket'),
                        region=s3_input_config.get('region'),
                        object_key=s3_input_config.get('object_key'))

        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']
    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)
    def runTest(self):
        input = S3Input(
            access_key=s3_input_config.get('access_key'),
            secret_key=s3_input_config.get('secret_key'),
            host=s3_input_config.get('host'),
            bucket=s3_input_config.get('bucket'),
            region=s3_input_config.get('region'),
            object_key=s3_input_config.get('object_key')
        )

        self.input = create_input(input, True)

        async_input_status = get_async_input_status(self.input.input_id)
        while async_input_status.status != 'CREATED':
            async_input_status = get_async_input_status(async_input_status.input_id)
            self.assertNotEqual(async_input_status.status, 'ERROR')
            print(async_input_status.to_json())
            sleep(5)

        self.input = get_input(self.input.input_id)
        self.assertEquals(self.input.host, input.host)
        self.assertEquals(self.input.bucket, input.bucket)
        self.assertEquals(self.input.region, input.region)
        self.assertEquals(self.input.status, 'CREATED')
Exemple #51
0
 def setUp(self):
     super(CreateJobWidevineDrmInvalidConfigTestCase, self).setUp()
     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.drm_config = WidevineDrmConfig(provider=None,
                                         signing_key=None,
                                         signing_iv=None,
                                         request_url=None,
                                         content_id=None,
                                         method=None)
#!/usr/bin/env python
from time import sleep

import bitcodin
import sys

bitcodin.api_key = '<YOUR_API_KEY>'

input_obj = bitcodin.Input(
    url='http://bitbucketireland.s3.amazonaws.com/Sintel-original-short.mkv')
input_result = bitcodin.create_input(input_obj)

video_configs = list()

video_configs.append(
    bitcodin.VideoStreamConfig(default_stream_id=0,
                               bitrate=4500000,
                               profile='Main',
                               preset='premium',
                               height=818,
                               width=1920))
video_configs.append(
    bitcodin.VideoStreamConfig(default_stream_id=0,
                               bitrate=2400000,
                               profile='Main',
                               preset='premium',
                               height=544,
                               width=1280))
video_configs.append(
    bitcodin.VideoStreamConfig(default_stream_id=0,
                               bitrate=1000000,
 def setUp(self):
     super(DeleteInputTestCase, self).setUp()
     input_url = 'http://bitbucketireland.s3.amazonaws.com/Sintel-original-short.mkv'
     input = Input(input_url)
     self.input = create_input(input)
Exemple #54
0
 def runTest(self):
     input = Input(self.inputUrl)
     with self.assertRaises(BitcodinBadRequestError):
         result = create_input(input)
 def runTest(self):
     input = Input(self.inputUrl)
     self.input = create_input(input)
     self.assertEquals(self.input.url, input.url)
     self.assertEquals(self.input.status, 'CREATED')