I currently have two videos, word.mp4
and word.matte.mp4
. I'm trying to alphamerge
these two videos with an image.jpg
overlay.
The command I'm trying to use, which I tweaked from this question, is giving me an error
ffmpeg -i word.mp4 -i word.matte.mp4 -i image.jpg -filter_complex '[1][0]scale2ref[mask][main];[main][mask]alphamerge[vid];[2:v][vid]overlay=(W-w)/2:(H-h)/2[out]' -map [out] complete.mp4
but I get this error
Stream mapping:
Stream #0:0 (hevc) -> scale2ref:ref
Stream #1:0 (mpeg4) -> scale2ref:default
Stream #2:0 (mjpeg) -> overlay:main
overlay -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[libx264 @ 0x560faabe37c0] width not divisible by 2 (983x1115)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
Any help would be appreciated