LOKLOK TV — the branded video channel
Since 2026-08-09 the station also broadcasts a full-branded 1080p30 video program derived from the master audio. Everything is generated live on the production node — no human operator, no pre-rendered video files beyond a few static assets.
Components — /home/sms/radio/video_feed/
| File | Role |
|---|---|
video_bridge.sh | The ffmpeg renderer (read-only daemon). Pulls http://localhost:8005/main, composites bg + logo + spectrum + lower-third + LIVE badge + ticker, pushes RTMP to MediaMTX path loklokvideo. Writes its own PID to .ffmpeg.pid. |
video_ticker.js | Zero-dep Node daemon. Polls the engine (/api/status, /api/content/status, /api/social/status) and the :19353 listener proxy, renders Cairo time via Africa/Cairo, and atomically writes the reload=1 text files. Editable headlines in news.txt (one per line). |
watch_video.sh | Watchdog — restarts either daemon on death. Logs to watch_video.log. Launched by @reboot sleep 45 && setsid nohup bash /home/sms/radio/video_feed/watch_video.sh. |
setup_video_assets.sh | One-time asset generator (bg + logo + fonts). |
bg.mp4 | Pre-rendered animated dark-purple gradient loop with film grain. |
logo.png | Transparent LOKLOK logo composited over the background. |
fonts/ | Arabic-capable fonts (segoeuib.ttf, tahomabd.ttf) for the ticker/artists. |
artwork/ | Album-art frames fetched for the lower-third art slot. |
title.txt / artist.txt / listeners.txt / ticker.txt | reload=1 drawtext inputs — ffmpeg re-reads them every frame. |
news.txt | Editable news headlines (1 per line) shown on the ticker. |
Endpoints
| Type | URL |
|---|---|
| HLS | http://files.mediahubnetwork.net:19351/loklokvideo/index.m3u8 |
| RTSP | rtsp://files.mediahubnetwork.net:19354/loklokvideo (cookie-free, works in mpv) |
| WebRTC | :19355 (via MediaMTX WHEP) |
# RTSP is the easiest to test (no cookie jar needed):
mpv rtsp://files.mediahubnetwork.net:19354/loklokvideo
The transcode farm + freetube ABR auto-discover the new RTSP path, so
multi-bitrate HLS ladders are generated automatically under
/home/sms/transcode-farm/outputs/live-hls/loklokvideo/ and
/home/sms/my_folder/freetube/abr/data/abr/loklokvideo/, plus WebRTC/WHEP
encoders.
On-screen design
- 1920×1080 @ 30 fps, AAC 48 kHz audio (from the master OGG).
- Animated gradient background + grain, transparent logo top-left.
- Gold NOW-PLAYING / white title / cyan artist lower-third.
- Bright animated
showfreqsvisualizer band. - Red blinking LIVE listener badge (count from the
:19353proxy). - Scrolling ticker with news headlines + Cairo clock.
Operational notes
-
The video feed dies with the master: it ingests Icecast
localhost:8005/main, so if the OGG master is down the video program is too. -
Editing headlines:
echo "…" >> /home/sms/radio/video_feed/news.txt— the ticker re-reads it on the next poll cycle; no restart needed. -
Restart the feed cleanly:
cd /home/sms/radio/video_feedpkill -f video_bridge.sh; pkill -f video_ticker.js # or pkill -9 + let watch_video.sh relaunch
Gotchas (hard-learned)
- Remote scripts must stay pure ASCII — the write-tool→scp path mangles
non-ASCII + backticks and writes CRLF. Always
sed -i 's/\r$//'after upload andnode --check/bash -n. - ffmpeg filtergraph: a labeled stream can only be consumed once — use
asplit=3to feed twoshowfreqs.scale=w:h,format=Xneeds the comma; there is nooverlapoption onshowfreqs(that'sshowspectrum);\,escapes a literal comma in drawtext expressions. setsid nohup bash x.sh < /dev/null &so the ssh channel can close — an open stdin fd hangs the session.
See also
- Streaming — the audio HLS/OGG delivery paths.
- Production runbook — watchdogs and crontab.