How to protect my live streaming from other websites on nginx - stream

I have big problem with my live stream i have on nginix
I want to lock my .m3u8 from any website and only work in my domain only because many websites steal my live stream and it make huge load on my vps
please help me my live stream stopped every time because hi load and other websites eat my bandwidth too
Thanks

Related

Streaming live desktop video to a web application

I'm looking to find a way to stream a user's desktop LIVE (through some piece of software, such as Open Broadcaster Software) to a web application.
I'm assuming I should use a CDN to get the live streamed video to my web application, but how (and what software should I use) to get the user's desktop to a streaming service? Should I use a service such as Red5 or an AWS service? Or if only a few viewers are using it, should I host the service myself?
Although I have built my share of web applications, I have never dealt with live media streaming before, and I would appreciate any assistance anyone could lend.
By far the best resource for video on Rails is OpenTok
Our own demo here: http://bvc-video.herokuapp.com/broadcasts/1
--
Streaming
Video streaming is a tough one
The problem is really dependent on what you're trying to stream. If it's "live" video - I.E captured & sent directly to the viewers, you'll have to use some sort of server to process the video.
Although I don't have huge experience with this, the main issue we've found is the compression / distribution of the feed. It's actually very simple to acheive video streaming on iOS - all the software / hardware is the same (just use the same API / drivers)
This often negates the requirement for a central server, although it's highly recommended (almost required) for many cases. Problems arise when you try and beam to multiple clients on multiple systems; as you'll run into compatibility issues
--
Solutions
The solutions we've found are thus:
The most stable part of the app is to take the stream & send to a server
The wizardry will then be to beam that stream to multiple clients
The way to do this is typically to use a flash widget & pull the stream from the server
WebRTC is becoming the standard (OpenTok is built on this)
I'm not sure about video compression / distribution. Akami is an industry heavyweight, but I've never used it. Brightcove too

How to stress-test HTTP Live Streaming

We built an youtube-like Rails application that serves videos using HTTP Live Streaming which are hosted on our company's S3-like (actually Ceph Object Gateway S3 API) cloud service.
It's the first public application on that storage service and we would like to know how much concurrent viewers it can handle beforehand.
We know that the network connection (10Gbps) will become the bottle neck at a certain stage, but we have no idea how much load the actual storage cloud service is able to handle.
How would you stress-test the HTTP Live Streaming?
Is something similar to this (UDP) suggestion an option in this (TCP) case?
You can use either a JMeter SAAS or cloud servers to overcome the network issue, and for JMeter you can use this commercial plugin which simulates realistically the Players behaviour and give useful metrics:
http://www.ubik-ingenierie.com/blog/easy-and-realistic-load-testing-of-http-live-stream-hls-with-apache-jmeter/
Metrics provided by plugin are:
Buffer fill time (time it took to start playin)
Lag Time (How many seconds play paused)
Lag Ratio (waiting time over watching time)
Disclaimer : We are behind the development of this solution
If you're testing HTTP streams you might be able to test it using JMeter though you'd probably need a hosted JMeter solution to create enough traffic.
I'm not sure if you'd be able to get any helpful response time info, but you would at least be able to easily create and ramp up the load.
Let me know if you need help with the JMeter side.

firewall-related problems when using YouTube iframe API

I built an educational web-based game that relies heavily on YouTube-hosted videos played back through the YouTube iframe API which accesses this script file on YouTube's server:
https://www.youtube.com/iframe_api
I am running into two problems when running the game from within a higher-security environment such as is often found within school buildings:
1) In some school systems YouTube is blocked so the game fails at the point when the first movie tries to play. (Other than moving the movies totally off of YouTube and finding another playback mechanism, I don't know any way to resolve this except to try to convince the administrators to loosen the YouTube restrictions on the network.)
2) Even when the global YouTube block is removed from the firewall, in some cases the game is behaving as if the above script file is totally missing. My theory is that some of the firewalls are also configured to block cross-site scripting.
Has anyone experienced one or both of these problems, and if so, how were you able to resolve? In dealing with #2, would it be possible (or even advisable) to pull the JS code from the youtube location and make a local server copy to avoid the presumed cross-site script blocking?
Any help or advice would be much appreciated!
It is fine to host the code for the api locally but that wouldn't solve the problem of the videos being blocked since they too reside on youtube.com.
If loading videos from YouTube is part of the game then you need to communicate that having access to YouTube is a requirement to play it. I don't think there is another option.

How to convert RTSP streaming to Http Live Streaming using lighttpd?

I'm having a problem here. I want to play RSTP streaming on ipad and iphone. but I find out that it will be much more easier if I use Http Live Streaming. I want to convert my RTSP streaming to Http live streaming using lighttpd. but I really have no idea how to do that. Do lighttpd accetp rtsp streaming url as input? Can anyone help? thanks!
you have two choices:
1) Run a server on your network that re-streams rtsp as hls.
a) wowza - popular, expensive
b) live 555 - free, lots of work
d) ffserver - free and as basic as it gets tons of work to make work.
Advantage :
No bandwidth restrictions over cellular or wi-fi
play with native apple players
Disadvantage
High server bandwidth - if your paying for server time you may want to watch this.
high letancy - forget any kind of live video.
2) Run FFmpeg based player on device
advantages :
a) A lot easier than it used to be, we do this all the time
b) deal with lgpl license, clear guidelines at ffmpeg.org and not a huge hassle
c) all on device, no server load issues.
Disadvantages
Limited bandwidth over celluar (about 10 min intervals), unlimited over wifi
lighttpd doesn't accept RTSP as an input. You will need some sort of translator program to read the rtsp stream and output the files to the website storage. I think you could do it with the avconv/ffmpeg program.

Fake video streaming

I am building an iOS App which displays video streams from a somewhat complex backend. Now while developing I want to be able to have some sort of test video stream, which I can use. Ideally this would also work without internet connection.
The video stream could show for example the current time or just a simple animation. What would be a good way of doing this on a Mac without having to install a whole suite of tools.
On you Mac you can setup a webserver or streaming server to provide you with a constant video stream for testing purposes. You won't need Internet access. You will, of course, need to ensure that the OSX firewall is either disabled or allows requests to the ports (80, most likely).
Two simple approaches I can see:
Wowza MPEG-TS stream of the Webcam on your mac
Install Wowza Media Server; developer license is free
Configure a basic applicaiton with MPEG-TS streaming
Use an encoding applicaiton, like Flash Media Live Encoder (free), Wirecast (demo version free), or some other software and start streaming from your webcam to the WMS
alternatively, with a bit more effort, you could setup Wowza to stream a file in a loop
be sure to get the codec settings correct
M3U8+MPEG-TS static files over plain HTTP
Simple Setup a basic webserver (lighttpd, Apache httpd, Apache Tomcat, whatever) to server static files
Whip up an M3U8 file to first point to a .ts media file, and then secondly back to itself
Have a look at MPEG-TS/M3U8 live stuff to work out the details. You'll need a properly segmented video file to start with.

Resources