Python Forum
Accessing IP Cam Audio In Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessing IP Cam Audio In Python
#1
[I'm not sure if this should be here or in the Networking forum.]

I need to get sound samples from a microphone that is attached to an IP Camera I have on my network. (I don't need to record. I just need to take a sample so I can determine dB level. Elevated dB levels indicate an event is taking place for the app I'm writing. To be clear - I don't want to check sound levels continuously. I only want to check the sound level when I've determined - via other means - that an event is taking place. When that occurs I want to use the sound level as a confirming data point that the event I'm looking for is actually taking place.)

I know the camera's audio is working - I can get the sound using an rtsp connection when using either iSpy or VLC.

Where I'm stuck is that the two Python sound modules I've found (PyAUdio and sounddevice) all seem to assume the sound inputs are local to the machine running the code - such as the computer's microphone jack. They assume either that or that the sound is being read from a local .wav file.

I need to either 1/ establish a connection with the remote audio source at the system level so the system thinks that audio is coming in via the local microphone jack or 2/ make Python/[PyAudio or sounddevice] see that remote audio stream as the input that is to be read from.

Any pointers? I feel kind of stuck. I've Googled and Googled and Googled and, if there are examples out there, I haven't yet found the right search terms to uncover them.

Thanks.

Jim
Reply
#2
Did you ever find a solution to this? I am trying to do something like this for an IP microphone which has an RTSP server on it. I have found possible workarounds, (maybe aiortc, or wrapping ffmpeg/vlc commands in python code) but no easy plug and play library in python.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  error python audio codiac 3 4,172 Mar-30-2023, 03:12 PM
Last Post: deanhystad
  Accessing same python script from multiple computers bigrockcrasher 1 1,710 May-25-2022, 08:35 PM
Last Post: Gribouillis
  Python modules for accessing the configuration of relevant paths Imago 1 1,384 May-07-2022, 07:28 PM
Last Post: Larz60+
  python audio analysis kiyoshi7 3 1,779 Feb-22-2022, 06:09 PM
Last Post: Axel_Erfurt
  Real Time Audio Processing with Python Sound-Device not working Slartybartfast 2 3,999 Mar-14-2021, 07:20 PM
Last Post: Slartybartfast
  Handling multi-input/output audio in python bor1904 4 3,602 Nov-04-2020, 08:25 AM
Last Post: CHLOVRL
  List index out of range error while accessing 2 lists in python K11 2 2,130 Sep-29-2020, 05:24 AM
Last Post: K11
  How to do real-time audio signal processing using python Zenolen 7 16,593 Nov-04-2019, 02:57 AM
Last Post: jefsummers
  How to get the duration of AMR audio file using python Prince_Bhatia 0 2,260 Aug-12-2019, 05:58 AM
Last Post: Prince_Bhatia
  Python Idea Assist.: BerryIMU & Raspberry Pi 3 Audio Mapping StephLeber 0 2,293 Dec-09-2018, 10:43 AM
Last Post: StephLeber

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020