Ejemplo n.º 1
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
        ]
Ejemplo n.º 2
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(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']
Ejemplo n.º 4
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(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)
Ejemplo n.º 6
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(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 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(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(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')
Ejemplo n.º 11
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']
Ejemplo n.º 12
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(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']
Ejemplo n.º 14
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']
Ejemplo n.º 15
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)
Ejemplo n.º 16
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)
Ejemplo n.º 18
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')
Ejemplo n.º 19
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)
 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)
Ejemplo n.º 21
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')