ShayBox / Mon2Cam

Workaround for multi-monitor Discord screensharing
MIT License
338 stars 33 forks source link

Border when scaling #6

Closed botiapa closed 5 years ago

botiapa commented 5 years ago

Added a way to use scaling without stretching by placing a border around the actual image.

In my testing this worked both with a 1650*1080 and a 2560*1080 display. I used it like this:

./Mon2Cam.sh -m 0 -r 1920:1080 -b

This means that the maximum resolution will be 1920*1080 and ffmpeg will scale down the image and add borders around it. I also moves into the center, so it looks better. Using larger resolutions than 1920*1080 should work (they work in ffplay) but I think the maximum allowed video resolution at least for free users in discord is 1920*1080.

But it also works when using smaller resolutions like 1280*720. The only thing that matters is that it has to be a 16:9 picture.