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. |
9th March 2021, 10:43 | #21 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,580
|
Resurrection of a very old thread: done.
There is something I need your help with x264 encoding. Perhaps I am now a bit spoiled with x265 HBD support and I tried to have the same thing in x264. I tried to use the x264 (8 bit) --input-depth 16 parameter (unfortunately no --dither found) but what I got is avs [info]: AviSynth+ 3.7.0 (r3382, 3.7, x86_64) avs [info]: avisynth 16bit hack enabled avs [info]: 960x800 0:0 @ 24/1 fps (cfr) instead of dealing with the original 1080p source. Is there a way to let x264 properly manage a HDB source?
__________________
@turment on Telegram Last edited by tormento; 9th March 2021 at 10:49. |
9th March 2021, 11:10 | #22 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
I don't know why you get this avisynth 16bit hack enabled, I'm not getting it:
Code:
Width : 1280 Height : 720 Frames : 638 Time : 00:21.561 Framerate : 29.590176 (200000/6759) Format : YUV420P16 x264 --crf 22 --synth-lib D:\AviSynth.dll --output aaa.h264 aaa.avs avs [info]: using external Avisynth library from: "D:\AviSynth.dll" avs [info]: AviSynth+ 3.7.0 (r3382, 3.7, x86_64) avs [info]: 1280x720 0:0 @ 200000/6759 fps (cfr) avs [info]: color matrix: bt709 x264 [info]: AVC Encoder x264 core 161 r3048+25 be33c5d [Mod by Patman] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 x264 [info]: profile: High 10, level: 3.1, subsampling: 4:2:0, bit-depth: 10-bit
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists Last edited by stax76; 9th March 2021 at 11:18. |
9th March 2021, 12:00 | #23 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,580
|
Quote:
SetMemoryMax() SetFilterMTMode("DEFAULT_MT_MODE", 2) LoadPlugin("D:\eseguibili\media\DGDecNV\DGDecodeNV.dll") DGSource("F:\In\1_53 gentlemen, The\gentlemen.dgi",ct=140,cb=140,cl=0,cr=0) SMDegrain (tr=4, thSAD=400, refinemotion=false, n16_out=true, mode=0, contrasharp=false, PreFilter=4, truemotion=true, plane=4, chroma=true) Prefetch(6) AND I am using x264 8 bit. not 10 bit one. Plus source is 1080p, don't know if relevant. VersionString: AviSynth+ 3.7.0 (r3382, 3.7, x86_64) VersionNumber: 2.60 File / Product version: 3.7.0.0 / 3.7.0.0 Interface Version: 8 Multi-threading support: Yes Avisynth.dll location: C:\WINDOWS\SYSTEM32\avisynth.dll Avisynth.dll time stamp: 2021-01-11, 15:47:06 (UTC) PluginDir2_5 (HKLM, x64): D:\Programmi\Media\AviSynth+\plugins64 PluginDir+ (HKLM, x64): D:\Programmi\Media\AviSynth+\plugins64+ So how should I feed a 16 bit source?
__________________
@turment on Telegram Last edited by tormento; 9th March 2021 at 12:04. |
|
13th March 2021, 11:52 | #25 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
Think about it, you are asking about a x264 problem, and then you are not even posting the full x264 output, so we don't even know what type of x264 build you use, I think you should try a Patman or DJATOM build.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
15th March 2021, 09:15 | #28 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,580
|
Ok, just ripped a BD to do another try. Same issue.
Original video: Video ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings : CABAC / 4 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 4 frames Codec ID : 27 Duration : 1 h 55 min Bit rate mode : Variable Maximum bit rate : 35.9 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 AVS script: SetMemoryMax() SetFilterMTMode("DEFAULT_MT_MODE", 2) LoadPlugin("D:\eseguibili\media\DGDecNV\DGDecodeNV.dll") DGSource("F:\In\1_55 Pantera Rosa, La\pantera.dgi",ct=132,cb=132,cl=0,cr=0) CompTest24(1) SMDegrain (tr=4, thSAD=400, refinemotion=false, n16_out=true, mode=0, contrasharp=false, PreFilter=4, truemotion=true, plane=4, chroma=true) Prefetch(6) Plain vanilla StaxRip log: ------------------------- System Environment ------------------------- StaxRip : 2.1.8.5 Windows : Windows 10 Enterprise 2009 Language : Italian (Italy) CPU : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz GPU : NVIDIA GeForce GTX 1060 3GB, Intel(R) HD Graphics 3000 Resolution : 1920 x 1080 DPI : 96 Code Page : 1252 ----------------------- Media Info Source File ----------------------- F:\In\1_55 Pantera Rosa, La\pantera_4.avs General Complete name : F:\In\1_55 Pantera Rosa, La\pantera_4.avs File size : 979 Bytes ---------------------------- Configuration ---------------------------- Template : x264 Video Encoder Profile : x264 Container/Muxer Profile : MKV (mkvmerge) --------------------------- AviSynth Script --------------------------- Import("F:\In\1_55 Pantera Rosa, La\pantera_4.avs") ------------------------- Source Script Info ------------------------- Width : 1920 Height : 816 Frames : 3327 Time : 02:18.764 Framerate : 23.976023 (24000/1001) Format : YUV420P16 ------------------------- Target Script Info ------------------------- Width : 1920 Height : 816 Frames : 3327 Time : 02:18.764 Framerate : 23.976023 (24000/1001) Format : YUV420P16 --------------------------- Video encoding --------------------------- x264 0.161.3048+25-gcc10.2.0 Patman Mod D:\Eseguibili\Media\StaxRip\Apps\Encoders\x264\x264.exe --crf 20 --preset slow --aq-mode 2 --colorprim bt709 --colormatrix bt709 --transfer bt709 --input-depth 16 --opencl --output "F:\In\1_55 Pantera Rosa, La\pantera_4_temp\pantera_4_out.h264" "F:\In\1_55 Pantera Rosa, La\pantera_4_temp\pantera_4.avs" avs [info]: AviSynth+ 3.7.0 (r3382, 3.7, x86_64) avs [info]: avisynth 16bit hack enabled avs [info]: 960x816 0:0 @ 24000/1001 fps (cfr) avs [info]: color matrix: bt709 x264 [info]: AVC Encoder x264 core 161 r3048+25 be33c5d [Mod by Patman] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX x264 [info]: OpenCL acceleration enabled with NVIDIA Corporation NVIDIA GeForce GTX 1060 3GB x264 [info]: Compiling OpenCL kernels... x264 [info]: profile: High, level: 3.1, subsampling: 4:2:0, bit-depth: 8-bit x264 [info]: opencl=1 cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=2:1.00 x264 [info]: frame I:142 Avg QP:16.55 size: 78167 x264 [info]: frame P:870 Avg QP:20.05 size: 13960 x264 [info]: frame B:2315 Avg QP:22.14 size: 3353 x264 [info]: consecutive B-frames: 5.6% 1.1% 11.5% 81.9% x264 [info]: mb I I16..4: 11.2% 80.0% 8.9% x264 [info]: mb P I16..4: 1.2% 4.9% 0.4% P16..4: 41.9% 14.5% 8.9% 0.0% 0.0% skip:28.1% x264 [info]: mb B I16..4: 0.0% 0.3% 0.0% B16..8: 41.8% 3.0% 0.5% direct: 1.3% skip:52.9% L0:39.9% L1:55.2% BI: 4.9% x264 [info]: 8x8 transform intra:78.9% inter:71.5% x264 [info]: direct mvs spatial:99.3% temporal:0.7% x264 [info]: coded y,uvDC,uvAC intra: 85.0% 67.7% 40.6% inter: 9.0% 13.2% 0.2% x264 [info]: i16 v,h,dc,p: 39% 18% 8% 34% x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 9% 6% 9% 13% 12% 12% 11% 12% x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 6% 3% 13% 17% 15% 13% 11% 12% x264 [info]: i8c dc,h,v,p: 29% 33% 26% 12% x264 [info]: Weighted P-Frames: Y:3.0% UV:2.4% x264 [info]: ref P L0: 66.1% 13.8% 14.2% 3.2% 2.7% 0.0% 0.0% x264 [info]: ref B L0: 89.5% 8.7% 1.6% 0.3% x264 [info]: ref B L1: 95.7% 4.3% x264 [info]: kb/s:1787.67 encoded 3327 frames, 14.63 fps, 1787.67 kb/s, duration 0:03:47.42 Start: 09:08:00 End: 09:11:51 Duration: 00:03:50 General Complete name : F:\In\1_55 Pantera Rosa, La\pantera_4_temp\pantera_4_out.h264 Format : AVC Format/Info : Advanced Video Codec File size : 29.6 MiB Writing library : x264 core 161 r3048+25 be33c5d [Mod by Patman] Video Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings : CABAC / 5 Ref Frames Format, CABAC : Yes Format, Reference frames : 5 frames Width : 960 pixels Height : 816 pixels Display aspect ratio : 1.176 Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Writing library : x264 core 161 r3048+25 be33c5d [Mod by Patman] Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 ---------------------------- Muxing to MKV ---------------------------- mkvmerge 55 D:\Eseguibili\Media\StaxRip\Apps\Support\MKVToolNix\mkvmerge.exe -o "F:\In\1_55 Pantera Rosa, La\pantera_4.mkv" "F:\In\1_55 Pantera Rosa, La\pantera_4_temp\pantera_4_out.h264" --ui-language en mkvmerge v55.0.0 ('Waiting For Space') 64-bit 'F:\In\1_55 Pantera Rosa, La\pantera_4_temp\pantera_4_out.h264': Using the demultiplexer for the format 'AVC/H.264'. 'F:\In\1_55 Pantera Rosa, La\pantera_4_temp\pantera_4_out.h264' track 0: Using the output module for the format 'AVC/H.264 (unframed)'. The file 'F:\In\1_55 Pantera Rosa, La\pantera_4.mkv' has been opened for writing. The cue entries (the index) are being written... Multiplexing took 0 seconds. Start: 09:11:51 End: 09:11:52 Duration: 00:00:00 General Complete name : F:\In\1_55 Pantera Rosa, La\pantera_4.mkv Format : Matroska Format version : Version 4 File size : 29.6 MiB Duration : 2 min 18 s Overall bit rate : 1 790 kb/s Encoded date : UTC 2021-03-15 08:11:52 Writing application : mkvmerge v55.0.0 ('Waiting For Space') 64-bit Writing library : libebml v1.4.2 + libmatroska v1.6.4 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings : CABAC / 5 Ref Frames Format, CABAC : Yes Format, Reference frames : 5 frames Codec ID : V_MPEG4/ISO/AVC Duration : 2 min 18 s Bit rate : 1 788 kb/s Width : 960 pixels Height : 816 pixels Display aspect ratio : 1.176 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.095 Stream size : 29.6 MiB (100%) Writing library : x264 core 161 r3048+25 be33c5d [Mod by Patman] Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 ---------------------------- Job Complete ---------------------------- Start: 09:07:59 End: 09:11:52 Duration: 00:03:52 Output video: Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings : CABAC / 5 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 5 frames Codec ID : V_MPEG4/ISO/AVC Duration : 2 min 18 s Bit rate : 1 788 kb/s Width : 960 pixels Height : 816 pixels Display aspect ratio : 1.176 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.095 Stream size : 29.6 MiB (100%) Writing library : x264 core 161 r3048+25 be33c5d [Mod by Patman] Encoding settings : opencl=1 / cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=2:1.00 Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709
__________________
@turment on Telegram Last edited by tormento; 15th March 2021 at 09:21. |
15th March 2021, 12:37 | #29 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
As the others said before, don't use --input-depth. At all. Period. x264 does not require special arguments to understand AviSynth+'s high bit depth formats.
The 16bit hack was a way of getting around the fact that Interleaved16 format is twice the width of the intended output, and using --input-depth was the method by which you could override the avs module's treatment of a script as 8bit (in the days before AviSynth+ supported high bit depth and x264 could accept those formats - both of which were possible by September 2016), which made the module perform essentially the same function as ConvertFromDoubleWidth() and pass the content over to the encoder as 16bit and the correct width instead of 8bit and double width.
__________________
AviSynth+ native Linux/macOS/BSD support | AviSynth+ utilities and plugins for non-Windows and non-x86(-64) Last edited by qyot27; 15th March 2021 at 12:39. |
15th March 2021, 13:39 | #30 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,580
|
Huh, ok. I thought it was the same switch as with x265, as I saw that --input-depth could get from 8 to 16 as parameter.
__________________
@turment on Telegram Last edited by tormento; 15th March 2021 at 13:41. |
15th March 2021, 18:44 | #31 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Hum...
https://github.com/jpsdr/x264/commit...f7892b6e208806 According what avs is now, do you think it should be removed in the future builds ? And just keep Code:
info->csp |= X264_CSP_HIGH_DEPTH;
__________________
My github. |
15th March 2021, 21:11 | #32 | Link | |
Registered User
Join Date: Jul 2007
Posts: 552
|
Quote:
Code:
if( opt->bit_depth > 8 && !(info->csp & X264_CSP_HIGH_DEPTH) ) |
|
15th March 2021, 23:19 | #34 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
Quote:
Whereas, there's a danger of the 16bit hack being always enabled instead of only on-demand and screwing up HBD input by bit-shifting non-double-width HBD content (which is probably the source of the complaint here, because --input-depth is supposed to be a no-op for any formats that have their properties detected, like avs and y4m). Keeping the patch with its current behavior would likely mean that the only correct way to use it with Plus and >8bit is to use ConvertToDoubleWidth in the script to tell Plus to output in Interleaved16, completely defeating the purpose of supporting those formats correctly. |
|
15th April 2021, 15:34 | #40 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
Thread Tools | Search this Thread |
Display Modes | |
|
|