Skip to content

Commit

Permalink
Merge pull request #23 from troykelly/22-update-ffmpeg-container-to-a…
Browse files Browse the repository at this point in the history
…llow-for-deinterlacing

Cleanup and add Read me
  • Loading branch information
troykelly authored Jan 16, 2023
2 parents b61e679 + dd8cf61 commit d77cc4c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,43 @@
# docker-nvidia-cuda-ffmpeg-xteve
xTeVe with nvidia cuda ffmpeg

<div align="center" style="background-color: #111; padding: 100;">
<a href="https://github.com/xteve-project/xTeVe"><img width="880" height="200" src="https://github.com/xteve-project/xTeVe/raw/master/html/img/logo_b_880x200.jpg" alt="xTeVe" /></a>
</div>
<br>

# Unoffical NVIDIA® CUDA® enabled container for xTeVe

### M3U Proxy for Plex DVR and Emby Live TV.

Documentation for setup and configuration of xTeVe is [here](https://github.com/xteve-project/xTeVe-Documentation/blob/master/en/configuration.md).

---

## Features

#### CUDA Enabled ffmpeg

* Use hardware transcoding
* User hardware deinterlacing
* Other hardware related things I guess?
* Python3 installed for scripting

---

## Hardware GPU

#### Using your NVIDIA GPU

I use the below as the settings for the ffmpeg encoder (obviously with ffmpeg selected)

**H.265 / HEVC Encoding**

```text
-hide_banner -loglevel error -hwaccel cuda -hwaccel_output_format nv12 -i [URL] -c:v hevc_nvenc -pix_fmt yuv420p -preset llhp -tune ull -rc cbr -multipass disabled -movflags +faststart -zerolatency 1 -tag:v hvc1 -c:a aac -c:s copy -f mpegts pipe:1
```

You can also add deinterlacing etc to your pipeline should you wish

*CUDA® name and the CUDA logo are a registered trademarks of Nvidia Corporation*
*NVIDIA® name and the NVIDIA logo are a registered trademarks of Nvidia Corporation*
10 changes: 7 additions & 3 deletions xteve/rootfs/usr/local/bin/docker-xteve-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,22 @@ else
fi

chown -R ${UID}:${GID} /etc/xteve
sudo -H -u xteve -- "/usr/local/bin/xteve_enable_mappings"

if [[ -x "/usr/bin/xteve" ]]; then
echo >&2 "🆗 Ready 3"
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
echo >&2 "📺 Starting xteve with settings \"$@\""
sudo -H -u xteve -- "/usr/bin/xteve" "$@"
sudo -H -u xteve -- "/usr/local/bin/xteve_enable_mappings"
sudo -H -u xteve -- "/usr/bin/xteve" "$@" &
pid=$!
else
echo >&2 "📺 Executing \"$@\""
sudo -H -u xteve -- bash -c "$@"
sudo --preserve-env -H -u ffmpeg -- bash -c 'exec "$@"' bash-run "$@" &
pid=$!
fi
echo >&2 "🕴️ Waiting for process ${pid} to finish"
wait ${pid}
else
echo >&2 "🛑 No xteve executable"
fi

0 comments on commit d77cc4c

Please sign in to comment.