I think vdpau seems to be the right setting. I also have an Intel processor and an Nvidia graphics card. With vdpau I get the best results. The CPU is hardly used, but the FPS is almost always at maximum. Especially when I switch to X11-OpenGL, I only have 12% CPU load left. Subjectively I have the impression it plays a bit more smoothly. I notice the clearest difference at the fan of the computer. It is hardly noticeable with the hardware acceleration. Without hardware acceleration I get earache because the CPU fan gets extremely loud. Thanks to Andrea for the tip with libva-vdpau post-installation, that's how I got it to work. Here are my tests: X11 CIN_HW_DEV=off ./cin -> CPU 58% CIN_HW_DEV=vdpau ./cin -> CPU 32% CIN_HW_DEV=vaapi ./cin -> CPU 82% X11-OpenGL CIN_HW_DEV=off ./cin -> CPU 48% CIN_HW_DEV=vdpau ./cin -> CPU 12% :-) CIN_HW_DEV=vaapi ./cin -> CPU 80% Sam --
I wish it had worked better.... I remind you that my computer includes an Intel i7 3770k CPU and a Nvidia GTX-750Ti video card. I did a lot of tests with the same.xml file that contains 4 mixers. Each time I checked both with mpeg proxies and original DNxHD sources. All my tests were done with the X11 video driver only, because the X11-OpenGL driver has been crashing Cin-GG systemically for some time. I have installed libva-dev alone then libvdpau-dev alone then libva-dev and libvdpau-dev together In each case I launched Cin-GG by CIN_HW_DEV=vaapi ./cin or by CIN_HW_DEV=vdpau ./cin And I also compared by launching Cin-GG simply by./cin Only the mpeg proxys files showed a slight decrease in CPU usage (33%/48%) in combination with the installation of libva-dev and the launch by CIN_HW_DEV=vdpau./cin. If libvdpau-dev is also installed in addition to libva-dev, there is no impact on this result, but libva-dev is required to see this reduction. In any case, I have never observed any difference in CPU usage with source media in DNxHD. Pierre On 19-04-25 11 h 53, Sam wrote:
I think vdpau seems to be the right setting. I also have an Intel processor and an Nvidia graphics card. With vdpau I get the best results. The CPU is hardly used, but the FPS is almost always at maximum. Especially when I switch to X11-OpenGL, I only have 12% CPU load left. Subjectively I have the impression it plays a bit more smoothly. I notice the clearest difference at the fan of the computer. It is hardly noticeable with the hardware acceleration. Without hardware acceleration I get earache because the CPU fan gets extremely loud. Thanks to Andrea for the tip with libva-vdpau post-installation, that's how I got it to work.
Here are my tests:
X11
CIN_HW_DEV=off ./cin -> CPU 58% CIN_HW_DEV=vdpau ./cin -> CPU 32% CIN_HW_DEV=vaapi ./cin -> CPU 82%
X11-OpenGL
CIN_HW_DEV=off ./cin -> CPU 48% CIN_HW_DEV=vdpau ./cin -> CPU 12% :-) CIN_HW_DEV=vaapi ./cin -> CPU 80%
Sam
Pierre: just some commentary here. I wish it had worked better....
That is what I was afraid of.
I did a lot of tests with the same.xml file that contains 4 mixers. Each time I checked both with mpeg proxies and original DNxHD sources.
When I load DNxHD sources, it falls back to using software as seen on the startup window: Decoder dnxhd does not support device type vdpau. HW device init failed, using SW decode. file:/root/Downloads/DNx145_1080i_2997.gxf err: Success FFmpeg apparently can not handle dnxhd with vdpau so that would be why you see not speed up for those.
В сообщении от Friday 26 April 2019 07:12:53 Phyllis Smith написал(а):
Pierre: just some commentary here.
I wish it had worked better....
That is what I was afraid of.
I did a lot of tests with the same.xml file that contains 4 mixers. Each time I checked both with mpeg proxies and original DNxHD sources.
When I load DNxHD sources, it falls back to using software as seen on the startup window:
Decoder dnxhd does not support device type vdpau. HW device init failed, using SW decode. file:/root/Downloads/DNx145_1080i_2997.gxf err: Success
FFmpeg apparently can not handle dnxhd with vdpau so that would be why you see not speed up for those.
Yeah, it seems vdpau as API only accelerate those (+may be something recently added): vdpauinfo display: :0 screen: 0 API version: 1 Information string: G3DVL VDPAU Driver Shared Library version 1.0 Video surface: name width height types ------------------------------------------- 420 8192 8192 NV12 YV12 422 8192 8192 UYVY YUYV 444 8192 8192 Y8U8V8A8 V8U8Y8A8 Decoder capabilities: name level macbs width height ---------------------------------------------------- MPEG1 0 16384 2048 2048 MPEG2_SIMPLE 3 16384 2048 2048 MPEG2_MAIN 3 16384 2048 2048 H264_BASELINE --- not supported --- H264_MAIN --- not supported --- H264_HIGH --- not supported --- VC1_SIMPLE --- not supported --- VC1_MAIN --- not supported --- VC1_ADVANCED --- not supported --- MPEG4_PART2_SP --- not supported --- MPEG4_PART2_ASP --- not supported --- DIVX4_QMOBILE --- not supported --- DIVX4_MOBILE --- not supported --- DIVX4_HOME_THEATER --- not supported --- DIVX4_HD_1080P --- not supported --- DIVX5_QMOBILE --- not supported --- DIVX5_MOBILE --- not supported --- DIVX5_HOME_THEATER --- not supported --- DIVX5_HD_1080P --- not supported --- H264_CONSTRAINED_BASELINE --- not supported --- H264_EXTENDED --- not supported --- H264_PROGRESSIVE_HIGH --- not supported --- H264_CONSTRAINED_HIGH --- not supported --- H264_HIGH_444_PREDICTIVE --- not supported --- HEVC_MAIN --- not supported --- HEVC_MAIN_10 --- not supported --- HEVC_MAIN_STILL --- not supported --- HEVC_MAIN_12 --- not supported --- HEVC_MAIN_444 --- not supported --- I think va-api can accelerate vp8/vp9/mjpeg (some variants) https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/state_trackers/va as you can see for open-source drivers based on gallium framework (radeonsi as most advanced example) acceleration supported for mpeg1/2,h264,hevc(h265),vc1,vp9,mjpeg I sadly can't test new acceleration because reverse-engineered Nouveau driver for my card (nv92 GeForce 8800) simply leaves default clocks for video decoding engines (and changig clocks on this generation of GPUs and newest ones is not simple) So, I can only see slideshow with va-api and mpeg2 file: CIN_HW_DEV=vaapi cin Cinelerra Infinity - built: Apr 25 2019 18:53:16 git://git.cinelerra-gg.org/goodguy/cinelerra.git (c) 2006-2018 Heroine Virtual Ltd. by Adam Williams (c) 2007-2018 cin5 derivative by W.P. Morrow aka goodguy Cinelerra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for Cinelerra. libva info: VA-API version 0.40.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/X11R7/lib/dri/nouveau_drv_video.so libva info: Found init function __vaDriverInit_0_40 libva info: va_openDriver() returns 0 libva info: VA-API version 0.40.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/X11R7/lib/dri/nouveau_drv_video.so libva info: Found init function __vaDriverInit_0_40 libva info: va_openDriver() returns 0 libva info: VA-API version 0.40.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/X11R7/lib/dri/nouveau_drv_video.so libva info: Found init function __vaDriverInit_0_40 libva info: va_openDriver() returns 0 Session time: 0:04:12 Cpu time: user: 0:00:13.844 sys: 0:00:02.309 vdpau for me result in this output: CIN_HW_DEV=vdpau cin Cinelerra Infinity - built: Apr 25 2019 18:53:16 git://git.cinelerra-gg.org/goodguy/cinelerra.git (c) 2006-2018 Heroine Virtual Ltd. by Adam Williams (c) 2007-2018 cin5 derivative by W.P. Morrow aka goodguy Cinelerra is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for Cinelerra. Decoder mpeg2video does not support device type vdpau. HW device init failed, using SW decode. file:/home/guest/botva/vid/BENCHMARK/1080p25.ts err: Выполнено Decoder mpeg2video does not support device type vdpau. HW device init failed, using SW decode. file:/home/guest/botva/vid/BENCHMARK/1080p25.ts err: Выполнено IndexFile::draw_index: index has 0 zoom IndexFile::draw_index: index has 0 zoom IndexFile::draw_index: index has 0 zoom IndexFile::draw_index: index has 0 zoom audio0 pad 32 -4159 (4191) audio0 pad 0 -2623 (2623) audio0 pad 0 -1087 (1087) Decoder mpeg2video does not support device type vdpau. HW device init failed, using SW decode. file:/home/guest/botva/vid/BENCHMARK/1080p25.ts err: Выполнено Session time: 0:02:30 Cpu time: user: 0:01:25.833 sys: 0:00:17.366 I run into small problem during compilation, because libva was installed in non-standard location (/usr/X11R7/lib) , but then adding symlink to /usr/includes from /usr/X11R7/includes/va fixed configure and another small hack fixed linking: cat libva_x11r7.diff --- configure.ac.orig 2019-04-25 16:48:18.302721570 +0300 +++ configure.ac 2019-04-25 17:09:32.994737160 +0300 @@ -889,7 +889,7 @@ FFMPEG_EXTRA_LDFLAGS="" if test "x$HAVE_vaapi" = "xyes"; then FFMPEG_EXTRA_LDFLAGS+=' -lva' - EXTRA_LIBS+=' -lva' + EXTRA_LIBS+=' -lva -L/usr/X11R7/lib' WANT_VAAPI='yes' CFG_WANTS+=" VAAPI" if test "x$HAVE_vaapi_x11" = "xyes"; then
On 26.04.19 06:12, Phyllis Smith wrote:
Pierre: just some commentary here.
I wish it had worked better....
That is what I was afraid of.
I did a lot of tests with the same.xml file that contains 4 mixers. Each time I checked both with mpeg proxies and original DNxHD sources.
When I load DNxHD sources, it falls back to using software as seen on the startup window:
Decoder dnxhd does not support device type vdpau. HW device init failed, using SW decode. file:/root/Downloads/DNx145_1080i_2997.gxf err: Success
FFmpeg apparently can not handle dnxhd with vdpau so that would be why you see not speed up for those.
Here are some background information about hardware acceleration. Hardware acceleration means that only the most common codecs, such as MPEG-2 and MPEG-4, are accelerated. The graphics card manufacturers have optimized the GPU to be able to play these certain video formats particularly efficiently. Conversely, this means that many other formats are not optimized and are played back normally unoptimized. These unoptimized formats do not provide any speed advantages. In this case, the CPU is normally used in the same way as if the hardware acceleration were deactivated. The hardware acceleration only makes sense if you have a relatively strong graphics card. Very old graphics cards or non-performing graphics cards will probably bring only little speed advantage or no speed advantage at all. But if you work for example with MPEG-2, MPEG-4 and H.264/MPEG-4 AVC encoded video material, you will see a significant speed advantage and performance increase. Depending on the graphics card, up to ten times higher processing speeds can be achieved. Nvidia supports VDPAU. The following video formats are supported optimized: MPEG-1, MPEG-2, MPEG-4 ASP (MPEG-4 Part 2), H.264/MPEG-4 AVC and VC-1, WMV3/WMV9 There are hundreds of different graphics cards, so the setting of one user does not necessarily have to be the same as the setting of another user. Here everyone has to test which setting is the best, otherwise if you only cut smaller videos from time to time and then use other codecs than the ones mentioned above, it is recommended to use the default settings without all the hardware tests. Sam
Instead of vdpau and vaapi is it possible to try OpenCL? It should be a STD that adapts to any format and hardware. However, it is likely that its implementation is too complex and intrusive on the code. CUDA, I wouldn't consider it because it's closed source.
Evolving the theme of engaging the GPU, I can propose an idea: the creation of a render farm not only from the CPU, but also from the GPU, as well as a mixed type. -- Ugin.
participants (6)
-
Andrea paz -
Andrew Randrianasulu -
Phyllis Smith -
Pierre autourduglobe -
preobraz@gmail.com -
Sam