RSSAmplifier

Blog

Ben Wilber

Ben Wilber on the Arts and Crafts of programming, systems, automation, and other things.

benwilber.github.ioRSS feed ↗10 posts

Latest posts

SQLite is great for what it is: a small, embedded SQL database. But nothing more.

Client/server SQL database engines strive to implement a shared repository of enterprise data. They emphasize scalability, concurrency, centralization, and control. SQLite strives to provide local data storage for individual applications and devices . SQLite emphasizes economy, efficiency, reliability, independence, and simplicity. SQLite does not compete with client/server databases. SQLite…

Fast autocomplete in PostgreSQL with pg_trgm

Fast autocomplete in PostgreSQL with pg_trgm Autocomplete functionality can significantly enhance UX, especially in comments or forums where users often mention each other by name or username. Implementing this is very efficient in PostgreSQL using the pg_trgm extension, which allows for fast, fuzzy text searches. This post will guide you through setting up autocomplete for usernames in mentions…

Don't parse ISO-8601 datetime strings with a regex

Do not try to parse ISO-8601 with a regex In 2017, I opened a pull request to Google’s ExoPlayer to properly support datetime strings in HLS manifests configured with a European locale. Basically, support comma ( , ) separators for unit delinations, in addition to the regular dot ( . ) separators that people are probably used to. It was a very simple change that was quickly accepted. A few months…

Building a live video streaming website - Part 3 - DRM

This is part 3 of a series on creating a Twitch.tv-like live video streaming website. See Part 2 - The Application here DRM It is sometimes desirable to have “protected” streams. These are video streams that can’t just be played-back in VLC or other media player directly. More importantly, they can’t be shared easily (HLS link posted on Twitter, Reddit, etc.). WARNING This method of DRM will keep…

Building a live video streaming website - Part 2 - The Application

This is part 2 of a series on creating a Twitch.tv-like live video streaming website. See Part 1 - Start Streaming! here The Application Now that we have video streaming working, we need to build a web application to manage the streams. I’m using Django and Python 3, but any web framework will work. The Django application Start by creating your new Django project: $ mkvirtualenv -p python3.6…

Building a live video streaming website - Part 1 - Start Streaming!

Introduction I’ve been working with live video streaming in some capacity for several years. Everything from simple Periscope or Meerkat clones, to very large-scale live sports productions (Super Bowl, FIFA World Cup). There are many open source tools available to build services like this yourself if you know what they are and how to use them. This guide attempts to introduce you to the tech…

Implementing Stream Keys with nginx-rtmp and Django

Any live video streaming community needs the ability for streamers to publish streams to a private endpoint but have their stream play back on their public profile or channel. This is typically implemented by providing a secret “stream key” known only to the streamer, preventing others from being able to stream on their account. There’s nothing special about the stream key as far as RTMP is…

How I built Sinklog.com, combine your log outputs into a single stream.

I have a lot of little sites and servers on the web that do a variety of things. I often find that I want to tail -f the logs across N number of servers/applications at any time. Typically you just set up a central log server with rsyslog or syslog-ng , SSH in and tail -f your logs. I wanted something even simpler than that. Introducing Sinklog.com . The setup is pretty simple. Go to Sinklog.com ,…

How I built ghit.me, hit count badges for github

If you read my blog then you know that I find special pleasure in solving a problem without writing any (or very little) of my own code. That was my goal for ghit.me , which is a simple hit counter badge for your Github repos. This is how I did it. The goal was to be able to put a simple hit counter badge in your Github repo’s README.md file, which is very common and useful. When a person views…

Unified Endpoints in nginx-push-stream

I recently started playing with nginx-push-stream-module . This a really cool module that essentially allows you to replicate the basic functionality of Pusher and PubNub within nginx. The configuration is pretty basic: Publisher location ~ /pub/(.+) { internal ; push_stream_publisher admin ; push_stream_channels_path $1 ; } Subscriber location ~ /sub/(.+) { internal ; push_stream_subscriber ;…