render
render copied to clipboard
Support transperancy in .mov format
I don't think .mov supports transparency. Please use .mp4 or in case I am wrong you may also update the .mov export file type with a pull request. (if it is supported by ffmpeg, it should not be a big problem)
MOV does Support transparency. MP4 doesn't.
use this code:
class TransparentMovFormat extends MovFormat {
const TransparentMovFormat({
super.audio,
super.scale,
super.interpolation = Interpolation.bicubic,
}) : super();
@override
FFmpegRenderOperation processor({
required String inputPath,
required String outputPath,
required double frameRate,
}) {
final audioInput = audio != null && audio!.isNotEmpty
? audio!.map((e) => "-i??${e.path}").join('??')
: null;
return FFmpegRenderOperation([
"-y",
"-i", inputPath,
audioInput,
"-filter_complex",
"[0:v]${scalingFilter != null ? "$scalingFilter," : ""}"
"setpts=N/($frameRate*TB)[v]",
"-map", "[v]",
"-c:v", "prores_ks",
"-profile:v", "4444",
"-pix_fmt", "yuva444p10le", // Enable alpha channel
"-vendor", "ap10",
"-colorspace", "bt709",
"-movflags", "+faststart",
"-r", "$frameRate",
outputPath,
]);
}
}