Using Python to stream media using GStreamer for WebRTC and RTSP applications
Part of the Our Connected Universe specialist track
Being able to capture, manipulate and present video and audio has become much more common and useful over the last few years. For example, the use of the WebRTC standard for teleconferencing and also applying Machine Learning for perceiving situations in the physical world, often using RTSP (network) cameras.
This presentation will aim to bring you up-to-speed quickly with using Python programmatically to build GStreamer pipelines for use with both RTSP and WebRTC applications.
See this talk and many more by getting your ticket to PyCon AU now!
I want a ticket!The popular GStreamer open-source multimedia framework has existed since 2001, supporting a range of programming languages, most notably C++ and Python. Whilst there is now substantial documentation and tutorials on-line, it can still be challenging to overcome the initial learning curve to build a substantial Python application, something more than just a limited plaything.
Multimedia is a complex domain due to the sheer number of audio / video standards and supporting libraries. GStreamer provides a sophisticated framework and a vast collection of plugins that act as sources, filters and sinks for various media formats. It can be hard to know where to start.
Fortunately, by focusing on two popular use-cases, RTSP (network) cameras and WebRTC for teleconferencing, this reduces the choices down to something more manageable. In both cases, the video format can be H.264 (aka MPEG-4 AVC).
RTSP (network) cameras typically offer a video stream, usually as an RTSP server ... and in most cases they are relatively simple to work with. Whereas WebRTC deals with all the challenges of securely delivering low-latency video, audio and data (typically chat) channels, between multiple peers (people using web browsers) and navigating through their firewalls.
This presentation aims to familiarize attendees with an overview of RTSP and WebRTC and how they are supported by GStreamer. Then, dive into how to build GStreamer pipelines for each use-case ... covering the plugins for data sources, media encoding / decoding and most importantly integration into Python applications to capture and produce images. Finally, demonstrating a Python development set-up for working with WebRTC applications.
Andy started hacking as a teenager when microprocessors were first available and you had to build your own personal computer. His career has included the spectrum of computing … from consumer electronics products to Cray supercomputers. Various projects have involved building automation, Internet of Things, establishing the Melbourne HackerSpace in 2009 and co-founding LIFX in 2012. Since the start of 2016, Andy has been developing distributed frameworks that combine real-time telemetry and video processing via Machine Learning (neural networks) for applications including robotics and drones.