Web UI for capturing raw MPEG-TS snippets with ffmpeg.
- fixed-duration capture (
.ts) - manual start/stop capture
- preview thumbnail (
preview.jpg) - relay/fanout start/stop
- schedule-based fixed captures
- capture list with download, delete, probe, and thumbnails
No database and no authentication. Designed for private/internal deployments.
- Python 3.10+
ffmpegandffprobe- Linux for production/systemd (macOS works for local dev)
git clone <repo-url> ts-capture-ui
cd ts-capture-ui
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtInstall ffmpeg (Ubuntu/Debian):
sudo apt update
sudo apt install -y ffmpegCreate capture directory:
sudo mkdir -p /data/captures
sudo chown -R "$USER":"$USER" /data/capturesRun:
uvicorn app.main:app --host 0.0.0.0 --port 8080Open: http://localhost:8080
TS_CAPTURE_DIR=/data/captures
TS_BIND_HOST=0.0.0.0
TS_BIND_PORT=8080
TS_DEFAULT_INPUT_URL="udp://0.0.0.0:5000?fifo_size=10000000&overrun_nonfatal=1"
TS_RELAY_AUTOSTART=0
TS_RELAY_INPUT_URL="udp://0.0.0.0:5000?fifo_size=10000000&overrun_nonfatal=1"
TS_PREVIEW_AUTOSTART=0
TS_PREVIEW_USE_RELAY=1For multiple instances, give each instance unique values for:
TS_CAPTURE_DIRTS_BIND_PORTTS_RELAY_PREVIEW_PORTTS_RELAY_CAPTURE_PORT
Example env files:
examples/primary.envexamples/processed.env
Foreground:
scripts/run-primary.sh
scripts/run-processed.shDetached screen:
scripts/run-primary.sh --screen
scripts/run-processed.sh --screenManage sessions:
scripts/screen-instance.sh primary status
scripts/screen-instance.sh primary attach
scripts/screen-instance.sh primary stopProvided unit files:
systemd/ts-capture-ui.servicesystemd/ts-capture-ui@.service
Single-instance install:
sudo cp systemd/ts-capture-ui.service /etc/systemd/system/ts-capture-ui.service
sudo systemctl daemon-reload
sudo systemctl enable --now ts-capture-ui
sudo systemctl status ts-capture-uiGET /- UIGET /api/status- live status JSONGET /api/captures- capture list/status JSONPOST /capture-fixedPOST /manual/startPOST /manual/stopPOST /preview/startPOST /preview/stopPOST /relay/startPOST /relay/stopPOST /schedules/createPOST /schedules/enable/{schedule_id}POST /schedules/disable/{schedule_id}POST /schedules/run-now/{schedule_id}POST /schedules/delete/{schedule_id}GET /download/{filename}POST /delete/{filename}GET /probe/{filename}
- Keep service access private (VPN, SSH tunnel, restricted security groups).
- Do not expose publicly without adding authentication.
- Download/delete/probe are restricted to
TS_CAPTURE_DIRand validated.tsfilenames.