Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-video-worker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-video-worker
Commits
f6d32c0a
Commit
f6d32c0a
authored
Oct 19, 2017
by
Gregory Martin
Committed by
GitHub
Oct 19, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16 from edx/deployment_debug
Updated variables debug
parents
fe053a9a
ff8ac3be
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
36 deletions
+28
-36
default_encode_profiles.json
+1
-7
instance_config.yaml
+0
-8
video_worker/__init__.py
+1
-1
video_worker/abstractions.py
+25
-19
video_worker/video_images.py
+1
-1
No files found.
default_encode_profiles.json
View file @
f6d32c0a
...
...
@@ -20,13 +20,7 @@
"rate_factor"
:
27
,
"filetype"
:
"mp4"
},
"mobile_high"
:{
"encode_suffix"
:
"MB1"
,
"resolution"
:
540
,
"rate_factor"
:
27
,
"filetype"
:
"mp4"
},
"desktop_mp4"
:{
"desktop_mp4"
:{
"encode_suffix"
:
"DTH"
,
"resolution"
:
720
,
"rate_factor"
:
27
,
...
...
instance_config.yaml
View file @
f6d32c0a
...
...
@@ -117,10 +117,8 @@ encode_dict:
mobile_override
:
-
override
s3_proc
:
-
mobile_high
-
mobile_low
-
audio_mp3
-
desktop_webm
-
desktop_mp4
-
hls
...
...
@@ -142,15 +140,9 @@ val_profile_dict:
-
mobile_low
-
mobile_high
mobile_high
:
-
mobile_high
audio_mp3
:
-
audio_mp3
desktop_webm
:
-
desktop_webm
youtube
:
-
youtube
review
:
...
...
video_worker/__init__.py
View file @
f6d32c0a
...
...
@@ -160,7 +160,7 @@ class VideoWorker(object):
encode_profile
=
self
.
encode_profile
deliverable_route
.
apply_async
(
(
veda_id
,
encode_profile
),
queue
=
'transcode_stat'
queue
=
self
.
settings
[
'celery_deliver_queue'
]
)
# Clean up workdir
if
self
.
jobid
is
not
None
:
...
...
video_worker/abstractions.py
View file @
f6d32c0a
...
...
@@ -154,13 +154,20 @@ class Encode(object):
self
.
encode_library
=
None
def
pull_data
(
self
):
if
self
.
VideoObject
.
veda_id
is
not
None
:
veda_token
=
generate_apitoken
.
veda_tokengen
()
if
veda_token
is
None
:
ErrorObject
()
.
print_error
(
"""
Retrieve Active and latest encode data from central VEDA node
"""
# TODO: Change retrieval to a scheduled/delay process
if
self
.
VideoObject
.
veda_id
is
None
:
self
.
_default_encodes
()
return
veda_token
=
generate_apitoken
.
veda_tokengen
()
if
veda_token
is
None
:
ErrorObject
()
.
print_error
(
message
=
"VEDA Token Generate"
)
return
None
return
None
data
=
{
'product_spec'
:
self
.
profile_name
}
...
...
@@ -190,20 +197,19 @@ class Encode(object):
self
.
encode_pk
=
e
[
'id'
]
if
self
.
encode_suffix
is
None
:
ErrorObject
()
.
print_error
(
message
=
"VEDA API Encode Data Fail: No Suffix"
)
return
None
else
:
'''
filetype': u'mp4', u'encode_suffix': u'DTH', u'resolution': 720, u'rate_factor'
'''
encode_data
=
self
.
_read_encodes
()
self
.
resolution
=
encode_data
[
self
.
profile_name
][
'resolution'
]
self
.
rate_factor
=
encode_data
[
self
.
profile_name
][
'rate_factor'
]
self
.
filetype
=
encode_data
[
self
.
profile_name
][
'filetype'
]
self
.
encode_suffix
=
encode_data
[
self
.
profile_name
][
'encode_suffix'
]
self
.
encode_pk
=
None
# In the case of an API Error
self
.
_default_encodes
()
def
_default_encodes
(
self
):
"""
filetype': u'mp4', u'encode_suffix': u'DTH', u'resolution': 720, u'rate_factor'
"""
encode_data
=
self
.
_read_encodes
()
self
.
resolution
=
encode_data
[
self
.
profile_name
][
'resolution'
]
self
.
rate_factor
=
encode_data
[
self
.
profile_name
][
'rate_factor'
]
self
.
filetype
=
encode_data
[
self
.
profile_name
][
'filetype'
]
self
.
encode_suffix
=
encode_data
[
self
.
profile_name
][
'encode_suffix'
]
self
.
encode_pk
=
None
def
_read_encodes
(
self
):
if
self
.
encode_library
is
None
:
...
...
video_worker/video_images.py
View file @
f6d32c0a
...
...
@@ -172,7 +172,7 @@ class VideoImages(object):
self
.
settings
[
'val_video_images_url'
],
data
=
json
.
dumps
(
data
),
headers
=
val_headers
,
timeout
=
settings
[
'global_timeout'
]
timeout
=
se
lf
.
se
ttings
[
'global_timeout'
]
)
if
not
response
.
ok
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment