Jump to content


Photo

Docker VAAPI with Quadro P2000 Error

docker vaapi hardware transcode

  • Please log in to reply
22 replies to this topic

#1 Codeh OFFLINE  

Codeh

    Advanced Member

  • Members
  • 38 posts
  • Local time: 05:11 AM

Posted 13 October 2018 - 10:57 AM

Hello,

 

I'm having difficulty getting hardware transcoding working.

 

Docker /dev/dri

/ # ls -l /dev/dri
total 0
crwxrwxrwx    1 root     44        226, 128 Oct 13 14:11 renderD128

Host /dev/dri

> ls -l /dev/dri
total 0
drwxr-xr-x  2 root root       120 Oct  1 18:01 ./
drwxr-xr-x 18 root root      3.7K Oct 13 10:22 ../
crw-rw----  1 root video 226,   0 Oct  1 18:01 card0
crw-rw----  1 root video 226,   1 Oct  1 18:01 card1
crw-rw----  1 root video 226,  64 Oct  1 18:01 controlD64
crw-rw----  1 root video 226, 128 Oct  1 18:01 renderD128

guid of video is 44.

 

Hardware acceleration is set to: Video Acceleration API (VA API)

VA API Device is set to: /dev/dri/renderD128

 

Full ffmpeg log is attached.

 

Log error:

[AVHWDeviceContext @ 0x2185940] libva: va_getDriverName() failed with unknown libva error,driver_name=(null)
[AVHWDeviceContext @ 0x2185940] Failed to initialise VAAPI connection: -1 (unknown libva error).
Device creation failed: -5.
Failed to set value '/dev/dri/renderD128' for option 'vaapi_device': Input/output error


Error parsing global options: Input/output error

Host video cards:

> lshw -numeric -C display
  *-display
       description: VGA compatible controller
       product: MGA G200eW WPCM450 [102B:532]
       vendor: Matrox Electronics Systems Ltd. [102B]
       physical id: 1
       bus info: pci@0000:08:01.0
       version: 0a
       width: 32 bits
       clock: 33MHz
       capabilities: pm vga_controller bus_master cap_list rom
       configuration: driver=mgag200 latency=64 maxlatency=32 mingnt=16
       resources: irq:16 memory:dd000000-ddffffff memory:df000000-df003fff memory:de800000-deffffff memory:c0000-dffff
  *-display
       description: VGA compatible controller
       product: GP106GL [10DE:1C30]
       vendor: NVIDIA Corporation [10DE]
       physical id: 0
       bus info: pci@0000:83:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:77 memory:fa000000-faffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:d000(size=128) memory:fb000000-fb07ffff

Any and all suggestions are welcome!



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153073 posts
  • Local time: 06:11 AM

Posted 13 October 2018 - 11:47 AM

Hi, have you added emby to the video group?

#3 Codeh OFFLINE  

Codeh

    Advanced Member

  • Members
  • 38 posts
  • Local time: 05:11 AM

Posted 13 October 2018 - 11:54 AM

Luke, thank you for your reply.

 

I believe I have that set, though I may have done it incorrectly. I have also restarted the container after making these changes.

 

Host user:

> id serviceworker
uid=1001(serviceworker) gid=1001(serviceworker) groups=1001(serviceworker),44(video)

Processes inside container:

/ # ps -ef | grep Emby
  198 1001      0:38 /system/EmbyServer -programdata /config -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3


#4 mastrmind11 OFFLINE  

mastrmind11

    Advanced Member

  • Members
  • 3015 posts
  • Local time: 06:11 AM
  • LocationLong Island, NY

Posted 13 October 2018 - 03:42 PM

the question is do you really need it?  in my experience, hardware acc is hit or miss, and 99% of the time not worth the effort.



#5 Codeh OFFLINE  

Codeh

    Advanced Member

  • Members
  • 38 posts
  • Local time: 05:11 AM

Posted 13 October 2018 - 10:11 PM

mastermind11, I don't need it, but I purchased the card specifically for use with Emby.

 

I accept that hardware transcoding might not work all of the time, but it would be nice to have the option working.



#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153073 posts
  • Local time: 06:11 AM

Posted 14 October 2018 - 02:45 AM

Can you please attach a complete ffmpeg log example? thanks.



#7 Codeh OFFLINE  

Codeh

    Advanced Member

  • Members
  • 38 posts
  • Local time: 05:11 AM

Posted 14 October 2018 - 08:28 AM

Thought I had it attached in the first post, my mistake. Logfile is attached now.

 

edit: looks like the basic attachment uploader doesn't work. Attached now using the flash uploader.

Attached Files


Edited by Codeh, 14 October 2018 - 08:29 AM.


#8 mastrmind11 OFFLINE  

mastrmind11

    Advanced Member

  • Members
  • 3015 posts
  • Local time: 06:11 AM
  • LocationLong Island, NY

Posted 14 October 2018 - 08:35 AM

Silly question, but did you enable it in your docker run command?



#9 Codeh OFFLINE  

Codeh

    Advanced Member

  • Members
  • 38 posts
  • Local time: 05:11 AM

Posted 14 October 2018 - 08:51 AM

my docker-compose is as follows. Do I need to add anything in order to enable it?

    emby:
        container_name: emby
        image: emby/embyserver:latest
        restart: always
        ports:
            - "9012:8096"
        volumes:
            - /usr/appdata/emby/config:/config
            - /mnt/virtual/movie:/media/movie
            - /mnt/virtual/tv:/media/tv
            - /usr/letsencrypt/config/etc/letsencrypt:/le-ssl
            - /tmp:/tmp
        devices:
            - /dev/dri/renderD128:/dev/dri/renderD128
            - /dev/nvidia0:/dev/nvidia0
            - /dev/nvidiactl:/dev/nvidiactl
        environment:
            - TZ=America/New_York
            - GID=1001
            - UID=1001
            - GIDLIST=44  


#10 dyslexicjedi OFFLINE  

dyslexicjedi

    Newbie

  • Members
  • 9 posts
  • Local time: 06:11 AM

Posted 02 November 2018 - 11:21 PM

I have the exact same problem, down to the same error messages with the same card. Let me know if you find a solution.



#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153073 posts
  • Local time: 06:11 AM

Posted 02 November 2018 - 11:26 PM

@Codeh did you find a solution?



#12 Codeh OFFLINE  

Codeh

    Advanced Member

  • Members
  • 38 posts
  • Local time: 05:11 AM

Posted 03 November 2018 - 09:41 AM

I never got it working. I have a feeling that it's a driver issue.

I would do more testing but I took my GPU out and won't be back to my server for a few days.

Which driver are you using? I think I was using the official Nvidia one

#13 Andy777 OFFLINE  

Andy777

    Advanced Member

  • Members
  • 117 posts
  • Local time: 12:11 PM

Posted 03 November 2018 - 05:30 PM

There has never been any implementation of vaapi for Nvidia hardware.

Vaapi is currently Intel (and very limited AMD) only.

See ffnpeg hwaccell intro documentation. Use Cuvid/nvdec/nvenc for Nvidia hw.

You are "trying to pump gasoline into a Tesla electric car".

#14 Codeh OFFLINE  

Codeh

    Advanced Member

  • Members
  • 38 posts
  • Local time: 05:11 AM

Posted 03 November 2018 - 06:17 PM

That makes a lot of sense. Guess I need to figure out how to get nvidia hardware acceleration inside of the docker container.

#15 dyslexicjedi OFFLINE  

dyslexicjedi

    Newbie

  • Members
  • 9 posts
  • Local time: 06:11 AM

Posted 03 November 2018 - 06:35 PM

@Andy777 is only slightly right, Nvidia has vdpau which uses the vaapi backend. So vaapi hw accelerated transcode still works with nvidia gpu's. I know this because I have plex side by side Emby and plex is able to vaapi hw transcode to my P2000 with no problem. Verified by process and load using nvidia-smi.

#16 dyslexicjedi OFFLINE  

dyslexicjedi

    Newbie

  • Members
  • 9 posts
  • Local time: 06:11 AM

Posted 03 November 2018 - 06:58 PM

Just to expand, I've got both Emby and Plex on the same system with the same vaapi config with the same P2000 card. Basically all variables are identical, so the issue must be in Emby's handling of the interface or something similar, since Plex does work.

#17 Andy777 OFFLINE  

Andy777

    Advanced Member

  • Members
  • 117 posts
  • Local time: 12:11 PM

Posted 08 November 2018 - 05:09 PM

I'd be happy to take a look at the Plex transcoder source if you can point me to it.

Maybe they are using the old (updated most recently in 2015) vdpau-libva wrapper which is abandoned.

AFAIK the Plex transcoder is based on ffnpeg so the source must be available by definition.

I might take the time to install linux to the computers that I have with Quadro p2000.

#18 Codeh OFFLINE  

Codeh

    Advanced Member

  • Members
  • 38 posts
  • Local time: 05:11 AM

Posted 08 November 2018 - 05:22 PM

@Andy777 According to https://github.com/D...-new-transcoder they have the ffmpeg source listed in their LICENSE file. the LICENSE file has http://downloads.ple...18-03-22.tar.gz listed as the most recent ffmpeg source.



#19 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153073 posts
  • Local time: 06:11 AM

Posted 08 November 2018 - 06:01 PM

It would be helpful to test our native package because that would help us isolate whether the problem is docker specific or not. thanks.



#20 Andy777 OFFLINE  

Andy777

    Advanced Member

  • Members
  • 117 posts
  • Local time: 12:11 PM

Posted 09 November 2018 - 04:48 PM

@Andy777 According to https://github.com/D...-new-transcoder they have the ffmpeg source listed in their LICENSE file. the LICENSE file has http://downloads.ple...18-03-22.tar.gz listed as the most recent ffmpeg source.



I rest my case.
See the dates and the issue that this is a (old) copy request by third party.

Edited by Andy777, 09 November 2018 - 04:54 PM.






Also tagged with one or more of these keywords: docker, vaapi, hardware, transcode

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users