Categorygithub.com/sholiday/tinycast
modulepackage
0.1.3
Repository: https://github.com/sholiday/tinycast.git
Documentation: pkg.go.dev

# README

tinycast

Automatically compress podcasts to tiny file sizes for bandwidth constrained connections like cellular or satellite.

Use Case

Sometimes I'm in locations where Internet connectivity is weak or expensive, but I'd still like to listen to the latest episode of my favorite podcasts. Podcasts can be pretty large files to download (50-100 MiB), but if you are willing to reduce the quality they can be much smaller to download (2-10 MiB).

Instead of downloading the episode to my server in a fast connection, manually compressing the file and copying it over, I wanted a way to download the files in a regular podcast app, right on my phone.

Conversion

This service takes a podcast feed and changes the links to podcasts downloads to point to the service. When a podcast file is requested, the service transcodes the audio file on the fly (without storing it locally first) and streams the much smaller file to the client.

Screenshots

Example of search results

Example of a podcast feed in Apple Podcasts

Deployment

Docker

An example Dockerfile.

docker run -d \
  --name=tinycast \
  -e PORT=8082 \
  -e BASE_URL="http://example.com:8082/" \
  -p 8082:8082 \
  --restart unless-stopped \
  sholiday/tinycast

Docker Compose

An example docker-compose.yml.

---
version: "3"
services:
  tinycast:
    image: sholiday/tinycast:latest
    restart: unless-stopped
    environment:
      - BASE_URL=https://tinycast.example.com/
      - API_KEY=AUniqueStringForTheDeployment

# Packages

No description provided by the author

# Functions

BindConversionConfig captures and validates a ConversionConfig passed in query parameters.
NewApp returns a new App based on configuration.
ParseBitRate converts a string version of BitRate.
ParseBitRateMode returns a BitRateMode if it matches the given string or an error.
ParseChannelMode translates from the string version of a ChannelMode.

# Variables

BitRateModes are the modes accepted by the encoder.
BitRates supported by the MP3 encoder.
ChannelModes supported by the MP3 encoder.
Templates holds the HTML/JavaScript/CSS/Images for the web app.go:embed templatesgo:embed templates/favicon/*.

# Structs

App is the core tinycast web app with handlers and state.
ConversionConfig holds the desired conversion for an audio file.
Page represents a page in a sequence of paginated results.
Pagination represents a location in a sequences of paginated results.

# Type aliases

BitRate used to encode an audio file.
BitRateMode describes how the MP3 encoder should apply bit rate limits.