This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Converting h264 1080p 4.2.0 8 bit to 4.2.2 10 bits for color grading using Hybrid!
#21
Encoding aborts with "x265 [error]: unable to open input file".
Encoding call:
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" "D:\Hybrid\Temp\encodingTempSynthSkript_2022-01-10@23_04_05_3210.vpy" - --y4m | "C:\Program Files\Hybrid\64bit\x265.exe" --input - --output-depth 10 --y4m --limit-modes --no-early-skip --no-open-gop --opt-ref-list-length-pps --lookahead-slices 0 --lossless --no-deblock --no-repeat-headers --range limited --colormatrix bt709 --output "D:\Hybrid\Temp\2022-01-10@23_04_05_3210_02.265"
seems fine.
Vapoursynth script looks fine:
# Imports
import os
import sys
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libdescale.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/Bilateral.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/CTMF/CTMF.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/DCTFilter.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/EEDI3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import edi_rpow2
import fvsfunc
import muvsfunc
import nnedi3_resample
import mvsfunc
import havsfunc
# source: 'Y:\My Drive\CHARLOTTE\Trabalhos\Mayra\May CDA\Sua Roupa Tem Historia\Temporada 02\S02E01 Cabelo Curto\AVCHD\BDMV\STREAM\00047.MTS'
# current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 29.97, color matrix: 709, yuv luminance scale: limited, scanorder: top field first
# Loading Y:\My Drive\CHARLOTTE\Trabalhos\Mayra\May CDA\Sua Roupa Tem Historia\Temporada 02\S02E01 Cabelo Curto\AVCHD\BDMV\STREAM\00047.MTS using LWLibavSource
clip = core.lsmas.LWLibavSource(source="Y:/My Drive/CHARLOTTE/Trabalhos/Mayra/May CDA/Sua Roupa Tem Historia/Temporada 02/S02E01 Cabelo Curto/AVCHD/BDMV/STREAM/00047.MTS", format="YUV420P8", cache=0, prefer_hw=0)
# making sure input color matrix is set as 709
clip = core.resize.Bicubic(clip, matrix_in_s="709",range_s="limited")
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# setting field order to what QTGMC should assume (top field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Very Slow", TFF=True, opencl=True) # new fps: 59.94
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
# applying deblocking using DeBlock QED
clip = havsfunc.Deblock_QED(clip)
# removing grain using SMDegrain
clip = havsfunc.SMDegrain(input=clip, interlaced=False)
# debanding using GradFun3
clip = fvsfunc.GradFun3(src=clip)
# adding Grain using AddGrain
clip = core.grain.Add(clip=clip)
# adding grain using GrainFactory3
clip = havsfunc.GrainFactory3(clp=clip)
# adjusting output color from: YUV420P16 to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
# set output frame rate to 59.940fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=60000, fpsden=1001)
# Output
Does the Vapoursynth preview work correctly or Does it show an error?

Cu Selur
Reply
#22
Thanks for the quick reply.

It shows an error:

Failed to evaluate the script:
Python exception: module 'muvsfunc' has no attribute 'Build_gf3_range_mask'

Traceback (most recent call last):
  File "src\cython\vapoursynth.pyx", line 2242, in vapoursynth.vpy_evaluateScript
  File "src\cython\vapoursynth.pyx", line 2243, in vapoursynth.vpy_evaluateScript
  File "C:\Users\leand\AppData\Local\Temp\tempPreviewVapoursynthFile14_42_18_299.vpy", line 48, in <module>
    clip = fvsfunc.GradFun3(src=clip)
  File "C:\Program Files\Hybrid\64bit\vsscripts\fvsfunc.py", line 329, in GradFun3
    dmask = muf.Build_gf3_range_mask(dmask, mask)
AttributeError: module 'muvsfunc' has no attribute 'Build_gf3_range_mask'
Reply
#23
deinstall Hybrid, install latest release, this looks like something that could be caused by the switch from Vapoursynth API3 to API 4.

Cu Selur
Reply
#24
Thanks, the reinstall worked!

However, I cannot select Nvenc - h264 or h265 lossless for the life of me.
The box is greyed out Sad How can I enable it?
Reply
#25
Those are disabled if 'NVEncC --check-features' does output the expected results.
Wild guess: your current drivers do not work with the latest NVEncC that comes with Hybrid.
What output do you get from 'NVEncC --check-features'?
(just noticed there might be a bug with H.264 lossless detection -> will look at it tomorrow, but H.265 lossless seems to work fine here -> had a quick look, fixed the bug regarding h264 lossless locally, will create dev version)

Cu Selur
Reply
#26
(11.01.2022, 21:11)Selur Wrote: Those are disabled if 'NVEncC --check-features' does output the expected results.
Wild guess: your current drivers do not work with the latest NVEncC that comes with Hybrid.
What output do you get from 'NVEncC --check-features'?
(just noticed there might be a bug with H.264 lossless detection -> will look at it tomorrow, but H.265 lossless seems to work fine here -> had a quick look, fixed the bug regarding h264 lossless locally, will create dev version)

Cu Selur

I am using the latest NVidia driver.
Here is the checkfeatures you asked:
NVEncC (x64) 5.41 (r2064) by rigaya, Oct 14 2021 13:42:50 (VC 1929/Win)
  [NVENC API v11.1, CUDA 10.1]
reader: raw, y4m, avi, avs, vpy, avsw, avhw [H.264/AVC, H.265/HEVC, MPEG2, VP8, VP9, VC-1, MPEG1, MPEG4, AV1]

Environment Info
OS : Windows 10 x64 (19044) [UTF-8]
CPU: AMD Ryzen 7 2700 Eight-Core Processor [3.13GHz] (8C/16T)
RAM: Used 19541 MB, Total 32679 MB

#0: NVIDIA GeForce GTX 1660 (1408 cores, 1800 MHz)[PCIe3x16][511.09]
NVEnc features
Codec: H.264/AVC
Encoder Engines          1
Max Bframes              4
B Ref Mode                3 (each + only middle)
RC Modes                  63
Field Encoding            0 (no)
MonoChrome                no
FMO                      no
Quater-Pel MV            yes
B Direct Mode            yes
CABAC                    yes
Adaptive Transform        yes
Max Temporal Layers      4
Hierarchial P Frames      yes
Hierarchial B Frames      yes
Max Level                62 (6.2)
Min Level                10 (1)
4:4:4                    yes
Min Width                145
Max Width                4096
Min Height                49
Max Height                4096
Multiple Refs            yes
Max LTR Frames            8
Dynamic Resolution Change yes
Dynamic Bitrate Change    yes
Forced constant QP        yes
Dynamic RC Mode Change    no
Subframe Readback        yes
Constrained Encoding      yes
Intra Refresh            yes
Custom VBV Bufsize        yes
Dynamic Slice Mode        yes
Ref Pic Invalidiation    yes
PreProcess                no
Async Encoding            yes
Max MBs                  65536
Lossless                  yes
SAO                      no
Me Only Mode              1 (I,P frames)
Lookahead                yes
AQ (temporal)            yes
Weighted Prediction      yes
10bit depth              no

Codec: H.265/HEVC
Encoder Engines          1
Max Bframes              5
B Ref Mode                3 (each + only middle)
RC Modes                  63
Field Encoding            0 (no)
MonoChrome                no
Quater-Pel MV            yes
B Direct Mode            no
Max Temporal Layers      0
Hierarchial P Frames      no
Hierarchial B Frames      no
Max Level                186 (6.2)
Min Level                30 (1)
4:4:4                    yes
Min Width                129
Max Width                8192
Min Height                33
Max Height                8192
Multiple Refs            yes
Max LTR Frames            7
Dynamic Resolution Change yes
Dynamic Bitrate Change    yes
Forced constant QP        yes
Dynamic RC Mode Change    no
Subframe Readback        yes
Constrained Encoding      yes
Intra Refresh            yes
Custom VBV Bufsize        yes
Dynamic Slice Mode        yes
Ref Pic Invalidiation    yes
PreProcess                no
Async Encoding            yes
Max MBs                  262144
Lossless                  yes
SAO                      yes
Me Only Mode              1 (I,P frames)
Lookahead                yes
AQ (temporal)            yes
Weighted Prediction      yes
10bit depth              yes


NVDec features
  H.264/AVC:  nv12, yv12
  H.265/HEVC: nv12, yv12, yv12(10bit), yv12(12bit), yuv444, yuv444(10bit), yuv444(12bit)
  MPEG1:      nv12, yv12
  MPEG2:      nv12, yv12
  MPEG4:      nv12, yv12
  VP8:        nv12, yv12
  VP9:        nv12, yv12, yv12(10bit), yv12(12bit)
  VC-1:      nv12, yv12
Reply
#27
I send you a link to dev version via pm which probably fixes the problem,...
Reply
#28
It did work, thanks!
BTW i tried enconding on another computer and I got the same error with the release version.
Installing the dev build fixed the problem ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)