video media_type now have their own config_spec.ini
This commit is contained in:
parent
93874d0a66
commit
9a6741d7bf
@ -104,27 +104,6 @@ max_height = integer(default=640)
|
|||||||
max_width = integer(default=180)
|
max_width = integer(default=180)
|
||||||
max_height = integer(default=180)
|
max_height = integer(default=180)
|
||||||
|
|
||||||
[media_type:mediagoblin.media_types.video]
|
|
||||||
# Should we keep the original file?
|
|
||||||
keep_original = boolean(default=False)
|
|
||||||
|
|
||||||
# 0 means autodetect, autodetect means number_of_CPUs - 1
|
|
||||||
vp8_threads = integer(default=0)
|
|
||||||
# Range: 0..10
|
|
||||||
vp8_quality = integer(default=8)
|
|
||||||
# Range: -0.1..1
|
|
||||||
vorbis_quality = float(default=0.3)
|
|
||||||
|
|
||||||
# Autoplay the video when page is loaded?
|
|
||||||
auto_play = boolean(default=False)
|
|
||||||
|
|
||||||
[[skip_transcode]]
|
|
||||||
mime_types = string_list(default=list("video/webm"))
|
|
||||||
container_formats = string_list(default=list("Matroska"))
|
|
||||||
video_codecs = string_list(default=list("VP8 video"))
|
|
||||||
audio_codecs = string_list(default=list("Vorbis"))
|
|
||||||
dimensions_match = boolean(default=True)
|
|
||||||
|
|
||||||
[media_type:mediagoblin.media_types.audio]
|
[media_type:mediagoblin.media_types.audio]
|
||||||
keep_original = boolean(default=True)
|
keep_original = boolean(default=True)
|
||||||
# vorbisenc quality
|
# vorbisenc quality
|
||||||
|
22
mediagoblin/media_types/video/config_spec.ini
Normal file
22
mediagoblin/media_types/video/config_spec.ini
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[plugin_spec]
|
||||||
|
# Should we keep the original file?
|
||||||
|
keep_original = boolean(default=False)
|
||||||
|
|
||||||
|
# 0 means autodetect, autodetect means number_of_CPUs - 1
|
||||||
|
vp8_threads = integer(default=0)
|
||||||
|
# Range: 0..10
|
||||||
|
vp8_quality = integer(default=8)
|
||||||
|
# Range: -0.1..1
|
||||||
|
vorbis_quality = float(default=0.3)
|
||||||
|
|
||||||
|
# Autoplay the video when page is loaded?
|
||||||
|
auto_play = boolean(default=False)
|
||||||
|
|
||||||
|
[[skip_transcode]]
|
||||||
|
mime_types = string_list(default=list("video/webm"))
|
||||||
|
container_formats = string_list(default=list("Matroska"))
|
||||||
|
video_codecs = string_list(default=list("VP8 video"))
|
||||||
|
audio_codecs = string_list(default=list("Vorbis"))
|
||||||
|
dimensions_match = boolean(default=True)
|
||||||
|
|
||||||
|
|
@ -126,7 +126,7 @@ class CommonVideoProcessor(MediaProcessor):
|
|||||||
|
|
||||||
def common_setup(self):
|
def common_setup(self):
|
||||||
self.video_config = mgg \
|
self.video_config = mgg \
|
||||||
.global_config['media_type:mediagoblin.media_types.video']
|
.global_config['plugins'][MEDIA_TYPE]
|
||||||
|
|
||||||
# Pull down and set up the processing file
|
# Pull down and set up the processing file
|
||||||
self.process_filename = get_process_filename(
|
self.process_filename = get_process_filename(
|
||||||
|
@ -27,7 +27,7 @@ def skip_transcode(metadata, size):
|
|||||||
|
|
||||||
Returns True if the video matches the requirements in the configuration.
|
Returns True if the video matches the requirements in the configuration.
|
||||||
'''
|
'''
|
||||||
config = mgg.global_config['media_type:mediagoblin.media_types.video']\
|
config = mgg.global_config['plugins']['mediagoblin.media_types.video']\
|
||||||
['skip_transcode']
|
['skip_transcode']
|
||||||
|
|
||||||
medium_config = mgg.global_config['media:medium']
|
medium_config = mgg.global_config['media:medium']
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
{% set display_type, display_path = media.get_display_media() %}
|
{% set display_type, display_path = media.get_display_media() %}
|
||||||
|
|
||||||
<video controls
|
<video controls
|
||||||
{% if global_config['media_type:mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
{% if global_config['plugins']['mediagoblin.media_types.video']['auto_play'] %}autoplay{% endif %}
|
||||||
preload="auto" class="video-js vjs-mg-skin"
|
preload="auto" class="video-js vjs-mg-skin"
|
||||||
data-setup='{"height": {{ media.media_data.height }},
|
data-setup='{"height": {{ media.media_data.height }},
|
||||||
"width": {{ media.media_data.width }} }'>
|
"width": {{ media.media_data.width }} }'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user