File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import time
99import json
1010
11+ #replace with your API KEY (can be found in your Project settings on Qencode portal)
12+ API_KEY = '5a5db6fa5b123'
1113
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'
1616
17+ #replace with a link to your input video
18+ VIDEO_URL = 'https://qa.qencode.com/static/1.mp4'
1719
1820
1921def start_encode ():
@@ -37,7 +39,7 @@ def start_encode():
3739 task = client .create_task ()
3840 task .start_time = 0.0
3941 task .duration = 10.0
40- task .start (TRANSCODING_PROFILEID , VIDO_URL )
42+ task .start (TRANSCODING_PROFILEID , VIDEO_URL )
4143 if task .error :
4244 print ('Error' , task .message , sep = ":" , end = "\n " )
4345 raise SystemExit
Original file line number Diff line number Diff line change 88import time
99import json
1010
11- API_KEY = '5a5db6fa5b4c5'
11+ #replace with your API KEY (can be found in your Project settings on Qencode portal)
12+ API_KEY = '5a5db6fa5b123'
1213
1314params = qencode .custom_params ()
1415
1718DESTINATION = qencode .destination ()
1819VIDEO_CODEC = qencode .x264_video_codec ()
1920
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"
2426
2527VIDEO_CODEC .vprofile = "baseline"
2628VIDEO_CODEC .level = 31
2931VIDEO_CODEC .partitions = "+parti8x8+parti4x4+partp8x8+partb8x8"
3032VIDEO_CODEC .directpred = 2
3133
34+ # stream object is specified for HLS or DASH outputs only.
35+ # for MP4 or WEBM output set properties below in format object directly
3236STREAM .profile = "baseline"
3337STREAM .size = "1920x1080"
3438STREAM .audio_bitrate = 128
Original file line number Diff line number Diff line change 88import json
99
1010
11+ #replace with your API KEY (can be found in your Project settings on Qencode portal)
12+ API_KEY = '5a5db6fa5b123'
1113
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'
1519
1620
1721def my_callback (e ):
@@ -57,7 +61,7 @@ def start_encode():
5761 :return: task object
5862 """
5963 task = client .create_task ()
60- task .start (TRANSCODING_PROFILEID , VIDO_URL )
64+ task .start (TRANSCODING_PROFILEID , VIDEO_URL )
6165 if task .error :
6266 print ('Error' , task .message , sep = ":" , end = "\n " )
6367 raise SystemExit
You can’t perform that action at this time.
0 commit comments