spatialaudio / python-sounddevice

:sound: Play and Record Sound with Python :snake:
https://python-sounddevice.readthedocs.io/
MIT License
992 stars 146 forks source link

Read data from RTSP - process them - save audio to file #243

Open matiashvladyslav opened 4 years ago

matiashvladyslav commented 4 years ago

Hello! I need to take data from rtsp, then process them (say every 5 second) it means normalize audio, drop silent parts from this 5 sec - and record it until RTSP open, after its closed i need to save audio to file (it would be cool to save it in mp3(maybe flac)).

I understand how to make it with microphone, but is it possible to make it from RTSP?

mgeier commented 4 years ago

I don't think so, not with the sounddevice module (or the underlying PortAudio library).

The sounddevice module is for hardware devices, but on some platforms there are "virtual" devices which can be used. If there would be a virtual device for RTSP, it might work, but I don't think such a thing exists.

But I'm sure there are libraries out there that allow grabbing an RTSP stream without involving any audio backend.