Last active
September 13, 2020 01:01
-
-
Save robert-wallis/28f7502d8a28ccd045d8027977cef106 to your computer and use it in GitHub Desktop.
Raspberry PI 4; 4" 480x800 viewfinder; Webcam mirrored on HDMI-2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo setting HDMI-2 to 1080p | |
echo setting HDMI-1 to mirror and scale to 1080p | |
xrandr --fb 1920x1080 \ | |
--output HDMI-2 --mode 1920x1080 --primary \ | |
--output HDMI-1 --mode 480x800 --scale-from 1152x1920 --rotate left --same-as HDMI-2 | |
sleep 1 | |
echo displaying webcam at 1080p full-screen | |
mplayer tv:// -tv driver=v4l2:width=1920:height=1080:device=/dev/video0 -fs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo setting HDMI-2 to 720p | |
echo setting HDMI-1 to mirror and scale to 720p | |
xrandr --fb 1280x720 \ | |
--output HDMI-2 --mode 1280x720 --primary \ | |
--output HDMI-1 --mode 480x800 --scale-from 768x1280 --rotate left --same-as HDMI-2 | |
sleep 1 | |
echo displaying webcam at 720p full-screen | |
mplayer tv:// -tv driver=v4l2:width=1280:height=720:device=/dev/video0 -fs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment