Merge pull request #32 from linuxserver/hwdecode

enable rpi hw decode, readme updates
This commit is contained in:
aptalca
2020-04-11 17:56:59 -04:00
committed by GitHub
8 changed files with 29 additions and 11 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1 +1,2 @@
open_collective: linuxserver open_collective: linuxserver
custom: ["https://opencollective.com/jellyfin",]

2
Jenkinsfile vendored
View File

@@ -58,7 +58,7 @@ pipeline {
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID env.PULL_REQUEST = env.CHANGE_ID
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md' env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE.md ./.github/PULL_REQUEST_TEMPLATE.md ./root/donate.txt'
} }
script{ script{
env.LS_RELEASE_NUMBER = sh( env.LS_RELEASE_NUMBER = sh(

View File

@@ -7,7 +7,7 @@
[![GitHub](https://img.shields.io/static/v1.svg?style=flat-square&color=E68523&label=linuxserver.io&message=GitHub&logo=github&logoColor=FFFFFF)](https://github.com/linuxserver "view the source for all of our repositories.") [![GitHub](https://img.shields.io/static/v1.svg?style=flat-square&color=E68523&label=linuxserver.io&message=GitHub&logo=github&logoColor=FFFFFF)](https://github.com/linuxserver "view the source for all of our repositories.")
[![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?style=flat-square&color=E68523&label=Supporters&logo=open%20collective&logoColor=FFFFFF)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget") [![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?style=flat-square&color=E68523&label=Supporters&logo=open%20collective&logoColor=FFFFFF)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget")
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring :- The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring:
* regular and timely application updates * regular and timely application updates
* easy user mappings (PGID, PUID) * easy user mappings (PGID, PUID)
@@ -83,6 +83,7 @@ docker create \
-v /path/to/movies:/data/movies \ -v /path/to/movies:/data/movies \
-v /opt/vc/lib:/opt/vc/lib `#optional` \ -v /opt/vc/lib:/opt/vc/lib `#optional` \
--device /dev/dri:/dev/dri `#optional` \ --device /dev/dri:/dev/dri `#optional` \
--device /dev/vc-mem:/dev/vc-mem `#optional` \
--device /dev/vchiq:/dev/vchiq `#optional` \ --device /dev/vchiq:/dev/vchiq `#optional` \
--device /dev/video10:/dev/video10 `#optional` \ --device /dev/video10:/dev/video10 `#optional` \
--device /dev/video11:/dev/video11 `#optional` \ --device /dev/video11:/dev/video11 `#optional` \
@@ -98,7 +99,7 @@ Compatible with docker-compose v2 schemas.
``` ```
--- ---
version: "2" version: "2.1"
services: services:
jellyfin: jellyfin:
image: linuxserver/jellyfin image: linuxserver/jellyfin
@@ -118,6 +119,7 @@ services:
- 8920:8920 #optional - 8920:8920 #optional
devices: devices:
- /dev/dri:/dev/dri #optional - /dev/dri:/dev/dri #optional
- /dev/vc-mem:/dev/vc-mem #optional
- /dev/vchiq:/dev/vchiq #optional - /dev/vchiq:/dev/vchiq #optional
- /dev/video10:/dev/video10 #optional - /dev/video10:/dev/video10 #optional
- /dev/video11:/dev/video11 #optional - /dev/video11:/dev/video11 #optional
@@ -142,6 +144,7 @@ Container images are configured using parameters passed at runtime (such as thos
| `-v /data/movies` | Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc. | | `-v /data/movies` | Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc. |
| `-v /opt/vc/lib` | Path for Raspberry Pi OpenMAX libs *optional*. | | `-v /opt/vc/lib` | Path for Raspberry Pi OpenMAX libs *optional*. |
| `--device /dev/dri` | Only needed if you want to use your Intel GPU for hardware accelerated video encoding (vaapi). | | `--device /dev/dri` | Only needed if you want to use your Intel GPU for hardware accelerated video encoding (vaapi). |
| `--device /dev/vc-mem` | Only needed if you want to use your Raspberry Pi MMAL video decoding (Enabled as OpenMax H264 decode in gui settings). |
| `--device /dev/vchiq` | Only needed if you want to use your Raspberry Pi OpenMax video encoding. | | `--device /dev/vchiq` | Only needed if you want to use your Raspberry Pi OpenMax video encoding. |
| `--device /dev/video10` | Only needed if you want to use your Raspberry Pi V4L2 video encoding. | | `--device /dev/video10` | Only needed if you want to use your Raspberry Pi V4L2 video encoding. |
| `--device /dev/video11` | Only needed if you want to use your Raspberry Pi V4L2 video encoding. | | `--device /dev/video11` | Only needed if you want to use your Raspberry Pi V4L2 video encoding. |
@@ -186,7 +189,7 @@ More information can be found in their official documentation [here](https://jel
Hardware acceleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container: Hardware acceleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container:
```--device=/dev/dri:/dev/dri``` `--device=/dev/dri:/dev/dri`
We will automatically ensure the abc user inside of the container has the proper permissions to access this device. We will automatically ensure the abc user inside of the container has the proper permissions to access this device.
@@ -200,16 +203,17 @@ We automatically add the necessary environment variable that will utilise all th
### OpenMAX (Raspberry Pi) ### OpenMAX (Raspberry Pi)
Hardware acceleration users for Raspberry Pi OpenMAX will need to mount their /dev/vchiq video device inside of the container and their system OpenMax libs by passing the following options when running or creating the container: Hardware acceleration users for Raspberry Pi MMAL/OpenMAX will need to mount their `/dev/vc-mem` and `/dev/vchiq` video devices inside of the container and their system OpenMax libs by passing the following options when running or creating the container:
``` ```
--device=/dev/vc-mem:/dev/vc-mem
--device=/dev/vchiq:/dev/vchiq --device=/dev/vchiq:/dev/vchiq
-v /opt/vc/lib:/opt/vc/lib -v /opt/vc/lib:/opt/vc/lib
``` ```
### V4L2 (Raspberry Pi) ### V4L2 (Raspberry Pi)
Hardware acceleration users for Raspberry Pi V4L2 will need to mount their /dev/videoX video devices inside of the container by passing the following options when running or creating the container: Hardware acceleration users for Raspberry Pi V4L2 will need to mount their `/dev/video1X` devices inside of the container by passing the following options when running or creating the container:
``` ```
--device=/dev/video10:/dev/video10 --device=/dev/video10:/dev/video10
@@ -218,6 +222,11 @@ Hardware acceleration users for Raspberry Pi V4L2 will need to mount their /dev/
``` ```
## Docker Mods
[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?style=for-the-badge&color=E68523&label=mods&query=%24.mods%5B%27jellyfin%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=jellyfin "view available mods for this container.")
We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) can be accessed via the dynamic badge above.
## Support Info ## Support Info
@@ -283,6 +292,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions ## Versions
* **11.04.20:** - Enable hw decode (mmal) on Raspberry Pi, update readme instructions, add donation info, create missing default transcodes folder.
* **11.03.20:** - Add Pi V4L2 support, remove optional transcode mapping (location is selected in the gui, defaults to path under `/config`). * **11.03.20:** - Add Pi V4L2 support, remove optional transcode mapping (location is selected in the gui, defaults to path under `/config`).
* **30.01.20:** - Add nightly tag. * **30.01.20:** - Add nightly tag.
* **09.01.20:** - Add Pi OpenMax support. * **09.01.20:** - Add Pi OpenMax support.

View File

@@ -27,3 +27,5 @@ repo_vars:
- CI_DOCKERENV='TZ=US/Pacific' - CI_DOCKERENV='TZ=US/Pacific'
- CI_AUTH='user:password' - CI_AUTH='user:password'
- CI_WEBPATH='' - CI_WEBPATH=''
sponsor_links:
- { name: "Jellyfin", url: "https://opencollective.com/jellyfin" }

View File

@@ -43,6 +43,7 @@ opt_param_volumes:
opt_param_device_map: true opt_param_device_map: true
opt_param_devices: opt_param_devices:
- { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "Only needed if you want to use your Intel GPU for hardware accelerated video encoding (vaapi)." } - { device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "Only needed if you want to use your Intel GPU for hardware accelerated video encoding (vaapi)." }
- { device_path: "/dev/vc-mem", device_host_path: "/dev/vc-mem", desc: "Only needed if you want to use your Raspberry Pi MMAL video decoding (Enabled as OpenMax H264 decode in gui settings)." }
- { device_path: "/dev/vchiq", device_host_path: "/dev/vchiq", desc: "Only needed if you want to use your Raspberry Pi OpenMax video encoding." } - { device_path: "/dev/vchiq", device_host_path: "/dev/vchiq", desc: "Only needed if you want to use your Raspberry Pi OpenMax video encoding." }
- { device_path: "/dev/video10", device_host_path: "/dev/video10", desc: "Only needed if you want to use your Raspberry Pi V4L2 video encoding." } - { device_path: "/dev/video10", device_host_path: "/dev/video10", desc: "Only needed if you want to use your Raspberry Pi V4L2 video encoding." }
- { device_path: "/dev/video11", device_host_path: "/dev/video11", desc: "Only needed if you want to use your Raspberry Pi V4L2 video encoding." } - { device_path: "/dev/video11", device_host_path: "/dev/video11", desc: "Only needed if you want to use your Raspberry Pi V4L2 video encoding." }
@@ -65,7 +66,7 @@ app_setup_block: |
Hardware acceleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container: Hardware acceleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container:
```--device=/dev/dri:/dev/dri``` `--device=/dev/dri:/dev/dri`
We will automatically ensure the abc user inside of the container has the proper permissions to access this device. We will automatically ensure the abc user inside of the container has the proper permissions to access this device.
@@ -79,16 +80,17 @@ app_setup_block: |
### OpenMAX (Raspberry Pi) ### OpenMAX (Raspberry Pi)
Hardware acceleration users for Raspberry Pi OpenMAX will need to mount their /dev/vchiq video device inside of the container and their system OpenMax libs by passing the following options when running or creating the container: Hardware acceleration users for Raspberry Pi MMAL/OpenMAX will need to mount their `/dev/vc-mem` and `/dev/vchiq` video devices inside of the container and their system OpenMax libs by passing the following options when running or creating the container:
``` ```
--device=/dev/vc-mem:/dev/vc-mem
--device=/dev/vchiq:/dev/vchiq --device=/dev/vchiq:/dev/vchiq
-v /opt/vc/lib:/opt/vc/lib -v /opt/vc/lib:/opt/vc/lib
``` ```
### V4L2 (Raspberry Pi) ### V4L2 (Raspberry Pi)
Hardware acceleration users for Raspberry Pi V4L2 will need to mount their /dev/videoX video devices inside of the container by passing the following options when running or creating the container: Hardware acceleration users for Raspberry Pi V4L2 will need to mount their `/dev/video1X` devices inside of the container by passing the following options when running or creating the container:
``` ```
--device=/dev/video10:/dev/video10 --device=/dev/video10:/dev/video10
@@ -99,6 +101,7 @@ app_setup_block: |
# changelog # changelog
changelogs: changelogs:
- { date: "11.04.20:", desc: "Enable hw decode (mmal) on Raspberry Pi, update readme instructions, add donation info, create missing default transcodes folder." }
- { date: "11.03.20:", desc: "Add Pi V4L2 support, remove optional transcode mapping (location is selected in the gui, defaults to path under `/config`)." } - { date: "11.03.20:", desc: "Add Pi V4L2 support, remove optional transcode mapping (location is selected in the gui, defaults to path under `/config`)." }
- { date: "30.01.20:", desc: "Add nightly tag." } - { date: "30.01.20:", desc: "Add nightly tag." }
- { date: "09.01.20:", desc: "Add Pi OpenMax support." } - { date: "09.01.20:", desc: "Add Pi OpenMax support." }

1
root/donate.txt Normal file
View File

@@ -0,0 +1 @@
Jellyfin: https://opencollective.com/jellyfin

View File

@@ -2,7 +2,7 @@
# create directories # create directories
mkdir -p \ mkdir -p \
/config/{log,data,cache} \ /config/{log,data/transcodes,cache} \
/data \ /data \
/transcode /transcode
@@ -11,6 +11,7 @@ chown abc:abc \
/config \ /config \
/config/* \ /config/* \
/data \ /data \
/data/transcodes \
/transcode /transcode
if [ -n "$(ls -A /data 2>/dev/null)" ]; then if [ -n "$(ls -A /data 2>/dev/null)" ]; then
chown abc:abc \ chown abc:abc \

View File

@@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
FILES=$(find /dev/dri /dev/dvb /dev/vchiq /dev/video1? -type c -print 2>/dev/null) FILES=$(find /dev/dri /dev/dvb /dev/vchiq /dev/vc-mem /dev/video1? -type c -print 2>/dev/null)
for i in $FILES for i in $FILES
do do