首页 > 解决方案 > 无法在视频上使用 FFmpeg 绘制文本

问题描述

我正在尝试使用 FFmpeg 使用“ ffmpeg-android-java ”在视频上叠加文本。我使用的命令是这样的:

command = "ffmpeg -i /storage/emulated/0/GsrVideo/testvideo.mp4 -vf drawtext=\"font=/storage/emulated/0/font/Pacifico.ttf:fontsize=20:fontcolor=red:x=10:y=10:text='hello'\" /storage/emulated/0/GsrVideo/editedVideo.mp4"

但它给出了错误提示 -使用 args ""font=/storage/emulated/0/font/Pacifico.ttf:fontsize=20:fontcolor=red:x=10:y=10:text= 初始化过滤器 'drawtext' 时出错'你好'",打开过滤器时出错!

请任何人都可以帮助我指出过滤器中的问题。

标签: androidvideoffmpegandroid-ffmpeg

解决方案


推荐阅读