Skip to content

Latest 🗞️

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.

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.

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.

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.