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 6th February 2023, 13:18   #8981  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
Quote:
Originally Posted by vadlerg View Post
Of course it is what it supposed to be but this should not disable dynamicRd.
Yes, it's probably just that validation which has not been updated accordingly. I don't remember I've ever seen the dynamic RD option used by anyone so it's definitely understandable.
__________________
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 6th February 2023, 17:47   #8982  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
I found the cause of the issue, it's not auto-aq related. The validation is almost ok, it just doesn't understand that --level-idc enables VBV. If you add the VBV parameters to the command line, it will work.

EDIT: Here's a build where the validation is fixed (if VBV is not set and --level-idc is 0, it will disable dynamic-rd): https://drive.google.com/file/d/1U9c...usp=share_link
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...

Last edited by Boulder; 6th February 2023 at 17:55.
Boulder is offline   Reply With Quote
Old 7th February 2023, 03:58   #8983  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by Boulder View Post
Yes, it's probably just that validation which has not been updated accordingly. I don't remember I've ever seen the dynamic RD option used by anyone so it's definitely understandable.
I've used it before, with high resolution CRF with VBV encodes. It lets the encoder run faster when it can achieve CRF, and then slows down to improve quality when VBV limitations keep CRF from being hit.

It can improve throughput across many clips, but perf improvements for any given encode are unpredictable, varying with how often the content would hit the VBV.

Of course, this will increase ABR versus just using full complexity the whole time, so it's quite scenario specific. There is also the risk of the different modes causing some "stylistic" discontinuities.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 7th February 2023, 18:36   #8984  |  Link
vadlerg
Registered User
 
Join Date: May 2005
Posts: 14
Thank You. That's it.
vadlerg is offline   Reply With Quote
Old 12th February 2023, 10:10   #8985  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
I'm stuck with an issue i've no idea for now how to solve, and i may think that's there is just no solution at all (unless a loooooot of rework of the code).
After adding just the command line asked by Boulder, i've hit the C1061 error issue with MS compiler...
Why have they done this...????
As it's specific to MS compiler, i still can make the clang version, but for now, it's the only build i can do.
To do the others builds, i have to see how i can build x265 with gcc, maybe i'll do that, but not the time for now...
__________________
My github.
jpsdr is offline   Reply With Quote
Old 12th February 2023, 12:06   #8986  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
Finaly i made some tests for gcc build, but when things want to get in your way, they are very efficients...

I've tested msys script build, but what i'm looking for is where i can find the parameter list you see in command like this:
Code:
cmake -G "MSYS Makefiles" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
I want to make a static standalone .exe, not a one when you start it asked a lot of gcc dll...!
This is possible with cmake-gui (i have trouble to make it start also), but cmake-gui doesn't give all the options (you don't have 12bits for exemple).
Also, i would like to add "-mavx2" in the gcc command, no idea how to do that's kind of stuff (this is why i choose the Visual Studio solution, where i have access to all the compiler options in the ide).

Edit
Even with "static link CRT" checked in cmake-gui, the .exe from gcc build is still asking for dll... Not the same than my first attempt without, but still...

So, gcc builders, can you provide my your whole complete build script ?
As i said, when things want to get in your way, they are very efficients !!
__________________
My github.

Last edited by jpsdr; 12th February 2023 at 12:11.
jpsdr is offline   Reply With Quote
Old 12th February 2023, 17:04   #8987  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
For GCC builds, I use Media Autobuild Suite to take care of the cumbersome scripting. You can use custom patches, for example with x265, create a file named x265_git_extra.sh and add the patch in the main 'build' folder and it will get applied during the compile operation. This is what I have in the file.

Code:
#!/bin/bash

_pre_ninja(){

patch -p 1 -i "$LOCALBUILDDIR/x265-jpsdr-aqauto-v5.patch"

}
__________________
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 12th February 2023, 18:35   #8988  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by jpsdr View Post
I've tested msys script build, but what i'm looking for is where i can find the parameter list you see in command like this:
Code:
cmake -G "MSYS Makefiles" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
cmake . -LAH will emit the full list of variables that get set with their values, although it isn't all that nicely formatted. In many cases it's just easier to open CMakeLists.txt and see what things are either listed as option() or being toggled as an environment variable with set() or some such.

Quote:
I want to make a static standalone .exe, not a one when you start it asked a lot of gcc dll...!
This is possible with cmake-gui (i have trouble to make it start also), but cmake-gui doesn't give all the options (you don't have 12bits for exemple).
Also, i would like to add "-mavx2" in the gcc command, no idea how to do that's kind of stuff (this is why i choose the Visual Studio solution, where i have access to all the compiler options in the ide).

Edit
Even with "static link CRT" checked in cmake-gui, the .exe from gcc build is still asking for dll... Not the same than my first attempt without, but still...

So, gcc builders, can you provide my your whole complete build script ?
As i said, when things want to get in your way, they are very efficients !!
See example here (yes, x265 is in the guide, but for clarity's sake use a smaller example):
https://github.com/qyot27/mpv/blob/1...dious.txt#L475

Most GCC toolchains that are widely distributed are built assuming shared runtime by default, you have to either pass something like -static-libgcc -static-libstdc++ to LDFLAGS (in CMake, -DCMAKE_SHARED_LINKER_FLAGS for libraries and -DCMAKE_EXE_LINKER_FLAGS for executables) or you can just turn this off entirely by building GCC with static runtime only (which is what I do when building the MinGW/GCC toolchain, hence why the guide doesn't use those flags).

I need to do a good refresh on that guide because while I typically do a once-through every six months after moving to the current release of Ubuntu, I was so stressed out last year and now spend >95% of my time in Linux that I still haven't done so since last May or something like that.
qyot27 is offline   Reply With Quote
Old 12th February 2023, 20:26   #8989  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
Ok, translation issue from my part, my question is not properly made.

I was asking, from people using gcc, their whole complete build script for building static x265 (not building gcc...).
__________________
My github.
jpsdr is offline   Reply With Quote
Old 13th February 2023, 19:21   #8990  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Mine (depends on the media-autobuild suite directory tree and its MSYS2/MinGW64 shell).
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 14th February 2023, 19:43   #8991  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
@LigH
Is in your script the following line:
Code:
export CXXFLAGS=
allow to add compiler options (like -mavx2) that will be used afterward ?
__________________
My github.
jpsdr is offline   Reply With Quote
Old 14th February 2023, 23:10   #8992  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
No, just basic adaptions of the Multicoreware templates.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 14th February 2023, 23:27   #8993  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
No luck, i've tried several options, but i always have an error message telling me that libstdc++6.dll is missing when i try to run the x265.exe builded...
Don't know what option i have to use to make a standalone version.
__________________
My github.
jpsdr is offline   Reply With Quote
Old 15th February 2023, 10:21   #8994  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 716
Quote:
Originally Posted by jpsdr View Post
@LeXXuz
For the same command line effect, you have to replace --sbrc --sbrc-aq5 --sbrc-hyst with --aq-auto 10 assuming you don't want the new sbrc (wich has totaly nothing to do with the first patch) and just keep the auto AQ feature.
(And still check with the log file )
jpsdr, is it normal that Mediainfo shows all kinds of aq-mode when encoding with --aq-mode 5? Some files show aq-mode=2, others 3, 4 or 5. All have been encoded with --aq-mode 5 and --aq-auto 10.
LeXXuz is offline   Reply With Quote
Old 15th February 2023, 13:04   #8995  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by jpsdr View Post
No luck, i've tried several options, but i always have an error message telling me that libstdc++6.dll is missing when i try to run the x265.exe builded...
Don't know what option i have to use to make a standalone version.
As qyot27 already said, your "best" (ooops ) option is to use a "static" build of GCC for Windows...
so you won't have to mess around with the CMake flags;
(just as an example...) ↓↓↓
Quote:
Originally Posted by qyot27 View Post
-DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static -pthread" when configuring resolves it with vanilla MSys2 with default repo packages.
When I still had the "energy" to make builds of x265.exe, and when I did not use the GCC binaries compiled by myself, I used the GCC packages built by nevcairiel or by www.msystem.waw.pl/x265.

H.T.H. :-|
__________________
«Your software patents have expired.»
filler56789 is offline   Reply With Quote
Old 15th February 2023, 14:34   #8996  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
@LeXXuz
I don't know how Mediainfo get his information, neither how x265 stores them. As in auto-aq the aq-mode changes on the fly, according how/when x265 stores the informations retrievied by Mediainfo, it would not be surprising to see differents values. But... for the same file with the exact same parameters, you should always have the same result.
@filler56789
Ok, thanks, i'll try with the gcc versions on www.msystem.waw.pl/x265, i allready use this for one of my x264 build.
So it means that the gcc version provided by default with msys2 isn't working with the standard scripts provided in the build/msys directory of x265 git... (unless tweak them).

Edit:
According CMakeList.txt, CMAKE_CXX_FLAGS is not used unless you set CMAKE_BUILD_TYPE to None.
Using CMAKE_CXX_FLAGS seems to me the only way to add tune build options (like -mavx2).
But, i've not been able to figure out what are the CXX_FLAGS options in Release build.
__________________
My github.

Last edited by jpsdr; 15th February 2023 at 14:39.
jpsdr is offline   Reply With Quote
Old 15th February 2023, 17:11   #8997  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Originally Posted by filler56789 View Post
I used the GCC packages built by nevcairiel or by www.msystem.waw.pl/x265.
I used them too, but the readme should really be updated as they're no longer Windows XP compatible and have not been for a while now (I think pre-pandemic).

@jpsdr... I'll bother you soon-ish via email, as soon as I have a bit of spare time at work (which is unlikely given the stuff I have to do right now). Anyway, to summarize, although I was totally fine with your x264 mod for x264, the fact that the company I work for is part of the partner program with Multicoreware makes me a bit "sad" to have to use modded version of x265 as well, so I'm determined to gather a list of the changes and come up with a big proposal to MCW to eventually merge them back into x265 and we can do this together given that we already had a chat with them about that other thing you asked last time. TL;DR given that we actually have a say on this, I'd like to avoid having an x265 mod that ends up becoming yet another x264 mod-like kind of situation where changes/fixes/improvements are never merged back and no one cares.

Last edited by FranceBB; 15th February 2023 at 17:19.
FranceBB is offline   Reply With Quote
Old 15th February 2023, 17:39   #8998  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
Quote:
Originally Posted by jpsdr View Post
@filler56789
Ok, thanks, i'll try with the gcc versions on www.msystem.waw.pl/x265, i allready use this for one of my x264 build.
So it means that the gcc version provided by default with msys2 isn't working with the standard scripts provided in the build/msys directory of x265 git... (unless tweak them).

Edit:
According CMakeList.txt, CMAKE_CXX_FLAGS is not used unless you set CMAKE_BUILD_TYPE to None.
Using CMAKE_CXX_FLAGS seems to me the only way to add tune build options (like -mavx2).
But, i've not been able to figure out what are the CXX_FLAGS options in Release build.
For CMAKE_BUILD_TYPE=Release use CMAKE_CXX_FLAGS_RELEASE / CMAKE_C_FLAGS_RELEASE

In order to use provided msys2 gcc and have statically linked internal libs use -DCMAKE_CXX_FLAGS_RELEASE="-static-libgcc -static-libstdc++ -static".
StvG is offline   Reply With Quote
Old 15th February 2023, 19:41   #8999  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
@StvG
Yes !! Finaly, it's working with the msys2 gcc. Thanks, after several people tall me the same thing, it finaly enters in my head...

Now... The last step.

I have several mingw64 directories in my msys directory for switching gcc versions. By default, my mingw64 directory is the one provided by gcc. I have two others: mingw64_win32 (the www.msystem.waw.pl/x265 version) and another mingw64_mcf, le LH Mouse version. To switch, i just rename, for exemple: "mingw64 -> mingw64_posix" and "mingw64_win32 -> mingw64", and then, i start the "MSYS2 MinGW 64-bit" icon of MSYS2 and check with a "gcc -v". This works perfectly fine for doing my several x264 builds.
And when there is a new release of the Win32/MCF version, i delete the mingw64_xx directory and extract/replace by the new version.
So, i just tried to do the same thing for x265, and... It didn't work, the script told me "cmake: command unknow"...
It seems that the mcf, and "worse", the one provided by www.msystem.waw.pl/x265 don't have cmake.
I didn't try yet to "re-install" cmake on the renamed directory, is it the only way ?

Edit:
As i was afraid, as i've already installed cmake, even if i put a mingw64 directory without it, msys said that's it's already installed and has nothing to do.
I can't switch to another version...
Edit2:
I was using pacman -S --needed, i changed to pacman -S, it said it's allready installed but re-install anyway, but... only the package, not the necessary dependancies, msys thinks they are all installed.
cmake installed but still not working with alternative gcc version...

@FranceBB
99% of the patches are not mine. They came either from the Patman version or others, i just gathered them.
__________________
My github.

Last edited by jpsdr; 15th February 2023 at 20:06.
jpsdr is offline   Reply With Quote
Old 15th February 2023, 20:53   #9000  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
@jpsdr && to anyone interested as well...

«User Guide: How to setup an MSYS2 building environment»

https://forum.videohelp.com/threads/...ng-environment

Quote:
12) Time to edit the file home\YourUsername\.bash_profile.
Add the lines below:

Code:
export PS1='[\w]\n<$MSYSTEM> '

PATH=/commons:/CMAKE/bin:/GIT/bin:/HG:$PATH
export PATH
__________________
«Your software patents have expired.»
filler56789 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 15:34.


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