Аппаратное ускорение nvidia linux

How to enable Hardware acceleration

I installed Ubuntu 16.04 and I have an NVIDIA GTX 1070 OC. I added this PPA: ppa:graphics-drivers/ppa And I installed the nvidia-370 package for my GTX 1070 OC. Then I played a 4K video file with HEVC Codec and excepted for hardware acceleration to be enabled to hardware decoding HEVC codec, but mpv player was using the software decoding mod. How can i fix this issue?

While that gpu should support hevc decoding maybe install vdpauinfo & ck. for support with vdpauinfo (- will list supported ) If good run mpv with —hwdec=vdpau —vo=vdpau options, see if it uses hw decoding.

1 Answer 1

Disclaimer: Sorry but it’s an answer for VLC, not mpv player. I believe there are bugs or lack of support in mpv player because in my setup, while VLC is working fine with low CPU, mpv player doesn’t. You may face the FFmpeg multithreading issue (see point 4).

I’ve really struggled to get this working, and I’m a bit disapointed of the limited NVIDIA GTX 10*0 (Pascal) HEVC support compared to AMD.

0. Check HEVC profile support

Edit: NVIDIA VDPAU driver now supports HEVC Main 10 profile on Linux since version 450.51+

Читайте также:  Zoom for linux ubuntu

Check media file HEVC profile: You can check your file HEVC profile by right-clicking on your file > Properties > Audio/Video tab > Video > Codec .

Check driver HEVC profiles support: Switch to the NVIDIA proprietary drivers (see below) and run:

$ vdpauinfo Information string: NVIDIA VDPAU Driver Shared Library 367.57 [crop] Decoder capabilities: name level macbs width height ---------------------------------------------------- [crop] HEVC_MAIN 153 262144 8192 8192 HEVC_MAIN_10 --- not supported --- HEVC_MAIN_STILL --- not supported --- HEVC_MAIN_12 --- not supported --- HEVC_MAIN_444 --- not supported --- $ vdpauinfo Information string: NVIDIA VDPAU Driver Shared Library 450.80.02 [crop] Decoder capabilities: name level macbs width height ---------------------------------------------------- [crop] HEVC_MAIN 153 262144 8192 8192 HEVC_MAIN_10 153 262144 8192 8192 HEVC_MAIN_STILL --- not supported --- HEVC_MAIN_12 153 262144 8192 8192 HEVC_MAIN_444 --- not supported --- 

1. Switch to NVIDIA proprietary drivers

You need at least version R367 ( nvidia-367 ).

Go to Additional drivers tab, check NVIDIA binary driver and Apply the changes.

2. Enable hardware acceleration in VLC

Of course, you must enable hardware acceleration in VLC > Tools > Preferences ( Simple ) > Input / Codecs > Hardware-acceleration decoding = Auto . For NVIDIA, you can choose VDPAU video decoder explicitely.

3. Update VLC to 2.2.4 or 3.0

There are several bugs in VLC 2.2.2 (Ubuntu 16.04), fixed in later versions (see: changelog), that lead to this misleading error:

$ vlc --version VLC media player 2.2.2 Weatherwax $ vlc [crop] [00007fa4b42cc5d8] vdpau_avcodec generic error: unsupported codec 1211250229 or profile 1 

That’s clearly a misleading and buggy error. Hard to tell, but 1211250229 does mean AV_CODEC_ID_HEVC (can be checked by compiling with rustc this rusty code). And we’ve seen from vdpauinfo that HEVC profile 1 (= Main ) is supported.

At this time, VLC 2.2.4 is not available from the official VLC PPA (check stable version here). So upgrade to VLC 3.0 from the master branch (check master version here) but keep in mind it’s a nightly release:

$ sudo add-apt-repository ppa:videolan/master-daily $ sudo apt update $ sudo apt install vlc $ vlc --version [crop] VLC version 3.0.0-git Vetinari 

4. Temporarily disable VLC FFmpeg multithreading

As this is not enough, you may now face this issue:

$ vlc --verbose [crop] [00007f6bc4ccc688] avcodec decoder warning: thread type 1: disabling hardware acceleration 

Explainations on this thread at VLC forum:

It means you’re using FFmpeg, which no longer allows enabling hardware acceleration and threading at the same time. You need to use libav [but] this is decided while compiling VLC. You can’t change it at run-time.

On the same thread, there’s a workaround: In VLC > Tools > Preferences (All) > Input / Codecs > Video codecs > FFmpeg, change the value of Threads from 0 (auto) to 1 .

Читайте также:  Linux find python packages

But that’s a manual workaround: keep in mind that to watch videos not GPU-accelerated, you should reset the VLC FFmpeg Threads setting to use all your CPU cores. or compile VLC from source with libav.

Источник

Воспроизведение HD-video

При проигрывании HD-видео в высоком качестве, ресурсов компьютера может быть недостаточно для декодирования, и видео начинает заметно «тормозить». Эта статья рассказывает о том, как заставить компьютер максимально быстро декодировать HD-видео.

SMPlayer

Установка SMPlayer

Установите SMPlayer через Центр приложений или из консоли:

sudo apt-get install smplayer

Настройка SMPlayer

После того как мы все установили, открываем SMPlayer:

Настройки → Быстродействие → Потоков декодирования выставляем значение равное количеству ядер вашего процессора.

Так же можно отключить петлевой фильтр, но это скажется на качестве:

Отключение двойной буферизации может повысить производительность, но вызвать мерцание субтитров:

Уже этого достаточно для плавного воспроизведения на компьютерах с многоядерным процессором.

Аппаратное ускорение декодирования видео

Настройка для видеокарт AMD и Nvidia (VDPAU)

Для использования аппаратного декодирования на видеокартах Nvidia необходимо установить проприетарный драйвер Nvidia. Подробнее об этом смотрите в статье Установка и настройка драйверов Nvidia.

VDPAU 1) — это набор библиотек для аппаратного декодирования видео, средствами видеокарт nVidia.

SMPlayer (рекомендуется)

Установите SMPlayer любым способом, например через Центр приложений.

Для задействования VDPAU, в настройках SMPlayer нужно выбрать:

XBMC Media Center (рекомендуется)

VLC

Установите VLC любым способом, например через Центр приложений.

Для задействования VDPAU, в настройках VLC нужно выбрать

Adobe Flash

В последней версии плагина Adobe Flash, поставляемого в комплекте с браузером Google Chrome 2) , имеется поддержка VDPAU.

Настройка для видеокарт AMD с проприетарным драйвером, а также Intel (VA-API)

VLC (рекомендуется для AMD с проприетарным драйвером)

Установите VLC любым способом, например через Центр приложений.

Читайте также:  Что такое linux своп

XBMC Media Center (рекомендуется для AMD)

SMPlayer (рекомендуется для Intel)

Для Ubuntu 14.04 добавляем репозиторий и устанавливаем пакет «mplayer-vaapi»:

sudo add-apt-repository ppa:sander-vangrieken/vaapi sudo apt-get update sudo apt-get install mplayer-vaapi

Затем в настройках SMPlayer:

XBMC Media Center (рекомендуется для Intel)

Кодеки

В отличии от Windows, большинство аудио/видео плееров в Linux имеют встроенные кодеки, или используют системные (общие для всех плееров). Но если у вас появились какие то проблемы с вопроизведением каких либо форматов, следует установить ubuntu-restricted-extras. Этот метапакет включает: кодеки, Adobe Flash Player, java, шрифты windows и все, что нужно для корректной работы большинства программ.

sudo apt-get install ubuntu-restricted-extras

Ссылки

VDPAU поддерживается видеокартами серии 8 и выше, но некоторые из них (8800GTS 320/640MB и 8800GTX) всё равно не поддерживаются.

  • Сайт
  • Об Ubuntu
  • Скачать Ubuntu
  • Семейство Ubuntu
  • Новости
  • Форум
  • Помощь
  • Правила
  • Документация
  • Пользовательская документация
  • Официальная документация
  • Семейство Ubuntu
  • Материалы для загрузки
  • Совместимость с оборудованием
  • RSS лента
  • Сообщество
  • Наши проекты
  • Местные сообщества
  • Перевод Ubuntu
  • Тестирование
  • RSS лента

© 2018 Ubuntu-ru — Русскоязычное сообщество Ubuntu Linux.
© 2012 Canonical Ltd. Ubuntu и Canonical являются зарегистрированными торговыми знаками Canonical Ltd.

Источник

Оцените статью
Adblock
detector