Loading... 默认情况下,nextcloud的视频文件是没有预览缩略图的,这很不方便 为实现视频文件生成预览缩略图,需要两步 ## 1.[安装ffmpeg](https://so.csdn.net/so/search?q=%E5%AE%89%E8%A3%85ffmpeg&spm=1001.2101.3001.7020) 打开[docker](https://so.csdn.net/so/search?q=docker&spm=1001.2101.3001.7020),打开nextcloud的容器终端 先升级apt ```bash apt-get update ``` 然后安装ffmpeg ```bash apt-get install ffmpeg ``` ## 2.修改配置文件 向`config/config.php`配置文件中加入以下内容: ```php 'enable_previews' => true, 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\Image', 1 => 'OC\\Preview\\Movie', 2 => 'OC\\Preview\\TXT', 3 => 'OC\\Preview\\MP3', 4 => 'OC\\Preview\\MKV', 5 => 'OC\\Preview\\MP4', 6 => 'OC\\Preview\\AVI', ), ``` 这是我的完整配置文件,以供参考: ```php <?php $CONFIG = array ( 'htaccess.RewriteBase' => '/', 'memcache.local' => '\\OC\\Memcache\\APCu', 'apps_paths' => array ( 0 => array ( 'path' => '/var/www/html/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/var/www/html/custom_apps', 'url' => '/custom_apps', 'writable' => true, ), ), 'upgrade.disable-web' => true, 'instanceid' => 'ocnykk316fv3', 'passwordsalt' => 'EM5japWPwqbdz3GUYHilMn9J7aHFLq', 'secret' => 'hv8l9kN4SbS+dzGHIE5Fh592m7FQFGXus8QBckxCQ2EvtwCz', 'trusted_domains' => array ( 0 => '127.0.0.1:8111', 1 => '192.168.0.4:8111', ), 'enable_previews' => true, 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\Image', 1 => 'OC\\Preview\\Movie', 2 => 'OC\\Preview\\TXT', 3 => 'OC\\Preview\\MP3', 4 => 'OC\\Preview\\MKV', 5 => 'OC\\Preview\\MP4', 6 => 'OC\\Preview\\AVI', ), 'datadirectory' => '/var/www/html/data', 'dbtype' => 'sqlite3', 'version' => '28.0.2.5', 'overwrite.cli.url' => 'http://127.0.0.1:8111', 'installed' => true, ); ``` 最后修改:2025 年 10 月 14 日 © 允许规范转载 打赏 赞赏作者 微信 赞 0 如果觉得我的文章对你有用,请随意赞赏
此处评论已关闭