Closed lxllsl closed 10 months ago
please refer the sample code as below:
my_graph = bmf.graph({'dump_graph': 1})
decode_stream = my_graph.decode({'input_path': input_video_path})
scaled_stream = bmf.module([decode_stream['video']], "c_ffmpeg_filter", option={
'name': 'scale',
'para': 'w=960:h=540:out_color_matrix=bt709:flags=lanczos'})
(bmf.encode(scaled_stream, None, {
"output_path": "out.mp4"
}).run())
set output color space: ffmpeg -i test.mp4 -vf "scale=960:540:out_color_matrix=bt709:flags=lanczos" out.mp4