Android FFmpeg无法为FONTCONFIG_文件找到合适的输出格式
我使用下面的ffmpeg命令在视频顶部绘制文本-Android FFmpeg无法为FONTCONFIG_文件找到合适的输出格式,android,ffmpeg,Android,Ffmpeg,我使用下面的ffmpeg命令在视频顶部绘制文本- String path=getFilesDir()+"/fonts.conf"; String[] complexCommand ={"-i", inputFilePath,"FONTCONFIG_FILE="+path,"-vf","drawtext=fontfile=/assets/fonts/formataregular.otf: \\text='Stack Overflow: fontcolor=white: fontsize=24: b
String path=getFilesDir()+"/fonts.conf";
String[] complexCommand ={"-i", inputFilePath,"FONTCONFIG_FILE="+path,"-vf","drawtext=fontfile=/assets/fonts/formataregular.otf: \\text='Stack Overflow: fontcolor=white: fontsize=24: box=1: boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2'","-codec:a","copy",outputFilePath};
我正在使用,并且已经按照说明进行操作-
如果要使用FONTCONFIG,则需要指定自定义配置
fontconfig配置文件(例如-“fontconfig_文件=/sdcard/fonts.conf
./ffmpeg--version”,其中/sdcard/fonts.conf是您的
FONTCONFIG配置文件)
我的配置文件以名称font.conf
我正在犯错误-
找不到适合的输出格式
'FONTCONFIG_FILE=/data/data/videoeditor.bhugnesh.com.ffmpegvideoeditor/files/fonts.conf'
FONTCONFIG_FILE=/data/data/videoeditor.bhugnesh.com.ffmpegvideoeditor/files/fonts.conf:
无效参数
我还尝试了路径作为-
File dir=Environment.getExternalStorageDirectory();
String path=dir.getAbsolutePath()+"/fonts.conf";
哪里出错了?这是要导出的环境变量;不是ffmpeg命令参数。@Mulvya我该怎么做?这是要导出的环境变量;不是ffmpeg命令参数。@Mulvya我怎么做?