No description
- Rust 97.6%
- CSS 2.4%
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| config.txt | ||
| LICENSE | ||
| README.md | ||
| style.css | ||
Serve Stream Layout
serve_stream_layout is a CLI application for generating a "Home Page" like layout for a MediaMTX server. The recommended way to use it is by generating snapshots for every MediaMTX stream using the RunOnReady feature. This app looks for files in a directory (assumes all files are images, ) and generates an index.html file containing a (n,1|2) grid layout displaying the pictures with hyperlinks to a path appending the filename to a given URL.
Usage
-
Create a config file (e.g. config.txt) with lines
option=value. -
The application requires the definition of 5 options (
indir,outdir,url,streamdir, andimgdir) in the config file:indir: Directory where files are located.indirmust be either in the same directory, or within a subdirectory of this application. Parent folders are not supported.
outdir: Directory to placeindex.html.url: Redirect URL for files. Will be appendedstreamdir,imgdir, and the filename with file extension truncated.- Example: url=
mydomain.com, streamdir=streams/,filename=streamname.png=> redirect=mydomain.com/streams/streamname
- Example: url=
streamdir: Local path where individual stream HTML files must be placed. Will also be appended tourlfor redirection from the home page.imgdir: Directory to append betwenurlandfilenamewhere images are served.filename: Assuming there is a picture atfiles/snapshots/mypic.jxl,filenamewill bemypic.
-
App can be run as
./serve_stream_layout config.txt
Building
git clone https://git.luispaulino.com/luispaulino/serve_stream_layout.git
cd serve_stream_layout
cargo build --release
./target/release/serve_stream_layout path_to_config_file