Created
February 10, 2018 09:05
-
-
Save v6ak/1678244cd71a0ebd019531d02a149c8f to your computer and use it in GitHub Desktop.
An attempt to pipe screen content to a VM. Related to https://groups.google.com/forum/#!topic/qubes-users/3amtMOIBTgI
This file contains 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 | |
# safety settings | |
set -u | |
set -e | |
set -o pipefail | |
# Ensure out.ogv exists. I know, this is a bit hacky and racy if run in parallel. | |
rm -f /tmp/out.ogv | |
ln -s /dev/stdout /tmp/out.ogv | |
# Record without sound in order to prevent echo. Overwrite and writing to symlink is a hack that allows writing to stdout. | |
# Playback: Speed larger than zero might allow to reduce the initial latency, but I don't see it working well. OTOH, it might cause underruns. I've tried to reduce various buffers, but without much effect. | |
recordmydesktop --on-the-fly-encoding --no-sound --overwrite -o /tmp/out.ogv | | |
qvm-run -p "$1" 'mplayer --speed=1 --demuxer-lavf-buffersize=1 --cache-backbuffer=0 --no-cache-pause -' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment