# Advanced Topics ## FFMPEG We build our own ffmpeg from the jellyfin repo (version 4.4.1-4), which includes: - Hardware acceleration support for both Intel and AMD (VAAPI) - Multiple codec support (H.264, HEVC, VP9, etc.) - Optimized for streaming workloads Hardware acceleration is automatically detected. To enable it, you must expose your GPU device to the container. ### Support for Intel/AMD GPU Transcoding (VAAPI) If you have a supported Intel or AMD GPU on Linux, you can enable hardware transcoding by passing the `dri` device to the container: **Docker Compose:** ```yaml services: stremio: # ... your other config devices: - "/dev/dri:/dev/dri" ``` **Docker CLI:** ```bash docker run -d \ # ... your other flags --device /dev/dri:/dev/dri \ tsaridas/stremio-docker:latest ``` ## Builds Builds are created for the following architectures: - `linux/amd64` - `linux/arm/v6` - `linux/arm/v7` - `linux/arm64/v8` - `linux/ppc64le` Images are automatically built and tested on pull requests using GitHub Actions. **Build tags:** - `latest`: Builds when a new version of the server or Web Player is released. - `nightly`: Builds daily from the development branch of the web player. - `vX.X.X`: Specific release versions. Images are hosted on [Docker Hub](https://hub.docker.com/r/tsaridas/stremio-docker). ## Customizing Local Storage Stremio's web app stores settings in the browser's local storage. You can pre-configure these settings by editing the `localStorage.json` file and mounting it into the container: ```bash docker run -d \ # ... your other flags -v /path/to/your/localStorage.json:/srv/stremio-server/build/localStorage.json \ tsaridas/stremio-docker:latest ``` ## Shell The old Stremio shell files are available at `http(s):///shell/`. These may have issues with some content like YouTube videos. ## Updating To update to the latest version, simply run: ```bash docker stop stremio-docker docker rm stremio-docker docker pull tsaridas/stremio-docker:latest ``` And then run your `docker run` or `docker compose up -d` command again. ## DNS Caching Stremio can be heavy on DNS queries. It's recommended to use a local DNS cache like `dnsmasq` to improve performance. ## Idle Restart The `restart_if_idle.sh` script can restart the Stremio server when it's not in use. You can add this as a healthcheck in your `compose.yaml`: ```yaml healthcheck: test: ["CMD-SHELL", "./restart_if_idle.sh"] interval: 1h start_period: 1h retries: 1 ``` ## Security - **HTTP Basic Authentication:** Supported via `USERNAME` and `PASSWORD` environment variables. - **HTTPS:** Automatic certificate generation is enabled when `IPADDRESS` is set. - **CORS:** Can be disabled for local deployments with `NO_CORS=1`. - **Minimal Images:** All images are built on Alpine with minimal dependencies. ## Known Issues - Unable to login through Facebook. ## Suggestions ### Performance Optimization 1. **Use DNS caching** with `dnsmasq` to reduce DNS query overhead 2. **Enable hardware acceleration** if you have a supported GPU 3. **Use SSD storage** for the mounted volume to improve cache performance 4. **Monitor resource usage** and adjust container limits if needed ### Troubleshooting 1. **Check logs:** `docker logs stremio-docker` 2. **Verify port exposure:** Ensure port 8080 is properly exposed 3. **Check certificate generation:** Look for `.pem` files in the mounted volume 4. **Test connectivity:** Verify the container can reach external services