Comments (6)
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.
from pistreaming.
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.
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.
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.
- 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)
- Syntax Error
- Audio Enhancement Suggestion !!! HOT 2
- IPv6 support missing?
- Taking stills HOT 3
- git clone fails with gnutls_handshake() failed error in the push function HOT 1
- Rasbian Buster
- python3-ws4py The following packages have unmet dependencies: python3-ws4py : Depends: python3:any (>= 3.3.2-2~) HOT 1
- [Question] How "low latency" HOT 2
- after Exit via Ctrl+C, Start fail again.
- BrokenPipeError After Refreshing Web Page
- Trying to get working on a public website
- Getting error in Raspberry pi zero w
- hello! ctr+C Stopping recording .Is there another way to stop recording?thank you!
- Change of resolution produces script failure
- Segmentation fault HOT 1
- What is the version of `jsmpg.js` in the repo? HOT 1
- Autostart at reboot HOT 3
- How do I save a video to my hard drive
- Script does not fully close on CTRL-C
- Webpage cannot be reached HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pistreaming.