Nginx script for creating m3u playlist from video directory.
Supported videos by extension: avi, mkv, mp4, ts.
Also supports m3u and source LiveProxy playlists.
Script requires Nginx variable $video_dir. Sample nginx.conf:
load_module /usr/lib/nginx/modules/ngx_http_js_module.so;http{include mime.types;default_type application/octet-stream; js_import /path/to/ssiptv.js;sendfile on;keepalive_timeout65;server{listen <port>; # Path for static filesset$video_dir /path/to/video/directory;root$video_dir;autoindex on;location~\.m3u$ {js_content ssiptv.m3u;} # playlists with commands for LiveProxylocation~\.liveproxy$ {js_content ssiptv.liveproxy;}}}In SS IPTV add external playlist with url http://ip:port/.m3u.
Where ip is Nginx's IP, port is from listen <port> directive.
If there is a picture (jpg or png) with the same basename as video or directory it will be used as logo.
Script converts commands from playlist.liveproxy files to LiveProxy's base64 urls. Sample file (from LiveProxy docs):
#EXTM3U#EXTINF:-1,Arte FRstreamlink https://www.arte.tv/fr/direct/ 720p,720p_alt,best#EXTINF:-1,France24streamlink https://www.youtube.com/user/france24 best#EXTINF:-1tvg-id="EuroNews"tvg-name="EuroNews",Euronewsstreamlink https://www.euronews.com/live best#EXTINF:-1,France24youtube-dl https://www.youtube.com/user/france24/live