Giter Club home page Giter Club logo

streamer-ds's Introduction

streamer-ds

Capturing desktop and streaming it to NDS

128px streaming 256px streaming

Dependencies

Usage

  • create hotspot on your laptop
  • run .nds file on your NDS
  • connect to your hotspot on your NDS via the .nds file
  • run the python script: desktop_client.py

How it works

  • NDS opens port 8080, python script connects PC to it, then:
    • python makes screenshot,
    • resizes it to 256px or 128px (depends how smooth transmition you want - 256px takes ~ 0.6s on frame, 128px - ~0.3s)
    • calls grit to make a 16 bit, lz77 compressed raw binary version
    • sends image size to the NDS
    • sends image
    • receives ACK character from NDS
    • repeat

How to make WIFI hotspot that NDS can connect (it's not that obvious):

  • in Ubuntu open "Network Connections" and click "add new"
  • go to the "Wi-Fi security" - NDS supports only WEP security (so remember, it's dangerous to beacon that poorly secured network all the time, use this hotspot only when playing with your NDS) - select "WEP 40/128 bit key (Hex or ASCII)"
  • select some random 5 character (only digits) password
  • in "Wi-Fi" tab select "Mode" to "Hotspot"
  • save it
  • open "Network"
  • click "Connect to to a hidden network"
  • select network that you've just created (by default its name will be "hotspot")
  • you're done, if you were previously connected with another network via wifi you'll be disconnected
  • now you can connect to this network through your NDS

Performance:

Well... as it's only sending lz77 compressed bitmaps through the network, you won't be suprised that for a 2004 portable console that much of bytes will be a shock therapy. On average it's somewhere between 10-20 kB per 256px frame and 5-10 per 128px frame. Every frame must be decompressed on NDS (it has a dedicated hardware for that so it's not that bad in this task) and that's the thing that takes most of the time (around 2/3 of frame time). I tried sending non-compressed bitmaps but it took around 80kB per each and it took even more time (this time the WiFi capabilities of the NDS were the bottleneck).

Click to see details Efficiency

Click to see details Efficiency

FAQ

  • Can I control my desktop through this app?
    • You could do it, I even created one version that you can access on this video:
    • https://www.youtube.com/watch?v=WR8Y4Iro9t0
    • ...but it's almost no use because I can't utilize multiple threads on NDS so capturing input will occure every frame - that means it will happen every ~0.3 second - so it's basically garbage.
    • If you're interested only in capturing key input (without the video part), I created another program:
    • https://github.com/dbeef/pc-controller-ds

GBAtemp thread

streamer-ds's People

Contributors

dbeef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

edo0xff

streamer-ds's Issues

import PIL: module doesn't exist

Checked up on this, turns out pillow was discontinued some time ago and it looks like the thing is broken with the newer python versions

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.