Skip to content

内置命令错误,图片合成视频 #67

Description

@pj567
@SuppressLint("DefaultLocale")
@JvmStatic
fun image2Video(srcFile: String?, targetFile: String?): Array<String?> {
    //-f image2:代表使用image2格式,需要放在输入文件前面

// var command = "ffmpeg -y -f image2 -r 1 -i %simg#d.jpg -vcodec mpeg4 %s"
// command = command.replace("#", "%")
return CommandParams()
.append("-f")
.append("image2")
.append("-r")
.append("1")
.append("-i")
.append("${srcFile}img%d.jpg")
.append("c:v")
.append("mpeg4")
.append(targetFile)
.get()
}
应该是
@SuppressLint("DefaultLocale")
@JvmStatic
fun image2Video(srcFile: String?, targetFile: String?): Array<String?> {
//-f image2:代表使用image2格式,需要放在输入文件前面
// var command = "ffmpeg -y -f image2 -r 1 -i %simg#d.jpg -vcodec mpeg4 %s"
// command = command.replace("#", "%")
return CommandParams()
.append("-f")
.append("image2")
.append("-r")
.append("1")
.append("-i")
.append("${srcFile}img%d.jpg")
.append("-c:v")
.append("mpeg4")
.append(targetFile)
.get()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions