mirror of
https://github.com/joshuaboniface/rffmpeg.git
synced 2026-07-18 00:45:53 +00:00
Add notes about .nv folder with NVEnc/NVDec
This commit is contained in:
parent
7e6a27ac80
commit
ab99b29356
1 changed files with 22 additions and 1 deletions
23
README.md
23
README.md
|
|
@ -45,7 +45,7 @@ The exact path to the local `ffmpeg` and `ffprobe` binaries can be overridden in
|
|||
### Terminating rffmpeg
|
||||
|
||||
When running rffmpeg manually, *do not* exit it with `Ctrl+C`. Doing so will likely leave the `ffmpeg` process running on the remote machine. Instead, enter `q` and a newline ("Enter") into the rffmpeg process, and this will terminate the entire command cleanly. This is the method that Jellyfin uses to communicate the termination of an `ffmpeg` process.
|
||||
|
||||
`G
|
||||
## Full setup guide
|
||||
|
||||
This example setup is the one I use for `rffmpeg` with Jellyfin, involving a media server (`jf1`) and a remote transcode server (`gpu1`). Both systems run Debian GNU/Linux, though the commands below should also work on Ubuntu. Note that Docker is not officially supported with `rffmpeg` due to the complexity of exporting Docker volumes with NFS, the path differences, and the fact that I don't use Docker, but if you do figure it out a PR is welcome.
|
||||
|
|
@ -95,3 +95,24 @@ This example setup is the one I use for `rffmpeg` with Jellyfin, involving a med
|
|||
1. Jellyfin reads the output files from the NFS-exported temporary transcoding directory and plays back normally.
|
||||
|
||||
1. `rffmpeg` will also be used during other tasks in Jellyfin that require `ffmpeg`, for instance image extraction during library scans and subtitle extraction.
|
||||
|
||||
### NOTE for NVEnv/NVDec HWA
|
||||
|
||||
If you are using NVEnv/NVDec, it's probably a good idea to symlink the `.nv` folder inside the Jellyfin user's homedir (i.e. `/var/lib/jellyfin/.nv`) to somewhere outside of the NFS volume on both sides. For example:
|
||||
|
||||
```
|
||||
jf1 $ sudo mv /var/lib/jellyfin/.nv /var/lib/nvidia-cache
|
||||
jf1 $ sudo ln -s /var/lib/nvidia-cache /var/lib/jellyfin/.nv
|
||||
gpu1 $ sudo mkdir /var/lib/nvidia-cache
|
||||
gpu1 $ sudo chown jellyfin /var/lib/nvidia-cache
|
||||
gpu1 $ ls -alh /var/lib/jellyfin
|
||||
[...]
|
||||
lrwxrwxrwx 1 root root 17 Jun 11 15:51 .nv -> /var/lib/nvidia-cache
|
||||
[...]
|
||||
```
|
||||
|
||||
Be sure to adjust these paths to match your Jellyfin setup. The name of the target doesn't matter too much, as long as `.nv` inside the homedir is symlinked to it and it is owned by the `jellyfin` service user.
|
||||
|
||||
This is because some functions of FFMpeg's NVEnc/NVDec stack - specifically the `scale_cuda` and `tonemap_cuda` filters - leverage this directory to cache their JIT codes, and this can result in very slow startup times for FFMpeg on the remote side due to NFS locking issues.
|
||||
|
||||
Alternatively, you can simplify the NFS mount to only export and mount the directories that are actually required to pass transcoded data back (at the least, `transcodes` and `data/subtitles`) over NFS, and leave the rest of the directory local to the remote host, but this likely isn't required with this workaround and makes setup more complex. Feel free to experiment and find the best solution for your setup.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue