Latest 🗞️
Friday, July 17
Git Commits
dev commits 4
ohnsh/dev-
11:52 pm — John Sherrell <dev@ohn.sh>
sh: fix script dir detection when wyze_timelapse.sh is being sourced (${BASH_SOURCE[0]} instead of $0). In timelapse.sh, use `-qp 28` for timelapse_vaapi variant, for slightly smaller output (default `qp` is 25).
-
10:21 pm — John Sherrell <dev@ohn.sh>
cam: Convert container management to use compose.yml.
-
10:15 pm — John Sherrell <dev@ohn.sh>
cam: For now, quit stream_folder.sh when we run out of files. If I restart the stream after a delay, the broadcast is already over and YouTube just throws the stream away. A new broadcast could be created programatically with `youtube-client`, which is what stream_folder.sh already does on start-up, but I'm reluctant to put that in a loop and leave it on autopilot.
-
9:53 pm — John Sherrell <dev@ohn.sh>
bug: Now starting container with docker compose.
YouTube
Thursday, July 16
Git Commits
dev commits 2
ohnsh/dev-
5:31 am — John Sherrell <dev@ohn.sh>
cam: Yikes, forgot the shebang in cam.sh. It ran, but not in a way that I could find with pgrep. It's definitely not a POSIX script.
-
2:34 am — John Sherrell <dev@ohn.sh>
cam: Removed redact_tty wrapper around ffmpeg in stream_folder.sh. It's a fun idea but the `script`-based implementation introduces unnecessary complexity around signals and controlling terminals. Also added documentation and a guard to disable writes to the status FIFO when there's no reader, preventing hangs.
YouTube
Wednesday, July 15
Git Commits
dev commits 7
ohnsh/dev-
10:15 pm — John Sherrell <dev@ohn.sh>
cam: Document correct usage of monitor.sh: The status FIFO must be open for read/write (<>$STATUS_FIFO).
-
10:05 pm — John Sherrell <dev@ohn.sh>
cam: Status updates via named pipe and new monitor.sh, which reads from the pipe and logs to both stderr and ntfy.sh.
-
8:29 pm — John Sherrell <dev@ohn.sh>
bug: New helper script to separate old recordings not open for writing so that they can be archived.
-
8:18 pm — John Sherrell <dev@ohn.sh>
sh: In wyze_timelapse.sh, save ffmpeg concat playlist to temporary file in working directory to enable relative file paths. (Process substitution is more elegant but not worth the hassle here because it causes ffmpeg to interpret paths as relative to /dev/fd.)
-
8:00 pm — John Sherrell <dev@ohn.sh>
sh: Refactored wyze_timelapse.sh, split generic timelapse functions into separate library script timelapse.sh. Added default strobe effect (2 fps). Update to dxif.sh bringing compatibility with aac, opus, and ogg files.
-
5:01 pm — John Sherrell <dev@ohn.sh>
cam: Refactored relay.sh and record.sh, replacing both with cam.sh. Implemented audio delay when combining Thingino video with external (Pulseaudio) audio, resulting in roughly synchronized audio/video. (Delay implemented both in cam.sh and mediamtx.yml.) Lots of duplicate code removed and lots more edge cases now handled gracefully.
-
10:33 am — John Sherrell <dev@ohn.sh>
cam: Recording functions moved to new file, record.sh. In mediamtx.yml, publish combined ("patched") streams with video from camera/Thingino and audio from macOS Pulseaudio server. Set PULSEAUDIO_SERVER in environment when creating Docker container.
YouTube
Tuesday, July 14
Git Commits
dev commits 3
ohnsh/dev-
9:11 am — John Sherrell <dev@ohn.sh>
cam: Added a path to mediamtx for thingino/Wyze camera. Moved all mediamtx configuration into mediamtx.yml (source URL was previously passed in environment). Moved recording back out of mediamtx into an external ffmpeg process that combines video from mediamtx with high-quality microphone audio from a macOS PulseAudio server.
-
5:37 am — John Sherrell <dev@ohn.sh>
cam: Add several utility functions to ctrl.sh to query the status and configuration of mediamtx via REST API calls, with output formatted through jq.
-
2:37 am — John Sherrell <dev@ohn.sh>
cam: Turn on mediamtx control API, switch container to host network, new script ctrl.sh providing a command-line interface to stop/start wuuk recording by switching the `runOnDemand` config option.
YouTube
Monday, July 13
Git Commits
dev commits 5
ohnsh/dev-
11:01 pm — John Sherrell <dev@ohn.sh>
cam: add continuous monitoring to stream_folder.sh
-
9:02 pm — John Sherrell <dev@ohn.sh>
cam: Added timezone awareness to mediamtx container (tzdata package and TZ environment variable). Added logic to only pre-resolve .local hostnames and only include --add-hosts on the docker command line when necessary. Added stream key redaction (from ffmpeg logs) to stream_folder.sh.
-
4:52 pm — John Sherrell <dev@ohn.sh>
stream-utils: Minor clean-up in shell scripts.
-
4:40 pm — John Sherrell <dev@ohn.sh>
cam: In relay.sh, change default source from camera to MediaMTX proxy. New script stream_folder.sh, similar to the one in stream-utils but a much cleaner implementation. It takes an input directory (must exist) and an output directory. Each mp4 file in input is streamed to YouTube's RTMP endpoint and then moved to output when finished. Files are streamed one-by-one in glob (lexicographic) order, which also happens to be chronological order for `%Y%m%d_%H%M%S`-formatted filenames.
-
4:31 pm — John Sherrell <dev@ohn.sh>
cam: Configure MediaMTX to record wuuk path to fMP4 files, and drop `runOnDemand` option. This moves recording into the same process doing the proxying instead of requiring a separate always-running ffmpeg.
YouTube
Sunday, July 12
Git Commits
dev commits 5
ohnsh/dev-
8:39 pm — John Sherrell <dev@ohn.sh>
cam: shell script to relay RTSP stream from Thingino camera or MediaMTX proxy to YouTube.
-
8:16 pm — John Sherrell <dev@ohn.sh>
cam: Added package.json to cam package with `youtube-client` as a dependency. Also updated stream-utils package.json with new youtube-client subcommands.
-
8:13 pm — John Sherrell <dev@ohn.sh>
youtube-client: Change name of `ensure` command to `prepare`. Add option to prune obsolete broadcasts when preparing (default true).
-
7:59 pm — John Sherrell <dev@ohn.sh>
youtube-client: Added command-line parsing so that title and description can be passed for subcommands that create a broadcast.
-
5:37 pm — John Sherrell <dev@ohn.sh>
cam: new project overlapping stream-utils. Proxying Thingino RTSP stream with MediaMTX. This will run as a docker container on a Raspberry Pi for now.
YouTube
Saturday, July 11
Git Commits
dev commits 3
ohnsh/dev-
12:49 pm — John Sherrell <dev@ohn.sh>
sh: brought in changes to wyze-timelapse.sh that have been in production on an Intel-based Alpine server. Need to add (optional) strobe effect, which here will be a genuinely low framerate, likely bringing major savings to both processing time and file size.
-
5:34 am — John Sherrell <dev@ohn.sh>
bug: Documentation. Only pass `--add-host` when we actually have an mdns name to pre-resolve.
-
2:05 am — John Sherrell <dev@ohn.sh>
bug: get timezone working inside container, clean up ffmpeg command line duplication, use wallclock for timestamps in hopes of stabilizing the output files a bit.
itsa-me commits 1
ohnsh/itsa-me-
11:19 am — John Sherrell <dev@ohn.sh>
Upgraded Astro, bumped dependencies, updated profile pic.
YouTube
Friday, July 10
Git Commits
dev commits 4
ohnsh/dev-
8:03 am — John Sherrell <dev@ohn.sh>
youtube-client: added logic to prune broadcasts in 'ready' state that aren't configured correctly. A common example would be broadcasts with outdated titles that were created by the Studio web interface. Since these would be automatically used by a future stream, the idea is to simply delete them and create a new ready broadcast.
-
6:25 am — John Sherrell <dev@ohn.sh>
bug: Added libopus encoder option. Since the files will be mostly silence and speech, 64k is a more reasonable bitrate. Opus apparently excels at low bitrates.
-
1:39 am — John Sherrell <dev@ohn.sh>
bug: now working as a dockerized service on alpine, recording from a pulseaudio server (`ffmpeg -f pulse`) via the network.
-
12:12 am — John Sherrell <dev@ohn.sh>
bug: Converting to a remote container that records a pulseaudio server over the network.