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 29th December 2018, 00:43   #6561  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
I hope that you pass /MT by
-DSTATIC_LINK_CRT=ON
CMake option.
Ma is offline   Reply With Quote
Old 29th December 2018, 05:18   #6562  |  Link
shinchiro
Registered User
 
Join Date: Feb 2012
Posts: 46
In case, people want to play around with new hevc-aq:

x265-2.9+34-17120cfb5c99-multilibs-gcc-8.2.1.7z
shinchiro is offline   Reply With Quote
Old 29th December 2018, 07:17   #6563  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Quote:
Originally Posted by LigH View Post
You will usually first use a preset, then a tuning (so the "animation" tuning will add 2 to the number of B frames of your preset); but if you also add an explicit bframes parameter later in the command line, it will supersede previously calculated values.
Quote:
Originally Posted by Wishbringer View Post
Or from bframes you give per commandline?
What has a higher priority?
I expect: +2 from preset, except explicit given by command, then the manual value
It makes sense, was a bit confused about it.

Thank you guys.
Yanak is offline   Reply With Quote
Old 29th December 2018, 11:49   #6564  |  Link
mini-moose
Registered User
 
Join Date: Oct 2007
Posts: 385
In the recent default branch builds, aq-mode default is now 2 instead of 1. Reading some on it, it seems (at least on paper) like a better mode to use: "applies separate aq-strength for each frame, based on the complexity of current frame. I tested on a short clip (10k frames) and it seems the avg bitrate with mode 2 is lower and avg qp is higher.
I'm not an expert so would appreciate comments on this.

The is also some feature called hevc-aq which I'm not sure what it does: Mode for HEVC Adaptive Quantization. Default disabled

Also see something called "no-splice" in mediainfo encoder settings, which I can't find any reference to in --full help.
mini-moose is offline   Reply With Quote
Old 29th December 2018, 14:03   #6565  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
I did a quick 2-pass test and a CRF test encode and hevc-aq smoothed the flat background quite heavily in both cases. The bitrate rose quite a lot in CRF mode:

AQ-mode 1 : 4425 kbps
AQ-mode 2 : 4706 kbps
AQ-mode 3 : 5999 kbps
HEVC-AQ : 5094 kbps

I'm really not convinced that aq-mode 2 is a better option than mode 1. To me it seems to also smooth the flat areas too much and that becomes quite annoying once you start noticing the gradients that result from it. See the wall between the women.

Original frame before encoding:


AQ-mode 1:


AQ-mode 2:


HEVC-AQ:
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 29th December 2018, 15:12   #6566  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Single frame screenshots often don't tell the impression of a movie clip accurately.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 29th December 2018, 15:24   #6567  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Fortunately the testclips are quite small so I could put them in my Google Drive:

https://drive.google.com/open?id=1Nr...1fjYfflCArMx6C (aq-mode 1)
https://drive.google.com/open?id=1__...fvuE55NBeMo_ui (aq-mode 2)
https://drive.google.com/open?id=1iW...Nt7364LDlQQI2p (hevc-aq)

These are all 2-pass encodes with the same avg bitrate. To me hevc-aq smooths things too much, part of the problem is that the bitrate is not enough to keep up. Aq-mode 2 doesn't look as good as mode 1. Near the end of the clip, the difference between 1 and 2 is clearer as mode 2 has produced more swimming blocks in the flat background near the top of the image.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 29th December 2018, 15:36   #6568  |  Link
tuanden0
Registered User
 
Join Date: Oct 2016
Posts: 111
Quote:
Originally Posted by Boulder View Post
Fortunately the testclips are quite small so I could put them in my Google Drive:

https://drive.google.com/open?id=1Nr...1fjYfflCArMx6C (aq-mode 1)
https://drive.google.com/open?id=1__...fvuE55NBeMo_ui (aq-mode 2)
https://drive.google.com/open?id=1iW...Nt7364LDlQQI2p (hevc-aq)

These are all 2-pass encodes with the same avg bitrate. To me hevc-aq smooths things too much, part of the problem is that the bitrate is not enough to keep up. Aq-mode 2 doesn't look as good as mode 1. Near the end of the clip, the difference between 1 and 2 is clearer as mode 2 has produced more swimming blocks in the flat background near the top of the image.
Agree with you, --hevc-aq just smooth (blur) too much, some details were blurred and destroyed.

I tested with setting --preset slow --tune animation --crf 18 --hevc-aq

https://i.imgur.com/B0xclJl.png
tuanden0 is offline   Reply With Quote
Old 30th December 2018, 11:29   #6569  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Does '--hevc-aq' exclude the usage of '--aq-mode', I mean is it one or the other, or can they both be applied at the same time? (can't test myself atm.)
Also is '--qp-adaptation-range' a sub-option of '--hevc-aq' or '--aq-mode, or of both?
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 30th December 2018, 11:39   #6570  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Hevc-aq replaces the other aq-modes so now we have 4 possible aq-modes to use. Somehow it looks to me that qp-adaptation-range is available to all modes. It really should be tested to see what it actually does. The problem with these new parameters and functionalities has lately been the fact that no one explains why they were implemented (which scenarios will probably benefit and which may suffer). Also the test cases would be interesting to see and compare.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 30th December 2018, 12:00   #6571  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
qp-adaptation-range doesn't seem to do anything at the moment (There's no variance in final results nor I can find what it does in the code.)
__________________
Monochrome Anomaly
Wolfberry is offline   Reply With Quote
Old 30th December 2018, 12:36   #6572  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Thanks for the help!

Quote:
Hevc-aq replaces the other aq-modes so now we have 4 possible aq-modes to use.
may be we get lucky and they adjust the code so that there simply is a new mode for 'aq-mode' instead of a new flag,..

Quote:
qp-adaptation-range doesn't seem to do anything at the moment (There's no variance in final results nor I can find what it does in the code.)
okay, so ignoring that parameter for now

Quote:
It really should be tested to see what it actually does. The problem with these new parameters and functionalities has lately been the fact that no one explains why they were implemented (which scenarios will probably benefit and which may suffer).
100% agree
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 30th December 2018, 14:22   #6573  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Edit : nevermind, i think i finally figured it, looks like i needed a little break from the screen to ease a bit my mind and see a bit more clear in all this, having the nose pointed at all this stuff since hours now

Hi all,

I'm trying to compile x265 using VS2017 (just want to compare speed vs some releases, especially interested in the Intel compiler linked in my vs2017 as my old CPU supports max AVX only, a little gain will be nice, no matter if it's a tiny one),

I followed all the steps, installed all stuff needed and i can compile successfully the 8 or 10 or 12 Bits exe's but I'm scratching my head since a couple of hours about how to compile a multilib 8+10+12Bits version.

I launched the multilib.bat, it creates the 8,10,12bits folders and it starts to populate some of them with a bunch of stuff and then i get prompted by an error message "10bit build failed". I'm pretty sure I'm missing something obvious but don't know what.

- Do i need first to generate the Solution using make-solutions.bat and repeat the process 3 times, using cmake GUI and selecting the different depth options to in the end get one for each 8,10,12Bits depths and generate each .exe and only after that i can run the multilib.bat ?

After spending a few hours on this i'm a bit out of ideas, if anyone have any tips about the steps to follow to create the multilib 8+10+12Bits exe please ?

Thank you very much.

Last edited by Yanak; 31st December 2018 at 09:36.
Yanak is offline   Reply With Quote
Old 30th December 2018, 15:33   #6574  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
I decided to test aq-mode 0/1/2/3 vs. hevc-aq at preset veryslow encoding lighthouse_lossless.mp4 to 10-bit hevc at bitrates 750/1500/3000/6000.

Command line:
for %b in (750 1500 3000 6000) do (
for %a in (0 1 2 3) do (
ffmpeg -i ../lighthouse_lossless.mp4 -v warning -f yuv4mpegpipe - | x265 --bitrate %b --y4m - --qg-size 64 --preset veryslow --psnr --ssim --aq-mode %a a%a-%b-1.hevc --pass 1
ffmpeg -i ../lighthouse_lossless.mp4 -v warning -f yuv4mpegpipe - | x265 --bitrate %b --y4m - --qg-size 64 --preset veryslow --psnr --ssim --aq-mode %a a%a-%b-2.hevc --pass 2
)
ffmpeg -i ../lighthouse_lossless.mp4 -v warning -f yuv4mpegpipe - | x265 --bitrate %b --y4m - --qg-size 64 --preset veryslow --psnr --ssim --hevc-aq ah-%b-1.hevc --pass 1
ffmpeg -i ../lighthouse_lossless.mp4 -v warning -f yuv4mpegpipe - | x265 --bitrate %b --y4m - --qg-size 64 --preset veryslow --psnr --ssim --hevc-aq ah-%b-2.hevc --pass 2
)

Results (sorted by PSNR):
bitrate 750:
aq-mode 1 - PSNR 43.244, SSIM 15.697 dB
aq-mode 3 - PSNR 43.063, SSIM 15.549 dB
aq-mode 2 - PSNR 42.919, SSIM 15.451 dB
--hevc-aq -- PSNR 42.514, SSIM 14.240 dB
aq-mode 0 - PSNR 41.108, SSIM 13.925 dB

bitrate 1500:
aq-mode 1 - PSNR 45.388, SSIM 17.483 dB
aq-mode 3 - PSNR 45.283, SSIM 17.366 dB
aq-mode 2 - PSNR 45.172, SSIM 17.288 dB
--hevc-aq -- PSNR 44.372, SSIM 15.980 dB
aq-mode 0 - PSNR 43.491, SSIM 16.001 dB

bitrate 3000:
aq-mode 3 - PSNR 47.310, SSIM 18.908 dB
aq-mode 2 - PSNR 47.276, SSIM 18.872 dB
aq-mode 1 - PSNR 47.240, SSIM 18.869 dB
--hevc-aq -- PSNR 46.424, SSIM 17.772 dB
aq-mode 0 - PSNR 46.084, SSIM 18.084 dB

bitrate 6000:
aq-mode 2 - PSNR 48.800, SSIM 19.839 dB
aq-mode 3 - PSNR 48.661, SSIM 19.710 dB
aq-mode 0 - PSNR 48.384, SSIM 19.659 dB
aq-mode 1 - PSNR 48.268, SSIM 19.436 dB
--hevc-aq -- PSNR 48.093, SSIM 19.248 dB

hevc-aq is not ready yet -- especially first pass is totally broken.
It's funny like aq-mode 1 wins at small bitrates and looses at high (even with aq-mode 0).

Full results in attached screen.txt
Attached Files
File Type: txt screen.txt (94.8 KB, 169 views)
Ma is offline   Reply With Quote
Old 30th December 2018, 15:36   #6575  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
Quote:
It's funny like aq-mode 1 wins at small bitrates and looses at high (even with aq-mode 0).
which makes it strange that aq-mode 2 is the new default,... (https://bitbucket.org/multicoreware/...d4e33f37e767c6)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 30th December 2018, 16:52   #6576  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
@Ma. Isn't SSIM a better image-quality metric?
And isn't VMAF the best image-quality metric?! I saw that someone here shared a VMAF-version of x265.

Last edited by Forteen88; 30th December 2018 at 17:43.
Forteen88 is offline   Reply With Quote
Old 30th December 2018, 19:13   #6577  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
For me the clip lighthouse_lossless.mp4 is interesting because of the sky -- it is challenging to encode this clip at low bitrates to be not annoying if you look at the sky. There are not sharp details -- it is about the gradients. PSNR is not perfect but for the sky it is OK.

For me at low bitrates aq-mode 1 is the least annoying, for medium bitrates aq-mode 3 is OK too. The default aq-mode 2 is not the best at low and medium bitrates with this clip (for me).

Last edited by Ma; 2nd January 2019 at 19:06. Reason: Removed samples
Ma is offline   Reply With Quote
Old 31st December 2018, 00:19   #6578  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
Bug in hevc-aq

It looks like there is (at least one) bug in '--hevc-aq' option.
Workaround is quite simple, please use
--hevc-aq --no-cutree
instead of plain '--hevc-aq' option.
Ma is offline   Reply With Quote
Old 31st December 2018, 18:44   #6579  |  Link
imhh11
Registered User
 
Join Date: Jul 2016
Posts: 171
Quote:
Originally Posted by imhh11 View Post
Thanks for the update.

is DV profile 5 single layer ?
if yes, then does it mean we can now convert our 2 layer DV uhd disc to a single layer file playable via usb into our TV ?
Quote:
Originally Posted by jlpsvk View Post
i would like to know that too. and if yes, how.


even better, we can now mux DV layers (without re-encoding) into a mp4 file playable in my DV TV.

https://extraimage.net/images/2018/1...71dc566510.png

only work with AC3 / E-AC-3 / AC-4 / AAC audio though.

https://github.com/DolbyLaboratories/dlb_mp4base

Code:
mp4muxer --dv-profile 7 --input-file (baselayername.hevc1) --input-file (dvlayername.hevc2) --input-file (audio.ac3) --media-lang eng --output-file (nameofmovie).mp4

Last edited by imhh11; 31st December 2018 at 19:38.
imhh11 is offline   Reply With Quote
Old 31st December 2018, 19:03   #6580  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
Quote:
Originally Posted by imhh11 View Post
...only work with AC3 audio though.
Actually, the new .MP4 muxer supports the following audio formats: Dolby Digital (AC-3), Dolby Digital Plus (E-AC-3) and Dolby AC-4 audio formats. Along with all AAC flavours.

Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Reply

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 16:13.


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