Skip to content

Latest 🗞️

Friday, August 7

Git Commits

dash commits 9 ohnsh/dash
  • 11:14 pm — John Sherrell <dev@ohn.sh>

    dash-next: bump Next, hls.js, biome.

  • 10:59 pm — John Sherrell <dev@ohn.sh>

    dash-next: A saner VOD implementation is emerging. Now using a Turso hosted libsql database to track inventory.json files in R2. (The root.txt file in R2 would scale terribly, though it could work with a Next route handler or Cloudflare worker in front of it). Re-organized random colocated helpers into @/lib and @/components.

  • 3:46 pm — John Sherrell <dev@ohn.sh>

    mkoverlay: remove a few tags from exiftool output, along with the corresponding schema properties.

  • 2:18 pm — John Sherrell <dev@ohn.sh>

    mkoverlay: Log pipeline steps to stderr in video.sh; don't log db result in db.ts.

  • 1:48 pm — John Sherrell <dev@ohn.sh>

    mkoverlay: prevent errors by explicitly telling libsql to do nothing when we attempt to insert an existing row. Also attempt to insert the inventory record once per run of video.sh, instead of inside the loop.

  • 12:54 pm — John Sherrell <dev@ohn.sh>

    mkoverlay: added turso/libsql database to index inventory JSON files on R2. Also reorganized a bit.

  • 10:23 am — John Sherrell <dev@ohn.sh>

    mkoverlay: sync to r2 on every remux/asset generation.

  • 6:04 am — John Sherrell <dev@ohn.sh>

    mkoverlay: New shell script, video.sh, that will process "camera dirs", or daily directories where OBS or mediaMTX save recordings. Processing involves remuxing the fragmented mp4 files, generating assets (just a thumbnail for now), and saving the metadata in an inventory.json file that can be fetched from R2.

  • 6:01 am — John Sherrell <dev@ohn.sh>

    mkoverlay: Re-thinking the whole overlay thing. Extracted typescript logic that isn't coupled to the days/overlay tree structure and made a new executable, meant to be called from scripts, that works on a single video and confines writes to the tree where the video lives.

dev commits 1 ohnsh/dev
  • 12:16 am — John Sherrell <dev@ohn.sh>

    cam: mediamtx config: turn on playback server, change recordingPath to start a new folder every day named %Y-%m-%d (recordings from OBS will follow a similar scheme).

YouTube

Thursday, August 6

Git Commits

dash commits 2 ohnsh/dash
  • 4:58 am — John Sherrell <dev@ohn.sh>

    dash-next: Fix minor type diagnostics so that `next build` runs. Clean up grid layout, especially the sidebar grid column computation, which is now just 1/5 of the available space with implicit min of 'auto'.

  • 2:24 am — John Sherrell <dev@ohn.sh>

    dashd: add `mak.local` as trusted CORS origin (for testing Next.js app from phone locally). Turn off logging every request.

dev commits 1 ohnsh/dev
  • 2:22 am — John Sherrell <dev@ohn.sh>

    mediamtx: turn on prometheus /metrics endpoint, allow access from the new prometheus docker bridge network.

Wednesday, August 5

Git Commits

dash commits 9 ohnsh/dash
  • 11:22 pm — John Sherrell <dev@ohn.sh>

    dash-next: add styling to sidebar, add 'mak.local' to allowedDevOrigins in next.config.ts so that testing from phone works.

  • 10:31 pm — John Sherrell <dev@ohn.sh>

    dash-next: responsive grid in decent shape; main video content flexes nicely and `overflow: hidden` on <main> prevents the layout from overflowing the grid container.

  • 9:44 pm — John Sherrell <dev@ohn.sh>

    dash-next: Reasonable mobile layout implemented. The menu button needs some work. Main content <video> needs to be made fluid.

  • 8:00 pm — John Sherrell <dev@ohn.sh>

    dash-next: Sidebar is now back to a server component which is rendered and passed into the client layout component. Split Header into new component that will toggle sidebarOpen state.

  • 4:44 pm — John Sherrell <dev@ohn.sh>

    dashd: log request IP to get an idea of trusted proxies with which to configure mediaMTX

  • 4:26 pm — John Sherrell <dev@ohn.sh>

    dash-next: main layout now imports a client component containing the true layout in order to accomodate sidebar state (at mobile sizes), eventually theme preference.

  • 2:54 pm — John Sherrell <dev@ohn.sh>

    dash-next: New, screen reader-accessible StatusIndicator component that renders a red unfilled circle when offline, or a green filled circle when online.

  • 1:18 pm — John Sherrell <dev@ohn.sh>

    dash-next: convert descendant selectors to child selectors in main grid layout definition (since <header>, <footer>, and <aside> can appear throughout the document). Shorten date format returned in VOD playlist titles.

  • 12:44 pm — John Sherrell <dev@ohn.sh>

    dash-next: sidebar now a synchronous component wrapping dynamic menus in <Suspense>

dev commits 2 ohnsh/dev
  • 6:00 pm — John Sherrell <dev@ohn.sh>

    cam: Add traffic from tunnelnet/cloudflared to mediaMTX hlsTrustedProxies and webrtcTrustedProxies so that true source IP addresses are logged and returned via control API.

  • 10:55 am — John Sherrell <dev@ohn.sh>

    sh: minor update to dxif.sh to generate category directories for desk_* and quad_* video files, and to sort wyze[0-9] and wuuk files appropriately regardless of suffixes like -patch or -patch-rec.

Tuesday, August 4

Git Commits

dash commits 10 ohnsh/dash
  • 8:18 pm — John Sherrell <dev@ohn.sh>

    dash-next: WIP get menus of live and VOD streams into root layout sidebar.

  • 7:36 pm — John Sherrell <dev@ohn.sh>

    dash-next: converted main layout to grid. Using track numbers; it would probably be an upgrade to use named areas. Also badly needs some responsive logic.

  • 6:56 pm — John Sherrell <dev@ohn.sh>

    dash-next: stats now lists all streams. Improved table formatting, added `title` attributes to the online/offline icons.

  • 6:21 pm — John Sherrell <dev@ohn.sh>

    dash-next: Extract Tab component into separate module.

  • 4:13 pm — John Sherrell <dev@ohn.sh>

    dash-next: clean up and comment CSS.

  • 3:28 pm — John Sherrell <dev@ohn.sh>

    dash-next: custom tab interface for stats and event stream tables.

  • 12:58 pm — John Sherrell <dev@ohn.sh>

    dash-next: converted stats and event stream views to tables.

  • 7:15 am — John Sherrell <dev@ohn.sh>

    dash-next: refactor useStats to not return a strict discriminated union; it wasn't really appropriate (but a good learning experience). Removed the feature that marks pending fetches as stale and re-fetches when complete. I'd like to get some experience with TanStack Query before deciding how to tackle that sort of thing.

  • 5:32 am — John Sherrell <dev@ohn.sh>

    dash-next: generate zod schema for mediaMTX Path API type. Make event stream a <table> and factor out a component for each row. CSS tweaks.

  • 1:12 am — John Sherrell <dev@ohn.sh>

    dash-next: Refreshing stats in useStats hook in response to SSE events is now working.

dev commits 2 ohnsh/dev
  • 6:06 pm — John Sherrell <dev@ohn.sh>

    cam: new path 'quad' for 2x2 OBS scene.

  • 1:10 am — John Sherrell <dev@ohn.sh>

    cam: automatically select `-patch-rec` paths for recording switch helper in ctrl.sh.

Monday, August 3

Git Commits

dash commits 4 ohnsh/dash
  • 11:02 pm — John Sherrell <dev@ohn.sh>

    dash-next: new blinking cursor style for h1.

  • 8:16 pm — John Sherrell <dev@ohn.sh>

    dash-next: Rename dynamic route param from vodSlug to slug. Make Meta type a proper discriminated union with `type` determining the presence of `playlist`.

  • 7:59 am — John Sherrell <dev@ohn.sh>

    dash-next: update schema for inventory JSON, get VOD routes rendering again.

  • 3:13 am — John Sherrell <dev@ohn.sh>

    dash-next: fix up handling of streams returned by API.

dev commits 3 ohnsh/dev
  • 9:13 pm — John Sherrell <dev@ohn.sh>

    cam: fixed 3 major bugs in one line of stream_folder.sh; I honestly don't understand how it's been working the past couple of weeks. Added logic to find a sensible folder to stream when given a bare specifier. E.g. given `wyze1`, if recordings/wyze1 is empty, try recordings/wyze1-patch-rec.

  • 1:56 am — John Sherrell <dev@ohn.sh>

    cam,cron: Minor fixes to make helper scripts consistent with new recording folder structure created by mediamtx.

  • 12:42 am — John Sherrell <dev@ohn.sh>

    cam: update mediamtx.yml to record streams to 'desk' endpoint (from OBS on macOS). New organizational scheme for recordings with subdirectories for each camera, which works much better with stream_folder.sh (folder to YouTube Live).

Sunday, August 2

Git Commits

dev commits 4 ohnsh/dev
  • 10:10 pm — John Sherrell <dev@ohn.sh>

    cam: new mediamtx paths, (wuuk|wyze1)-patch-rec, that record on-demand from corresponding *-patch paths. Recording can be switched on or off for a given path by calling the API with PATCH /v3/config/paths/patch/{path} and setting `sourceOnDemand` to no or yes, respectively.

  • 9:26 pm — John Sherrell <dev@ohn.sh>

    cam: WIP getting on-demand recording working via pure mediaMTX config, without running external ffmpeg readers.

  • 7:07 pm — John Sherrell <dev@ohn.sh>

    cam,bug: quiet ffmpeg; docker logs were getting huge.

  • 9:42 am — John Sherrell <dev@ohn.sh>

    cam: add static ip of dashd container to mediaMTX auth config, allowing it to access the API endpoint.

dash commits 2 ohnsh/dash
  • 10:07 am — John Sherrell <dev@ohn.sh>

    dash-next: Move back to @latest next.js release. (I had moved to the preview release for an experimental config that adds support for Typescript 7. That config now appears to work in @latest.)

  • 2:04 am — John Sherrell <dev@ohn.sh>

    dash-next: Sidebar layout, configure rewrite from root route to /hls, fix up default stream handling to use the first one returned instead of a constant value.

Saturday, August 1

Git Commits

dash commits 7 ohnsh/dash
  • 9:28 pm — John Sherrell <dev@ohn.sh>

    dashd: now dockerized. There's a new named docker network, tunnelnet, for cloudflared and anything that cloudflared proxies, including dashd. mediaMTX config now whitelists the IP address of dashd inside that network. For now, src/ is bind-mounted into the container, and the container command uses `bun --watch`, so dashd is automatically reloaded whenever a source file changes.

  • 9:20 pm — John Sherrell <dev@ohn.sh>

    dashd-next: minor fixes to get rid of diagnostics.

  • 4:53 pm — John Sherrell <dev@ohn.sh>

    dashd: snapshot endpoint is working. It fetches from the Thingino snapshot endpoint using the device-generated API key in the `token` query parameter. It also adds cache-control headers to prevent Cloudflare from caching the response. Also a new helper script, append-hosts.sh, that resolves .local addresses (cameras) and appends them to /etc/hosts.

  • 2:50 pm — John Sherrell <dev@ohn.sh>

    chore: bump dependencies

  • 2:48 pm — John Sherrell <dev@ohn.sh>

    dashd: toward dockerizing dashd. Doesn't yet quite work; need to look at bun's docker docs regarding recommended container user.

  • 2:28 pm — John Sherrell <dev@ohn.sh>

    dash-next: moved <Script> element out of main layout. Not that it matters but it seems to be working now in the individual HLS experiment components, both client and server. Much cleaner.

  • 2:27 pm — John Sherrell <dev@ohn.sh>

    dash-next: No longer setting hls.js to send credentials (cookies) with every request. It works fine and is much cleaner.

dev commits 5 ohnsh/dev
  • 6:28 pm — John Sherrell <dev@ohn.sh>

    bug: minor syntax improvement in `if` statement.

  • 6:27 pm — John Sherrell <dev@ohn.sh>

    stream-utils: add videotoolbox hardware acceleration option for transcoding to HLS. Automatically detects videotoolbox or vaapi. Calculate GOP (keyframe interval) from probed frame rate.

  • 2:36 pm — John Sherrell <dev@ohn.sh>

    cam: updated mediamtx.yml to match latest default config file. Hooks `runOnAvailable` and `runOnOnline` have been added.

  • 12:09 pm — John Sherrell <dev@ohn.sh>

    cam: Reverting to not run a snapshot script in a mediaMTX hook. A much better option is to switch the sources back to on-demand and run an external script that grabs snapshots directly from the thingino snapshot endpoint.

  • 10:48 am — John Sherrell <dev@ohn.sh>

    cam: Add snapshot config to mediamtx.yml, update hook name from `runOnReady` to `runOnAvailable` to align with recent MediaMTX releases. Update compose.yml to bind-mount snapshot directory into container.

Friday, July 31

Git Commits

dash commits 5 ohnsh/dash
  • 5:11 pm — John Sherrell <dev@ohn.sh>

    next-dash: fix up dashd api/fetch types, recover from errors when dashd is down.

  • 11:23 am — John Sherrell <dev@ohn.sh>

    mkoverlay: bug fixes. Refactored `Metadata` object creation into an inner function in `getMetadata` to make types cleaner and simplify the main logic.

  • 9:38 am — John Sherrell <dev@ohn.sh>

    mkoverlay: ffprobe now extracting r_frame_rate, bit_rate, and pix_fmt metadata, with r_frame_rate evaluated and converted to a number ("30000/1001" is 29.97).

  • 5:36 am — John Sherrell <dev@ohn.sh>

    mkoverlay: Metadata type is now a discriminated union with a `type` property. When 'hls', there is an additional `playlist` key with the path to the .m3u8 file. The script has now been tested a few times and generates thumbnails like a mf.

  • 12:23 am — John Sherrell <dev@ohn.sh>

    mkoverlay: fixed some bugs related to building paths and handling non-existent directories.

dev commits 3 ohnsh/dev
  • 3:28 am — John Sherrell <dev@ohn.sh>

    sh: tweak ffmpeg command line for videotoolbox variant to use hardware decoding. Document the options a bit more.

  • 1:45 am — John Sherrell <dev@ohn.sh>

    stream-utils: new script for generating VOD HLS streams from whole directories using VAAPI hardware acceleration.

  • 1:40 am — John Sherrell <dev@ohn.sh>

    stream-utils: fixing up 'mkvod' scripts from a few weeks back, preparing for production HLS generation.

Thursday, July 30

Git Commits

dash commits 1 ohnsh/dash
  • 11:35 pm — John Sherrell <dev@ohn.sh>

    mkoverlay: big refactor to create a more flexible file structure and inventory data structure to accomodate, for example, HLS renditions of an entire folder. Completely untested for now.

dev commits 1 ohnsh/dev
  • 10:53 pm — John Sherrell <dev@ohn.sh>

    sh: changed default params in timelapse.sh. The default rate is now 8x and the strobe effect is 4 fps (or 1 frame every 2 real seconds).

YouTube

Wednesday, July 29

Git Commits

dash commits 1 ohnsh/dash
  • 12:12 am — John Sherrell <dev@ohn.sh>

    next-dash: VOD route is becoming somewhat functional. Refactored into a layout and components for the main 'inventory list' (now in a sidebar with no css yet) and individual playlists, with <video> element.

dev commits 1 ohnsh/dev
  • 1:42 am — John Sherrell <dev@ohn.sh>

    mkoverlay: clean-up; this project has effectively moved to the dash repo.