Metadata-Version: 2.5
Name: ei-media
Version: 0.3.0
Summary: Minimal media server with optional transcoding
Project-URL: Homepage, https://github.com/TakeoIschiFan/ei
Project-URL: Repository, https://github.com/TakeoIschiFan/ei
Project-URL: Issues, https://github.com/TakeoIschiFan/ei/issues
Project-URL: Releases, https://github.com/TakeoIschiFan/ei/releases
Author-email: takeoischifan <takeoischifan@github.com>
License: GPL-3.0-only
License-File: LICENSE
Keywords: dash,lan,media-server,streaming,video
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Multimedia :: Video
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# ei

Minimal media server with optional transcoding. Hassle-free streaming of media files to all devices on your network.

![The three ei screens — PIN login, media library, and video player — shown as a landscape triptych split by diagonal cuts](docs/screenshot.png)

## Features

- Batteries included web-based video player.
- Near-zero setup. Plug and play.
- Dynamic quality detection.
- Optional transcoding pipeline for goofy video/container formats.
- Optional hardware transcoding.
- Support for embedded and external subtitles.
- Support for multiple audio tracks.

## Run

Grab a standalone `ei` executable for your operating system from the [releases page](https://github.com/TakeoIschiFan/ei/releases).

Or install from PyPI if you have Python installed and prefer that:

```shell
pip install ei-media
# or
pipx install ei-media
# or
uv tool install ei-media
```

Or [install via Docker](https://github.com/TakeoIschiFan/ei/pkgs/container/ei). A sample configuration [docker-compose.yml](docker-compose.yml) file is provided.

For the direct installs above you also need [ffmpeg](https://ffmpeg.org/) available on your system.

Then start the server with:

```shell
ei . --transcode --no-pin
```

## Configuration

All configuration is via CLI flags (`ei --help`):

```shell
ei [DIR] [options]
```

### General Options:

    -d, --debug          Print debug output.
    -v, --version        Print the version and exit.

### Filesystem Options:

    DIR                  Media directory to serve.
                         Default: current directory.
    --recursive          Also descend into subdirectories.
                         Default: top level only.
    --extra-extensions EXTS
                         Extra container extensions to scan,
                         comma-separated (e.g. --extra-extensions
                         .nut,.mxf).
                         The built-in list already covers common
                         containers (mkv, mp4, webm, ts, avi, ...).
    --cache-dir DIR      Where probe metadata, segments, and
                         thumbnails are cached.
                         Default: ~/.cache/ei-media on Linux,
                         ~/Library/Caches/ei-media on macOS,
                         %LOCALAPPDATA%/ei-media on Windows.
    --cache-size SIZE    max cache size for video segments
                         Accepts suffixes KB/MB/GB, 0 = unlimited.
                         Default: 5GB.

### Network and Auth Options:

    --host HOST          Interface to listen on.
                         Default: 0.0.0.0 (LAN-wide).
    --port PORT          Port to listen on.
                         Default: 8509.
    --pin PIN            Require a 4-digit PIN. Default
                         behavior generates a random PIN
                         if not provided.
    --no-pin             Disable the PIN (open access).

### Video Options:

    --transcode          Enable the transcode stack
                         Default: off (direct stream-copy only).
    --nvenc              Encode with NVIDIA NVENC instead
                         of CPU. Make sure your ffmpeg and
                         graphics stack supports it.

## Contributing

Issues and PRs welcome.

This project uses `uv`:

```shell
# create .venv with dev tools
uv sync --group dev

# run the program
uv run python -m ei . --no-pin

# run lint and tests
uv run pytest
uv run ruff

# test CI locally: ruff + pytest + wheel + vendor + executables
bash scripts/check.sh --check --exe
```

## License

[GPLv3](LICENSE).
