Table of Contents
Prevue Guide Channel
A βPrevue Guide Channelβ style companion site for AmigaZ Cablevision β meant to run as a fun background TV feed.
It follows the same pattern as Community Bulletin TV:
- Player page: displays the guide + a video box that plays bumpers/trailers/ads
- Editor page: uploads videos and edits the JSON config
- JSON driven: channels + programming template + player behavior
Location / URL
- Folder:
/var/www/html/amigaz/prevue
- Player:
https://www.amigaz.org/prevue/player/
- Editor:
https://www.amigaz.org/prevue/editor/
Related Pages
Features
Player
- Top-left: video playback slot
- Between clips: optional WeatherStar 4K+ cut-in (iframe)
- Top-right: βNow Playingβ info + controls (mute/unmute/next)
- Bottom: channel grid (currently placeholder blocks; will be made real from schedule template)
Editor
- Loads and saves
guide.json
- Uploads bumper/trailer/ad clips into the video folder
- Lists available videos found on disk
Weather Integration (WS4K+)
Weather cut-ins use the WS4K+ permalink approach.
Because the WS4K+ URL can be very long, we created a short redirect on the weather site:
- Short link:
https://weather.amigaz.org/p/prevue
- Redirects to the long WS4K+ permalink (includes
&kiosk=true
)
Nginx snippet (weather.amigaz.org)
# Short link for Prevue (WS4K+ permalink redirect)
location = /p/prevue {
return 302 "https://weather.amigaz.org/?(LONG_PERMALINK_HERE)&kiosk=true";
}
Use
302
while tweaking, then optionally switch to
301
later.
Video Playback / Rotation
- Videos can be uploaded via the editor OR dropped in manually.
- Manual drop folder:
/var/www/html/amigaz/prevue/videos/bumpers/
The player pulls the video list from:
/prevue/api/list_videos.php
Supported extensions currently include:
- mp4, webm, ogg, mov, m4v
(Recommendation: MP4 H.264 + AAC for maximum browser compatibility.)
JSON Config
Main config:
/var/www/html/amigaz/prevue/data/guide.json
It contains:
- Settings: timezone, grid window, grid step
- Player behavior: fallback message, weather cut-in settings
- Channels list
- Template schedule blocks (recurring programming)
Example settings:
"weatherCutIn": {
"enabled": true,
"url": "https://weather.amigaz.org/p/prevue",
"durationSeconds": 15,
"mode": "betweenVideos",
"everyNClips": 5
}
This allows more space between weather (example: show weather every 5 clips).
Nginx Notes (www.amigaz.org)
Key lesson learned: do NOT use
^~
on the
/prevue/
location if you want regex PHP blocks to work.
Working pattern:
# PHP for /prevue/api/*.php
location ~ ^/prevue/api/.*\.php$ {
client_max_body_size 250m;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Prevue static
location /prevue/ {
client_max_body_size 250m;
index index.html;
try_files $uri $uri/ =404;
}
Upload sizing:
- If you see
413 Request Entity Too Large
, increase:
- nginx:
client_max_body_size
- PHP:
upload_max_filesize
and
post_max_size
in
/etc/php/8.3/fpm/php.ini
TODO / Next Steps
- Make the programming grid real (render actual blocks from
templateSchedule
)
- Add editor UI for programming blocks (instead of editing raw JSON)
- Add multi-folder rotation (trailers/ads/bumpers) and/or βrecipeβ based rotation
- Optionally add XMLTV import later as an adapter
Files / Structure
/var/www/html/amigaz/prevue/ ββ player/ β ββ index.html β ββ player.js β ββ player.css ββ editor/ β ββ index.html β ββ editor.js β ββ editor.css ββ api/ β ββ guide_get.php β ββ guide_save.php β ββ list_videos.php β ββ upload_video.php ββ data/ β ββ guide.json ββ videos/ ββ bumpers/
