pythonvideostreamingliveipv6

Streaming audio and video with Python


I need to make an application which streams live multimedia. At present my application is taking image frames from a webcam (using OpenCV) and sending it to the client. It is also sending audio using pymedia module. The problem is that both the image and audio packets that arrive at the client are out of sync.

So I have following questions:

  1. Is there any module in python for live-multimedia streaming?
  2. Can I make the audio and image frames somehow in sync for the client?

PS. pymedia has not been in development since 2006 and is not working.


Solution

  • You can use gstreamer's python module. I mean gst-python mentioned above. Use rtmp protocol to synchronize client/server videos. Last time I use gst-python, there was no support for rtmp. At the time, my solution was to limit buffer size. When buffer gets full oldest frames will be dropped.