tiny-pilot / tinypilot

Use your Raspberry Pi as a browser-based KVM.
https://tinypilotkvm.com
MIT License
2.99k stars 249 forks source link

Modify video resolution #786

Open e-minguez opened 2 years ago

e-minguez commented 2 years ago

Currently the video options allows you to change the FPS and the JPG quality. It would be nice to have an option to modify the video resolution also.

mtlynch commented 2 years ago

Thanks for filing this!

The wrinkle here is that not all video capture devices support multiple resolutions. The TC358743, which we use on the Voyager, doesn't allow resolution changes as of my last check. It might be possible to dynamically generate a new EDID, but that's pretty complex.

There is a workaround for this, but it requires dropping into the command-line. You can add a line to your TinyPilot settings file like this:

TINYPILOT_SETTINGS="/home/tinypilot/settings.yml"
echo 'ustreamer_resolution: "1280x760"' | sudo tee -a "${TINYPILOT_SETTINGS}"
sudo chown tinypilot:tinypilot "${TINYPILOT_SETTINGS}"

And then the next time you change video settings through the UI, it should apply the new resolution if your hardware supports it.