Stream videos from Django application - django

I have a Django application which generates video chunks to a folder in the server's filesystem. I need to stream those chunks as they are generated so that the users can see the output of the application as a single video in their browser.
I have not been able to find a solution in the right direction to accomplish this. Any ideas??

Use a dedicated streaming server
Flash Media Server (propritary, $ to $$$)
Wowza Media Server (propriatary, $)
Red5 (open source)
numerous other esoteric, defunct, or little known but viable servers
Personally and professionally, I'm a big fan of Wowza. Solid, good value for the cost.

Something other than Django. Django is not optimized to serve static resources at all, let alone video. You need an actual media server for best performance.

We have both Flash Media Server and Wowza options that are flexible, with great hand-holding support. IMO this sounds like a job for FMS, which we've been doing for about 10 years.
I would love to find out more :)
Wesley
-Influxis

Related

Record live streaming video with WebRTC and stream with AWS

I'm trying to develop a website that basically lets a user visit a page, and lets say click a button, and use their built in camera to live stream videos with audio to others that visit another url.
I need some clarity on what I need to develop, what I can get from 3rd party to save time. AWS looks to cover all the encoding and delivery http://aws.amazon.com/cloudfront/streaming/, but I'm confused on the process on which I should record and delivery the content to S3. Just to much information overload.
In all my research I looks like I should build a WebRTC, which I have done, then transport that data with javascript from the clients browser to my server, and thus to AWS. Is this the best format, or should I been using a 3rd party thats putting more time into that element?
I have seen the Kurento project, as well as this RecordRTC project.
Like I said, I'm finding there is just to much information overload on the topic.
So what are my options for:
In browser recording with WebRTC. Anything else I should do or just force users to roll up to a supporting browser?
WebRTC means I have to do Javascript for the delivery, is node a better option for the server to take delivery of this streaming data?
Anything else I need to know before I pass it off to S3 for delivery to the cloud front?
As you can see the core of my question comes within the recording and transporting the data to the web server so I can delivery it for streaming.
I am looking for the same thing.
In 2020, it seems it should be possible with RecordRTC and then uploading blobs / multiform data directly to S3.

On the fly Stream and transcode video with Django

I have a model that uses "models.FileField()", which I then display back to the user so they may click the link and have a file rendered in their browser. The user can upload various types of files.
Problem is, I'd like to handle large avi's differently, and have the file stream to the user.
The requirement I have is to simply stream/transcode video files from the media_root dir to an end user's browser, preferably in a mac friendly format. It would be for a couple users at most.
I've search and stumbled upon a few projects:
https://github.com/andrewebdev/django-video
https://github.com/rugginoso/django-transcodeandstream
As I am I a relatively newbie when it comes to django, I'm not sure how to incorporate their code into my proj.
Any thoughts, suggestions?
You can check Amazon Elastic Transcoder. It is a media transcoding in the cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or “transcode”) media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.
Or else you can check Webfaction, they have Video and image processing on their servers which you can use.
If you will use any of those, you can ask them about the installing process and how to integrate it in your project.
And one more thing, if you want to play the video on the browser, you will need a video player like jwplayer.
Hope this will help you get started! Best wishes!

How to stream video in a django app

I'm looking to stream video's as part of a django app, but I've never done anything with video and don't really know where to start. I don't have all the details of the project yet, but I'm expecting a fairly small library of videos uploaded by one or two people (Think less than 100 videos of about 5 mins length).
I'm looking for a solution that allows users to upload videos using django admin. I want to reach the majority of desktop browsers (95%+), and obviously I want to keep my costs down. Saying that I do like the idea of using some sort of cloud based CDN (I've no idea if that's possible / appropriate for this size of project)
I really want to ask if anyone can point me int he right direction (tutorials / services / projects / code), but I realise that might not be specific enough.
So to be more specific -
Is it possible to stream video to browsers using just django and an apache web server?
What cloud hosting providers will support easy integration with a django app?
Will I need to convert the format of my video's before they're ready to stream?
Can I use Red5 with a cloud hosting solution.
I want to host the project on a Ubuntu server that I use to host a
couple of other (low traffic) django apps - would it be a mistake to install Red5
on a server with existing sites.
From recollection, the server has 12GB RAM and 4 cores (in a 1and1
uk datacentre). Will I have enough power / bandwidth to stream say 3-5 video's simultaneously? (assuming red5 / wowza).
I'm not interested in Flash because I was rooting for Apple. Do I
need to need to re-evaluate my prejudices to be free of my ignorance?
I never streamed videos using Django/Python, but I have some experience in the field of streaming video in frontend apps. I can certainly not answer all your questions. In my experience it does not really matter where the video is hosted, a CDN is fine if you want to distribute the video world-wide.
I personally think you should start with the question on how you want to play the video in the browser. Choose an appropriate video player (could be html5 video) and you have an idea of what is possible to play and what not.
3) The format matters depending on how you want to stream the video. Progressive download (e.g. mp4)? Live streaming (unprogressive, e.g. HLS)? You can find example videos online and test if your video player can play the videos on the platform you want to support.
7) As said, you need to check out which player to use in this case. HTML5 video is not widely supported enough yet in my opinion, but can play most formats in the most modern browsers (Chrome, Safari).
Hope that helps.

Webcam streaming with Django

I try to create a django app that uses webcam. I would like people to be able to broadcast with their webcam, while other people can watch and listen to them.
I don't know how to do that with Django. Do I have to use flash? Is there a module that would allow me to do that?
Any advice is really welcome. Thank you.
Django can display the page containing the webcam application (and display, for instance, a directory of ongoing broadcasts, a search mechanism, separate urls for separate broadcasts, user authentication, etc.), but the actual software that takes the video from the webcam and streams it is not technically part of Django.
Flash can handle webcam streaming, and is probably the easiest tool to use because of the quality and user-friendliness of the dev tools, but the use of Flash for new projects is strongly discouraged since the vendor (Adobe) is attempting to migrate users away from it. HTML 5 is at least theoretically the correct tool for this task, although it may be challenging to develop in because Flash is, despite being a 'dead' project, still much more frequently used. There are also other browser plugins such as Silverlight, although I don't believe they have much to recommend them over Flash and HTML 5 for most applications.
All of the above are only a solution for the client side of the equation -- you'll need some kind of server software to accept the streaming video content and stream it out to viewers. This is a fairly complex task, and is generally outside of the purview of Django (which is not to say that it's strictly impossible to bolt that functionality on to Django in some sense, but you won't be using any of the standard Django modules for it).

Working on a django site and wondering would it be wise to store my media on an nfs mounted partition?

First, I only have experience building small-medium sized websites with php so forgive me if this question seems asinine. I want to know if it is a common /accepted/wise practice to store media (user uploaded photos,videos,etc) in a mounted nfs share? I was just going to put all media in a /media folder like I always have done in php, but on a huge site, having 1 million+ images in one directory would seem... not the scalable way to proceed.
Am I at least on the right track with my NFS train of thought?
Cheers!
I think you are probably getting ahead of yourself. You can always migrate the media to a separate server later. I don't think NFS would necessarily be the way to go anyways. Better to just serve the media from another box directly. If you want to design this to be scalable in advance, think about using GridFS, perhaps. It's easy to work with from Python, and you could even use it as a storage backend for Django.