Play GTA V In Your Browser – Sort Of
Inspired by a blog post to run your own cloud gaming service which uses a VPN and Steam's In-Home Streaming, I thought I could do this, too, but in the browser.
With the tech I developed for Instant Webcam I had all the major building blocks ready and just needed to glue them together in nice, useable Windows App.
The result is jsmpeg-vnc – a tiny Windows application written in C. It captures the screen at 60 frames per second, encodes it into MPEG1 using FFmpeg, sends it over WebSockets to the browser where it is finally decoded again in JavaScript using jsmpeg. All the mouse and keyboard input in the browser is captured as well and sent back to the server again.
This works way better than it should. Latency is minimal and only affected by the network conditions. It's certainly good enough to play most types of games.
Update: I did some latency measurement now. For my system it hovers around 50-70ms (video, photo). Tested with an 800x600 window at ~7% CPU utilization on a Core i5. My desktop monitor is a Dell U2711, which seems to add about 15ms latency itself.
Full source code and binary releases are on github: jsmpeg-vnc
71 Comments:
WOW!!!
Wicked cool, man!
This is cool! Is there a possibility to run this on linux?
@Tom: the source is mostly straight C code. Only the part that grabs the raw pixel data from a window is Windows specific, so porting it to another OS shouldn't be all to difficult.
This is cool!!!
Whoa, that's sick!
Nice one.
(offtopic) Is that Anna Fisher on the wallpaper?
"Latency is minimal"... can we get numbers for the geeks among us?
Awesome!!
This is fantastic. If somebody could port this to Linux, I'd be a very happy man!
thats cool
This game is cool to play. I played it a million of times. so wanna keep playing it.
Incredible!
G-R-E-A-T !!!!!!!!!!!!
this can enable not only games, but apps too
haha very nice! your video skills need some major ramp up but oh my goodness this is so cool! :)
This is Sick
Awesome! It seems like you're running it locally so that's probably why the latency is so low
Im getting only 19 fps on wifi network. How to fix that issue
The most impressive part is how this guy manages to play a racing game on his iPhone!
Awesome stuff!!
[394281:4204] ERR: Unable to open 'client/index.html i get this error
i'm getting a black screen, what am i doing wrong?
jsmpeg-vnc.exe -s 800x600 -p 8181 cursor
firefox > 192.168.0.142:8181/
(unblocked in windows firewall)
how can i make this work for me
#22 it should start out black while the server works to gather up your video. This will last a few seconds (at least it does for me). You should eventually see what you're looking for.
#23 you may need to be more specific. the instructions on github are very simple and straightforward.
Hi,
i've got error at broswer cannot click mouse while gaming, i'm playing warcraft frozen thrones. this is the error :
Uncaught InvalidStateError: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.sendMouse @ jsmpg-vnc.js:99(anonymous function) @ jsmpg-vnc.js:109
I am really impressed! I think, you are "underpaid" 8-)
i tested "Dungeon Keeper (FX)" on my iPad Air.
- 800x600
Everything was fine!! *cheers*
One Point: Source (game) Sound-streaming possible?
Greets from Germany
M
[69776:2525] ERR : Unable to open 'client/index.html's')
Can anyone help with this..
Hey Micha kannst du mir vielleicht helfen? ich kenne mich damit zwar nicht aus aber habe auch ein ipad air und würde das gerne mal versuchen ;D
Can I stream fullscreen games?
Wow this is going to be popular, im sure of it
ERR : Unable to open 'client/index.html
Help ?
The 'Unable to open 'client/index.html' error happens when the jsmpeg-vnc.exe can't find "client/" folder and or contents. Most likely your current working directory in the Dos prompt is not the same as the directory where the .exe is in.
Simply navigate to the jsmpeg-vnc directory first (using 'cd <path>'), before executing the .exe.
@ #28 – pierre –
Hi! Klar! Hast du iMessage am iPad angeschaltet?
You're a god! Seriously!
Someone please help me I'm not getting compile who have step by step help me
no playable on ps vita, but works
Help!!! I don't know C code. Somebody help me how to use this. Thanks!
Awesome man
Fantastic man! I'll try it now!
Is this possible on a Mac?
Someone can play there?????????
If you download only binaries you cannot use. You receive HTPP 404. You also need to add client directory from github
Please if I could really play tell me cause I want I so bad thanks
i dont know much about computers so could someone help with playing it in browser
How do you open the game ? Let's say I wanted to play DotA. What do I type ?
One thing to note is that this is merely over a local network. The latency would be much more significant if used remotely.
how to install this binaries ?
Is there any way you could explain this that someone who knows nothing about coding would understand how to set it up and play
How can i Play?
If it is in C mainly, I believe, that it can't be hard to port it everywhere :) I'm gonna give it a shot with OSX and Linux.
amazing! someone port to linux pliz !!!
i only get 10-15 fps on gigabit wired network, i7, 16GB ram, WIN10
Cpu only work at 20% i dont understand.
I get 5-6sec of latency :(
whole desktop works for me, even windows folders are working.
Minecraft shows always only first frame and Return to Castle Wolfenstein only grey screen. Mouse works, but no picture :( any suggestions?
Haven't done nothing.....
where can I get JSMPEG exe file??
Hi giv me da download link plz
Any chance this could be modified so that the client can run headless (accepts an incoming stream without having to touch the PC)?
Or could you at lest tell me the ffmpeg stream settings you are using?
(couldn't find any examples for mpeg1)
For example I can use FFMPEG to stream mpegts on udp to a particular address and port and the client just has VLC open listening to UDP on the given port...this way I can have the client always on and it starts displaying once the stream arrives and the buffer fills...I can tweak the lag down to about 1.5s with mpeg2, but that's still quite a lot...
I'm trying to come up with a way for office people being able to share their desktop on a headless public terminal with a big TV, but can't use TeamViewer or VNC (security policy)...
haista vittu
gta v
were is the game
Soares
wow is this really happening.
can l play gta 5 in pc i want to use it
hahaha very nice
Why vnc keyword in project name(jsmpeg-vnc)? Does it use VNC protocol? Is it running VNC server implementation?
this is awsome
jsmpeg-unc.exe -s 1920x1000 desktop_
any possibility to replace mpg1 by Mp4 or even
put any kind of protocol like rtmp rtmfp?
What is the website to play the game?
this game is so awesome
0669932836