• Stars
    star
    2,329
  • Rank 18,931 (Top 0.4 %)
  • Language
    C
  • Created almost 9 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A low latency, high framerate screen sharing server for Windows and client for browsers

jsmpeg-vnc

A low latency, high framerate screen sharing server and client, viewable in any modern browser.

More Info & Demo Video

Download Binaries

Usage & Performance Considerations

jsmpeg-vnc.exe [options] <window name>

Options:
	-b bitrate in kilobit/s (default: estimated by output size)
	-s output size as WxH. E.g: -s 640x480 (default: same as window size)
	-f target framerate (default: 60)
	-p port (default: 8080)
	-c crop area in the captured window as X,Y,W,H. E.g.: -c 200,300,640,480
	-i enable/disable remote input. E.g. -i 0 (default: 1)

Use "desktop" as the window name to capture the whole Desktop. Use "cursor"
to capture the window at the current cursor position.

Example:
jsmpeg-vnc.exe -b 2000 -s 640x480 -f 30 -p 9006 "Quake 3: Arena"

To enable mouse lock in the browser (useful for games that require relative
mouse movements, not absolute ones), append "?mouselock" at the target URL
i.e: http://<server-ip>:8080/?mouselock

For sharing the whole Desktop, Windows' Aero theme should be disabled as it slows down screen capture significantly. When serving a single window (e.g. games), Aero only has a marginal performance impact and can be left enabled.

Capturing and encoding 1920x1080 video narrowly amounts to 60fps on my system and occupies a whole CPU core. Capturing smaller windows significantly speeds up the process. Depending on your Wifi network quality you may also want to dial down the bitrate for large video sizes.

If Windows complains about a missing MSVCR100.dll, install the Microsoft Visual C++ 2010 Redistributable Package.

Technology & License

This App uses ffmpeg for encoding, libwebsockets for the WebSocket server and jsmpeg for decoding in the browser. Note that the jsmpeg version in this repository has been modified to get rid of an extra frame of latency. The server sends each frame with a custom header, so the resulting WebSocket stream is not a valid MPEG video anymore.

The client application (the thing that runs in the browser) is very rudimentary. In particular, the mobile version has some quirks with mouse input and only has touch buttons for the arrow keys, ESC and Enter, though this can be easily extended.

jsmpeg-vnc is published under the GPLv3 License.

If you require my code under a different license, or need some consulting work regarding jsmpeg/jsmpeg-vnc, get in touch: [email protected]

More Repositories

1

qoi

The “Quite OK Image Format” for fast, lossless image compression
C
6,657
star
2

jsmpeg

MPEG1 Video Decoder in JavaScript
JavaScript
6,222
star
3

Ejecta

A Fast, Open Source JavaScript, Canvas & Audio Implementation for iOS
Objective-C
2,795
star
4

wipeout-rewrite

C
2,449
star
5

Impact

HTML5 Game Engine
JavaScript
1,916
star
6

q1k3

A tiny FPS for js13k
JavaScript
1,471
star
7

underrun

Twin stick shooter game in 13kb of JavaScript/WebGL
JavaScript
1,075
star
8

pl_mpeg

Single file C library for decoding MPEG1 Video and MP2 Audio
C
695
star
9

JavaScriptCore-iOS

Apple's JavaScript Engine, with modified project files for iOS
C++
685
star
10

qoa

The “Quite OK Audio Format” for fast, lossy audio compression
C
641
star
11

wipeout

WipEout (PSX) Model Viewer in WebGL/Three.js
JavaScript
520
star
12

voidcall

Real time strategy game in 13kb of JavaScript/WebGL
JavaScript
365
star
13

WebGLImageFilter

Fast image filters for Browsers with WebGL support
JavaScript
322
star
14

js-hqx

hqx Pixel Art Scaling Algorithm in JavaScript
JavaScript
187
star
15

TwoPointFive

3D View Plugin for the Impact HTML5 Game Engine
JavaScript
140
star
16

Quakespasm-Rift

Quake for Oculus Rift
C
138
star
17

Asaph

A micro-blogging system, focusing on collecting links and images
PHP
97
star
18

ttt

Tiny Texture Tumbler – A JS library and an editor to create textures
HTML
78
star
19

pagenode

Pagenode – No Bullshit Content Management
PHP
68
star
20

OculusWeb

A fast and lean HTTP/WebSocket Oculus Rift Tracking Server for Windows and Mac
C
57
star
21

impact-box2d

Box2D Plugin for the Impact Game Engine
JavaScript
51
star
22

JS360

A NET framework for JavaScript on the XBox with XNA.
C#
48
star
23

json-format

JSON Pretty Printer for JavaScript
JavaScript
38
star
24

picturelicious

Social Imaging Platform
PHP
36
star
25

impact-splash-loader

A loading screen for Impact that shows the Impact logo
JavaScript
34
star
26

rectpack

Super Simple Rectangle Packing for JS
JavaScript
13
star
27

arduboy-games

My Arduboy Mini Games
C
12
star
28

jQuery-JSH

Tiny jQuery Plugin for JavaScript SyntaxHighlighting
11
star
29

pagenode-legacy

Older version of Pagenode with a complete admin interface
PHP
2
star