📜 ⬆️ ⬇️

HD-video on your computer: CPU, DXVA, Hi10P, players



It would seem that such an everyday task as video playback should not cause any problems, but still this is not quite so.

Because it is about HD video, you will need a high performance decoder. For example, if we decode on a CPU, then on 30-35 MBps streams on Intel Core2 Duo E8500 3.2 GHz, frames are starting to fall out. The processor is quite fast, the difference in performance compared to the core Sandy Bridge at the same frequency will be about 20%. Qualitatively squeezed full-HD film can create problems, not to mention the original streams from Blu-ray, there the stream can reach 45 MBps. Owners of laptops usually have weaker processors, and not all desktop systems with powerful CPUs. Another case where the CPU becomes a bottleneck is deinterlacing. Deintrlacing is necessary when viewing streams of satellite HD channels, streams there with a reasonable bitrate (usually 10-15 MBps), but software deintarlace eats up all the remaining resources. Moreover, high-quality deinterlace, without flushing and with preservation of fps, are heavy for the CPU. The only way out is to use the hardware decoding offered by modern GPUs. About video from satellite channels, it should be noted that they are partially damaged, because reception is not always perfect, so it is important that the player stably digest such “breakdowns” in the stream.

In Windows, hardware decoding is implemented through the DXVA API. All modern AMD and Nvidia GPUs implement DXVA as a separate physical module (AMD - UVD , Nvidia - PureVideo ). These modules are made specifically for this task, they work almost identically as in the video cards of primary and senior classes. Intel's situation is more complicated. Only in CPU cores Sandy Bridge Intel added Intel Clear Video HD module. Previous generations of Intel graphics formally performed acceleration, but the implementation was using GPU shaders, which was enough only for 720p video and it seemed to me to be very inefficient in terms of energy consumption. For this reason, owners of most laptops with Intel graphics cannot afford to watch full-HD video. CPU utilization with DXVA is a few percent, while DXVA provides high quality deinterlace. Manufacturers provide additional decoding settings, such as motion smoothing in 24/25 fps movies through the generation of intermediate frames (similar functionality is available on televisions), the elimination of noise, etc.
')
In practice, there are often streams that go beyond the specifications of Blu-ray and there have been problems with DXVA decoders. The first was AMD, which provided support for the H.264 L5.1 profile. I do not know how this is with Nvidia and Intel, so for now I recommend AMD solutions.

There is one more innovation - the H.264 High 10 Profile (Hi10P) profile . Hi10P presented ( Habr ) as the next step in the development of video compression. It turned out that if 10-bit signal sampling is used within the codec, then it is possible to ensure a 20-40% (?!) Increase in compression while maintaining quality. The main plus is an improvement in the transmission of gradients, which can be seen even when outputting to screens with normal color depth (8-bits per channel). It is known that animeshniki are at the forefront of the use of new video encoding products and now there are groups of releasers that upload videos encoded in this profile. This profile does not understand most codecs, much less hardware players and DXVA implementations. Decoding takes place only with soft decoders, which in this case even more heavily load the CPU. Not all users have top-end processors and this causes public outrage, but it doesn’t stop release authors, who sometimes don’t give Hi10P alternatives. But all this has the character of a local problem in the environment of some anime releases.

Note about external H.264 codecs. Earlier, I tried to use additional external Divx H.264 DXVA and PowerDVD8 H.264 DXVA codecs, now I refused them. PowerDVD8 H.264 is an old version that does not evolve and has problems when working in Windows 7, and I have repeatedly noticed problems with uneven playback in the new Divx H.264. In Windows 7, there is a built-in Microsoft H.264 codec with DXVA support, which turned out to be very stable and I have been using it for a long time as a base in Media Player Classic Home Cinema.

When choosing a player, I am guided by the following principles: do not litter the system with codecs; DXVA support; omnivorous - different containers and codecs; whenever possible Hi10P support.

VLC Player

pros
  • DXVA support has appeared a long time ago, but beta is still considered, so you need to enable GPU acceleration in options (Tools / Preferences / Input & Codecs / Use GPU acceleration (experimental)).
  • Omnivorous, usually, if something does not go anywhere, it digests.

Minuses
  • CPU load in DXVA is 2-3 times more than others, it uses a break in the flow of a standard pipeline in order to apply soft filters.
  • Nontrivial scaling control. Scale can be pre-made on the harvested or cleverly cut from different sides.
  • You cannot use external codecs (for example, MS H.264).
Media Player Classic Home Cinema

pros
  • Omnivorous, has many built-in codecs, in particular there are built-in with support for DXVA.
  • You can hook up external codecs, for example, the MS H.264 codec (View / Options / External Filters - add MS DTV-DVD Video Decoder, make it Prefer, disable the built-in H264 in Internal Filters).
  • Convenient and flexible interface.
Windows Media Player 12 (part of Windows 7)

pros
  • DXVA support via codecs from the system.
  • Stable when working with satellite channels.
  • Convenient and advanced music library, but this is not related to the topic of the video.

Minuses
  • Weak format support, only: ts, m2ts, mov, avi, wmv.
  • No scaling.
  • No normal subtitle support.
  • No audio track switching.
  • Flexibility is minimal, almost nothing can be configured.
Xbmc

This is the parent of two other powerful media centers - boxee and mediaportal, they budged at XBMC at different times.

pros
  • This is not just a player, this is a media center. Beautiful interface, media library with downloading images and descriptions with imdb / kinopoisk, etc.
  • Recently added support for DXVA. I drove a little, everything seems to be good. DXVA is turned off by default, you need to enable it in the options.
  • Omnivorous.

Minuses
  • To get the media library to work clearly (name recognition and downloading information from the Internet), you need to tinker. But you can do a simple file navigation.
  • Navigation through the media library is quite diverse, but there is a lack of advanced filtering and search, it will be relevant if there are many films.
  • For the media library I would like to have user fields so that you can filter more efficiently.
  • Management is more sharpened by the remote control; not everything can be quickly done from the keyboard.
SMPlayer

pros
  • Omnivorous.
  • User-friendly interface, immediately at hand the audio track and subtitle selection buttons.

Minuses
  • There is no support for DXVA, so gaps are possible on heavy threads, for the same reason it is not perfect and loads CPU deinterlace heavily.
Umplayer

Relative to SMPlayer, the interfaces are very close.

pros
  • Omnivorous.
  • Supports H.264 Hi10p. SMPlaer also uses mplayer codecs, but Hi10P is not supported there for some reason.

Minuses
  • There is no support for DXVA, so gaps are possible on heavy threads, for the same reason it is not perfect and loads CPU deinterlace heavily.

The conclusion from my practice: number 1 is MPC-HC, if problems are using VLC, satellite streams sometimes go to WMP with less problems.

PS Of course there are also other players, I listed what I touched and use.

Source: https://habr.com/ru/post/136778/


All Articles