openshot-qt icon indicating copy to clipboard operation
openshot-qt copied to clipboard

GPU rendering doesn't work

Open Robin-Sch opened this issue 4 years ago • 11 comments

Describe the bug: None of the GPU renders works (GPU: NVIDIA GeForce GTX 1650)

Steps to reproduce the behavior:

  1. Render a video on VA-API, QSV or NVENC
  2. see the error

Expected behavior: It should render

System Details:

  • OpenShot Version [e.g. 2.4.3]: 2.5.1
  • Operating System / Distro: Arch Linux

Screenshots: (Optional) https://cdn.discordapp.com/attachments/746418631029686362/830027285980774451/unknown.png https://cdn.discordapp.com/attachments/746418631029686362/830027361507737610/unknown.png https://cdn.discordapp.com/attachments/746418631029686362/830027446925131796/unknown.png

Robin-Sch avatar Apr 09 '21 10:04 Robin-Sch

NVENC:

Encodiing Device Nr: 0
[mp4 @ 0x5626d607cdc0] pts (512) < dts (1536) in stream 0
[mp4 @ 0x5626d607cdc0] pts (1024) < dts (2048) in stream 0
[mp4 @ 0x5626d607cdc0] pts (1536) < dts (2560) in stream 0
[mp4 @ 0x5626d607cdc0] pts (2048) < dts (3072) in stream 0
[mp4 @ 0x5626d607cdc0] pts (2560) < dts (3584) in stream 0
[mp4 @ 0x5626d607cdc0] pts (3072) < dts (4096) in stream 0
      export:INFO Error type string: Error while writing raw video frame

QSV:

[h264_qsv @ 0x5626d6e75d00] Error initializing an internal MFX session: unsupported (-3)
     export:INFO Error type string: Could not open video codec

VA_API:

Encodiing Device Nr: 0
[AVHWDeviceContext @ 0x5626d600c500] Failed to initialise VAAPI connection: -1 (unknown libva error).
     export:INFO Error type string: Could not create hwdevice

Robin-Sch avatar Apr 09 '21 10:04 Robin-Sch

I can repro this with an Nvidia RTX 2060 on Ubuntu 20.10

alichtman avatar Apr 20 '21 09:04 alichtman

Same issue on 21.04 with a GTX 1080.

iSLC avatar Apr 27 '21 21:04 iSLC

Same problem with GTX-750ti

Ma5t3rful avatar May 09 '21 05:05 Ma5t3rful

I also tried QSV again (OpenShot-v2.5.2-release-candidate-6915-f344214c-5487efb2-x86_64.exe) after not using it for a long time, I recently turned on the built-in Intel HD. I have used it in old versions (2.4.x I guess).

Now it seems that after selecting QSV for the output the CPU does the encoding: the speed is the same and the GPU usage shows usage at 0%. The Preferences also display no hardware decode/encode.

I switched to testing a newer version (was with 2.5.1, I don't know which exact built), because after turning-on the Intel HD again, clicking "Preferences" caused a crash of the program.

Twenkid avatar Jul 15 '21 15:07 Twenkid

The same crash happens to me when opening preferences on a Core i5-10400 CPU and Ubuntu 21.04 and OpenShot 2.6.0. I also get "Could not open video codec" when selecting VAAPI or QSV on export. Happens on both XOrg and Wayland.

Version Info:

INFO app: openshot-qt version: 2.6.0-dev
INFO app: libopenshot version: 0.2.6-dev
INFO app: platform: Linux-5.11.0-34-generic-x86_64-with-glibc2.33
INFO app: processor: x86_64
INFO app: machine: x86_64
INFO app: python version: 3.9.5
INFO app: qt5 version: 5.15.2
INFO app: pyqt5 version: 5.15.4

Crash when opening preferences dialog:

Hardware decoding device number: 0
Hardware decoding device number: 0
Caught signal 11 (SIGSEGV)
---- Unhandled Exception: Stack Trace ----
  /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so (                                           + 0x3392c1)  [0x7f0464aeb2c1]
  /lib/x86_64-linux-gnu/libva.so.2 ( vaGetImage                                + 0x5c  )  [0x7f056278433c]
  /lib/x86_64-linux-gnu/libavutil.so.56 (                                           + 0x36b0d)  [0x7f0566c88b0d]
  /lib/x86_64-linux-gnu/libavutil.so.56 (                                           + 0x3707f)  [0x7f0566c8907f]
  /lib/x86_64-linux-gnu/libavutil.so.56 ( av_hwframe_transfer_data                  + 0xe3  )  [0x7f0566c7da43]
  /lib/x86_64-linux-gnu/libavutil.so.56 ( av_hwframe_transfer_data                  + 0x166 )  [0x7f0566c7dac6]
  /lib/x86_64-linux-gnu/libopenshot.so.20 ( openshot::FFmpegReader::GetAVFrame()      + 0x535 )  [0x7f05441b07b5]
  /lib/x86_64-linux-gnu/libopenshot.so.20 ( openshot::FFmpegReader::ReadStream(long)  + 0xb27 )  [0x7f05441be447]
  /lib/x86_64-linux-gnu/libopenshot.so.20 ( openshot::FFmpegReader::GetFrame(long)    + 0x772 )  [0x7f05441bef12]

pHr34kY avatar Sep 08 '21 12:09 pHr34kY

same error with garuda/linux NVIDIA GeForce RTX 2070

fcolecumberri avatar Jan 09 '22 15:01 fcolecumberri

AMD RX5 550 Same issue

me too with Nvidia GTX 3060 Linux driver 515.48.07

bnounours avatar Jun 13 '22 21:06 bnounours

I believe I have similar problem. Same error messages as OP. Verbose log attached. The version of Openshot 2.6.1 in flathub does render the project but is old and missing the video filter I need for my project.

One interesting bit of data is that when using the NVENC MP4 h.264 target the render appears to start and even process a few frames. See screenshot below.

image

OS: PopOS 22.04 RAM: 64GB CPU: AMD® Ryzen 7 5800x 8-core processor GPU: NVIDIA Corporation GA106 [GeForce RTX 3060]

GNOME: 42.2 Windowing: X11

Installed via: APT/PPA

openshot-qt version: 2.6.1-dev libopenshot version: 0.2.7-dev platform: Linux-5.18.10-76051810-generic-x86_64-with-glibc2.35 processor: x86_64 machine: x86_64 python version: 3.10.4 qt5 version: 5.15.3 pyqt5 version: 5.15.6

GPU Details:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.48.07    Driver Version: 515.48.07    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:2D:00.0  On |                  N/A |
|  0%   54C    P0    30W / 170W |    693MiB / 12288MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

openshot-qt_submit.log

kerryhatcher avatar Aug 10 '22 22:08 kerryhatcher

Latest AppImage build from July 20, 2022, appears to work fine with GPU rendering. So I'd venture to say its some sort of dependency issue.

kerryhatcher avatar Aug 11 '22 00:08 kerryhatcher

Here is the answer from the Openshot development team:

• Hardware Acceleration in Windows is supported but limited. Those new settings that you see in the Performance tab are new, experimental, and not fully baked.

  • AMD is not yet supported.
  • Hardware acceleration is still experimental in OpenShot Video Editor.
  • NVIDIA NVENC acceleration is only available in Linux operating systems.
  • OpenShot v2.6.0 and later includes Intel® Quick Sync Video encoding in Windows operating systems. If you have a CPU that supports Intel®QSV encoding, you can use the encoder by selecting the ( QSV) MP4 (h.264 qsv) Target on the Export Video window. You do not have to change the Preferences window to use the Intel® QSV encoder."

• Hardware acceleration in OpenShot requires using the proprietary drivers from the distribution package manager instead of the NVIDIA drivers. You cannot use the Nouveau, Xorg, or open-source drivers.

Hardware Acceleration for Windows and AMD has been submitted as an enhancement request.

Colorjet3 avatar Feb 01 '23 02:02 Colorjet3

I still have this issue (all of them) on 3.1.1 with nvidia proprietary drivers on Linux. Only CPU rendering works (well, qsv isn't supposed to work on amd, but the error message could be better. Nvidia encoding should work :( )

$ modinfo nvidia filename: /lib/modules/6.3.2-arch1-1/extramodules/nvidia.ko.xz firmware: nvidia/530.41.03/gsp_tu10x.bin firmware: nvidia/530.41.03/gsp_ga10x.bin

cpu: Model name: AMD Ryzen 5 5600X 6-Core Processor CPU family: 25 Model: 33

video card: 0a:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 Rev. A] (rev a1)

raas avatar Jun 03 '23 19:06 raas

I have the same problem on Ubuntu 22.04c running ketnel 6.1 OEM. My system us very stable, no problem for over a year. My Va-api seems happy ;) But activating Va api in OPenshot 2.6 or daily 3.1 doesn t work as of 29 June 2023 :( Its really a great soft, I use it a lot ! WOuld be nice to have va api working under linux . THKS

image

hubyhuby avatar Jun 29 '23 07:06 hubyhuby