Skip to content

Instantly share code, notes, and snippets.

View jimbrayrcp's full-sized avatar
😀

Jim Bray jimbrayrcp

😀
  • San Antonio, Texas
View GitHub Profile
@John07
John07 / HLS_dvr.sh
Last active August 19, 2024 09:03
A small script to make recording http live streams (HLS, those streams that work on iOS devices) nicer on a Mac. Script records the stream for a defined period of time and sends the user notifications if anything goes wrong and once it's done.
# required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier
# you can schedule this with launchd to run e.g. weekly
# Specify in seconds how long the script should record (default here is 1 hour).
seconds=3600
# Date format for the recording file name
DATE=`date "+%d-%m-%y_%H-%M"`
# start ffmpeg recording
from kivy.app import App
from kivy.lang import Builder
root = Builder.load_string('''
<ScaleLabel@Label>:
_scale: 1. if self.texture_size[0] < self.width else float(self.width) / self.texture_size[0]
canvas.before:
PushMatrix
Scale:
origin: self.center