JojoL
JojoL

Reputation: 141

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.

Upvotes: 2

Views: 1295

Answers (1)

Andrew Gorcester
Andrew Gorcester

Reputation: 19973

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).

Upvotes: 1

Related Questions