No description
  • Rust 97.6%
  • CSS 2.4%
Find a file
2026-07-07 16:55:10 -04:00
src No need for nested mod 2026-01-22 08:52:26 -05:00
.gitignore Initial commit 2025-12-05 17:42:02 -05:00
Cargo.toml Initial commit 2025-12-05 17:42:02 -05:00
config.txt Add example config file 2026-01-17 03:10:37 -05:00
LICENSE Initial commit 2025-12-05 22:31:25 +00:00
README.md Update README 2026-01-17 03:10:55 -05:00
style.css Remove border on grid 2026-07-07 16:55:10 -04:00

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, and imgdir) in the config file:

    • indir: Directory where files are located.
      • indir must be either in the same directory, or within a subdirectory of this application. Parent folders are not supported.
    • outdir: Directory to place index.html.
    • url: Redirect URL for files. Will be appended streamdir, imgdir, and the filename with file extension truncated.
      • Example: url=mydomain.com, streamdir=streams/,filename=streamname.png => redirect=mydomain.com/streams/streamname
    • streamdir: Local path where individual stream HTML files must be placed. Will also be appended to url for redirection from the home page.
    • imgdir: Directory to append betwen url and filename where images are served.
      • filename: Assuming there is a picture at files/snapshots/mypic.jxl, filename will be mypic.
  • 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