mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Implement additional options for video processing in file module
This commit is contained in:
parent
685a027640
commit
ab2b96d509
4 changed files with 73 additions and 4 deletions
|
|
@ -82,6 +82,12 @@ class FileAdminController extends File
|
|||
$config->image_quality_adjustment = max(50, min(100, intval(Context::get('image_quality_adjustment'))));
|
||||
$config->image_autorotate = Context::get('image_autorotate') === 'Y' ? true : false;
|
||||
$config->image_remove_exif_data = Context::get('image_remove_exif_data') === 'Y' ? true : false;
|
||||
$config->max_video_width = intval(Context::get('max_video_width')) ?: '';
|
||||
$config->max_video_height = intval(Context::get('max_video_height')) ?: '';
|
||||
$config->max_video_size_action = Context::get('max_video_size_action') ?: '';
|
||||
$config->max_video_size_admin = Context::get('max_video_size_admin') === 'Y' ? 'Y' : 'N';
|
||||
$config->video_autoconv['any2mp4'] = Context::get('video_autoconv_any2mp4') === 'Y' ? true : false;
|
||||
$config->video_always_reencode = Context::get('video_always_reencode') === 'Y' ? true : false;
|
||||
$config->video_thumbnail = Context::get('video_thumbnail') === 'Y' ? true : false;
|
||||
$config->video_mp4_gif_time = intval(Context::get('video_mp4_gif_time'));
|
||||
if (RX_WINDOWS)
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ $lang->image_autoconv_bmp2jpg = 'BMP → JPG';
|
|||
$lang->image_autoconv_png2jpg = 'PNG → JPG';
|
||||
$lang->image_autoconv_webp2jpg = 'WebP → JPG';
|
||||
$lang->max_image_size = 'Limit Image Size';
|
||||
$lang->about_max_image_size = 'limit the size of uploaded images.<br />This limit does not apply to files uploaded by the administrator.';
|
||||
$lang->about_max_image_size = 'Limit the dimensions of uploaded images. Note that this is only indirectly related to file size.';
|
||||
$lang->max_image_size_action_nothing = 'If exceeded, do nothing';
|
||||
$lang->max_image_size_action_block = 'If exceeded, block upload';
|
||||
$lang->max_image_size_action_resize = 'If exceeded, resize automatically';
|
||||
|
|
@ -102,6 +102,12 @@ $lang->image_remove_exif_data = 'Remove EXIF';
|
|||
$lang->about_image_remove_exif_data = 'remove EXIF data including camera, GPS information, and more in image file for privacy.<br />Even if this option is not used, EXIF data may be removed when the image is converted by other settings.';
|
||||
$lang->image_autoconv_gif2mp4 = 'Convert GIF to MP4';
|
||||
$lang->about_image_autoconv_gif2mp4 = 'convert animated GIF images into MP4 videos to save storage and bandwidth.<br />This requires ffmpeg settings below. Videos may not play properly in older browsers.';
|
||||
$lang->max_video_size = 'Limit Video Size';
|
||||
$lang->about_max_video_size = 'Limit the dimensions of uploaded videos. Note that this is only indirectly related to file size.';
|
||||
$lang->video_autoconv_any2mp4 = 'Convert to MP4';
|
||||
$lang->about_video_autoconv_any2mp4 = 'Convert all other types of videos to MP4 format that can be played on the web.<br />Supported original formats vary by ffmpeg version and system environment, but usually include AVI and MOV.';
|
||||
$lang->video_always_reencode = 'Always Reencode';
|
||||
$lang->about_video_always_reencode = 'Reencode videos to a constant quality even if they do not meet one of the conditions above. This may help save disk space and traffic.';
|
||||
$lang->video_thumbnail = 'Video Thumbnail';
|
||||
$lang->about_video_thumbnail = 'extract a thumbnail image from uploaded video.';
|
||||
$lang->video_mp4_gif_time = 'Play Like GIF';
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ $lang->image_autoconv_bmp2jpg = 'BMP → JPG';
|
|||
$lang->image_autoconv_png2jpg = 'PNG → JPG';
|
||||
$lang->image_autoconv_webp2jpg = 'WebP → JPG';
|
||||
$lang->max_image_size = '이미지 크기 제한';
|
||||
$lang->about_max_image_size = '업로드된 이미지의 크기를 제한하거나 조정합니다. 관리자가 업로드한 파일에는 적용되지 않습니다.';
|
||||
$lang->about_max_image_size = '업로드된 이미지의 크기를 제한하거나 조정합니다. 파일 용량과는 직접적인 관계가 없으니 참고하세요.';
|
||||
$lang->max_image_size_action_nothing = '초과시 아무 것도 하지 않음';
|
||||
$lang->max_image_size_action_block = '초과시 업로드 금지';
|
||||
$lang->max_image_size_action_resize = '초과시 자동 크기 조정';
|
||||
|
|
@ -103,6 +103,12 @@ $lang->image_remove_exif_data = 'EXIF 제거';
|
|||
$lang->about_image_remove_exif_data = '프라이버시를 위해 이미지 파일에서 카메라, GPS 정보 등이 포함되어 있는 EXIF 데이터를 삭제합니다.<br />이 옵션을 사용하지 않아도 다른 설정에 의해 이미지가 변환될 경우에도 EXIF 데이터가 삭제될 수 있습니다.';
|
||||
$lang->image_autoconv_gif2mp4 = 'GIF → MP4 변환';
|
||||
$lang->about_image_autoconv_gif2mp4 = '움직이는 GIF 이미지를 MP4 동영상으로 변환하여 용량 및 트래픽을 절약합니다.<br />아래에서 ffmpeg 설정을 해야 하며, 구형 브라우저에서는 동영상이 재생되지 않을 수도 있습니다.';
|
||||
$lang->max_video_size = '동영상 크기 제한';
|
||||
$lang->about_max_video_size = '업로드된 동영상의 크기를 제한하거나 조정합니다. 파일 용량과는 직접적인 관계가 없으니 참고하세요.';
|
||||
$lang->video_autoconv_any2mp4 = 'MP4로 변환';
|
||||
$lang->about_video_autoconv_any2mp4 = 'MP4 이외의 동영상 포맷은 모두 웹에서 재생할 수 있는 MP4 포맷으로 변환합니다.<br />지원하는 원본 포맷은 ffmpeg 버전 및 서버 환경에 따라 다르지만 일반적으로 AVI, MOV 등이 해당됩니다.';
|
||||
$lang->video_always_reencode = '무조건 재인코딩';
|
||||
$lang->about_video_always_reencode = '위에서 설정한 조건에 해당되지 않더라도 무조건 일정한 화질로 재인코딩하여 용량과 트래픽을 절약합니다.';
|
||||
$lang->video_thumbnail = '동영상 섬네일 추출';
|
||||
$lang->about_video_thumbnail = '업로드된 동영상에서 섬네일 이미지를 추출합니다.';
|
||||
$lang->video_mp4_gif_time = 'GIF처럼 취급';
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<input type="hidden" name="module" value="file" />
|
||||
<input type="hidden" name="act" value="procFileAdminInsertUploadConfig" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/file/tpl/upload_config/1" />
|
||||
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="allowed_filesize" class="x_control-label">{$lang->allowed_filesize}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -138,6 +138,57 @@
|
|||
</section>
|
||||
<section class="section">
|
||||
<h1>{$lang->video}</h1>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->max_video_size}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" min="0" name="max_video_width" id="max_video_width" value="{$config->max_video_width}" size="7" style="min-width:80px" /> ×
|
||||
<input type="number" min="0" name="max_video_height" id="max_video_height" value="{$config->max_video_height}" size="7" style="min-width:80px" /> px
|
||||
<select name="max_video_size_action" id="max_video_size_action">
|
||||
<option value="">{$lang->max_image_size_action_nothing}</option>
|
||||
<option value="block" selected="selected"|cond="$config->max_video_size_action === 'block'">{$lang->max_image_size_action_block}</option>
|
||||
<option value="resize" selected="selected"|cond="$config->max_video_size_action === 'resize'">{$lang->max_image_size_action_resize}</option>
|
||||
</select>
|
||||
<p class="x_help-block">
|
||||
{$lang->about_max_video_size}
|
||||
</p>
|
||||
<p>
|
||||
<label for="max_video_size_admin">
|
||||
<input type="checkbox" name="max_video_size_admin" id="max_video_size_admin" value="Y" checked="checked"|cond="$config->max_video_size_admin === 'Y'" />
|
||||
{$lang->max_image_size_admin}
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->video_autoconv_any2mp4}</label>
|
||||
<div class="x_controls">
|
||||
<label for="video_autoconv_any2mp4_Y" class="x_inline">
|
||||
<input type="radio" name="video_autoconv_any2mp4" id="video_autoconv_any2mp4_Y" value="Y" checked="checked"|cond="$config->video_autoconv['any2mp4'] === true" disabled="disabled"|cond="!$is_ffmpeg" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="video_autoconv_any2mp4_N" class="x_inline">
|
||||
<input type="radio" name="video_autoconv_any2mp4" id="video_autoconv_any2mp4_N" value="N" checked="checked"|cond="$config->video_autoconv['any2mp4'] !== true" disabled="disabled"|cond="!$is_ffmpeg" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->about_video_autoconv_any2mp4}</p>
|
||||
<p class="x_text-info" cond="!$is_ffmpeg">{$lang->msg_cannot_use_ffmpeg}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->video_always_reencode}</label>
|
||||
<div class="x_controls">
|
||||
<label for="video_always_reencode_Y" class="x_inline">
|
||||
<input type="radio" name="video_always_reencode" id="video_always_reencode_Y" value="Y" checked="checked"|cond="$config->video_always_reencode === true" disabled="disabled"|cond="!$is_ffmpeg" />
|
||||
{$lang->cmd_yes}
|
||||
</label>
|
||||
<label for="video_always_reencode_N" class="x_inline">
|
||||
<input type="radio" name="video_always_reencode" id="video_always_reencode_N" value="N" checked="checked"|cond="$config->video_always_reencode !== true" disabled="disabled"|cond="!$is_ffmpeg" />
|
||||
{$lang->cmd_no}
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->about_video_always_reencode}</p>
|
||||
<p class="x_text-info" cond="!$is_ffmpeg">{$lang->msg_cannot_use_ffmpeg}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->video_thumbnail}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -177,7 +228,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue