1、安装ffmpeg

参考:https://www.jianshu.com/p/65e14b80dc80

cd /opt/
# 下载
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
# 解压
tar -Jxf ffmpeg-git-amd64-static.tar.xz
# 移动到对应路径下
mkdir /opt/alfresco-community/ffmpeg
mv ffmpeg-git-20230313-amd64-static/* /opt/alfresco-community/ffmpeg/
# 创建软链接
cd /usr/bin
ln -s /opt/alfresco-community/bin/ffmpeg ffmpeg
ln -s /opt/alfresco-community/bin/ffprobe ffprobe

2、复制video-thumbnail-context.xml和video-transformation-context.xml到D:\alfresco-community\tomcat\shared\classes\alfresco\extension

3、在D:\alfresco-community\tomcat\shared\classes\alfresco-global.properties中增加以下配置:

### 音视频对应
ffmpeg.exe=/opt/alfresco-community-idoc3.0/bin/ffmpeg
content.transformer.default.timeoutMs=600000

# ffmpeg.thumbnail
# ================
content.transformer.ffmpeg.thumbnail.priority=50
content.transformer.ffmpeg.thumbnail.extensions.3g2.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.3gp.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.asf.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.avi.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.avx.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.flv.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.mov.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.movie.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.mp4.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.mpeg2.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.mpg.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.ogv.png.supported=true
content.transformer.ffmpeg.thumbnail.extensions.wmv.png.supported=true

# ffmpeg.mp4
# ==========
content.transformer.ffmpeg.mp4.priority=50
content.transformer.ffmpeg.mp4.extensions.3g2.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.3gp.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.asf.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.avx.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.mov.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.movie.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.mpeg2.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.mpg.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.wmv.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.avi.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.mp4.mp4.supported=true
content.transformer.ffmpeg.mp4.extensions.flv.mp4.supported=true

# ffmpeg.mp3
# ==========
content.transformer.ffmpeg.mp3.priority=50
content.transformer.ffmpeg.mp3.extensions.aiff.mp3.supported=true
content.transformer.ffmpeg.mp3.extensions.au.mp3.supported=true
content.transformer.ffmpeg.mp3.extensions.m4a.mp3.supported=true
content.transformer.ffmpeg.mp3.extensions.oga.mp3.supported=true
content.transformer.ffmpeg.mp3.extensions.wav.mp3.supported=true
文档更新时间: 2023-12-03 19:52   作者:凌云文档