Re: [Cin] Cinelerra & GPU
On 25.04.19 05:47, Phyllis Smith wrote:
Spurred on by the discussion and with additional information supplied by Sam, mods have been by GG and checked into GIT that take further advantage of the GPU capabilities of modern graphics boards and more recent device drivers for those boards.
This is *very preliminary* at this point. We have tested with Nvidia, Radeon, and Broadwell graphics board on AMD and Intel computers and ran at least 30 tests. In these tests, if you run "top" from another window, we could see the CPU usage with this API go down by 2 to 10 times lower,
How to use IF you have the appropriate graphics board and the proper libraries installed:
1) You need to have libva-dev installed on Intel processors; 2) or you need to have libvdpau-dev installed on AMD processors. 3) Verify Settings->Preferences, Playback, Video Driver is set to X11 (NOT X11-OpenGL). 4) Before starting CinelerraGG, set an environment variable -- because this is so new and we do not have the capability of testing across all hardware and all operating system distros, we used an environment variable in order to make it easily reversible by the user. To run in the installed directory:
CIN_HW_DEV=vaapi ./cin (for Intel) Or CIN_HW_DEV=vdpau ./cin
Dreams still come true. Thank you very much for this improvement. I tested it the same way, but I get the error message. Decoder h264 does not support device type vaapi. HW device init failed, using SW decode. file:/home/spc/cin-test/aerial-shot-of-las-vegas-sprawl-daytime_w18wevlbr__D.mp4 err: Success Under OpenSuse I installed the following package. zypper install libva-devel-2.4.0-lp150.114.1.x86_64.rpm In the Cin settings I have set it to X11. However, I have installed the proprietary drivers, do I need to change this? Thanks again for this implementation. Sam
Great news! I have Intel processor and Nvidia GTX460M with proprietary drivers. I have installed: libvdpau (for nvidia), CUDA, opencl-nvidia, libva and libva-vdpau-driver. I have not installed in my system: libva-utils and libva1. Arch linux has not dev version, only the items I've listed. What I need to use to test: vaapi o vdpau? I think vdpau for nvidia. Results for playback of a h264 movie: With CIN_HW_DEV=vaapi ./cin --> CPU 60% with CIN_HW_DEV=vdpau ./cin --> CPU 11% without vdpau or vaapi --> CPU 60%. With vdpau the whole system seems to me less reactive, but the playback FPS are always at their max (as in the other cases). I exit with CTRL+C voluntarily (I did not crash) to create a dump that I attach.
Andrea, What I need to use to test: vaapi o vdpau? I think vdpau for
nvidia.
Results for playback of a h264 movie:
With CIN_HW_DEV=vaapi ./cin --> CPU 60% with CIN_HW_DEV=vdpau ./cin --> CPU 11% without vdpau or vaapi --> CPU 60%.
Apparently, from the above statistics, you should use "vdpau"!!! I will see if GG can gain anything from the attached dump in the next email. *Everyone: *and thanks for testing!
This mod is going to react differently depending on the hardware used and the number of files loaded. For example, - if you have an epyc Amd chip with 128 CPUs and load 150 files, without vaapi/vdpau may be better. - if you load only a couple of files the GPU vaapi/vdpau should be faster depending on your graphics board and how capable it is. - if you load 10 MIXERS, it always seems to work a lot better playing them on our computers. - if you have 4 cores or less, but a really good "gaming card", using vaapi/vdpau should be a big help. It might be more difficult to analyze problems as a result because of the wide variation in hardware but everything should still work the same without the CIN_HW_CIN environment variable as it is isolated. We see mixed preliminary results so far. gg/Phyllis
Sam, I tested it the same way, but I get the error message.
Decoder h264 does not support device type vaapi. HW device init failed, using SW decode.
file:/home/spc/cin-test/aerial-shot-of-las-vegas-sprawl-daytime_w18wevlbr__D.mp4 err: Success
I "sort of" forgot to mention an important part -- when ffmpeg can not use
vaapi to decode a specific file, it backs down to using the software instead which is what the above message indicates. So I think it is really working for you -- check CPU % usage with "top" with and without CIN_HW_DEV to see the difference. Also, try it with MIXERS and you should see an obvious speedup. For example, awhile back you provided us a test case of 150 clips (cin_media) and a few of these could not be loaded by ffmpeg using the GPU (in this case 5 out of 150) and it will use "SW decode" (software instead). So you will see from the 150, the following: Failed to get HW surface format. HW device init failed, using SW decode. file:/proj/cin_media/aerial-of-empire-s...mp4 err: Success ... file:/proj/cin_media/aerial-over-hoboken...mp4 file:/proj/cin_media/aerial-zoom-to-empire...mp4 file:/proj/cin_media/empire-state-...mp4 file:/proj/cin_media/freedom-tower-...mp4 GG did test this successfully on Leap but of course with different hardware. gg/phyllis
Hi Phylis, I would like to test your procedure with the video card (Nvidia GTX-750Ti) on my computer (equipped with an Intel i7 3770k CPU), but I don't really understand the indications. If I follow you well First - Install "libva-dev" (since the CPU of my computer is made by Intel). Second - Use the "X11" video driver in Cin-GG. Then I don't understand the indications concerning a "environment variable". Does it simply mean that I launch Cin-GG by the command "CIN_HW_DEV=vaapi./cin" in a terminal opened from the folder where the Cin-GG installation is located? Pierre On 19-04-25 08 h 06, Sam wrote:
How to use IF you have the appropriate graphics board and the proper libraries installed:
1) You need to have libva-dev installed on Intel processors; 2) or you need to have libvdpau-dev installed on AMD processors. 3) Verify Settings->Preferences, Playback, Video Driver is set to X11 (NOT X11-OpenGL). 4) Before starting CinelerraGG, set an environment variable -- because this is so new and we do not have the capability of testing across all hardware and all operating system distros, we used an environment variable in order to make it easily reversible by the user. To run in the installed directory:
CIN_HW_DEV=vaapi ./cin (for Intel) Or CIN_HW_DEV=vdpau ./cin
Pierre: A Mint18 version will become available sometime later today; no problem. It got too late last night and we were not too sure how this was going to play out. We would REALLY APPRECIATE your testing. After hearing back from Andrea and Sam, I do not know if libva or libvdpau is the correct package to install. This was a total surprise and it looks like it is dependent on the graphics board and device drivers installed. Also, a total surprise from Sam's last statistics about using Cinelerra's device driver of OpenGL or X11. I will let you know when a Mint18 and Ubuntu18 build is available but we have some non-computer commitments today. gg/phyllis
Hi Pierre, Yes, that's right. You start Cinelerra from the terminal. I have entered the following: CIN_HW_DEV=vdpau ./cin You can try this: CIN_HW_DEV=vaapi./cin If you don't notice any difference, then you have to install the following package libva-vdpau-driver. I also have a Nvidia graphics card and CIN_HW_DEV=vdpau is the only one that works. I have also set X11-OpenGL in the Cinelerra settings. You have to try it, the best way to see it is to watch the CPU load. Less CPU load is better. Sam On 25.04.19 17:57, Pierre autourduglobe wrote:
Hi Phylis,
I would like to test your procedure with the video card (Nvidia GTX-750Ti) on my computer (equipped with an Intel i7 3770k CPU), but I don't really understand the indications.
If I follow you well
First - Install "libva-dev" (since the CPU of my computer is made by Intel).
Second - Use the "X11" video driver in Cin-GG.
Then I don't understand the indications concerning a "environment variable".
Does it simply mean that I launch Cin-GG by the command "CIN_HW_DEV=vaapi./cin" in a terminal opened from the folder where the Cin-GG installation is located?
Pierre
On 19-04-25 08 h 06, Sam wrote:
How to use IF you have the appropriate graphics board and the proper libraries installed:
1) You need to have libva-dev installed on Intel processors; 2) or you need to have libvdpau-dev installed on AMD processors. 3) Verify Settings->Preferences, Playback, Video Driver is set to X11 (NOT X11-OpenGL). 4) Before starting CinelerraGG, set an environment variable -- because this is so new and we do not have the capability of testing across all hardware and all operating system distros, we used an environment variable in order to make it easily reversible by the user. To run in the installed directory:
CIN_HW_DEV=vaapi ./cin (for Intel) Or CIN_HW_DEV=vdpau ./cin
Thanks for the clarification, Sam. A message from Phyllis tells me to wait for a new version for Mint-18.3 that will be ready later today. I guess the indications will then be a little more precise, namely whether the different procedures should be done according to the CPU manufacturer... or the GPU. Pierre On 19-04-25 12 h 07, Sam wrote:
Hi Pierre,
Yes, that's right. You start Cinelerra from the terminal. I have entered the following: CIN_HW_DEV=vdpau ./cin
You can try this: CIN_HW_DEV=vaapi./cin
If you don't notice any difference, then you have to install the following package libva-vdpau-driver. I also have a Nvidia graphics card and CIN_HW_DEV=vdpau is the only one that works. I have also set X11-OpenGL in the Cinelerra settings. You have to try it, the best way to see it is to watch the CPU load. Less CPU load is better.
Sam
On 25.04.19 17:57, Pierre autourduglobe wrote:
Hi Phylis,
I would like to test your procedure with the video card (Nvidia GTX-750Ti) on my computer (equipped with an Intel i7 3770k CPU), but I don't really understand the indications.
If I follow you well
First - Install "libva-dev" (since the CPU of my computer is made by Intel).
Second - Use the "X11" video driver in Cin-GG.
Then I don't understand the indications concerning a "environment variable".
Does it simply mean that I launch Cin-GG by the command "CIN_HW_DEV=vaapi./cin" in a terminal opened from the folder where the Cin-GG installation is located?
Pierre
On 19-04-25 08 h 06, Sam wrote:
How to use IF you have the appropriate graphics board and the proper libraries installed:
1) You need to have libva-dev installed on Intel processors; 2) or you need to have libvdpau-dev installed on AMD processors. 3) Verify Settings->Preferences, Playback, Video Driver is set to X11 (NOT X11-OpenGL). 4) Before starting CinelerraGG, set an environment variable -- because this is so new and we do not have the capability of testing across all hardware and all operating system distros, we used an environment variable in order to make it easily reversible by the user. To run in the installed directory:
CIN_HW_DEV=vaapi ./cin (for Intel) Or CIN_HW_DEV=vdpau ./cin
I think: GPU intel (internal) ---> vaapi GPU NVIDIA AMD (external) ---> vdpau Nvidia Optimus /Bumbelebee ---> ? (I do not use it)
Pierre: "what Sam said!" Here is the Mint version (created with 18.2): https://www.cinelerra-gg.org/download/testing/cinelerra-5.1-mint18-x86_64-st... If problems, report back. We still do not for sure whether to use vaapi or vdpau under which conditions -- GG says try 1 and if you get no results, try the other 😁😁 ! All feedback is welcome. gg/Phyllis *Ugin: * there is a new Ubuntu18 build too so I hope you are reading this -- it does NOT have the Tracer plugin fix in it though. https://www.cinelerra-gg.org/download/testing/cinelerra-5.1-ub18-x86_64-stat...
I guess the indications will then be a little more precise, namely whether the different procedures should be done according to the CPU manufacturer... or the GPU.
[I find this debate very interesting] (only simple playback of h264 movie with 2 audio tracks. My hardware is from 2011) My results with X11-openGL: With CIN_HW_DEV=vaapi ./cin --> CPU 67% (error in terminal) with CIN_HW_DEV=vdpau ./cin --> CPU 60% without vdpau or vaapi --> CPU 67% [Remenber results with X11 --> direct rendering on: With CIN_HW_DEV=vaapi ./cin --> CPU 60% with CIN_HW_DEV=vdpau ./cin --> CPU 11% without vdpau or vaapi --> CPU 60%]
participants (4)
-
Andrea paz -
Phyllis Smith -
Pierre autourduglobe -
Sam