Looking for a way to broadcast live video streams. Is it possible with Django ?

2,229 views
Skip to first unread message

Jeremy Hermelin

unread,
Jan 27, 2015, 9:05:24 AM1/27/15
to django...@googlegroups.com
Hi everybody, 

I'm quite new in Django community. I've just learn the basics of the framework, and now that I know how to create a "blog-style" website, I'm wondering how to integrate video streams in my project. Do you have some advices about that ? Any existing app ? 

What I am looking for precisely : 
- Capturing video stream from a client's webcam (Maybe the easier will be using a script)
- Sending the stream to the server and then to hundreds of clients connected to this session. 

In fact, it's really close to Google Hangout. 

As I said, I'm new in Django, and also in Python, then I'm sorry if the answer is obvious. I've made some research on djangopackages but haven't find anything. 


Have an awesome and fantastic day, 

Jeremy

By the way : Wooohhh Django is so easy and powerful at the same time ! 

Russell Keith-Magee

unread,
Jan 27, 2015, 8:08:28 PM1/27/15
to Django Users
Hi Jeremy,

What you're trying to tackle here is fairly complex - and for the most part, won't have anything to do with Django. The capability of capturing webcam video and sending it will be almost entirely "client side" - which means that the logic will reside in the browser, and will be implemented in Javascript. 

The only involvement Django will have will be:
1) Sending the initial content to the user 
2) Receiving video content, if it's going to be archived.

If you're looking to do Hangout-like stuff, you're going to be using the WebRTC extensions that are available in *some* browsers - the best resources I can point you at are:


But even then - the specification isn't widespread. Safari, for example, doesn't support WebRTC, and neither does IE. That doesn't mean you can't do hangout in Safari or IE - clearly you can - but it means the interface isn't going to be easy, either.

Yours,
Russ Magee %-)


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cb8c96bf-854f-4ed5-a803-6cd943c767df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cal Leeming

unread,
Jan 27, 2015, 8:24:55 PM1/27/15
to django...@googlegroups.com
This really isn't something Django can do out of the box, but if
you're looking to get simple video streams integrated into your site,
then perhaps consider using LiveStream embed instead?

If you're looking to create your own service, then unless you are a
skilled programmer with experience in multiple languages/frameworks
then you're gonna find this extremely difficult, as you have a ton of
other components which would need to be included and a variety of
technical challenges to overcome.

Previously I worked on a similar project which used Flash fallback for
encoding when WebRTC wasn't available, there are all sorts of weird
edge cases due to browser bugs, including 100% CPU bugs when encoding
streams above 720p in Chrome (which has been outstanding for 2 years).
For flash fallback, you also have to implement IPC between Flash and
JS because you would only want to offload rendering and RTMP to flash,
not the entire interface. I might consider open sourcing this part of
the code if there is interest for it.

Then you have to consider the backend, handling video streams is an
absolute pita and most streaming solutions have poor performance or
leak memory. There are some out of the box streaming servers such as
Wowza, or the awful FMS (stay away from this, seriously), then you
also have to consider bandwidth usage, distributing load, handling
spikes, preventing DoS, mitigating DDoS.. You could look at using
Zencoder live transcode but this isn't cheap by any means (and for
good reason).

If you're looking for a fantastic learning experience, then try
building your own. If you're looking to just get something working,
use LiveStream embed :)

Hope this helps

Cal

Jeremy Hermelin

unread,
Jan 28, 2015, 1:32:48 AM1/28/15
to django...@googlegroups.com

Thank you Russ and Cal for your answers. 

I'll take a look at WebRTC that seems to be a revolution in that domain, and it's a matter of time before it will spread to Safari or IE. 

Adam

unread,
Jun 4, 2016, 8:07:11 PM6/4/16
to Django users


On Tuesday, January 27, 2015 at 10:32:48 PM UTC-8, Jeremy Hermelin wrote:

Thank you Russ and Cal for your answers. 

I'll take a look at WebRTC that seems to be a revolution in that domain, and it's a matter of time before it will spread to Safari or IE. 

Thanks also,

Does anyone have an opinion on big blue button? or a similar lms solution to this issue?

Adam
Reply all
Reply to author
Forward
0 new messages