A html canvas based screencasting server with occasional ground-truth updates via screenshots and very fast input drawing

Overview

rm2canvas

A html canvas based screencasting server for the reMarkable 1/2 digital paper systems. It draws live on the canvas from the remarkables touchscreen input, but also fetches ground truth via occasional screenshots from the remarkable, trying to (seamlessly) integrate these two.

Why is it cool?

  • High quality screencast, with native 1872x1404 resolution (These are unfortunately a few seconds old, bad for live presentations)!
  • Instantanious updates on what is drawn/removed on the rm via the Wacom pen (30 times per second)!
  • Smooth interpolation between those two!
  • Low data usage: Updates are only send if there is something to update. As the event stream is rather small and the PNG backgrounds are just updated every few seconds, the whole streaming experience uses just ~20-50kb/s.

These features make it ideal for streaming a course too many students. That's why I developed it, at least.

Usage

  1. enable SSH access on your remarkable

Warning: Please be aware of the risks of running go code as root on a potentially brickable device. Be especially aware on software updates of xochitl. I do not think that there are extended risks, but please try to understand what this script is doing.

  1. Install imagemagick as we both need the convert and the compare tool as well as websockets via pip.
  2. start the server via python3 server.py HOSTADDRESS, where HOSTADDRESS could be either localhost or some IPv4/IPv6 address. This opens a (maybe publicly reachable!) HTTP Server on Port 7622. Be aware that the file request sanitzier was programmed at 02:53 in the morning.

ToDo:

  • enable rm1 support. Should be almost trivial, I just don't have any device to test this with.
  • remove canvas strokes with a smooth transition instead of abruptly deleting them (eyecandy)
  • Hunt bugs. Please report any you encounter!
  • Fix rotation.

Planned bigger features

  • detect swipes to new pages and save a backlog of pages in the html
  • Make setup easier
  • Switch to a "real" http server, not something made in websockets.
  • Make HTTPS support easier

Background

Building upon others work:

The original idea of drawing to a html canvas with input capured from the reMarkable is @afandians idea, see https://gitlab.com/afandian/pipes-and-paper. We modified (and hopefully improved) his code significantly, but the basic idea remains.

Furthermore, the rm2 screenshotter is due to a gist of https://gist.github.com/owulveryck (https://gist.github.com/owulveryck/4007cbf14e0028f373e4294f66c4ad07), who himself builds upon a lot of other peoples work, see https://github.com/rien/reStream/issues/28.

Input parsing was easy thanks to the information here: https://github.com/canselcik/libremarkable/wiki/Reading-from-Wacom-I2C-Digitizer

I (flomlo) also recevied generous amounts of help of my friends

Thank you

Working principles

The reMarkable features a full Linux with root access. This means that we may just read the input device /dev/input/event1 (or event0 on rm1) via the following command:ssh -o ConnectTimeout=2 {rm_user}@{rm_host} cat {input_device}. This information is parsed in tipa.py according to the rules described in the libremarkable wiki and send to the JavaScript frontend via the websocketInput. There the input is drawn on a html canvas (and saved in an Array together with a timestamp).

Concurrently a new screenshot is grabbed every few seconds and send (together with a timestamp tsBg) to the JavaScript frontend via the websocketBackground. There it triggers a transition to the newest screenshot as well as triggering the removal of all Canvas strokes older than that timestamp.

The websocket server is happy to serve as many clients as there are, the only limits are currently the bandwith (and CPU, as it is single-threaded via pythons asyncio). Simultanious streaming to ~20 devices was already tested.

AutoKey, a desktop automation utility for Linux and X11.

AutoKey Contents About Installation Zero-installation Method Documentation Support Bug reports and Pull Requests Changelog License About AutoKey, a de

2.5k Dec 31, 2022
PyQT5 app for LOLBAS and GTFOBins

LOLBins PyQT app to list all Living Off The Land Binaries and Scripts for Windows from LOLBAS and Unix binaries that can be used to bypass local secur

Hamza Megahed 41 Dec 01, 2022
PyQt5 Sample GUI Program - Python PyQt5 Sample GUI application

Python PyQt5 Sample GUI application Program work like this Designed GUI using De

Dimuth De Zoysa 5 Mar 27, 2022
Quebra cabeça - Utilizando biblioteca do python: PyQt5

Puzzle 3x3 PyQt5 - Windows Quebra cabeça - Utilizando biblioteca do python: PyQt5 Para testar este quebra cabeça na sua maquina, primeiramente faça o

Matheus Marsal 1 Dec 21, 2021
GUI Python Auto text bot.

Bagel Text Bot Auto text bot. Written in Python. Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what

Toby 3 May 14, 2022
A simple todo GUI applicaiton

simple_todo_gui A simple todo GUI applicaiton To create an .exe file, run 'Python setup.py build' after installing PyQt5 and cx_Freeze with pip. Then

Dhammike Piyumal 2 Nov 11, 2021
Useful PDF-related productivity tool.

Luftmensch 1.4.7 (Español) | 1.4.3 (English) Version 1.4.7 (Español) released in October 2021. Version 1.4.3 (English) released in September 2021. 🏮

8 Dec 29, 2022
A Windows Dock Widget Written In Pure Python

VEПUS A Windows Dock Widget Written In Pure Python What is Venus? Venus is a Dock Widget for your desktops interface. It adds a couple of really cool

Secrets 18 Dec 30, 2022
Create custom desktop notificatons using python

Create custom desktop notificatons using python In this video i am going to use a module called plyer

Niranjan 2 Dec 15, 2021
Declarative User Interfaces for Python

Welcome to Enaml Enaml is a programming language and framework for creating professional-quality user interfaces with minimal effort. What you get A d

1.4k Jan 07, 2023
Dear PyGui Extensions is a collection of useful tools, abstractions, and simplification layers built with/for Dear PyGui users.

Dear PyGui Extensions: A collection of useful tools, abstractions, and simplification layers built with/for Dear PyGui users.

Jonathan Hoffstadt 34 Jan 01, 2023
A library for building modern declarative desktop applications in WX.

re-wx is a library for building modern declarative desktop applications. It's built as a management layer on top of WXPython, which means you get all the goodness of a mature, native, cross-platform

Chris 115 Dec 24, 2022
Management Gui for OpenVR FSR PlugIn

OpenVR FSR App Small GUI to install/uninstall, tweak settings of the Modified OpenVR DLL with AMD FidelityFX SuperResolution Upscaler with a single cl

Stefan Tapper 234 Dec 20, 2022
Primeira interface (simples) desenvolvida em Python utilizando o PySimpleGUI

Interface-Python Sobre o projeto Primeira interface gráfica (simples) desenvolvida em Python utilizando o PySimpleGUI Interface Gráfica Tecnologias ut

Matheus Maia Alvarez 5 Apr 09, 2022
Py address book gui - An address book with graphical user interface developed with Python Tkinter

py_address_book_gui An address book with graphical user interface developed with

Milton 4 Feb 01, 2022
This repository contains some projects that I have done using Python + Tkinter.

This repository contains some projects that I have done using Python + Tkinter.

João Victor Vilela dos Santos 1 Nov 10, 2021
Make nixos usable for non-technical users through a settings / package management GUI.

Nix-Gui Make nixos usable for non-technical users through a settings / package management GUI. Motives The declarative nature of ni

547 Dec 31, 2022
A small manager/GUI Frontend for QEMU written in Python

qemu-manager A small manager/GUI Frontend for QEMU written in Python Requirements You'll need to have the following tools installed to run this: QEMU

yeppiidev 15 Dec 21, 2022
A Virtual Desktop Assistant Written in Python

DesktopAssitant A Virtual Desktop Assistant Written in Python. It's generally a basic virtual assistant The basic purpose of this is to make work easi

Technerd brainiac 609 Jan 07, 2023
Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies

(This library is available under a free and permissive license however, if you Enjoy Dear PyGui please consider becoming a Sponsor) Dear PyGui is a si

Jonathan Hoffstadt 9.4k Jan 07, 2023