{
"encode_video": [
"[ffmpeg]",
"-y",
"-f",
"rawvideo",
"-vcodec",
"rawvideo",
"-s",
"[width]x[height]",
"-pix_fmt",
"rgb24",
"-r",
"[fps]",
"-i",
"-",
"-an",
"-vcodec",
"h264",
"-pix_fmt",
"yuv420p",
"-crf",
"[crf]",
"-metadata",
"comment=[comment]",
"[output]"
],
"encode_audio": [
"[ffmpeg]",
"-y",
"-i",
"[inputvideo]",
"-i",
"[inputaudio]",
"-filter_complex",
"[1:0]apad",
"-shortest",
"-vcodec",
"copy",
"-acodec",
"aac",
"-b:a",
"[bitrate]k",
"-metadata",
"comment=[comment]",
"-strict",
"-2",
"[output]"
],
"ffmpeg_path": "/usr/bin/ffmpeg"
}
It’s very simple actually. The json, if you look at the encode_video
part, is just an array of strings. It will be concatenated with spaces.
The parts in square brackets are replaced by variables by the library (the path of the executable, width, height, fps, the crf quality, a comment and the output file path).
Everything else is passed as it is. You can completely change it any way you want: add, remove and change the order of the strings.
If I remember right you should be able to see the command that is executed in the debug txt file that is produced.
Update: actually the command is not written to the debug txt file, but it would be useful if it was!