4

I've been looking at a million resources and I can't find a definitive answer to this.

I'm looking to do a small scale (max 50 viewers possibly), low quality live video stream, with nothing but my existing equipment (mac and firewire camera), a low end ubuntu vps and free software. Stream from the mac and host the stream on a website on the vps.

I don't want to use services like justin.tv or ustream because the advertising is very intrusive, and I'd also like to learn how to do it myself. I have some server admin skills, but this is a new world to me, and I can't make sense of how all the pieces fit together. I spent all night reading about rtmp, rec5, wowza, ffmpeg and now i don't understand anything at all.

Can someone give me possible workflows to piece the 3 parts together?ie, streaming from local computer, receiving in vps, broadcasting on website.

1
  • If you can use .net and wouldnt mind rtsp then check out net7mma.codeplex.com
    – Jay
    Sep 22, 2014 at 15:37

3 Answers 3

3

It varies a little from one server to another, but the basic components are an encoder/streaming client on the local client that takes input from the camera and turns it in to a stream that can be sent to the stream server on the VPS.

The job of the stream server (such as Red5) is then to provide a publishing point that relays the stream to viewers. The streaming server can either pull from the client or the client can push to a target location on the stream server in order to provide content to the publishing point.

Each viewer then connects to the published RTMP stream on the streaming server and is provided with a copy of the stream that is being uploaded. Note that every copy has to be sent out separately unless you are on a private network where you can use multicast, so bandwidth needs rise quickly, though it should be possible to do 50 SD or lower quality streams from a single VPS provided it has a reliable 100Mbps connection.

The website simply contains a viewer that hooks up to the RTMP (or similar) stream and is actually operating client side, not server side.

So to quickly recap, client uploads to back end of streaming server, streaming server replicates out to every viewer requesting to watch it and the web server simply gives users a client side viewer that connects to the video stream.

To briefly hit on what each one of the component you mentioned.

  • RTMP is real time media protocol, which is a common streaming protocol used for actually relaying the video stream content.
  • Red5 is a fairly popular free streaming media server software used for replicating out RTMP and similar media streams to clients.
  • Wowza is another streaming media server software, however it is a commercial, paid software product. If you are limited to free software, Wowza is not an option.
  • FFMpeg is a popular open source video encoder. It runs on the client and can be configured to publish a stream that can be sent to Red5 or similar streaming media server.

Additionally, you will need an end-point viewer capable of consuming the stream. Software like Windows Media Player or Quicktime should be able to view a stream, but it is often best to include an embedded cross platform player in the website that people are going to for the stream. There are many options for this component with different strengths and weaknesses, but any should work for your purposes.

2

There's another free, more lightweight alternative to wowza and red5 - the nginx-rtmp-module, which frees you from messing around with java

https://github.com/arut/nginx-rtmp-module/

and here's a guide to set it up with the free Open Broadcaster Software (which unfortunately is windows only) https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/

For the streaming user end, the only decent free solution I've found for OSX is Adobe Flash Media Live Encoder.

So, a free and relatively lightweight pipeline for streaming from osx would be

Camtwist and Soundflower for capturing

Adobe Flash Media Live Encoder for streaming RTMP to the vps (or Open Broadcaster Software on windows)

An ubuntu vps running nginx with the nginx-rtmp-module (needs to be built from source)

Embed the stream on a website with something like JWPlayer

0
0

In addition to the mentioned Red5 and Wowza, there have been new protocols and media servers introduced in the past decade. For example, SRT/RIST is widely used in streaming and broadcasting, WebRTC/WHIP has replaced Flash for web streaming, and new codecs like H.265 and AV1 are becoming more popular. The new media server SRS supports these protocols well and works well with clients.

Streaming servers need to support various streaming protocols, such as RTMP, SRT, HLS, HTTP-FLV, WebRTC, DASH, etc. They also need to support protocol conversion, like converting RTMP to HLS or WebRTC, and WebRTC to RTMP or HLS. This is because, during streaming, OBS might use RTMP or SRT, or a web page might use WebRTC, while viewers may require HLS or WebRTC. Modern streaming servers have the capability to perform these protocol conversions.

In fact, streaming solutions not only include media servers like SRS and clients like FFmpeg, OBS, and WebRTC, but also essential features such as authentication, recording, re-streaming, and transcoding. These features require a combination of multiple open-source projects, working together with servers and clients. SRS Stack is designed to address this issue.

SRS Stack is a more suitable solution for you, which can be deployed on a VPS or started directly using Docker. You can refer to the following documentation:

Streaming solutions need to support specific business scenarios. We welcome your feedback to continuously improve SRS Stack.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.