FFmpeg
ffmpeg
is a cli tool for video, audio file processing. It is cross-platform and support all major operating system.
convert video
Lower the size
lower crf
means higher resolution and vice versa. Further compression can be done using libx265
codec (but browser doesn't support)
add an overlay
To list all available pixel format run ffmpeg -pix_fmts
(e.g yuv420p)
create video
HandBrake
HandBrake is a very nice gui
tool which gives userfriently options out of the box.