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 21st February 2020, 20:53   #7421  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,730
Quote:
Originally Posted by vpupkind View Post
Have you tried higher threshold values? The algorithm does not look at motion, only on colors and texture. They differ a lot when you have a strong scene cut, but low thresholds can result in it false positives.
With the default threshold, lots of false positives. Min-keyint is respected as all were i-frames. The only I-frame was right at the beginning of the file, the same in the encode with the standard scenecut detection. Due to open GOP?

Some tests; Hot Fuzz is an easy clip with clear scene cuts. The correct amount of keyframes in the testclip is 13.

Threshold 0.5, it misses all scene changes
Threshold 0.1, it misses a lot of them
Threshold 0.05, it still misses some quite obvious ones
Threshold 0.025, it begins to place too many (29)
Threshold 0.03, still too many (19)
Threshold 0.035, almost the correct amount (14)

The default encoding missed two very obvious scene cuts which the histogram one was able to find. The histogram one had one false detection in a scene of higher motion. The false one was in the middle of the scene and slightly less blurry, and I suspect that red text on a white shirt skewed the detection routine there even more.
__________________
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 22nd February 2020, 18:27   #7422  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,730
I uploaded the source clip here: https://drive.google.com/open?id=19c...J08OaQbfBIHUjm

To encode, I cropped off the black borders and downscaled with Spline36 to 1280x544. The histogram sc detection picks up frame 805 incorrectly, others seem good to me.
For some reason, I am unable to tweak the --scenecut and --scenecut-bias parameters to get the standard sc detection to pick up frames 380 and 582 which are perfect cuts between scenes.
__________________
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 24th February 2020, 08:05   #7423  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Quote:
Originally Posted by Boulder View Post
I uploaded the source clip here: https://drive.google.com/open?id=19c...J08OaQbfBIHUjm

To encode, I cropped off the black borders and downscaled with Spline36 to 1280x544. The histogram sc detection picks up frame 805 incorrectly, others seem good to me.
For some reason, I am unable to tweak the --scenecut and --scenecut-bias parameters to get the standard sc detection to pick up frames 380 and 582 which are perfect cuts between scenes.
At this point, copy-pasting everything you've discovered into the x265 bug tracker sounds like the way to go.
foxyshadis is offline   Reply With Quote
Old 24th February 2020, 10:09   #7424  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,730
Quote:
Originally Posted by foxyshadis View Post
At this point, copy-pasting everything you've discovered into the x265 bug tracker sounds like the way to go.
Agreed, I'll do that right away.
__________________
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 24th February 2020, 16:21   #7425  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Are there no more Wolfberry x265 builds (since mid 2019) or another x265 build that can open a .avs directly without the need for piping?
Stereodude is offline   Reply With Quote
Old 25th February 2020, 11:43   #7426  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 556
I'd appreciate it if devs here, that releases x265-builds, comments on what compiling-setting they use!
My favorite is compiler-setting is "Optimization: Compile for speed", although maybe it doesn't matter that much since x265 is mostly coded in assembler.
Forteen88 is offline   Reply With Quote
Old 25th February 2020, 21:59   #7427  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by HolyWu View Post
My build is compiled with lavf support.
Thanks for pointing that out. I had missed that detail. I hate having to pipe into x265.
Stereodude is offline   Reply With Quote
Old 27th February 2020, 12:33   #7428  |  Link
fauxreaper
Registered User
 
Join Date: Oct 2014
Posts: 23
Is it viable to make a --frame-dup mode 2 without generating VFR video? I don't know why x265 spends so many bits on duplicated frames.

Example:

1) Download wallpaper on https://wallpaperscraft.com/download...4996/1920x1080
2) Create avs with
ImageSource("planet_clouds_light_star_94996_1920x1080.jpg",start=0,end=199,fps=23.976)
3) Encode avs with x265 x64 10bit, crf 22, preset slow and --csv-log-level 2 --csv
4) Open csv and examine used bits

https://i.imgur.com/vSwL4KQ.png

Why frames with 100% skip 64x64 need to use more than one thousand bits? Why the bits variation on duplicated frames, shouldn't almost all of them have similar size in bits?

x264 has much less variation on bitrate with same video. x64, 10bit, crf22.

I've filed an issue on x265's bugtracker, https://bitbucket.org/multicoreware/...t-variation-on
Attached Files
File Type: rar duptest.rar (143.1 KB, 28 views)
File Type: txt x264 log level debug.txt (23.6 KB, 29 views)

Last edited by fauxreaper; 28th February 2020 at 21:59. Reason: Wrong quote
fauxreaper is offline   Reply With Quote
Old 1st March 2020, 21:20   #7429  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 240
change from 3.3+1 to 3.3.+2 that haven't been mention anywhere??? command give "unknown parameter" with 3.3+2

--no-rskip --> --rskip 0
__________________
AMD Ryzen 9 5950X, 32GB DDR4-3200 CL16, RTX 3060, 2TB NVMe PCIE4.0, NAS with 8x16TB HDD

Last edited by jlpsvk; 1st March 2020 at 21:33.
jlpsvk is offline   Reply With Quote
Old 2nd March 2020, 01:46   #7430  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
Quote:
Originally Posted by fauxreaper View Post
Is it viable to make a --frame-dup mode 2 without generating VFR video? I don't know why x265 spends so many bits on duplicated frames.
What is mode 2? The syntax just has --frame-dup as a Boolean.

Frame-dup should be fully compatible with constant frame rate, since it is putting in skip frames, not changing frame durations (which was how WMV9 did it back in the day).
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd March 2020, 04:24   #7431  |  Link
Greenhorn
Registered User
 
Join Date: Apr 2018
Posts: 61
Quote:
Originally Posted by jlpsvk View Post
change from 3.3+1 to 3.3.+2 that haven't been mention anywhere??? command give "unknown parameter" with 3.3+2

--no-rskip --> --rskip 0
There's information at (https://x265.readthedocs.io/en/default/cli.html) (just search for "rskip"), or if you run x265 --fullhelp from the CLI.

Basically, --rskip 0 is (old) --no-rskip, (old) --rskip 1 is --rskip, --rskip 2 and --rskip 3 use a different method of analysis to decide when to perform the skip. --rskip-edge-threshold controls how much recursion the encoder skips, if you've set --rskip 2 or 3.

From my limited testing it seems to still need
Greenhorn is offline   Reply With Quote
Old 2nd March 2020, 18:11   #7432  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 240
Quote:
Originally Posted by Greenhorn View Post
There's information at (https://x265.readthedocs.io/en/default/cli.html) (just search for "rskip"), or if you run x265 --fullhelp from the CLI.

Basically, --rskip 0 is (old) --no-rskip, (old) --rskip 1 is --rskip, --rskip 2 and --rskip 3 use a different method of analysis to decide when to perform the skip. --rskip-edge-threshold controls how much recursion the encoder skips, if you've set --rskip 2 or 3.

From my limited testing it seems to still need
In the docs, there it is, but nowhere in changelog... That's what i am talkong about.. I am using --rskip 0 (--no-rskip till now)...
__________________
AMD Ryzen 9 5950X, 32GB DDR4-3200 CL16, RTX 3060, 2TB NVMe PCIE4.0, NAS with 8x16TB HDD
jlpsvk is offline   Reply With Quote
Old 2nd March 2020, 20:33   #7433  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Code:
RD Level    Rskip Mode    Skip Recursion Heuristic

0 - 4       1             Neighbour costs.
5 - 6       1             Comparison with inter2Nx2N.
0 - 6       2             CU edge denstiy.
0 - 6       3             CU edge denstiy with forceful skip for lower levels of CTU.
Is row 1 column 2 correct?

What is the default? --rskip 0 is the same as no --rskip ?

https://x265.readthedocs.io/en/defau...mdoption-rskip

I hope I added it correctly.

Code:
New OptionParam With {
    .Switch = "--rskip",
    .Text = "Recursion Skip",
    .Expand = True,
    .Options = {
        "Disabled",
        "0 - RD Level 0-4 Neighbour costs",
        "1 - RD Level 5-6 Comparison with inter2Nx2N",
        "2 - RD Level 0-6 CU edge denstiy",
        "3 - RD Level 0-6 CU edge denstiy with forceful skip for lower levels of CTU"},
    .Values = {"", "0", "1", "2", "3"}}

Last edited by stax76; 2nd March 2020 at 20:50.
stax76 is offline   Reply With Quote
Old 2nd March 2020, 21:42   #7434  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 240
@Stax76

--rskip 0 should be DISABLED (should do the same as --no-rskip) according to docs
__________________
AMD Ryzen 9 5950X, 32GB DDR4-3200 CL16, RTX 3060, 2TB NVMe PCIE4.0, NAS with 8x16TB HDD
jlpsvk is offline   Reply With Quote
Old 3rd March 2020, 08:57   #7435  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,730
So --rskip 1 is now the same as --rskip previously?
Once again, would be very nice to know which use cases would benefit from the other settings. To me it looks like the changes commited lately have something to do with cartoons and anime, which I never touch myself.
__________________
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 3rd March 2020, 11:13   #7436  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,346
Quote:
Originally Posted by stax76 View Post
Code:
RD Level    Rskip Mode    Skip Recursion Heuristic

0 - 4       1             Neighbour costs.
5 - 6       1             Comparison with inter2Nx2N.
0 - 6       2             CU edge denstiy.
0 - 6       3             CU edge denstiy with forceful skip for lower levels of CTU.
Is row 1 column 2 correct?
It is correct. "--rskip 1" behavior depends on the RD Level, it differs between RD Level 0-4 and 5-6.

So, your option mapping would not be correct. 0 is disabled. 1 is both those modes, depending on RD.
Default is actually 1, and not disabled, unless --tune grain is used, according to the docs.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 3rd March 2020 at 11:15.
nevcairiel is offline   Reply With Quote
Old 3rd March 2020, 11:24   #7437  |  Link
RainyDog
Registered User
 
Join Date: May 2009
Posts: 184
Quote:
Originally Posted by Boulder View Post
So --rskip 1 is now the same as --rskip previously?
Appears so, yes. I've not changed my command line since the change and it just defaults to --rskip 1 now.

I'll have a play around with --rskip 2 and 3 shortly but looks like there's also a --rskip-edge-threshold setting to take into account with those too.

I didn't find the speed difference between the old --rskip and --no-skip to be worth the trade off though, so unless the speed drop-off with --rskip 2 and 3 is substantially less then I don't expect them to be of much use.
RainyDog is offline   Reply With Quote
Old 3rd March 2020, 12:29   #7438  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
@nev

I think I got it now, thank you.

Code:
New OptionParam With {
    .Switch = "--rskip",
    .Text = "Recursion Skip",
    .Expand = True,
    .Options = {
        "Undefined",
         "0 - Disabled",
         "1 - RD Level 0-4 Neighbour costs, RD Level 5-6 Comparison with inter2Nx2N",
         "2 - RD Level 0-6 CU edge denstiy",
         "3 - RD Level 0-6 CU edge denstiy with forceful skip for lower levels of CTU"},
    .Values = {"", "0", "1", "2", "3"}},
stax76 is offline   Reply With Quote
Old 6th March 2020, 11:21   #7439  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Quote:
Originally Posted by jlpsvk View Post
In the docs, there it is, but nowhere in changelog... That's what i am talkong about.. I am using --rskip 0 (--no-rskip till now)...
If you want to use the bleeding edge builds, you have to be prepared for things to break occasionally, and UIs to catch up later. Otherwise, stick to stable builds or the build provided by the UI.
foxyshadis is offline   Reply With Quote
Old 7th March 2020, 01:30   #7440  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
Quote:
Originally Posted by jlpsvk View Post
In the docs, there it is, but nowhere in changelog... That's what i am talkong about.. I am using --rskip 0 (--no-rskip till now)...
I just checked the commit log, and found that rskip changes is on future 3.4. You must have used a 3.3+X where X includes the 3.4 changes.

It could be confusing to write 3.3+X in version number indicating a future 3.4 dev version.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain 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 02:18.


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