Python Nerdery: Audio RSTP AI Listener

Python Nerdery: Audio RSTP AI Listener
Today's python experiment came after hearing an explosion outside. We never identified what it was, but it led me to be curious if I could create an AI listener to the camera. Long story short, python with numpy, pandas and tensorflow are all you need to read the audio from an RSTP feed and listen for audio events. import subprocess import numpy as np import tensorflow as tf import tensorflow_hub as hub import pandas as…

Python Nerdery: Security Camera Color Grading

Python Nerdery: Security Camera Color Grading
I have a camera that shoots Mount Rainier all of the time. This morning's coffee tinker was automatically color grading the stream import cv2 import numpy as np from datetime import datetime import os class RTSPGrader: def __init__(self): # RTSP connection settings - fill these in self.username = "user" self.password = "password" self.ip = "192.168.1.2" self.port = "554" # Default RTSP port # Create control window cv2.namedWindow('Controls') # Create trackbars cv2.createTrackbar('Contrast', 'Controls', 120, 300, lambda…