@@ -15,12 +15,13 @@ def render(self, node, references, *, time=None, fps=None, realtime=None, **kwar
1515 codec = node .get ('codec' , 1 , str , 'h264' )
1616 keep_alpha = node .get ('keep_alpha' , 1 , bool , False )
1717 if ext in ('.mp4' , '.mov' , '.m4v' , '.mkv' , '.webm' , '.ogg' ) or (ext == '.gif' and codec == 'gif' ):
18- pixfmt = node .get ('pixfmt' , 1 , str , 'rgb8' if codec == 'gif' else ' yuv420p' )
18+ pixfmt = node .get ('pixfmt' , 1 , str , 'rgb8' if codec == 'gif' else ( 'yuva420p' if keep_alpha else ' yuv420p') )
1919 crf = node .get ('crf' , 1 , int )
20+ profile = node .get ('profile' , 1 , str )
2021 preset = node .get ('preset' , 1 , str )
2122 limit = node .get ('limit' , 1 , float )
2223 path .write_video_frame (self ._target .video_frame , time , fps = int (fps ), realtime = realtime , codec = codec ,
23- pixfmt = pixfmt , crf = crf , preset = preset , limit = limit , alpha = keep_alpha )
24+ pixfmt = pixfmt , crf = crf , profile = profile , preset = preset , limit = limit , alpha = keep_alpha )
2425 else :
2526 quality = node .get ('quality' , 1 , int )
2627 path .write_image (self ._target .image , quality = quality , alpha = keep_alpha )
0 commit comments