NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Docker amd64 v
« Previous 1 2 3 4 5 … 9 Next »
Cannot transcode with Vaapi on intel GeminiLake [UHD Graphics 600]

 
  • 0 Vote(s) - 0 Average
Cannot transcode with Vaapi on intel GeminiLake [UHD Graphics 600]
prahal
Offline

Junior Member

France
Posts: 26
Threads: 2
Joined: Sep 2022
#1
2022-09-25, 03:34 AM
I believe you should install i965-va-driver-shaders in the docker container instead of i965-va-driver. It is a non-free Debian package but is fully MIT licensed. The issue with its Debian freeness is that it ships blobs without sources (any of the shaders) that are thus removed in the Debian free i965-va-driver.

Jellyfin ended up rebuilding the intel-vaapi-driver and shipping it in their docker image in https://github.com/jellyfin/jellyfin-ffmpeg/pull/33, but I do not see the point as i965-va-driver-shaders is the intel-vaapi-driver code (the Debian free version is the same but with blobs stripped)


This fix this error that prevents transcoding (viewing TV in the browser):
Code:
[39] GetStatus() got transcoder
[39] GetStatus()@2
[39] GetStatus()@3
[39] GetStatus()@exit
[39] {"status": "Receiving Data. (5648272)","final": false,"speed": 0,"duration": 0,"percentage": 0}
[41] [FFMPEG]: ffmpeg: i965_encoder.c:1692: intel_enc_hw_context_init: Assertion `encoder_context->mfc_context' failed.
[33] Client has disconnected
[39] Got request [192.168.10.175]: /services/service (channel.transcode.status)
[39] method=channel.transcode.status
[39] parameters:
[39]    method: channel.transcode.status
[39]    format: json
[39]    sid: f095d58d-4ee2-4b61-bec8-8e828d44cf65
[39]    client_ip: 192.168.10.175
[39]    user_agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
[39]    host_callback: ...
[39] GetStatus() got transcoder
[39] GetStatus()@nochild
[39] {"status": "Streaming Failed (transcoder exited)","final": true,"duration": 0,"percentage": 0}
[33] StopStream(1507334)...
[33] clientHandle[f095d58d-4ee2-4b61-bec8-8e828d44cf65] = 1507334
[33] Calling StopStream()
[33] http://localhost:33903/stream/stop?handle=6
2022-09-24 23:57:37:108 [INFO] received request
2022-09-24 23:57:37:108 [DEBUG] got request:
GET /stream/stop?handle=6 HTTP/1.1
Host: localhost:33903
Connection: Keep-Alive

that is:
Code:
ffmpeg: i965_encoder.c:1692: intel_enc_hw_context_init: Assertion `encoder_context->mfc_context' failed.


vainfo:
Code:
root@argos:/app# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Gemini Lake - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main              : VAEntrypointVLD
      VAProfileH264Main              : VAEntrypointEncSlice
      VAProfileH264Main              : VAEntrypointEncSliceLP
      VAProfileH264High              : VAEntrypointVLD
      VAProfileH264High              : VAEntrypointEncSlice
      VAProfileH264High              : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264StereoHigh        : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                  : VAEntrypointVideoProc
      VAProfileJPEGBaseline          : VAEntrypointVLD
      VAProfileJPEGBaseline          : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain              : VAEntrypointVLD
      VAProfileHEVCMain10            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,643
Threads: 767
Joined: Nov 2003
#2
2022-09-25, 03:47 AM
Did you remember to map /dev/dri into the docker container? (may not be the problem here, but is required)
prahal
Offline

Junior Member

France
Posts: 26
Threads: 2
Joined: Sep 2022
#3
2022-09-28, 11:23 PM
Yes, I do have /dev/dri mapped.
All in all,  otherwise installing a package with the shaders without sources would not help.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,643
Threads: 767
Joined: Nov 2003
#4
2022-09-29, 03:05 AM
It's not that clear to me what exactly I'd need to do to get i965-va-driver-shaders into the docker image, but I'll try to take a look for the next release.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,810
Threads: 954
Joined: May 2006
#5
2022-09-29, 12:20 PM
@prahal did you test to confirm that this works? I just opened a bash shell to my Docker and it does allow me to run apt install i965-va-driver-shaders to replace the default driver. My Docker is not Intel.

Martin
prahal
Offline

Junior Member

France
Posts: 26
Threads: 2
Joined: Sep 2022
#6
2022-09-29, 03:51 PM
@sub the intel driver with shaders is required to get VAAPI encoding working on intel graphics (at least some of them if not all).
Hardware decoding works fine with the default intel driver (the one with some shaders removed from the Debian package, due to missing sources for these shaders). But encoding does not.
Thus this encoding shaders package version is required to get transcoding when the transcoder is set to VAAPI on an intel graphics host.
Setting the transcoder to CPU is a workaround.

Here this matter is for the NextPVR web client which transcodes (while the Kodi NextPVR plugin is fine I believe because it gets native format from the server).

@mvallevand yes I tested it and confirms the web client with transcoding set to VAAPI still works with intel-va-driver-shaders. If I revert to intel-va-driver I get in the web client after "Receiving Data. (<number>) " completes the error "Streaming Failed (transcoder exited)" and no playback.
Note that after getting the error "Streaming Failed (transcoder exited)" I had to restart the container else this error persisted even after installing intel-va-driver-shaders. This should be taken care of by the docker upgrade and then restarting the container. But a tester messing with the packages by hand might encounter this problem (I believe NextPVR get stuck but I did not know how to restart only NextPVR from inside the container, so reloading the full container seems good enough for me)

Jellyfin also installed the intel va driver with shaders but they were confused in my opinion. They chose not to install the Debian "non-free" (as in missing a few sources but license ok) and to build and ship the git repository this Debian non-free package source is built from. To me it is the same, they ship the git repository binaries without sources the same as the Debian non-free package.
prahal
Offline

Junior Member

France
Posts: 26
Threads: 2
Joined: Sep 2022
#7
2022-09-29, 03:53 PM
I also opened a docker shell into the NextPVR container.
Code:
docker exec -ti nextpvr /bin/bash

Mind the container is not intel per see, it supports all hardwares. What is Intel graphics is the docker host (whose /dev/dri is mapped into the docker container).

Cheers.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,643
Threads: 767
Joined: Nov 2003
#8
2022-09-29, 05:00 PM
(2022-09-29, 03:51 PM)prahal Wrote: @sub the intel driver with shaders is required to get VAAPI encoding working on intel graphics (at least some of them if not all).
Hardware decoding works fine with the default intel driver (the one with some shaders removed from the Debian package, due to missing sources for these shaders). But encoding does not.
It certainly was working in the past for encode. I took your post as meaning I'd possibly broken it in NextPVR v6, which changed the based image used inside the container (and maybe something required for vaapi is now missing). I admitted did not test vaapi in docker during my v6 testing.

I wasn't able to 'apt install i965-va-driver-shaders'. Did you need to add some repo for it?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,810
Threads: 954
Joined: May 2006
#9
2022-09-29, 05:12 PM
Sub, when I checked with my v5 docker it was there. Do you use the multiverse repo?

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,643
Threads: 767
Joined: Nov 2003
#10
2022-09-29, 10:42 PM
(2022-09-29, 05:12 PM)mvallevand Wrote: Sub, when I checked with my v5 docker it was there.  Do you use the multiverse repo?
I don't explicitly add it.

v6 moved to being based on "mcr.microsoft.com/dotnet/aspnet:6.0", which is based on debian bullseye based.

Code:
root@a4b81c8fd858:/app# more /etc/apt/sources.list
# deb http://snapshot.debian.org/archive/debian/20220822T000000Z bullseye main
deb http://deb.debian.org/debian bullseye main
# deb http://snapshot.debian.org/archive/debian-security/20220822T000000Z bullseye-security main
deb http://deb.debian.org/debian-security bullseye-security main
# deb http://snapshot.debian.org/archive/debian/20220822T000000Z bullseye-updates main
deb http://deb.debian.org/debian bullseye-updates main
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Add Intel iHD Driver to Docker Image for NextPVR thelanofvilles 8 1,271 2024-06-16, 08:10 PM
Last Post: thelanofvilles
  Vaapi on Intel 11th Gen integrated graphics PaddytheKiwi 10 3,351 2022-04-17, 08:40 PM
Last Post: PaddytheKiwi

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode