File tree Expand file tree Collapse file tree 3 files changed +24
-14
lines changed Expand file tree Collapse file tree 3 files changed +24
-14
lines changed Original file line number Diff line number Diff line change 8
8
import time
9
9
import json
10
10
11
+ #replace with your API KEY (can be found in your Project settings on Qencode portal)
12
+ API_KEY = '5a5db6fa5b123'
11
13
12
- API_KEY = '5a5db6fa5b4c5'
13
- TRANSCODING_PROFILEID = '5a5db6fa5b8ac'
14
- VIDO_URL = 'https://qa.qencode.com/static/1.mp4'
15
-
14
+ #replace with your Transcoding Profile ID (can be found in your Project settings on Qencode portal)
15
+ TRANSCODING_PROFILEID = '5a5db6fa5b123'
16
16
17
+ #replace with a link to your input video
18
+ VIDEO_URL = 'https://qa.qencode.com/static/1.mp4'
17
19
18
20
19
21
def start_encode ():
@@ -37,7 +39,7 @@ def start_encode():
37
39
task = client .create_task ()
38
40
task .start_time = 0.0
39
41
task .duration = 10.0
40
- task .start (TRANSCODING_PROFILEID , VIDO_URL )
42
+ task .start (TRANSCODING_PROFILEID , VIDEO_URL )
41
43
if task .error :
42
44
print ('Error' , task .message , sep = ":" , end = "\n " )
43
45
raise SystemExit
Original file line number Diff line number Diff line change 8
8
import time
9
9
import json
10
10
11
- API_KEY = '5a5db6fa5b4c5'
11
+ #replace with your API KEY (can be found in your Project settings on Qencode portal)
12
+ API_KEY = '5a5db6fa5b123'
12
13
13
14
params = qencode .custom_params ()
14
15
17
18
DESTINATION = qencode .destination ()
18
19
VIDEO_CODEC = qencode .x264_video_codec ()
19
20
20
-
21
- DESTINATION .url = "s3://s3-eu-west-2.amazonaws.com/qencode-test"
22
- DESTINATION .key = "AKIAIKZIPSJ7SDAIWK4A"
23
- DESTINATION .secret = "h2TGNXeT49OT+DtZ3RGr+94HEhptS6oYsmXCwWuL"
21
+ # set your S3 access credentials here
22
+ # for more storage types see Destination object description: https://docs.qencode.com/#010_050
23
+ DESTINATION .url = "s3://s3.eu-east-1.amazonaws.com/qencode-test"
24
+ DESTINATION .key = "AKIAIKASDJ7SD12345"
25
+ DESTINATION .secret = "h2TGNXeQA9OT+DtZ3RGr+94HEhptS6oYsm12345"
24
26
25
27
VIDEO_CODEC .vprofile = "baseline"
26
28
VIDEO_CODEC .level = 31
29
31
VIDEO_CODEC .partitions = "+parti8x8+parti4x4+partp8x8+partb8x8"
30
32
VIDEO_CODEC .directpred = 2
31
33
34
+ # stream object is specified for HLS or DASH outputs only.
35
+ # for MP4 or WEBM output set properties below in format object directly
32
36
STREAM .profile = "baseline"
33
37
STREAM .size = "1920x1080"
34
38
STREAM .audio_bitrate = 128
Original file line number Diff line number Diff line change 8
8
import json
9
9
10
10
11
+ #replace with your API KEY (can be found in your Project settings on Qencode portal)
12
+ API_KEY = '5a5db6fa5b123'
11
13
12
- API_KEY = '5a5db6fa5b4c5'
13
- TRANSCODING_PROFILEID = '5a5db6fa5b8ac'
14
- VIDO_URL = 'https://qa.qencode.com/static/1.mp4'
14
+ #replace with your Transcoding Profile ID (can be found in your Project settings on Qencode portal)
15
+ TRANSCODING_PROFILEID = '5a5db6fa5b123'
16
+
17
+ #replace with a link to your input video
18
+ VIDEO_URL = 'https://qa.qencode.com/static/1.mp4'
15
19
16
20
17
21
def my_callback (e ):
@@ -57,7 +61,7 @@ def start_encode():
57
61
:return: task object
58
62
"""
59
63
task = client .create_task ()
60
- task .start (TRANSCODING_PROFILEID , VIDO_URL )
64
+ task .start (TRANSCODING_PROFILEID , VIDEO_URL )
61
65
if task .error :
62
66
print ('Error' , task .message , sep = ":" , end = "\n " )
63
67
raise SystemExit
You can’t perform that action at this time.
0 commit comments