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 1st April 2020, 18:08   #7501  |  Link
Barough
Registered User
 
Barough's Avatar
 
Join Date: Feb 2007
Location: Sweden
Posts: 345
x265 v3.3+17-gdf2ac512d (32 & 64-bit 8/10/12bit Multilib Windows Binaries) (GCC 9.3.0)
Code:
https://bitbucket.org/multicoreware/x265_git/commits/branch/master
Barough is offline   Reply With Quote
Old 1st April 2020, 20:27   #7502  |  Link
LazyNcoder
Registered User
 
Join Date: Feb 2015
Posts: 22
Quote:
Originally Posted by filler56789 View Post
x265.exe 3.3+19-1d2f556

http://msystem.waw.pl/x265/

Changes after commit 00b6867:

https://bitbucket.org/multicoreware/x265/commits/all
Tried the VS 2015/2019 AVX build and it gives me error:

Code:
x265 [info]: HEVC encoder version 3.3+19-1d2f556ffb12
x265 [info]: build info [Windows][MSVC 1900][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [error]: internalBitDepth must match compiled bit depth
x265 [error]: x265_encoder_open() failed for Enc,
x265 [error]: Failure generating stream headers 0
Error: fwrite() call failed when writing frame: 1, plane: 0, errno: 32
Output 34 frames in 24.73 seconds (1.37 fps)

Quote:
Originally Posted by Barough View Post
x265 v3.3+17-gdf2ac512d (32 & 64-bit 8/10/12bit Multilib Windows Binaries) (GCC 9.3.0)
Code:
https://bitbucket.org/multicoreware/x265_git/commits/branch/master
It's same with this one.
But it's OK with 3.3+10-g08d8

Last edited by LazyNcoder; 1st April 2020 at 20:38.
LazyNcoder is offline   Reply With Quote
Old 1st April 2020, 21:13   #7503  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 423
LazyNcoder, yeah, I had error in the program "Simple x264 Launcher v2" (set to 10-bit encode) with x265.exe from x265-3.3+19-1d2f556_gcc100-AVX2.7z, but when I instead used x265-10b.exe it worked fine!

With old x265-3.3+10 x265.exe worked in "Simple x264 Launcher v2".
Forteen88 is offline   Reply With Quote
Old 1st April 2020, 21:14   #7504  |  Link
Patman
Registered User
 
Patman's Avatar
 
Join Date: Jan 2015
Posts: 184
Quote:
Originally Posted by LazyNcoder View Post
Tried the VS 2015/2019 AVX build and it gives me error:

Code:
x265 [info]: HEVC encoder version 3.3+19-1d2f556ffb12
x265 [info]: build info [Windows][MSVC 1900][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [error]: internalBitDepth must match compiled bit depth
x265 [error]: x265_encoder_open() failed for Enc,
x265 [error]: Failure generating stream headers 0
Error: fwrite() call failed when writing frame: 1, plane: 0, errno: 32
Output 34 frames in 24.73 seconds (1.37 fps)
There is an error in the source code. I also compiled x265-3.3+17 and got the same error. I'll report it to the devs.

EDIT:

I compiled a x265-3.3+15 build and that version works. I would like to compile a x265-3.3+16 build and it's not possible. I've opened an issue. I use the x265_git as source.

Last edited by Patman; 2nd April 2020 at 06:23.
Patman is offline   Reply With Quote
Old 2nd April 2020, 20:20   #7505  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,099
Is there any documentation anywhere on this exciting new feature?

ABR-ladder settings
--abr-ladder <file> File containing config settings required for the generation of ABR-ladder


With scaling also added as a new feature, I presume the file would be a list of resolutions and bitrates at a minimum. But I don't see the syntax documented anywhere yet.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd April 2020, 20:25   #7506  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,626
Interesting! They've had this kind of functionality in UHDKit for awhile (commercially productized x265 with lots of neat pro features) so maybe they're bringing some of the features into the open source world

Analysis re-use is a huge deal when implemented correctly (especially for UHD). I wonder if that's part of this!
Blue_MiSfit is offline   Reply With Quote
Old 2nd April 2020, 21:31   #7507  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,099
Quote:
Originally Posted by Blue_MiSfit View Post
Interesting! They've had this kind of functionality in UHDKit for awhile (commercially productized x265 with lots of neat pro features) so maybe they're bringing some of the features into the open source world

Analysis re-use is a huge deal when implemented correctly (especially for UHD). I wonder if that's part of this!
Yeah, 2-3x speedups for a bitrate ladder are quite achievable via shared motion search and other analysis. Definite improvement in quality @ perf (although time to encode the single most complex output stream will be increased, typically).
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd April 2020, 21:33   #7508  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,099
Silly me, there is help text in the code:

+.. option:: --abr-ladder <filename>
+ File containing the encoder configurations to generate ABR ladder.
+ The format of each line is:
+
+ **<encID:reuse-level:refID> <CLI>**
+
+ where, encID indicates the unique name given to the encode, refID indicates
+ the name of the encode from which analysis info has to be re-used ( set to 'nil'
+ if analysis reuse isn't preferred ), and reuse-level indicates the level ( ption:`--analysis-load-reuse-level`)
+ at which analysis info has to be reused.
+
+ A sample config file is available in `the downloads page <https://bitbucket.org/multicoreware/x265/downloads/Sample_ABR_ladder_config>`_
+
+ Default: Disabled ( Conventional single encode generation ). Experimental feature.
+
+ **CLI ONLY**
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd April 2020, 21:40   #7509  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,099
And the sample config file.

Seems pretty straightforward. The "base" stream uses nil for the analysis file, and they chain from the previous one on up the ladder. It presumes a ladder of scaled sources.

A lot of cruft comes from using a .yuv file and needing to specify all the color space stuff for each line. Plus calculating PSNR and SSIM and saving those to a log file.

I'm not sure how the --scale-factor parameter is derived, but the rule seems to be 0 if the analysis file is the same resolution, otherwise 2.

Now that there is a scaling algorithm, an obvious extension would be to allow the scaling to take place within x265 so a single source can be used.

Also, it isn't clear at all if these would be encoded in parallel versus serially. I'm guessing serially as it doesn't say otherwise (in contrast to UHDKit, which can already do its own scaling and parallel encoding).

[360p:0:nil] --input 640x360_5994fps_8bit_420p.yuv --input-res 640x360 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 145 --ssim --psnr --csv 0.csv --csv-log-level 2 -o 0.hevc --cutree --scale-factor 0
[432p:1:360p] --input 768x432_5994fps_8bit_420p.yuv --input-res 768x432 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 300 --ssim --psnr --csv 1.csv --csv-log-level 2 -o 1.hevc --cutree --scale-factor 0
[540p1:1:432p] --input 960x540_5994fps_8bit_420p.yuv --input-res 960x540 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 600 --ssim --psnr --csv 2.csv --csv-log-level 2 -o 2.hevc --cutree --scale-factor 0
[540p2:10:540p1] --input 960x540_5994fps_8bit_420p.yuv --input-res 960x540 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 900 --ssim --psnr --csv 3.csv --csv-log-level 2 -o 3.hevc --cutree --scale-factor 0
[540p3:10:540p2] --input 960x540_5994fps_8bit_420p.yuv --input-res 960x540 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 1600 --ssim --psnr --csv 4.csv --csv-log-level 2 -o 4.hevc --cutree --scale-factor 0
[720p1:10:360p] --input 1280x720_5994fps_8bit_420p.yuv --input-res 1280x720 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 2400 --ssim --psnr --csv 5.csv --csv-log-level 2 -o 5.hevc --cutree --scale-factor 2
[720p2:10:720p1] --input 1280x720_5994fps_8bit_420p.yuv --input-res 1280x720 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 3400 --ssim --psnr --csv 6.csv --csv-log-level 2 -o 6.hevc --cutree --scale-factor 0
[1080p1:10:540p3] --input 1920x1080_5994fps_8bit_420p.yuv --input-res 1920x1080 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 4500 --ssim --psnr --csv 7.csv --csv-log-level 2 -o 7.hevc --cutree --scale-factor 2
[1080p2:10:1080p1] --input 1920x1080_5994fps_8bit_420p.yuv --input-res 1920x1080 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 5800 --ssim --psnr --csv 8.csv --csv-log-level 2 -o 8.hevc --cutree --scale-factor 0
[1440p:10:720p2] --input 2560x1440_5994fps_8bit_420p.yuv --input-res 2560x1440 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 8100 --ssim --psnr --csv 9.csv --csv-log-level 2 -o 9.hevc --cutree --scale-factor 2
[2160p1:10:1080p2] --input 3840x2160_5994fps_8bit_420p.yuv --input-res 3840x2160 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 11600 --ssim --psnr --csv 10.csv --csv-log-level 2 -o 10.hevc --cutree --scale-factor 2
[2160p2:10:2160p1] --input 3840x2160_5994fps_8bit_420p.yuv --input-res 3840x2160 --fps 59.94 --input-depth 8 --input-csp i420 --min-keyint 60 --keyint 60 --no-open-gop --bitrate 16800 --ssim --psnr --csv 11.csv --csv-log-level 2 -o 11.hevc --cutree --scale-factor 0
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd April 2020, 22:47   #7510  |  Link
vpupkind
Registered User
 
Join Date: Jul 2007
Posts: 26
Quote:
Originally Posted by benwaggoner View Post
And the sample config file.

Seems pretty straightforward. The "base" stream uses nil for the analysis file, and they chain from the previous one on up the ladder. It presumes a ladder of scaled sources.

A lot of cruft comes from using a .yuv file and needing to specify all the color space stuff for each line. Plus calculating PSNR and SSIM and saving those to a log file.

I'm not sure how the --scale-factor parameter is derived, but the rule seems to be 0 if the analysis file is the same resolution, otherwise 2.

Now that there is a scaling algorithm, an obvious extension would be to allow the scaling to take place within x265 so a single source can be used.

Also, it isn't clear at all if these would be encoded in parallel versus serially. I'm guessing serially as it doesn't say otherwise (in contrast to UHDKit, which can already do its own scaling and parallel encoding).
...
The analysis reuse done there depends on whether the analysis-save resolution is a power-of-two multiple of the analysis-load resolution. If the resolutions are same or power-of-two, things like motion vectors and RQT are used as predictors. If not, only frame types are reused in order to maintain IDR alignment in variable duration GOPs.

The older x265 implementation back in 2018 used to be serial (i.e., analysis-save encode had to complete before analysis-load encode starts). This version is closer to parallel -- you only need to finish a number of lower-resolution frames to start encoding at a higher resolution.

The older serial implementation gave us about 2.4x speedup on 4K predicted from 1080p vs "standalone" 4K. I don't have results on the new one yet.
vpupkind is offline   Reply With Quote
Old Yesterday, 18:43   #7511  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,626
Fascinating stuff! Thanks for sharing
Blue_MiSfit 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 18:58.


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