diff --git a/modules/file/file.admin.controller.php b/modules/file/file.admin.controller.php index 1b290e10e..72531e66f 100644 --- a/modules/file/file.admin.controller.php +++ b/modules/file/file.admin.controller.php @@ -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) diff --git a/modules/file/lang/en.php b/modules/file/lang/en.php index b02233616..e78966db5 100644 --- a/modules/file/lang/en.php +++ b/modules/file/lang/en.php @@ -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.
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.
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.
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.
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'; diff --git a/modules/file/lang/ko.php b/modules/file/lang/ko.php index ace295713..5cc6f3e79 100644 --- a/modules/file/lang/ko.php +++ b/modules/file/lang/ko.php @@ -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 데이터를 삭제합니다.
이 옵션을 사용하지 않아도 다른 설정에 의해 이미지가 변환될 경우에도 EXIF 데이터가 삭제될 수 있습니다.'; $lang->image_autoconv_gif2mp4 = 'GIF → MP4 변환'; $lang->about_image_autoconv_gif2mp4 = '움직이는 GIF 이미지를 MP4 동영상으로 변환하여 용량 및 트래픽을 절약합니다.
아래에서 ffmpeg 설정을 해야 하며, 구형 브라우저에서는 동영상이 재생되지 않을 수도 있습니다.'; +$lang->max_video_size = '동영상 크기 제한'; +$lang->about_max_video_size = '업로드된 동영상의 크기를 제한하거나 조정합니다. 파일 용량과는 직접적인 관계가 없으니 참고하세요.'; +$lang->video_autoconv_any2mp4 = 'MP4로 변환'; +$lang->about_video_autoconv_any2mp4 = 'MP4 이외의 동영상 포맷은 모두 웹에서 재생할 수 있는 MP4 포맷으로 변환합니다.
지원하는 원본 포맷은 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처럼 취급'; diff --git a/modules/file/tpl/upload_config.html b/modules/file/tpl/upload_config.html index f058e03c4..3598101ba 100644 --- a/modules/file/tpl/upload_config.html +++ b/modules/file/tpl/upload_config.html @@ -8,7 +8,7 @@ - +
@@ -138,6 +138,57 @@

{$lang->video}

+
+ +
+ × + px   + +

+ {$lang->about_max_video_size} +

+

+ +

+
+
+
+ +
+ + +

{$lang->about_video_autoconv_any2mp4}

+

{$lang->msg_cannot_use_ffmpeg}

+
+
+
+ +
+ + +

{$lang->about_video_always_reencode}

+

{$lang->msg_cannot_use_ffmpeg}

+
+
@@ -177,7 +228,7 @@
- +