Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd September 2020, 17:26   #41  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by huhn View Post
i can "just" go and record a lossless 4:4:4 4K RGB game video.
or 1440p/1080p if my disk or CPU can't handle so much throughput and just do the old test of if subsampling actually improves image quality with the same bit rate?
Some kind of lightweight lossless or perceptually lossless codec is ideal here. There's software that can do this, ideally leveraging the CPU's HW encoder so as not to burn a lot of CPU during that game. That said, a lot of those encoders are subsampled by default so some tweaking might be needed. I've not done screen recording for ages, so I'm not up on what today's state of the art is.

Alternatively you can capture HDMI out if you have that available. The cheap HDMI capture solutions are 4:2:0, though.

I don't know what can capture to >8-bit on-PC. An interesting comparison would be between 10-bit 4:2:0 and 8-bit 4:4:4, when those are availble. Some devices, like Xbox One X, can even render and output 12-bit over HDMI.

Quote:
i mean we can talk a lot but test are the real thing.
Huzzah!

And heck, I see I have some 1080p60 RGBA recorded game clips on my RAID. I'll try to whip out some quick tests.

Any preferences between:
  1. CSGO
  2. DOTA 2
  3. GTA V
  4. Hearthstone
  5. Minecraft
  6. Rust
  7. Starcraft 2
  8. Witcher 3

There are captures from over four years ago, so they won't have all the latest bright and shiny effects.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd September 2020, 18:39   #42  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
It looks like DOTA2 has the most extreme examples of single-pixel transitions between brightly saturated to no chroma, so I'll do some test runs like that.

On an initial test with Witcher 3, CRF 18 still left a lot of visible blocking and banding. The default aq settings aren't well tuned/effective adapting for that sort of material. DOTA2 is quite different, so I'm going to stick with CRF 18 to start.

Bitrates were pretty much identical between 420 and 444, probably because of:
Code:
x265 [warning]: halving the quality when psy-rd is enabled for 444 input. Setting cbQpOffset = 6 and crQpOffset = 6
Which should make apples-to-apples comparisons easier, as the same amount of bits should be allocated to both luma and chroma in either mode. Although any potential gain from 444 might require lower Qps for chroma to retain those edges.

Here's the DOTA2 command line I'm kicking off. These seem reasonable?

Code:
ffmpeg.exe -i DOTA2.mov -pix_fmt yuv420p -f yuv4mpegpipe - | x265.exe - --y4m --preset slower --pools "+,-" --keyint 240 --crf 18 --vbv-maxrate 5000 --vbv-bufsize 15000 -o DOTA2_CRF-18.hevc

ffmpeg.exe -i DOTA2.mov -pix_fmt yuv444p -f yuv4mpegpipe - | x265.exe - --y4m --profile main444-8 --preset slower --keyint 240 --crf 18 --vbv-maxrate 5000 --vbv-bufsize 15000 -o DOTA2_CRF-18-444.hevc
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd September 2020, 23:20   #43  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
i have everything setup to record lossless on my gaming PC (x264rgb CRF=0 preset=ultrafast) i didn't try 4K but 1080p is no problem i may even be able to do 60-240 HZ.

only nvidia can record lossless 444 but not in RGB so it's already not great and not lossless.

DOTA 2 should be an OK test. i have no clue how old your sample is the game changed drastically i will capture a new one.

Quote:
I don't know what can capture to >8-bit on-PC. An interesting comparison would be between 10-bit 4:2:0 and 8-bit 4:4:4, when those are available. Some devices, like Xbox One X, can even render and output 12-bit over HDMI.
rendering 10 bit is already kinda complicated and games rarely do that. outputting 12 bit RGB you can do that with windows 7 and a i don't know 10 year old consumer grade GPU and it was and is done with madVR.
12 bit doesn't exist only 16 bit and the driver has to dither this to 12 bit you can try this with MPDN. games don't use stuff like this there are always exception and microsoft doesn't stop adding new feature so this could be easily "dated" information.

i'm pretty sure ni no kuni 2 can do that when rendering HDR and 10 bit but that's not going to be fun to capture if it is even possible at all.

edit: i have a 1080p60 38 sec lossless RGB clip on my system now it's ~5GB so i need a place to upload it. i can't do UHD at the moment AMD has a strange bug forcing me to run the game at 240 hz making recording 60 FPS a nightmare. the system and the disk should be fast enough for this if i can get it to 60 HZ.

Last edited by huhn; 3rd September 2020 at 00:15.
huhn is offline   Reply With Quote
Old 3rd September 2020, 18:53   #44  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by huhn View Post
edit: i have a 1080p60 38 sec lossless RGB clip on my system now it's ~5GB so i need a place to upload it. i can't do UHD at the moment AMD has a strange bug forcing me to run the game at 240 hz making recording 60 FPS a nightmare. the system and the disk should be fast enough for this if i can get it to 60 HZ.
Doing 7zip LZMA2 Ultra can shrink game capture stuff down amazingly. You can also use ffmpeg or whatever to decimate to 60 fps first.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 3rd September 2020, 23:59   #45  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
i just need a place to upload.

the problem is i can't capture 240 hz UHD and i can't run the game at 240 hz so decimation is risky and frame times would be inaccurate so i have to limited the game to 60 manual which would be much more fun by just using 60 HZ and vsync.

edit: this clip will not show the benefts from 4:4:4 on a visual level the game benefits not enough from it.

Code:
D:\encode\x>D:\encode\x\x264_64_8.exe --input-range PC --colorprim BT709 --range PC --preset veryslow --crf=0 --output-csp RGB --output "d:\encode\x\test.mkv" "E:\2020-09-03 01-08-49.mkv"
[matroska,webm @ 00000000001e5c40] Stream #0: not enough frames to estimate rate; consider increasing probesize
[matroska,webm @ 00000000001e5c40] decoding for stream 0 failed
lavf [info]: 1920x1080p 0:1 @ 0/0 fps (vfr)
resize [warning]: converting from gbrp to rgb24
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High 4:4:4 Predictive, level 5.1, 4:4:4, 8-bit
that should be irrelevant because that lossless?
i will upload the file to google drives.

edit2: https://drive.google.com/file/d/1JCW...gSzvdsd9B/view

Last edited by huhn; 4th September 2020 at 02:27.
huhn is offline   Reply With Quote
Old 7th September 2020, 12:00   #46  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
i used your shared encode settings and here are the files:
https://drive.google.com/file/d/1Z20...ew?usp=sharing
https://drive.google.com/file/d/1Tfy...ew?usp=sharing


on a first look 444 is doing fantastic better then i would have expected from the source.

the encode was done from the original ultrafast compressed lossless x264 source not the shared one the FFMPEG or x265 couldn't deal with it.

the 4:2:0 encode had --pool the 4:4:4 not i just copied the settings form you didn't notice before i even started encoding.

4:2:0: encoded 2322 frames in 620.47s (3.74 fps), 5152.00 kb/s, Avg QP:35.55
4:4:4: encoded 2322 frames in 837.02s (2.77 fps), 5152.05 kb/s, Avg QP:35.47

bilinear chroma 4:2:0: https://abload.de/img/420dota2k1ktm.png
4:4:4: https://abload.de/img/444dota2lkkf7.png
source: https://abload.de/img/lldota282j4c.png

Last edited by huhn; 7th September 2020 at 12:08.
huhn is offline   Reply With Quote
Old 7th September 2020, 19:01   #47  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by huhn View Post
i used your shared encode settings and here are the files:
https://drive.google.com/file/d/1Z20...ew?usp=sharing
https://drive.google.com/file/d/1Tfy...ew?usp=sharing


on a first look 444 is doing fantastic better then i would have expected from the source.

the encode was done from the original ultrafast compressed lossless x264 source not the shared one the FFMPEG or x265 couldn't deal with it.

the 4:2:0 encode had --pool the 4:4:4 not i just copied the settings form you didn't notice before i even started encoding.

4:2:0: encoded 2322 frames in 620.47s (3.74 fps), 5152.00 kb/s, Avg QP:35.55
4:4:4: encoded 2322 frames in 837.02s (2.77 fps), 5152.05 kb/s, Avg QP:35.47

bilinear chroma 4:2:0: https://abload.de/img/420dota2k1ktm.png
4:4:4: https://abload.de/img/444dota2lkkf7.png
source: https://abload.de/img/lldota282j4c.png
The differences between the 444 and 420 versions are a lot smaller than each has from the source.

I wonder if content that could benefit from 444 needs to have the chroma-qp deltas reduced to increase bits spent on chroma. The automatic +6 qp in 444 could be quite material.

Of course, then the comparison is about whether there are cases where it's worth it to reduce luma bitrate to increase chroma bitrate.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 8th September 2020, 04:00   #48  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
maybe we are not looking at the same parts but this bird for example is much better with 444. his icon is not even close.
the player name looks massively better with 444 too.

even through i'm using a really "bad" chroma scaler here. the difference could be smaller but bilinear is sadly a realistic chroma scaler.

another issue is luma is very different which i don't understand why shouldn't it similar with the same QP as the target? but they trade different artifacts the green orb firing little guy has chroma ringing on this right arm in 444 but has something even more wired thingy on his back in 420.

i can try and make a lossless recording of FTL it's 720p and pixel art with perfect use of chroma. another game would be starsector (native 1080p) it uses "1" pixel green lines with zero AA.

but there are other issues her there is clearly a color space mismatch my guess would be the ffmpeg conversation. the image shouldn't look this bad with CFR 18 too.

the results are far better then i could have hoped for. luma didn't obviously get worst and chroma is clearly better
huhn is offline   Reply With Quote
Old 11th September 2020, 19:25   #49  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
does someone know how to use VT 709 for color conversation instead of bt 601 in ffmpeg?

these setting where used.
Code:
ffmpeg.exe -i DOTA2.mov -pix_fmt yuv420p -f yuv4mpegpipe - | x265.exe - --y4m --preset slower --pools "+,-" --keyint 240 --crf 18 --vbv-maxrate 5000 --vbv-bufsize 15000 -o DOTA2_CRF-18.hevc

ffmpeg.exe -i DOTA2.mov -pix_fmt yuv444p -f yuv4mpegpipe - | x265.exe - --y4m --profile main444-8 --preset slower --keyint 240 --crf 18 --vbv-maxrate 5000 --vbv-bufsize 15000 -o DOTA2_CRF-18-444.hevc
huhn is offline   Reply With Quote
Old 18th December 2020, 06:44   #50  |  Link
takla
Registered User
 
Join Date: May 2018
Posts: 182
For bit depth in video games, I recommend to check out this nifty tool. It is developed by Kaldaien. He made it his mission to streamline HDR in PC games, which currently follows basically no standards and is mostly brocken (at least brocken when compared to what can be achieved with this tool properly set up). It can show you what native bit depth and color space a game uses and overwrite it, when supported, with scRGB HDR 16-bit.

And for 4:4:4 chroma talk, personally, I watch a lot of twitch tv streams which I pipe to MPV. It is very obvious to me to tell the difference of 540p to 2160p chroma on my 55" 4k Samsung TV. I use the excellent KrigBilateral glsl shader to get chroma to almost native res. Good examples I recommend to test for chroma are UI heavy games like World of Warcraft and Path of Exile.

And thankfully this samsung tv also supports freesync, which removes all judder in low fps videos once mpv is in exclusive fullscreen (default key is f) this is achieved by the gpu driver telling the display to double its refresh rate when outside freesync range (24>48fps with 48to60hz range)

Last edited by takla; 18th December 2020 at 07:02.
takla is offline   Reply With Quote
Reply

Tags
2160p, bluray, staxrip, upscale, x265

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.