Not sure if this is the right place to ask this question (pretty technical), but I thought I'd start here.

I'm interested in building a website that will have a streaming-video feature. It's not quite live video, because the videos will only be available after they have been reviewed. However, I would like the videos to be viewable on demand (ie, I don't want there to be a waiting period for them to be uploaded and encoded, like Youtube).

Basically, I'm wondering how to live-stream video directly to a server, so that it is being encoded on the fly, and can be watched as soon as the stream ends.

Thanks for your help!

  • If you can run the python app youtube-dl you can capture on the fly. You'd just need a way to tell it to end and name it something meaningful. Oct 15, 2015 at 20:15

5 Answers 5


If you’re up for building your own server, and have some coding skill, then you could look at setting up a nginx server running the RTMP extension that can capture an re-stream live or on demand video. It can also do near realtime transcoding or "at completion of capture" transcoding using ffmpeg.

For the system I setup, I send live video in using an IP based camera system from multiple sources that can do RTMP streaming, or if I want to capture desktop content like a video game I use OBS to do the streaming to the server.enter image description here

The actually user website itself runs from a node.js based system that has access to the content recorded by the nginx rtmp capture.


You could look at a pre-build solution like Kaltura which has both a open-source community version and a commercial version. Think of it as your own YouTube server setup that has a tone of features ready to go out-of-the-box. enter image description here


Why would you need the videos to be available instantly if they are going to be reviewed before making them publicly available anyway?

Reducing the encoding time comes down to server performance, which in turn comes down to money. Youtube has very much money, and still the server-side encoding of uploaded videos takes some time. I'm pretty sure they've done anything they can to reduce the waiting time as much as possible; I don't think you can do more with limited ressources and time. The only solution I see is to not reencode uploaded videos, which will get rid of that issue alltogether. However, this opens up another set of issues related to compatibility with various devices, high bandwidth usage on the visitor's side and problably security problems as well.

You can have a look at the streaming services provided by Twitch (which sadly still uses flash) and Youtube Live Events; both are very sophisticated systems, so I suggest using one of those instead of trying to build your own solution.


There are video services such as LiveStream and Ustream that provide such functionality. It comes at a cost, but their fees are nothing compared to the cost of building a video distribution capability that scales beyond a few friends and immediate family.

  • 1
    YouTube is better and it's free. We've recently left those other platforms and we couldn't be happier. May 11, 2016 at 15:06

Technically, you could map a network drive from whatever server you're talking about to your local machine, and then use something like a blackmagic h264 prorecorder to live encode a file to that folder. It'll be a completed mp4 when you press stop, and ready to view instantly.

But that's the easy part... What will your website look like? How will it function? Will you have automated routines to make them private for review then public after review? Will people have to login to review? There's a million questions on the website front end that are very difficult to engineer. That's why people have suggested to use other services that are very mature and have cost billions to put together.

Getting the video to the server in real time is super easy, it's the rest that's hard.


Why don't you stream to YouTube? That's free. Make your stream/"event" private. Then it's ready instantly once the "event" ends because there is no waiting period. Then serve that embedded player on your website. This is very flexible and free (less camera and computer expense). No reason to build your own sever ... Maybe eventually, but the YouTube service will do a great job in the meantime.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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