Skip to content

Commit 824162d

Browse files
added support for stitching
1 parent f636025 commit 824162d

File tree

9 files changed

+24
-9
lines changed

9 files changed

+24
-9
lines changed

qencode3/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,9 @@ def x265_video_codec():
2929

3030
from . exeptions import QencodeClientException, QencodeTaskException
3131

32+
__version__ = "0.9.15"
33+
__status__ = "Beta"
34+
__author__ = "Qencode"
35+
3236

3337

qencode3/task.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,19 @@ def task_completed(self, callback, *args, **kwargs):
8787
break
8888
time.sleep(SLEEP_REGULAR)
8989

90+
9091
def _prepare_data(self, profiles, video_url, **kwargs):
9192
data = dict(
9293
task_token=self.task_token,
93-
uri=video_url,
9494
profiles=', '.join(profiles) if type(profiles).__name__ == 'list' else profiles
9595
)
96+
if isinstance(video_url, list):
97+
try:
98+
data.update(stitch=json.dumps(video_url))
99+
except Exception:
100+
data.update(stitch=video_url)
101+
else:
102+
data.update(uri=video_url)
96103
if kwargs:
97104
data.update(kwargs)
98105
return data

sample-code/query.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{"query": {
22

3-
"source": "https://qa.qencode.com/static/1.mp4",
3+
"source": "https://qencode.com/static/1.mp4",
44
"format": [
55
{
66
"output": "mp4",

sample-code/start_custom_hls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
FORMAT.destination = DESTINATION
3636

3737
#replace with a link to your input video
38-
params.source = 'https://qa.qencode.com/static/1.mp4'
38+
params.source = 'https://qencode.com/static/1.mp4'
3939
params.format = [FORMAT]
4040

4141
def start_encode():

sample-code/start_custom_mp4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
FORMAT.destination = DESTINATION
2929

3030
#replace with a link to your input video
31-
params.source = 'https://qa.qencode.com/static/1.mp4'
31+
params.source = 'https://qencode.com/static/1.mp4'
3232
params.format = [FORMAT]
3333

3434
def start_encode():

sample-code/start_custom_with_dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
API_KEY = 'your-api-qencode-key'
1414

1515
#replace with a link to your input video
16-
source_url = "https://qa.qencode.com/static/1.mp4"
16+
source_url = "https://qencode.com/static/1.mp4"
1717

1818
format_240 = dict(
1919
output="mp4",

sample-code/start_custom_with_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#replace with a link to your input video
1616
params = """
1717
{"query": {
18-
"source": "https://qa.qencode.com/static/1.mp4",
18+
"source": "https://qencode.com/static/1.mp4",
1919
"format": [
2020
{
2121
"output": "mp4",

sample-code/start_encode.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
TRANSCODING_PROFILEID = 'your-qencode-profile-id'
1717

1818
#replace with a link to your input video
19-
VIDEO_URL = 'https://qa.qencode.com/static/1.mp4'
19+
VIDEO_URL = 'https://qencode.com/static/1.mp4'
20+
#or stitch
21+
#STITCH = ['https://qencode.com/static/1.mp4', 'https://qencode.com/static/2.mp4']
2022

2123

2224
def start_encode():
@@ -42,6 +44,8 @@ def start_encode():
4244
raise QencodeTaskException(task.message)
4345

4446
task.start(TRANSCODING_PROFILEID, VIDEO_URL)
47+
#or stitch
48+
#task.start(TRANSCODING_PROFILEID, STITCH)
4549

4650
if task.error:
4751
raise QencodeTaskException(task.message)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
setup(
1010
name='qencode3',
11-
version='0.9.14',
11+
version='0.9.15',
1212
description='Qencode Python SDK',
1313
url='https://github.com/qencode-dev/qencode-api-python3-client',
1414
# url=here,
1515
author='Qencode Developer',
1616
author_email='team@qencode.com',
1717
license='proprietary',
1818
classifiers=[
19-
'Development Status :: 3 - Alpha',
19+
'Development Status :: 4 - Beta',
2020
'Intended Audience :: Developers',
2121
'Topic :: Software Development :: Build Tools',
2222
'License :: Other/Proprietary License',

0 commit comments

Comments
 (0)