|
7 | 7 | from qencode import QencodeClientException, QencodeTaskException |
8 | 8 |
|
9 | 9 | # replace with your API KEY (can be found in your Project settings on Qencode portal) |
10 | | -API_KEY = 'your-api-qencode-key' |
| 10 | +#API_KEY = 'your-api-qencode-key' |
| 11 | +API_KEY = '5a2a846a26ace' |
| 12 | +#API_KEY = '5a5db6fa5b4c5' |
11 | 13 |
|
12 | 14 | # specify path to your BuyDRM certificate files |
13 | 15 | USER_PVT_KEY_PATH = './keys/user_private_key.pem' |
|
27 | 29 | "format": [ |
28 | 30 | { |
29 | 31 | "output": "advanced_dash", |
| 32 | + "destination": { |
| 33 | + "url": "s3://nyc3.digitaloceanspaces.com/qencode3/regression_tests/encrypt/buydrm_widevine/dash", |
| 34 | + "key": "DRSKM355SM7QT4DB7Q37", |
| 35 | + "secret": "CGE1pypu02SfZ8DDPtZ5l1M5drFoVmAoVUrPBkQdAjM", |
| 36 | + "permissions": "public-read" |
| 37 | + }, |
30 | 38 | "stream": [ |
31 | 39 | { |
32 | 40 | "video_codec": "libx264", |
|
48 | 56 |
|
49 | 57 |
|
50 | 58 | def start_encode(): |
51 | | - """ |
52 | | - Create client object |
53 | | - :param api_key: string. required |
54 | | - :param api_url: string. not required |
55 | | - :param api_version: int. not required. default 'v1' |
56 | | - :return: task object |
57 | | - """ |
58 | | - |
59 | 59 | # this creates signed request to BuyDRM |
60 | 60 | cpix_request = create_cpix_user_request( |
61 | 61 | key_ids, media_id, USER_PVT_KEY_PATH, USER_PUB_CERT_PATH, |
62 | 62 | use_playready=True, use_widevine=True |
63 | 63 | ) |
64 | 64 |
|
65 | | - client = qencode.client(API_KEY) |
| 65 | + #client = qencode.client(API_KEY, api_url='https://stage-sfo2-1-api-do.qencode.com/') |
| 66 | + #client = qencode.client(API_KEY, api_url='https://qa-sfo2-api-do.qencode.com/') |
| 67 | + client = qencode.client(API_KEY, api_url='https://prod-nyc1-api-do.qencode.com/') |
66 | 68 | if client.error: |
67 | 69 | raise QencodeClientException(client.message) |
68 | 70 |
|
|
0 commit comments