Giter Club home page Giter Club logo

Comments (6)

waveform80 avatar waveform80 commented on June 4, 2024

It'll need a little more than that, but not much since it's just using TCP for everything. Firstly you'll need to forward two ports: 8082 for the HTTP connection, and 8084 for the WS connection. Secondly you'll need to tweak the code a bit so that the URL for the WS connection points to the router's external IP rather than the Pi's address...

If you look at index.html you'll see ws://${ADDRESS}/ somewhere in there. That's the URL for the video stream. ADDRESS is substituted in do_GET (in server.py) for the socket's own address (see getsockname). But that'll be internal to the LAN the Pi is on. You could simply hard-code that as your external address (or hostname - it doesn't have to be an IP), or you could do something a bit more nuanced to try and calculate your external address (e.g. Google "what's my IP?").

Anyway, I think that should be enough to get it working over the internet. As to how secure the code is ... no idea. I haven't put any thought into security on this; nothing's encrypted, there's no authentication, and the error checking is minimal.

from pistreaming.

creepandpeep avatar creepandpeep commented on June 4, 2024

from pistreaming.

creepandpeep avatar creepandpeep commented on June 4, 2024

That's done it, replacing the address variable with hardcoded domain name and ports forwarded. got a friend to test remotely and the quality/speed is apparently fantastic.

Thanks again!

from pistreaming.

waveform80 avatar waveform80 commented on June 4, 2024

Great stuff! Glad to see it's a simple as I thought. Don't know about the quality being great - this is only MPEG1 - but it's good enough for a demo.

The display-o-tron is something I need to have a play with (had one sitting in a drawer for a while). However, I did throw something together for pimoroni's pantilthat recently (if you've got one, checkout the pantilthat branch on this repo :). Anyway, have fun!

from pistreaming.

creepandpeep avatar creepandpeep commented on June 4, 2024

well, 640x480 picture was apparently very smooth and very fast - speaking with a friend on the phone and my lips were syncd to my voice. I realise this is only one person connecting in, but over a home broadband connection which I later realised was also uploading a huge file via torrent at the same time, it was fantastic.

from pistreaming.

creepandpeep avatar creepandpeep commented on June 4, 2024
  • and you should definitely play with the displayotron, it's great! Accidentally ordered 2, ended up buying another pi to use them both at the same time :)

from pistreaming.

Related Issues (20)

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.