LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Video playback: OpenGL vs VDPAU (https://www.linuxquestions.org/questions/slackware-14/video-playback-opengl-vs-vdpau-4175625503/)

Jeebizz 03-13-2018 12:30 PM

Video playback: OpenGL vs VDPAU
 
I have been wondering is it better to just use VDPAU (if supported) over OpenGL? What are everyone's experience when using OpenGL or VDPAU for video playback. I have noticed less CPU/GPU usage for video playback in VLC with VPDAU over OpenGL; but the only draw back is that some video formats (older) like .avi do not seem to properly display on screen (wrong position).

Also, is VDPAU just an NVIDIA thing anyways?

Emerson 03-14-2018 10:26 AM

You are comparing software decoding with hardware decoding. BTW, avi is not a video format, it is a container. I'm sitting at an AMD right now, vdpauinfo output (Evergreen chipset):
Code:

Decoder capabilities:

name                        level macbs width height
----------------------------------------------------
MPEG1                          --- not supported ---
MPEG2_SIMPLE                    3  9216  2048  1152
MPEG2_MAIN                      3  9216  2048  1152
H264_BASELINE                  41  9216  2048  1152
H264_MAIN                      41  9216  2048  1152
H264_HIGH                      41  9216  2048  1152
VC1_SIMPLE                      1  9216  2048  1152
VC1_MAIN                        2  9216  2048  1152
VC1_ADVANCED                    4  9216  2048  1152
MPEG4_PART2_SP                  3  9216  2048  1152
MPEG4_PART2_ASP                5  9216  2048  1152
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      0  9216  2048  1152
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 ---


RadicalDreamer 03-14-2018 10:55 AM

I found that recent NVIDIA cards run best with QMPlay2 with CUVID.

bassmadrigal 03-14-2018 07:30 PM

Emerson did provide some great info... but to expound on it, OpenGL will use your CPU for decoding and VDPAU will use your GPU. For certain systems, that can mean the difference between choppy (OpenGL) and smooth (VDPAU) playback, however, the choppy playback tends happens on lower-end systems or higher bitrate videos. A lot of modern systems will play h265 (HEVC) videos with little to no stuttering without VDPAU, yet your CPU usage would be higher than if you were using VDPAU. Video cards do a great job at decoding video and do it with less resources than the CPU. This can also be handy if you tend to have other things going on in the background that could benefit from more available CPU resources.

Also, as Emerson stated, avi is just a container, much like mp4 and mkv. It supports multiple video and audio codecs. Most commonly, avi containers are associated with DivX or Xvid video codecs. As you can see from their vdpauinfo output, the DIVX4 and DIVX5 profiles are not supported by his video card. None of my systems support it either. I think the lack of support is because these codecs are old and tend to not require a lot of video power. However, it's been a while since I've played avis on my system, so I don't remember if they do anything weird with vdpau enabled. I would be interested in seeing the output of the video player you're using to play these files. I believe when vdpau isn't able to decode a video, it should switch to a different output, so I'd be interested to the output to see if the video player attempts this.

As far as VDPAU only being for Nvidia, I believe they were the ones who developed it, but it became quite popular in the industry and is used by a lot of programs. Nvidia and AMD both have support for VDPAU, however, Intel doesn't (they use VA-API) unless you install libvdpau-va-gl, which acts as a backend between VDPAU programs and VA-API hardware.


All times are GMT -5. The time now is 02:51 AM.