CUDASynth
Posted: Sat Feb 17, 2024 6:58 pm
Please re-download and test. Thank you.
BTW, that clip is not interlaced.
BTW, that clip is not interlaced.
Code: Select all
G:\HDTV\DGtest>"C:\SOFTWARE\MediaInfo\MediaInfo.exe" --Legacy "!QSF_VIDEO!"
General
Complete name : G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (isom/mp42)
File size : 134 MiB
Duration : 11 s 674 ms
Overall bit rate : 96.4 Mb/s
Frame rate : 29.235 FPS
Performer : Samsung SM-S901E
Encoded date : 2024-02-17 01:46:33 UTC
Tagged date : 2024-02-17 01:46:33 UTC
xyz : -34.9460+138.6245/
com.android.version : 14
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5@High
HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 11 s 674 ms
Source duration : 11 s 664 ms
Bit rate : 96.2 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Rotation : 90°
Frame rate mode : Variable
Frame rate : 29.235 FPS
Minimum frame rate : 5.001 FPS
Maximum frame rate : 30.010 FPS
Real frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.397
Stream size : 134 MiB (100%)
Source stream size : 134 MiB (100%)
Title : VideoHandle
Language : English
Encoded date : 2024-02-17 01:46:33 UTC
Tagged date : 2024-02-17 01:46:33 UTC
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 1000 cd/m2
Maximum Frame-Average Light Level : 200 cd/m2
mdhd_Duration : 11674
Codec configuration box : hvcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 11 s 648 ms
Bit rate mode : Constant
Bit rate : 256 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 364 KiB (0%)
Title : SoundHandle
Language : English
Encoded date : 2024-02-17 01:46:33 UTC
Tagged date : 2024-02-17 01:46:33 UTC
G:\HDTV\DGtest>"!vapoursynth_root!\DGIndex\DGIndexNV.exe" -version
DGIndexNV 251.0.0.0 (64 bit)
G:\HDTV\DGtest>"!vapoursynth_root!\DGIndex\DGIndexNV.exe" -i "!QSF_VIDEO!" -e -h -o "!_DGI_FILE!"
Project
100
G:\HDTV\DGtest>TYPE "!_DGI_LOG!"
Stream Type: MP4
Video Type: HEVC
HDR: PQ
Profile: Main 10
Level: 5/High
Coded Size: 3840x2176
Display Size: 3840x2160
PAR: 1:1
Frame Rate: 29.210211 fps
Colorimetry: BT.2020 [9]
Frame Structure: Progressive
Field Order: Progressive
Frame Type:
Coded Number: 341
Playback Number: 341
Frame Repeats: 0
Field Repeats: 0
Film Percent: 0.00
Bitrate:
Bitrate (Avg): 93.883
Bitrate (Max):
Elapsed:
Remain: 0:00:00
FPS:
Info: Finished!
Code: Select all
G:\HDTV\DGtest>TYPE "!_OLD_VPY_file!" 2>&1
import vapoursynth as vs # this allows use of constants eg vs.YUV420P8
from vapoursynth import core # actual vapoursynth core
#import functool
#import mvsfunc as mvs # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
#import havsfunc as haf # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
core.avs.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
core.avs.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGHDRtoSDR.dll')
# NOTE: deinterlace=1, use_top_field=True for "Interlaced"/"TFF"
video = core.dgdecodenv.DGSource(r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False)
video = core.std.AssumeFPS(video, fpsnum=30, fpsden=1)
video = core.avs.DGHDRtoSDR(video, mode="pq")
# DGDecNV changes -
# 2020.10.21 Added new parameters cstrength and cblend to independently control the chroma denoising.
# 2020.11.07 Revised DGDenoise parameters. The 'chroma' option is removed.
# Now, if 'strength' is set to 0.0 then luma denoising is disabled,
# and if cstrength is set to 0.0 then chroma denoising is disabled.
# 'cstrength' is now defaulted to 0.0, and 'searchw' is defaulted to 9.
# example: video = core.avs.DGDenoise(video, strength=0.06, cstrength=0.06) # replaced chroma=True
video = core.avs.DGDenoise(video, strength=0.06, cstrength=0.06)
video = core.avs.DGSharpen(video, strength=0.2)
video = core.std.Transpose(video)
video = core.std.FlipHorizontal(video)
#video = vs.core.text.ClipInfo(video)
# the video needs rotating 90 degrees
video.set_output()
G:\HDTV\DGtest>set bitrate=6000000
G:\HDTV\DGtest>set min_bitrate=500000
G:\HDTV\DGtest>set max_bitrate=10000000
G:\HDTV\DGtest>set bufsize=!max_bitrate!
G:\HDTV\DGtest>if not exist "!OLD_TARGET_VIDEO!" (
"!old_vspipeexe64!" --container y4m --filter-time "!_OLD_VPY_file!" - | "!old_ffmpegexe64_OpenCL!" -hide_banner -v verbose -nostats -f yuv4mpegpipe -i pipe: -probesize 200M -analyzeduration 200M -i "!QSF_VIDEO!" -map 0:v:0 -map 1:a:0 -fps_mode passthrough -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres -forced-idr 1 -g 25 -coder:v cabac -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0 -rc:v vbr -cq:v 0 -b:v !bitrate! -minrate:v !min_bitrate! -maxrate:v !max_bitrate! -bufsize !bufsize! -profile:v high -level 5.2 -movflags +faststart+write_colr -c:a libfdk_aac -cutoff 18000 -ab 256k -ar 48000 -y "!OLD_TARGET_VIDEO!"
)
Routing option strict to both codec and muxer layer
Warning: Avisynth Compat: requested frame 2 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 0 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 1 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 3 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 4 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 5 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 6 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 7 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 8 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 9 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 10 not prefetched, using slow method
Input #0, yuv4mpegpipe, from 'pipe:':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p(progressive, center), 2160x3840, 30 fps, 30 tbr, 30 tbn
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2024-02-17T01:46:33.000000Z
location : -34.9460+138.6245/
location-eng : -34.9460+138.6245/
com.android.version: 14
com.android.capture.fps: 30.000000
Duration: 00:00:11.67, start: 0.000000, bitrate: 96396 kb/s
Stream #1:0[0x1](eng): Video: hevc (Main 10), 1 reference frame (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, left), 3840x2160, 96219 kb/s, 29.24 fps, 30 tbr, 90k tbn (default)
Metadata:
creation_time : 2024-02-17T01:46:33.000000Z
handler_name : VideoHandle
vendor_id : [0][0][0][0]
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #1:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
Metadata:
creation_time : 2024-02-17T01:46:33.000000Z
handler_name : SoundHandle
vendor_id : [0][0][0][0]
[out#0/mp4 @ 0000013759d05700] Adding streams from explicit maps...
[vost#0:0/h264_nvenc @ 000001375ab18a00] Created video stream from input stream 0:0
[aost#0:1/libfdk_aac @ 0000013759c8e140] Created audio stream from input stream 1:1
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
Stream #1:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
[vost#0:0/h264_nvenc @ 000001375ab18a00] Starting thread...
[aost#0:1/libfdk_aac @ 0000013759c8e140] Starting thread...
[vf#0:0 @ 0000013759c8e9c0] Starting thread...
[af#0:1 @ 0000013759c8e640] Starting thread...
[vist#0:0/rawvideo @ 0000013759c87840] [dec:rawvideo @ 0000013759c8d180] Starting thread...
[aist#1:1/aac @ 0000013759c8d6c0] [dec:aac @ 0000013759c8d2c0] Starting thread...
[in#0/yuv4mpegpipe @ 0000013759c72740] Starting thread...
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] Starting thread...
[graph_1_in_1_1 @ 0000013759cf80c0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[graph 0 input from stream 0:0 @ 0000013759cf81c0] w:2160 h:3840 pixfmt:yuv420p tb:1/30 fr:30/1 sar:0/1 csp:unknown range:unknown
[format_out_0_1 @ 0000013759d3a8c0] auto-inserting filter 'auto_aresample_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_scale_0 @ 0000013759d3ad00] w:iw h:ih flags:'' interl:0
[format @ 0000013759d3ac00] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_aresample_0 @ 0000013759d3b100] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
Warning: Avisynth Compat: requested frame 11 not prefetched, using slow method
[auto_scale_0 @ 0000013759d3ad00] w:2160 h:3840 fmt:yuv420p csp:unknown range:unknown sar:0/1 -> w:2160 h:3840 fmt:nv12 csp:unknown range:unknown sar:0/1 flags:0x00046200
[graph 0 input from stream 0:0 @ 0000013759cf81c0] video frame properties congruent with link at pts_time: 0
[h264_nvenc @ 0000013759d079c0] Loaded Nvenc version 12.2
[h264_nvenc @ 0000013759d079c0] Nvenc initialized successfully
Warning: Avisynth Compat: requested frame 12 not prefetched, using slow method
[h264_nvenc @ 0000013759d079c0] 1 CUDA capable devices found
[h264_nvenc @ 0000013759d079c0] [ GPU #0 - < NVIDIA GeForce RTX 2060 SUPER > has Compute SM 7.5 ]
Warning: Avisynth Compat: requested frame 13 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 14 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 15 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 16 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 17 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 18 not prefetched, using slow method
[h264_nvenc @ 0000013759d079c0] supports NVENC
[h264_nvenc @ 0000013759d079c0] AQ enabled.
[h264_nvenc @ 0000013759d079c0] Temporal AQ enabled.
[h264_nvenc @ 0000013759d079c0] Lookahead enabled: depth 28, scenecut enabled, B-adapt enabled.
Warning: Avisynth Compat: requested frame 19 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 20 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 21 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 22 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 23 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 24 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 25 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 26 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 27 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 28 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 29 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 30 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 31 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 32 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 33 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 34 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 35 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 36 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 37 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 38 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 39 not prefetched, using slow method
Output #0, mp4, to 'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.result.OLD.mp4':
Metadata:
encoder : Lavf60.21.100
Stream #0:0: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), nv12(progressive, center), 2160x3840, q=2-31, 6000 kb/s, 30 fps, 15360 tbn
Metadata:
encoder : Lavc60.39.100 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 10000000/0/6000000 buffer size: 10000000 vbv_delay: N/A
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, delay 2048, 256 kb/s (default)
Metadata:
creation_time : 2024-02-17T01:46:33.000000Z
handler_name : SoundHandle
vendor_id : [0][0][0][0]
encoder : Lavc60.39.100 libfdk_aac
[out#0/mp4 @ 0000013759d05700] Starting thread...
Warning: Avisynth Compat: requested frame 40 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 41 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 42 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 43 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 44 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 45 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 46 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 47 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 48 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 49 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 50 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 51 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 52 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 53 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 54 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 55 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 56 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 57 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 58 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 59 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 60 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 61 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 62 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 63 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 64 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 65 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 66 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 67 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 68 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 69 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 70 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 71 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 72 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 73 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 74 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 75 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 76 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 77 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 78 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 79 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 80 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 81 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 82 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 83 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 84 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 85 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 86 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 87 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 88 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 89 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 90 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 91 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 92 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 93 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 94 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 95 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 96 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 97 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 98 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 99 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 100 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 101 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 102 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 103 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 104 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 105 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 106 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 107 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 108 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 109 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 110 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 111 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 112 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 113 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 114 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 115 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 116 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 117 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 118 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 119 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 120 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 121 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 122 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 123 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 124 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 125 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 126 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 127 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 128 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 129 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 130 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 131 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 132 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 133 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 134 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 135 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 136 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 137 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 138 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 139 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 140 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 141 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 142 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 143 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 144 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 145 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 146 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 147 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 148 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 149 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 150 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 151 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 152 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 153 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 154 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 155 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 156 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 157 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 158 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 159 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 160 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 161 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 162 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 163 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 164 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 165 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 166 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 167 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 168 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 169 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 170 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 171 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 172 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 173 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 174 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 175 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 176 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 177 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 178 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 179 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 180 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 181 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 182 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 183 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 184 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 185 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 186 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 187 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 188 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 189 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 190 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 191 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 192 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 193 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 194 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 195 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 196 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 197 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 198 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 199 not prefetched, using slow method
Output 341 frames in 12.60 seconds (27.06 fps)
Filtername Filter mode Time (%) Time (s)
DGDenoise parreq 99.10 12.49
DGHDRtoSDR fstate 41.95 5.29
DGSharpen parreq 35.44 4.47
DGSource unordered 26.63 3.36
FlipHorizontal parallel 15.08 1.90
Transpose parallel 7.27 0.92
AssumeFPS parallel 0.01 0.00
[in#0/yuv4mpegpipe @ 0000013759c72740] EOF while reading input
[in#0/yuv4mpegpipe @ 0000013759c72740] Terminating thread with return code 0 (success)
[vist#0:0/rawvideo @ 0000013759c87840] [dec:rawvideo @ 0000013759c8d180] Decoder thread received EOF packet
[vist#0:0/rawvideo @ 0000013759c87840] [dec:rawvideo @ 0000013759c8d180] Decoder returned EOF, finishing
[vist#0:0/rawvideo @ 0000013759c87840] [dec:rawvideo @ 0000013759c8d180] Terminating thread with return code 0 (success)
[vf#0:0 @ 0000013759c8e9c0] Filtergraph returned EOF, finishing
[vf#0:0 @ 0000013759c8e9c0] All consumers returned EOF
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] EOF while reading input
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] Terminating thread with return code 0 (success)
[vf#0:0 @ 0000013759c8e9c0] Terminating thread with return code 0 (success)
[aist#1:1/aac @ 0000013759c8d6c0] [dec:aac @ 0000013759c8d2c0] Decoder thread received EOF packet
[aist#1:1/aac @ 0000013759c8d6c0] [dec:aac @ 0000013759c8d2c0] Decoder returned EOF, finishing
[aist#1:1/aac @ 0000013759c8d6c0] [dec:aac @ 0000013759c8d2c0] Terminating thread with return code 0 (success)
[af#0:1 @ 0000013759c8e640] Filtergraph returned EOF, finishing
[af#0:1 @ 0000013759c8e640] All consumers returned EOF
[vost#0:0/h264_nvenc @ 000001375ab18a00] Encoder thread received EOF
[af#0:1 @ 0000013759c8e640] Terminating thread with return code 0 (success)
[aost#0:1/libfdk_aac @ 0000013759c8e140] Encoder thread received EOF
[aost#0:1/libfdk_aac @ 0000013759c8e140] Terminating thread with return code 0 (success)
[vost#0:0/h264_nvenc @ 000001375ab18a00] Terminating thread with return code 0 (success)
[out#0/mp4 @ 0000013759d05700] All streams finished
[out#0/mp4 @ 0000013759d05700] Terminating thread with return code 0 (success)
[mp4 @ 0000013759ce7340] Starting second pass: moving the moov atom to the beginning of the file
no ICC profile found, will write nclx/nclc colour info instead
Last message repeated 1 times
[AVIOContext @ 0000013759cf9fc0] Statistics: 9918706 bytes read, 0 seeks
no ICC profile found, will write nclx/nclc colour info instead
[AVIOContext @ 000001375aa67e80] Statistics: 19850252 bytes written, 4 seeks, 79 writeouts
[out#0/mp4 @ 0000013759d05700] Output file #0 (G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.result.OLD.mp4):
[out#0/mp4 @ 0000013759d05700] Output stream #0:0 (video): 341 frames encoded; 341 packets muxed (9544368 bytes);
[out#0/mp4 @ 0000013759d05700] Output stream #0:1 (audio): 546 frames encoded (559104 samples); 548 packets muxed (374290 bytes);
[out#0/mp4 @ 0000013759d05700] Total: 889 packets (9918658 bytes) muxed
[out#0/mp4 @ 0000013759d05700] video:9321KiB audio:366KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.130219%
frame= 341 fps= 26 q=41.0 Lsize= 9699KiB time=00:00:11.26 bitrate=7052.0kbits/s speed=0.847x
[h264_nvenc @ 0000013759d079c0] Nvenc unloaded
[in#0/yuv4mpegpipe @ 0000013759c72740] Input file #0 (pipe:):
[in#0/yuv4mpegpipe @ 0000013759c72740] Input stream #0:0 (video): 341 packets read (4242585600 bytes); 341 frames decoded; 0 decode errors;
[in#0/yuv4mpegpipe @ 0000013759c72740] Total: 341 packets (4242585600 bytes) demuxed
[AVIOContext @ 0000013759c87200] Statistics: 4242587699 bytes read, 0 seeks
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] Input file #1 (G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4):
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] Input stream #1:1 (audio): 546 packets read (372823 bytes); 546 frames decoded; 0 decode errors (559104 samples);
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] Total: 546 packets (372823 bytes) demuxed
[AVIOContext @ 0000013759c88780] Statistics: 1610759 bytes read, 12 seeks
Code: Select all
G:\HDTV\DGtest>TYPE "!_VPY_file!" 2>&1
import vapoursynth as vs # this allows use of constants eg vs.YUV420P8
from vapoursynth import core # actual vapoursynth core
#import functool
#import mvsfunc as mvs # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
#import havsfunc as haf # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
# NOTE: deinterlace=1, use_top_field=True for "Interlaced"/"TFF"
# dn_enable=x DENOISE
# default 0 0: disabled 1: spatial denoising only 2: temporal denoising only 3: spatial and temporal denoising
# dn_quality="x" default "good" "good" "better" "best" ... "best" halves the speed compared pre-CUDASynth
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="best", dn_strength=0.06, dn_cstrength=0.06 )
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="better", dn_strength=0.06, dn_cstrength=0.06 )
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1, h2s_mode="pq", dn_enable=3, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 )
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1 h2s_mode="pq" )
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 )
video = core.std.AssumeFPS(video, fpsnum=30, fpsden=1)
video = core.avs.DGSharpen( video, strength=0.2 )
# the video needs rotating 90 degrees
video = core.std.Transpose(video)
video = core.std.FlipHorizontal(video)
#video = vs.core.text.ClipInfo(video)
video.set_output()
G:\HDTV\DGtest>"!vspipeexe64!" --container y4m --filter-time "!_VPY_file!" - | "!ffmpegexe64_OpenCL!" -hide_banner -v verbose -nostats -f yuv4mpegpipe -i pipe: -probesize 200M -analyzeduration 200M -i "!QSF_VIDEO!" -map 0:v:0 -map 1:a:0 -fps_mode passthrough -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres -forced-idr 1 -g 25 -coder:v cabac -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0 -rc:v vbr -cq:v 0 -b:v !bitrate! -minrate:v !min_bitrate! -maxrate:v !max_bitrate! -bufsize !bufsize! -profile:v high -level 5.2 -movflags +faststart+write_colr -c:a libfdk_aac -cutoff 18000 -ab 256k -ar 48000 -y "!TARGET_VIDEO!"
Routing option strict to both codec and muxer layer
Input #0, yuv4mpegpipe, from 'pipe:':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo, 1 reference frame (Y3[11][16] / 0x100B3359), yuv420p16le(progressive), 2160x3840, 30 fps, 30 tbr, 30 tbn
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2024-02-17T01:46:33.000000Z
location : -34.9460+138.6245/
location-eng : -34.9460+138.6245/
com.android.version: 14
com.android.capture.fps: 30.000000
Duration: 00:00:11.67, start: 0.000000, bitrate: 96396 kb/s
Stream #1:0[0x1](eng): Video: hevc (Main 10), 1 reference frame (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, left), 3840x2160, 96219 kb/s, 29.24 fps, 30 tbr, 90k tbn (default)
Metadata:
creation_time : 2024-02-17T01:46:33.000000Z
handler_name : VideoHandle
vendor_id : [0][0][0][0]
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #1:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
Metadata:
creation_time : 2024-02-17T01:46:33.000000Z
handler_name : SoundHandle
vendor_id : [0][0][0][0]
[out#0/mp4 @ 00000203ef136080] Adding streams from explicit maps...
[vost#0:0/h264_nvenc @ 00000203f0b28a00] Created video stream from input stream 0:0
[aost#0:1/libfdk_aac @ 00000203ef0be140] Created audio stream from input stream 1:1
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
Stream #1:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
[vost#0:0/h264_nvenc @ 00000203f0b28a00] Starting thread...
[aost#0:1/libfdk_aac @ 00000203ef0be140] Starting thread...
[vf#0:0 @ 00000203ef0bef00] Starting thread...
[af#0:1 @ 00000203ef0be8c0] Starting thread...
[vist#0:0/rawvideo @ 00000203ef0b7840] [dec:rawvideo @ 00000203ef0bd180] Starting thread...
[aist#1:1/aac @ 00000203ef0bd6c0] [dec:aac @ 00000203ef0bd2c0] Starting thread...
[in#0/yuv4mpegpipe @ 00000203ef0a2740] Starting thread...
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] Starting thread...
[graph_1_in_1_1 @ 00000203ef122680] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[graph 0 input from stream 0:0 @ 00000203ef122780] w:2160 h:3840 pixfmt:yuv420p16le tb:1/30 fr:30/1 sar:0/1 csp:unknown range:unknown
[format_out_0_1 @ 00000203ef109340] auto-inserting filter 'auto_aresample_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_aresample_0 @ 00000203ef126b80] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[auto_scale_0 @ 00000203f0b3ee80] w:iw h:ih flags:'' interl:0
[format @ 00000203ef166840] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scale_0 @ 00000203f0b3ee80] w:2160 h:3840 fmt:yuv420p16le csp:unknown range:unknown sar:0/1 -> w:2160 h:3840 fmt:nv12 csp:unknown range:unknown sar:0/1 flags:0x00046200
[graph 0 input from stream 0:0 @ 00000203ef122780] video frame properties congruent with link at pts_time: 0
[h264_nvenc @ 00000203ef1379c0] Loaded Nvenc version 12.2
[h264_nvenc @ 00000203ef1379c0] Nvenc initialized successfully
[h264_nvenc @ 00000203ef1379c0] 1 CUDA capable devices found
[h264_nvenc @ 00000203ef1379c0] [ GPU #0 - < NVIDIA GeForce RTX 2060 SUPER > has Compute SM 7.5 ]
[h264_nvenc @ 00000203ef1379c0] supports NVENC
[h264_nvenc @ 00000203ef1379c0] AQ enabled.
[h264_nvenc @ 00000203ef1379c0] Temporal AQ enabled.
[h264_nvenc @ 00000203ef1379c0] Lookahead enabled: depth 28, scenecut enabled, B-adapt enabled.
Output #0, mp4, to 'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.result.mp4':
Metadata:
encoder : Lavf60.21.100
Stream #0:0: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), nv12(progressive), 2160x3840, q=2-31, 6000 kb/s, 30 fps, 15360 tbn
Metadata:
encoder : Lavc60.39.100 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 10000000/0/6000000 buffer size: 10000000 vbv_delay: N/A
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, delay 2048, 256 kb/s (default)
Metadata:
creation_time : 2024-02-17T01:46:33.000000Z
handler_name : SoundHandle
vendor_id : [0][0][0][0]
encoder : Lavc60.39.100 libfdk_aac
[out#0/mp4 @ 00000203ef136080] Starting thread...
Output 341 frames in 11.51 seconds (29.63 fps)
Filtername Filter mode Time (%) Time (s)
DGSource unordered 99.63 11.46
DGSharpen parreq 46.13 5.31
FlipHorizontal parallel 17.65 2.03
Transpose parallel 16.05 1.85
AssumeFPS parallel 0.01 0.00
[in#0/yuv4mpegpipe @ 00000203ef0a2740] EOF while reading input
[in#0/yuv4mpegpipe @ 00000203ef0a2740] Terminating thread with return code 0 (success)
[vist#0:0/rawvideo @ 00000203ef0b7840] [dec:rawvideo @ 00000203ef0bd180] Decoder thread received EOF packet
[vist#0:0/rawvideo @ 00000203ef0b7840] [dec:rawvideo @ 00000203ef0bd180] Decoder returned EOF, finishing
[vist#0:0/rawvideo @ 00000203ef0b7840] [dec:rawvideo @ 00000203ef0bd180] Terminating thread with return code 0 (success)
[vf#0:0 @ 00000203ef0bef00] Filtergraph returned EOF, finishing
[vf#0:0 @ 00000203ef0bef00] All consumers returned EOF
[vf#0:0 @ 00000203ef0bef00] Terminating thread with return code 0 (success)
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] EOF while reading input
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] Terminating thread with return code 0 (success)
[aist#1:1/aac @ 00000203ef0bd6c0] [dec:aac @ 00000203ef0bd2c0] Decoder thread received EOF packet
[aist#1:1/aac @ 00000203ef0bd6c0] [dec:aac @ 00000203ef0bd2c0] Decoder returned EOF, finishing
[aist#1:1/aac @ 00000203ef0bd6c0] [dec:aac @ 00000203ef0bd2c0] Terminating thread with return code 0 (success)
[af#0:1 @ 00000203ef0be8c0] Filtergraph returned EOF, finishing
[af#0:1 @ 00000203ef0be8c0] All consumers returned EOF
[vost#0:0/h264_nvenc @ 00000203f0b28a00] Encoder thread received EOF
[af#0:1 @ 00000203ef0be8c0] Terminating thread with return code 0 (success)
[aost#0:1/libfdk_aac @ 00000203ef0be140] Encoder thread received EOF
[aost#0:1/libfdk_aac @ 00000203ef0be140] Terminating thread with return code 0 (success)
[vost#0:0/h264_nvenc @ 00000203f0b28a00] Terminating thread with return code 0 (success)
[out#0/mp4 @ 00000203ef136080] All streams finished
[out#0/mp4 @ 00000203ef136080] Terminating thread with return code 0 (success)
[mp4 @ 00000203ef117bc0] Starting second pass: moving the moov atom to the beginning of the file
no ICC profile found, will write nclx/nclc colour info instead
Last message repeated 1 times
[AVIOContext @ 00000203f0a38000] Statistics: 9803190 bytes read, 0 seeks
no ICC profile found, will write nclx/nclc colour info instead
[AVIOContext @ 00000203f0a77e80] Statistics: 19619212 bytes written, 4 seeks, 79 writeouts
[out#0/mp4 @ 00000203ef136080] Output file #0 (G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.result.mp4):
[out#0/mp4 @ 00000203ef136080] Output stream #0:0 (video): 341 frames encoded; 341 packets muxed (9428852 bytes);
[out#0/mp4 @ 00000203ef136080] Output stream #0:1 (audio): 546 frames encoded (559104 samples); 548 packets muxed (374290 bytes);
[out#0/mp4 @ 00000203ef136080] Total: 889 packets (9803142 bytes) muxed
[out#0/mp4 @ 00000203ef136080] video:9208KiB audio:366KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.131672%
frame= 341 fps= 28 q=40.0 Lsize= 9586KiB time=00:00:11.26 bitrate=6970.0kbits/s speed=0.926x
[h264_nvenc @ 00000203ef1379c0] Nvenc unloaded
[in#0/yuv4mpegpipe @ 00000203ef0a2740] Input file #0 (pipe:):
[in#0/yuv4mpegpipe @ 00000203ef0a2740] Input stream #0:0 (video): 341 packets read (8485171200 bytes); 341 frames decoded; 0 decode errors;
[in#0/yuv4mpegpipe @ 00000203ef0a2740] Total: 341 packets (8485171200 bytes) demuxed
[AVIOContext @ 00000203ef0b7200] Statistics: 8485173302 bytes read, 0 seeks
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] Input file #1 (G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4):
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] Input stream #1:1 (audio): 546 packets read (372823 bytes); 546 frames decoded; 0 decode errors (559104 samples);
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] Total: 546 packets (372823 bytes) demuxed
[AVIOContext @ 00000203ef0b8780] Statistics: 1610759 bytes read, 12 seeks
Code: Select all
import vapoursynth as vs # this allows use of constants eg vs.YUV420P8
from vapoursynth import core # actual vapoursynth core
#import functool
#import mvsfunc as mvs # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
#import havsfunc as haf # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
core.avs.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
# NOTE: deinterlace=1, use_top_field=True for "Interlaced"/"TFF"
video = core.dgdecodenv.DGSource(r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False)
# DGDecNV changes -
# 2020.10.21 Added new parameters cstrength and cblend to independently control the chroma denoising.
# 2020.11.07 Revised DGDenoise parameters. The 'chroma' option is removed.
# Now, if 'strength' is set to 0.0 then luma denoising is disabled,
# and if cstrength is set to 0.0 then chroma denoising is disabled.
# 'cstrength' is now defaulted to 0.0, and 'searchw' is defaulted to 9.
# example: video = core.avs.DGDenoise(video, strength=0.06, cstrength=0.06) # replaced chroma=True
video = core.avs.DGDenoise(video, strength=0.06, cstrength=0.06)
video = core.avs.DGSharpen(video, strength=0.2)
#video = vs.core.text.ClipInfo(video)
video.set_output()
Code: Select all
import vapoursynth as vs # this allows use of constants eg vs.YUV420P8
from vapoursynth import core # actual vapoursynth core
#import functool
#import mvsfunc as mvs # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
#import havsfunc as haf # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
# NOTE: deinterlace=1, use_top_field=True for "Interlaced"/"TFF"
# dn_enable=x DENOISE
# default 0 0: disabled 1: spatial denoising only 2: temporal denoising only 3: spatial and temporal denoising
# dn_quality="x" default "good" "good" "better" "best" ... "best" halves the speed compared pre-CUDASynth
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=1, dn_quality="best", dn_strength=0.06, dn_cstrength=0.06 )
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=1, dn_quality="better", dn_strength=0.06, dn_cstrength=0.06 )
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=3, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 )
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False )
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=1, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 )
video = core.avs.DGSharpen( video, strength=0.2 )
#video = vs.core.text.ClipInfo(video)
video.set_output()
Ah. For 391/438 fps resultRocky wrote: ↑Sun Feb 18, 2024 8:43 amRegarding your 391/438 fps result, I have two observations.
1) In the new case, you have deinterlacing enabled, but not in the old case.
2) You have external Sharpen() for both.
Both of these reduce the apparent performance improvement.
For 1) please use the same settings.
For 2) that will be ameliorated by addition of DGSharpen() to DGSource().
Yes. Unfortunately for ubiquitous handheld samsung phone cameras, I see people tending to record in
Code: Select all
import math
import vapoursynth as vs # this allows use of constants eg vs.YUV420P8
from vapoursynth import core # actual vapoursynth core
#import functool
#import mvsfunc as mvs # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
#import havsfunc as haf # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
if int(90.000) == 90:
#REM this is for resizing BEFORE rotated 90 degrees h.265 from samsung camera which is when one films in portrait mode
#REM so before rotation it appears sideways long with the top to the left and we must resize according to that
#REM x is long and will become vertical and when rotated must fit into 1080
#REM y is skinny and will become horizontal and when rotated must fit into 1920
#REM so, when rotated it will be adjusted to fit into 1080p
x = 3840
y = 2160
x_target = 1080
y_target = 1920
x_ratio = x_target / x
y_ratio = y_target / y
resize_factor = min(x_ratio, y_ratio)
new_x = min(math.ceil(x * resize_factor), x_target)
new_y = min(math.ceil(y * resize_factor), y_target)
else:
#REM this is for resizing BEFORE rotated 0 degrees h.265 from samsung camera which is when one films in landscape mode
#REM so NO rotation and it appears sideways long with the top at the top and we must resize according to that
#REM x is long and will become vertical and when rotated must fit into 1920
#REM y is skinny and will become horizontal and when rotated must fit into 1080
#REM so, when rotated it will be adjusted to fit into 1080p
x = 3840
y = 2160
x_target = 1920
y_target = 1080
x_ratio = x_target / x
y_ratio = y_target / y
resize_factor = min(x_ratio, y_ratio)
new_x = min(math.ceil(x * resize_factor), x_target)
new_y = min(math.ceil(y * resize_factor), y_target)
# dn_enable=x DENOISE
# default 0 0: disabled 1: spatial denoising only 2: temporal denoising only 3: spatial and temporal denoising
# dn_quality="x" default "good" "good" "better" "best" ... "best" halves the speed compared pre-CUDASynth
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=new_x, rh=new_y, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 )
# 1. get dgsource to resize
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=new_x, rh=new_y)
# 2. use vapoursynth resize
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI')
video = core.resize.Lanczos(video, width=new_x, height=new_y)
video = core.std.AssumeFPS(video, fpsnum=30, fpsden=1)
#video = core.avs.DGSharpen( video, strength=0.2 )
if int(90.000) == 90:
## the video needs rotating 90 degrees
video = core.std.Transpose(video)
video = core.std.FlipHorizontal(video)
#video = vs.core.text.ClipInfo(video)
video.set_output()
Code: Select all
import math
import vapoursynth as vs # this allows use of constants eg vs.YUV420P8
from vapoursynth import core # actual vapoursynth core
#import functool
#import mvsfunc as mvs # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
#import havsfunc as haf # this relies on the .py residing at the VS folder root level - see run_vsrepo.bat
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
if int(90.000) == 90:
#REM this is for resizing BEFORE rotated 90 degrees h.265 from samsung camera which is when one films in portrait mode
#REM so before rotation it appears sideways long with the top to the left and we must resize according to that
#REM x is long and will become vertical and when rotated must fit into 1080
#REM y is skinny and will become horizontal and when rotated must fit into 1920
#REM so, when rotated it will be adjusted to fit into 1080p
x = 3840
y = 2160
x_target = 1080
y_target = 1920
x_ratio = x_target / x
y_ratio = y_target / y
resize_factor = min(x_ratio, y_ratio)
new_x = min(math.ceil(x * resize_factor), x_target)
new_y = min(math.ceil(y * resize_factor), y_target)
else:
#REM this is for resizing BEFORE rotated 0 degrees h.265 from samsung camera which is when one films in landscape mode
#REM so NO rotation and it appears sideways long with the top at the top and we must resize according to that
#REM x is long and will become vertical and when rotated must fit into 1920
#REM y is skinny and will become horizontal and when rotated must fit into 1080
#REM so, when rotated it will be adjusted to fit into 1080p
x = 3840
y = 2160
x_target = 1920
y_target = 1080
x_ratio = x_target / x
y_ratio = y_target / y
resize_factor = min(x_ratio, y_ratio)
new_x = min(math.ceil(x * resize_factor), x_target)
new_y = min(math.ceil(y * resize_factor), y_target)
# dn_enable=x DENOISE
# default 0 0: disabled 1: spatial denoising only 2: temporal denoising only 3: spatial and temporal denoising
# dn_quality="x" default "good" "good" "better" "best" ... "best" halves the speed compared pre-CUDASynth
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=new_x, rh=new_y, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 )
# 1. get dgsource to resize
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=new_x, rh=new_y)
# 2. use vapoursynth resize
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI')
#video = core.resize.Lanczos(video, width=new_x, height=new_y)
video = core.std.AssumeFPS(video, fpsnum=30, fpsden=1)
#video = core.avs.DGSharpen( video, strength=0.2 )
if int(90.000) == 90:
## the video needs rotating 90 degrees
video = core.std.Transpose(video)
video = core.std.FlipHorizontal(video)
#video = vs.core.text.ClipInfo(video)
video.set_output()
Code: Select all
G:\HDTV\DGtest>"!vspipeexe64!" --version 2>&1
VapourSynth Video Processing Library
Copyright (c) 2012-2023 Fredrik Mellbin
Core R65
API R4.0
API R3.6
Options: -
G:\HDTV\DGtest>"!vspipeexe64!" --info "!_VPY_file!" 2>&1
Width: 608
Height: 1080
Frames: 3410
FPS: 30/1 (30.000 fps)
Format Name: YUV420P16
Color Family: YUV
Alpha: No
Sample Type: Integer
Bits: 16
SubSampling W: 1
SubSampling H: 1
G:\HDTV\DGtest>"!vspipeexe64!" --filter-time --progress --container y4m "!_VPY_file!" -- 2>&1
Script evaluation done in 0.30 seconds
G:\HDTV\DGtest>set bitrate=6000000
G:\HDTV\DGtest>set min_bitrate=500000
G:\HDTV\DGtest>set max_bitrate=10000000
G:\HDTV\DGtest>set bufsize=!max_bitrate!
G:\HDTV\DGtest>"!vspipeexe64!" --container y4m --filter-time "!_VPY_file!" - | "!ffmpegexe64_OpenCL!" -hide_banner -v verbose -nostats -f yuv4mpegpipe -i pipe: -probesize 200M -analyzeduration 200M -i "!QSF_VIDEO!" -map 0:v:0 -map 1:a:0 -fps_mode passthrough -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres -forced-idr 1 -g 25 -coder:v cabac -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0 -rc:v vbr -cq:v 0 -b:v !bitrate! -minrate:v !min_bitrate! -maxrate:v !max_bitrate! -bufsize !bufsize! -profile:v high -level 5.2 -movflags +faststart+write_colr -c:a libfdk_aac -cutoff 18000 -ab 256k -ar 48000 -y "!TARGET_VIDEO!"
Routing option strict to both codec and muxer layer
[yuv4mpegpipe @ 00000245416333c0] Header too large.
[AVIOContext @ 00000245416481c0] Statistics: 0 bytes read, 0 seeks
[in#0 @ 0000024541632e40] Error opening input: Invalid argument
Error opening input file pipe:.
Error opening input files: Invalid argument
Code: Select all
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=1080, rh=608)
Code: Select all
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI')
video = core.resize.Lanczos(video, width=1080, height=608)
Cool.
Nice, it works fine (of course).
He he, in other times and ways been there done that, I feel your determination.
OK, thanks. I perceived the temporal denoising to be fairly strong (prior download rather than the latest), so I'll probably tend to use that more for VHS sources. I'll give it another whirl using the latest download for fun.
After a night of refreshing REM sleep fueled by 5mg of melatonin, I fixed this in half an hour this morning. I'm changing from black to white to denote filtered areas as it was at first, as it makes things easier to visualize. The reason I went to black for a while was it somewhat disguised the chroma bleed-through bug.
And who doesn't like a good cover-up from time to time Ask any politician
Code: Select all
import vapoursynth as vs # this allows use of constants eg vs.YUV420P8
from vapoursynth import core # actual vapoursynth core
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765
before_video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\RESULTS\00_PostcardsFromMannum_sample-unprocessed_interlaced_CUT.DGI', deinterlace=1, use_top_field=True, use_pf=False )
after_video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\RESULTS\00_PostcardsFromMannum_sample-unprocessed_interlaced_CUT.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=3, dn_quality="best", dn_strength=0.06, dn_cstrength=0.06, dn_tthresh=75.0, dn_show=0 )
after_video = core.avs.DGSharpen( after_video, strength=0.3 )
stacked_video = core.std.StackVertical( [before_video, after_video] )
stacked_video.set_output()
Nothing more than ongoing laziness on my part.