📜 ⬆️ ⬇️

Netbook tuning for maximum HDTV performance

Good day, habrovchane!

On Habré there was already a small article on this topic, it was called "Acceleration of HD-video playback . " For those to whom even the methods suggested in it did not help, I wrote this text - having considered, among other things, the issue with the work of subtitles.

I myself also belong to the people mentioned above, because I use one of the first netbooks (Asus EeePc 701), the nominal frequency of its processor is 600 MHz, and above 810 it does not “chase” me - it crashes to BSOD. In addition, it has an Intel GMA 900 video card built into the chipset that does not have any hardware support for HD video. Update: RAM I bought up to 2 GB. The task was to force the netbook to play the file with the following characteristics:


Unlike any other HD-video (I over-endured short brakes and look further), my task has additional difficulties:
1. the need to display subtitles. With such limited resources as that of a similar netbook, the output of subtitles in the "standard" way (via VobSub) when decoding HDTV "at the limit" gives a sensitive additional load
2. Output subtitles should not run away, desynchronizing with the video.
')
I took a test file, the characteristics of which are listed above, and began to try on it various combinations of codecs, players and settings. It took about 3 days to sort through the options. If you tell about all those that did not work - the article will be several times more :) therefore I will limit myself to those examples that are given in the above text “Acceleration of HD-video playback”.

First, about choosing a test video. This is a piece of the usual anime (characterized by a lower bit rate with the same resolution and quality as the movies), but with a completely unscrupulous screensaver, where each frame is a highly detailed picture with an abundance of the smallest details, and such kind of pictures "appear" through one another, in addition to the “camera” movement. It turns out the effect of "noise" of the image, which gives just a wild load when decoding. I thought that if I could force the computer to scroll through this fragment, without having synchronized the sound and subtitles with the video track, the method will work for any anime within the specified bit rate (up to 10 Mbps - with a guarantee). Most likely, the specified maximum video bitrate of 14 Mbps corresponds to this screensaver, or rather its smallest heaviest piece.

Among other things, VobSub didn’t want to show subtitles out of the box, and I decided not to add new variables to myself and do with the subtitles that the player gives. First “go”, and then you can take care of “checkers” - so setting up VobSub will be the subject of my next “study” :)

So, the result of the work:

Any options with Media Player Classic (HomeCinema mod) ended in failure. Torn video - using the built-in H264 / AVC decoder, using ffmpeg-mt from ffdshow, and using the DivX h264 / AVC codec. The video slows down, the sound is normal, as a result - the sound runs forward. Tried heaps of options for settings - with the omission of frames, changing the priority of the player and other things. For a tick, I will mention that any postprocessing was (essno!) Disabled, both in the codec settings and in the player, and in addition to the player no demanding tasks were launched.

The situation drastically changed when I installed CoreAVC 2.0 - yes, this is a paid codec, so I don’t provide any links and leave it to the reader’s conscience. Now his website has a price of ~ $ 10 - inexpensive, considering that this is the only way to watch HDTV-video on such a weak gland, like mine. So, the video has become noticeably smooth - though without sharp jerks. Actually, this solves the problem only in part - from time to time the video playback slows down a lot, and the subtitles behave completely unpredictably, the timing is constantly lost. It seems to fit the text under the sound / video ... and then a small excerpt with a high bit rate - and again out of sync.

And then I turn to the third part of my story - the problem solves one single player. This is a well-known Crystal Player, from which I personally "wept" a few years ago. I didn’t have a special desire to use it again - everyone would be satisfied with MPC HomeCinema ... But only Crystal Player had a key opportunity - decoding the video stream “henceforth” into the buffer, in accordance with the set buffer size. I did not find such an opportunity with any other player. To clear my conscience, I should say that I watched only the most popular players (BSPlayer, VLC, smplayer, others), and not all of them installed. If suddenly you find this opportunity in someone else - write to me! So, nominally, the setting is called “Frame Buffer Size” with a maximum value of “50% of memory”.

Why nominally? The fact is that when setting this value in “10% of memory”, the player caches up to 93 frames. When exhibiting “50% of memory”, the number of cached frames increases to (93x5 = 465 frames? Horseradish bald!) - only to 97. TaskManager shows the memory consumption of 180 MB by the player and 800 MB by the total system. Another 1.2 GB is idle. It is easy to calculate that by giving the player all 1.2 GB of buffer, you can get the ability to decode a movie up to 24 seconds ahead, which would easily be enough for the most dynamic scenes.

But what is not - is not. In any case, 97 pre-coded frames “smooth out” the video stream, the buffer smoothly (but quickly: () is emptied during dynamic scenes and filled with relatively static ones. There remains one unsolved problem - the subtitles. For their work, after considerable anguish, the solution was found: player settings “speed problems solving” >> “skip over key frames . It is this option, nothing more. It feels as if each frame was a key bit at a high bit rate, so just “frame skipping” almost did not produce a result.

So, to summarize. The settings of the OS in order to enable the necessary codec at the right time, I can not say - everyone decides this issue on his own machine individually.

CoreAVC settings:

"Input levels" , "Output levels" , "Input colorspace" put in "TV" , "PC" , "autodetect", respectively.

The guide on which it was oriented is here - it lists the CoreAVC setting for using Nvidia CUDA Acceleration. There it is indicated that for Input levels “TV” should stand in any scenario, and for Output, “TV” should be set if you use MPC HomeCinema. In this case, "let the MPC : HC be set in the menu " render settings " >> " output range " > > "16-235" . I have this item in MPC is not available, and without this, the picture significantly loses "juiciness", and in Crystal there is no such setting at all - so select "Output levels" - "PC" .

Deinterlacing: None (Weave)
(I didn’t have anything to do with the interlaced video, I had to choose it if I had one)

Deblocking: Skip always ( turn off post-processing by codec)

[] Aggressive deinterlacing (set if you want to do a deinterlacing codec)
[X] Crop 1088 to 1080 (I don’t even want to think about HDTV 1080p on my hardware!)
[] Force VMR AR correction (they say we don’t need it)
[X] Preferred decoder option (A strange option, even when turned on, the H264 / AVC video was opened in my DivX-ohm until I demolished it. Beware!
[X] Use tray icon (Captain Obvious to the rescue!)
[n / a] Prefer CUDA Acceleration (for lucky Nvidia cardholders)

In the list of "output formats" the first three set:
1. YV12
2. YUY2
3. NV12
tick off the rest
(here I may be mistaken, the information was taken from the nvidia-oriented fak, it was thought that the letters NV could be related to.)

Next, the Crystal Player settings.

To begin with, we are trying to ensure that the video is opened through CoreAVC - checked by “right click on the player” >> “Properties” , the video stream compressor is in my [AVC1] CoreAVC video decoder . I didn’t focus on audio, it’s not defined at all, but it works :)

So, the main guideline should be the statistics window, called by the same right button or via the hotkey “S”.

In the top line, something like “1194x679 Overlay Flipping YV12” should be desirable, most importantly, the YV12 is the fastest possible mode . Also valid is YUY2.
In the large text field should be: "No comments, the fastest mode . " If this is not the case, then follow the instructions in this field, and disable ALL unnecessary in the settings. Here you can see the fields with the current state of the video and audio buffers - I used it constantly to determine if the netbook has time to “digest” the current bitrate.

In the menu "Parsers" >> "Read data" set the maximum data blocks. The remaining settings are not particularly critical, the main thing is to apply common sense when they change.

The result of all the above actions:


UPDATE: It turned out that the processor frequency with the above experiments was 765 MHz instead of 810, as I thought. After increasing to 810, no major changes, of course, have happened, but the framedrop has generally decreased.

UPDATE:
- I tried MPlayer - it turned out that it does not have the option to set the size of the buffer with pre-rendered frames, the -cache parameter and the like refer to the “preliminary” buffer (useful for video over the network)
- haali video renderer did not work for me, I don’t know how to make it. In the comments they say that it is slow, although it has a buffer for pre-rendered frames (256 MB max.)


PS For those who are interested, “why torture such a weak iron by forcing it to turn HDTV”: I have been using this netbook as a desktop for 1.5 years - with a full keyboard, mouse and monitor for 17 ”... and I don’t have much choice anime, and it is in HDTV only :)

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


All Articles