Share screen over HTTP and M-JPEG
tags: bash geek http mjpeg screen
13 Oct 2014 20:14
Here's a script to share your screen in a way that you can use a simple web browser to see it:
#!/bin/bash
fps=5
bitrate=15000
port=8080
transcode="transcode{vcodec=MJPG,vb=$bitrate}"
http='http{mime=multipart/x-mixed-replace}'
std="standard{access=$http,mux=mpjpeg,dst=:$port}"
sout="#$transcode:$std"
cvlc -q screen:// ":screen-fps=$fps" --sout "$sout"
Connect using a browser pointed to http://localhost:8080/
Opera seems to work the best for that stream. If you don't set the zoom at 100% if will flicker a bit though.