Skip to content

Commit b281aea

Browse files
Adjusted samples
1 parent 66c0377 commit b281aea

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

sample-code/start_encode.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
import time
99
import 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

1921
def 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

sample-code/start_encode2.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
import time
99
import 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

1314
params = qencode.custom_params()
1415

@@ -17,10 +18,11 @@
1718
DESTINATION = qencode.destination()
1819
VIDEO_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

2527
VIDEO_CODEC.vprofile = "baseline"
2628
VIDEO_CODEC.level = 31
@@ -29,6 +31,8 @@
2931
VIDEO_CODEC.partitions = "+parti8x8+parti4x4+partp8x8+partb8x8"
3032
VIDEO_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
3236
STREAM.profile = "baseline"
3337
STREAM.size = "1920x1080"
3438
STREAM.audio_bitrate = 128

sample-code/start_encode3.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
import 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

1721
def 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

0 commit comments

Comments
 (0)