Git Product home page Git Product logo

raspi2png's Introduction

raspi2png

Utility to take a snapshot of the raspberry pi screen and save it as a PNG file

Modified fork to allow streaming. The streams can be viewed from any computer on the local network in the web browser, or you can restrict viewing to a specific IP address and it will refuse connections from other devices. Performance is not very high, so using the "scale" parameter to reduce the quality (such as 0.5 for 50% quality) and turning down the Raspberry Pi's resolution in raspi-config (and scaling up the font-size in dpkg-recongifure console-setup to make sure the text is still clear even when the quality is reduced) can get a stable framerate.

You can use this to turn your smartphone into a Pi display in order to use your Pi on-the-go. You can see an example of this here: https://www.youtube.com/watch?v=TCD0oboQ4EQ

The reason I made this fork is because the remote desktop applications require an X server to run and SSH only does the command-line interface but not graphical programs. What if you want something that can stream graphical programs that don't use X? Could not find anything, so I forked raspi2png and added the option here.

I also added keyboard emulation. If "control" is set to 1 (e.g. raspi2png stream 8888 0.5 192.168.0.111 1) then you can type in the browser window and it simulates those as keyboard presses on the Raspberry Pi.

Usage: raspi2png [--pngname name] [--width <width>] [--height <height>] [--compression <level>] [--delay <delay>] [--display <number>] [--stdout] [--help]

    --pngname,-p - name of png file to create (default is snapshot.png)
    --height,-h - image height (default is screen height)
    --width,-w - image width (default is screen width)
    --compression,-c - PNG compression level (0 - 9)
    --delay,-d - delay in seconds (default 0)
    --display,-D - Raspberry Pi display number (default 0)
    --stdout,-s - write file to stdout
    --help,-H - print this usage information

Streaming usage: 
    Streams the contents of the screen to the web browser at http://ip_address:port_number/view

    raspi2png stream - Start streaming on port 8888
    raspi2png stream [port] - Start streaming on port [port]
    raspi2png stream [port] [quality] - Stream quality, e.g. 0.5 for 50% or 1 for 100%
    raspi2png stream [port] [quality] [ip_addr] - Only allow a specific IP to connect
    raspi2png stream [port] [quality] [ip_addr] [control] - Use 1 for the control to enable keyboard input
    raspi2png stop - Stop streaming

Simple Install

Run this command through terminal or CLI screen.

curl -sL https://raw.githubusercontent.com/AndrewFromMelbourne/raspi2png/master/installer.sh | bash -

Manual Building

You will need to install libpng, libmicrohttpd, and libevdev before you build the program. On Raspbian

sudo apt-get install libpng12-dev libmicrohttpd-dev libevdev-dev

Then just type 'make' in the raspi2png directory you cloned from github.

raspi2png's People

Contributors

amihart avatar andrewfrommelbourne avatar bradisbell avatar codepainters avatar floppes avatar lashower avatar loganmc10 avatar waveform80 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.