Coder Social home page Coder Social logo

restream's Introduction

reStream

reMarkable screen sharing over SSH.

rm1 rm2

A demo of reStream

Installation

  1. Clone this repository: git clone https://github.com/rien/reStream.
  2. (Optional but recommended) Install lz4 on your host and reMarkable.
  3. Copy the reDump program to your reMarkable and make it executable with:
scp reDump.remarkable.shared [email protected]:/home/root/reDump
ssh [email protected] 'chmod +x /home/root/reDump'
  1. Set up an SSH key and add it to the ssh-agent, then add your key to the reMarkable with ssh-copy-id [email protected].

Usage

  1. Connect your reMarkable with the USB cable.
  2. Make sure you can open an SSH connection.
  3. Run ./reStream.sh
  4. A screen will pop-up on your local machine, with a live view of your reMarkable!

Options

  • -h --help: show usage information
  • -p --portrait: shows the reMarkable screen in portrait mode (default: landscape mode, 90 degrees rotated tot the right)
  • -s --source: the ssh destination of the reMarkable (default: [email protected])
  • -o --output: path of the output where the video should be recorded, as understood by ffmpeg; if this is -, the video is displayed in a new window and not recorded anywhere (default: -)
  • -f --format: when recording to an output, this option is used to force the encoding format; if this is -, ffmpegโ€™s auto format detection based on the file extension is used (default: -).
  • -w --webcam: record to a video4linux2 web cam device. By default the first found web cam is taken, this can be overwritten with -o. The video is scaled to 1280x720 to ensure compatibility with MS Teams, Skype for business and other programs which need this specific format.
  • -t --throughput: use pv to measure how much data throughput you have (good to experiment with parameters to speed up the pipeline)

If you have problems, don't hesitate to open an issue or send me an email.

Requirements

On your host machine:

  • Any POSIX-shell (e.g. bash)
  • ffmpeg (with ffplay)
  • ssh
  • Video4Linux loopback kernel module if you want to use --webcam

On your reMarkable nothing is needed, unless you want...

Sub-second latency

To achieve sub-second latency, you'll need lz4 on your host and on your reMarkable.

You can install lz4 on your host with your usual package manager. On Ubuntu, apt install liblz4-tool will do the trick.

On your reMarkable you'll need a binary of lz4 build for the arm platform, you can do this yourself by installing the reMarkable toolchain and compiling lz4 from source with the toolchain enabled, or you can use the statically linked binary I have already built and put in this repo.

Copy the lz4 program to your reMarkable with scp lz4.arm.static [email protected]:/home/root/lz4, make it executable with ssh [email protected] 'chmod +x /home/root/lz4' and you're ready to go.

Video4Linux Loopback

To set your remarkable as a webcam we need to be able to fake one. This is where the Video4Linux loopback kernel module comes into play. We need both the dkms and util packages. On Ubuntu you need to install:

apt install v4l2loopback-utils v4l2loopback-dkms

In some package managers v4l2loopback-utils is found in v4l-utils.

After installing the module you must enable it with

modprobe v4l2loopback

To verify that this worked, execute:

v4l2-ctl --list-devices

The result should contain a line with "platform:v4l2loopback".

Troubleshooting

Steps you can try if the script isn't working:

restream's People

Contributors

rien avatar matteodelabre avatar beardhatcode avatar aarondavidschneider avatar utopiah avatar foxei avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.