Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Websites UFRPE
Wagtail Videos
Commits
15252526
Commit
15252526
authored
Mar 31, 2021
by
Jonny Scholes
Browse files
Transcode audio to AAC for MP4 conversions to make available input file containers more permissive
parent
81776618
Changes
1
Hide whitespace changes
Inline
Side-by-side
wagtailvideos/models.py
View file @
15252526
...
@@ -42,7 +42,7 @@ class VideoQuality(ChoiceEnum):
...
@@ -42,7 +42,7 @@ class VideoQuality(ChoiceEnum):
class
MediaFormats
(
ChoiceEnum
):
class
MediaFormats
(
ChoiceEnum
):
webm
=
'VP8 and Vorbis in WebM'
webm
=
'VP8 and Vorbis in WebM'
mp4
=
'H.264 and
MP3
in Mp4'
mp4
=
'H.264 and
AAC
in Mp4'
ogg
=
'Theora and Vorbis in Ogg'
ogg
=
'Theora and Vorbis in Ogg'
def
get_quality_param
(
self
,
quality
):
def
get_quality_param
(
self
,
quality
):
...
@@ -279,7 +279,7 @@ class TranscodingThread(threading.Thread):
...
@@ -279,7 +279,7 @@ class TranscodingThread(threading.Thread):
'-codec:v'
,
'libx264'
,
'-codec:v'
,
'libx264'
,
'-preset'
,
'slow'
,
# TODO Checkout other presets
'-preset'
,
'slow'
,
# TODO Checkout other presets
'-crf'
,
quality_param
,
'-crf'
,
quality_param
,
'-codec:a'
,
'
copy
'
,
'-codec:a'
,
'
aac
'
,
output_file
,
output_file
,
],
stdin
=
FNULL
,
stderr
=
subprocess
.
STDOUT
)
],
stdin
=
FNULL
,
stderr
=
subprocess
.
STDOUT
)
elif
media_format
is
MediaFormats
.
webm
:
elif
media_format
is
MediaFormats
.
webm
:
...
...
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