Change output codec/bitrate?
Author: megascansCreated May 15, 2023Updated Mar 13, 2025
Using the changes from https://github.com/gaomingqi/Track-Anything/issues/26 to export a video of the mask through a luma matte
with:
painted_image = mask_painter(painted_image, (final_mask==0).astype('uint8'), mask_color=0, mask_alpha=1, contour_width=0)
painted_image = mask_painter(painted_image, (final_mask>0).astype('uint8'), mask_color=1, mask_alpha=1, contour_width=0)The output though is a low bitrate h264 mp4 which has a lot of compression artifacts. Is there a way to change the codec to something like ProRes or increase the bitrate.
Changing the codec to something like prores_ks doesn't work for me https://github.com/gaomingqi/Track-Anything/blob/b26b7fec95dbd9a51f3f897826f7bb3b12bee614/app.py#L348
Source: gaomingqi/Track-Anything