mltmelt-framework

Melt framework - Add a background persisten between videos


I need to merge videos in a ratio of 16:9 with a png image to use instead of the black borders. I'm running this command: melt vid_1.mp4 vid_2.mp4 -mix 30 -mixer luma -consumer avformat:finish.mp4

I see the affine plugin but can make it work


Solution

  • melt -profile atsc_1080p_25 bg.png -filter affine transition.rect="-36.8976 -58 1953.17 1300 1" -track v1.mp4 v2.mp4 -transition affine
    

    This command will get you started. You will need to customize transition.rect to meet the needs of how you want to crop/fit your background image. If your background image aspect ratio matches your profile aspect ratio, then you can exclude transition.rect.

    You should also change the profile to be whatever profile you want.

    See the melt documentation for other helpful parameters (like in/out points)

    See Affine Filter and Affine Transition for details about the parameters for the image transformation.