Android 如何使用Ffmpeg命令在视频中添加字幕
我正在执行下面的命令并获得流#0:0:Subtitle:unknown_编解码器 (编解码器未知_编解码器)未找到输出流#0:0 FFmpeg命令:Android 如何使用Ffmpeg命令在视频中添加字幕,android,ffmpeg,Android,Ffmpeg,我正在执行下面的命令并获得流#0:0:Subtitle:unknown_编解码器 (编解码器未知_编解码器)未找到输出流#0:0 FFmpeg命令: final String demoVideoPath = "/sdcard/b.mp4"; final String subTitlePath="/sdcard/srtf.srt"; String ffmpegCommand[] = { "ffmpeg", "-i", demoVideoPath, "-i", subTitlePath,
final String demoVideoPath = "/sdcard/b.mp4";
final String subTitlePath="/sdcard/srtf.srt";
String ffmpegCommand[] = { "ffmpeg", "-i", demoVideoPath, "-i", subTitlePath,
"-map","1", "-c", "copy","-strict", "experimental","-c:v","mpeg","-crf","23","-preset","veryfast",
"/sdcard/output.avi" };
LogCat
Shellout[srt @ 0xc03930] Estimating duration from bitrate, this may be inaccurate
ShelloutInput #1, srt, from '/sdcard/srtf.srt':
Shellout Duration: N/A, bitrate: N/A
Shellout Stream #1:0: Subtitle: srt
ShelloutPlease use -b:a or -b:v, -b is ambiguous
ShelloutOutput #0, avi, to '/sdcard/output.avi':
Shellout Metadata:
Shellout major_brand : isom
Shellout minor_version : 512
Shellout compatible_brands: isomiso2mp41
Shellout creation_time : 2013-12-20 11:33:07
Shellout encoder : Lavf51.12.1
Shellout Stream #0:0: Subtitle: unknown_codec
ShelloutStream mapping:
Shellout Stream #1:0 -> #0:0 (srt -> ?)
ShelloutEncoder (codec unknown_codec) not found for output stream #0:0
如何处理未知的编解码器错误。您应该显示完整的
ffmpeg
控制台输出。@lordNeckbeard-检查此日志我添加了日志幸运的是,这不是完整的输出。