Tutorial UpScaling from 1080p 8 bit SDR to 2160p 10 bit HDR

Licdom:_trusted_uploader::_male::_junkie:Posted at 2023-10-11 12:08:40(28Wks ago) Report Permalink URL 
Reppoints: 23
Posts: 5
Uploads: 1610



Software needed to do UpScaling...

Download and install Python version 3.11 from here: https://www.python.org/downloads/

Image error


Download and install VapourSynth from here: https://github.com/vapoursynth/vapoursynth/releases/tag/R64

Image error


Download and install VapourSynth Editor from here: https://github.com/YomikoR/VapourSynth-Editor/releases/tag/r19-mod-6.2

Image error


Download and unzip FFmpeg Full version from here: https://www.gyan.dev/ffmpeg/builds/

Image error

Open the Command Prompt as Administrator and go to this directory: C:Program FilesVapourSynthvsrepo

Image error


In the Command Prompt write this command: vsrepo.py install ffms2
and click on enter.

Image error

You have installed an FFmpeg library to play video files with VapourSynth.


In the Command Prompt write this command: vsrepo.py install adjust
and click on enter.

Image error

Now you have everything you need to do UpScaling.


Create a New Folder and put the 1080p file you want to enlarge into it and create a New Text File called: UpScaling. vpy

Image error


Double click on the file UpScaling.vpy and the VaporSynth editor you installed opens:

Image error

Write these commands:


Quote:


import vaporsynth as vs
import os
import sys
import adjust
core = vs.core

clip = core.ffms2.Source(source='F:\BluRay_Rip\Test Software Vari\Tutorial UpScaling\Le cronache di Narnia - Il viaggio del veliero (2010) 1080p originale 2 minuti 42-44.mkv')

clip = core.resize.Lanczos(clip, format=vs.RGBS, matrix_in_s="709", transfer_in_s="709", primaries_in_s="709")

clip = core.resize.Lanczos(clip, format=vs.YUV420P10, matrix_s="2020ncl", transfer_s="st2084", primaries_s="2020")

clip = adjust.Tweak(clip, bright=0.2,cont=1.2,sat=1.1);

clip = core.resize.Lanczos(clip, 3840, 2160)

clip.set_output()
Image error


Press the F6 key and the editor will check the script you just wrote, it will read the entire source video file so it takes several minutes to test it, with faster hard disk less time it will take to read the video and check the script.

At the end you will see a message in the lower text box of the editor: Script was successfully evaluated.

Image error


This Script reads the Source video 1080p 8 bit upscales it to 2160p 10 bit and sends a stream, a video stream to a program to encode it.
Open Command Prompt as Administrator and write this command for encoding with FFmpeg.

"C:\Program Files\VapourSynth\core\vspipe.exe" -c y4m "F:\BluRay_Rip\Test Software Vari\Tutorial UpScaling\UpScaling.vpy " - | "C:\Users\licdoVideos\Bluray_Rip\ffmpeg_latest\ffmpeg.exe" -y -i - -max_muxing_queue_size 1024 -filter_complex "[0:0] hqdn3d=luma_spatial=2:chroma_spatial=1.5:luma_tmp=3:chroma_tmp=2.25[v]" -map "[v]" -c:v libx265 -pix_fmt yuv420p10le -x265-params "aq-mode=2 :repeat-headers=1:strong-intra-smoothing=1:bframes=4:b-adapt=2:frame-threads=0:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:hdr10_opt=1:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1):max-cll=1000,400: hdr10=1:chromaloc=2" -crf:v 22 -preset:v medium -hide_banner -stats -loglevel panic -map_metadata -1 -map_chapters 0 -default_mode infer_no_subs [color=red ] "F:\BluRay_Rip\Test Software Vari\Tutorial UpScaling\Le cronache di Narnia - Il viaggio del veliero (2010) UpScaled 2160p 2 minuti 42-44.mkv"[/color]



Quote:


"C:\Program Files\VapourSynth\core\vspipe.exe" -c y4m "F:\BluRay_Rip\Test Software Vari\Tutorial UpScaling\UpScaling.vpy" - | "C:\UserslicdoVideos\Bluray_Rip\ffmpeg_latest\ffmpeg.exe" -y -i - -max_muxing_queue_size 1024 -filter_complex "[0:0]hqdn3d=luma_spatial=2:chroma_spatial=1.5:luma_tmp=3:chroma_tmp= 2.25[v]" -map "[v]" -c:v libx265 -pix_fmt yuv420p10le -x265-params "aq-mode=2:repeat-headers=1:strong-intra-smoothing=1:bframes=4:b -adapt=2:frame-threads=0:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:hdr10_opt=1:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP (15635,16450)L(10000000,1):max-cll=1000,400:hdr10=1:chromaloc=2" -crf:v 22 -preset:v medium -hide_banner -stats -loglevel panic -map_metadata -1 - map_chapters 0 -default_mode infer_no_subs "F:\BluRay_Rip\Test Software Vari\Tutorial UpScaling\Le cronache di Narnia - Il viaggio del veliero (2010) UpScaled 2160p 2 minuti 42-44.mkv"

"C:\Program Files\VapourSynth\core\vspipe.exe" reads the VapourSynth script "F:\BluRay_Rip\Test Software Vari\Tutorial UpScaling\UpScaling. vpy" and send the output stream to ffmpeg source "C:\Userslicdo\Videos\Bluray_Rip\ffmpeg_latestffmpeg.exe" -y -i -

-filter_complex "[0:0]hqdn3d=luma_spatial=2:chroma_spatial=1.5:luma_tmp=3:chroma_tmp=2.25[v]" is a slight denoise.

master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1):max-cll=1000,400 these values are fine for all films that go from 8 bit to 10 bit if you change them and you don't know what you're doing you get a film with green or red colors or other strange things.

  -crf:v 22 -preset:v medium you can change the crf value to a smaller or larger number.
Larger numbers decrease bitrate and quality, smaller numbers increase quality and bitrate.
You can replace the medium value with one of these: ultrafast - superfast - veryfast - faster - fast - medium - slow - slower - veryslow - placebo
Lower speeds create a smaller file with more detail, higher speeds create a larger file with less detail.

You can replace -crf:v 22 with -b:v 3000k which encodes the file with an average bitrate of 3000k or whatever number you think is better, obviously higher bitrate better encoding.

Image error


Last edited by Licdom on 2023-10-11 12:22:49


 
Post liked by - devsped568:_male:, appdoze:_verified_uploader::_male::_turtle:, privateloader, hesly, eyez:_trusted_uploader::_sitefriend::_male::_sitelover::_junkie::_kitty::_sun::_turtle:, Balerion:_trusted_user::_male::_turtle:, ROBBREDD:_moderator::_male::_sitelover::_junkie::_sun:, Barharmar:_trusted_user::_male::_sitelover::_junkie::_kitty::_sun::_turtle:, Mafketel:_super_admin::_male:, NatalieNY:_trusted_user::_female:
heslyPosted at 2024-01-25 16:54:51(13Wks ago) Report Permalink URL 
Reppoints: -2
Posts: 6
Uploads: 0

WIll this works even if the film is at 720p?

 
Post liked by - privateloader
privateloaderPosted at 2024-01-27 21:20:22(12Wks ago) Report Permalink URL 
Reppoints: -5
Posts: 2
Uploads: 0

Seems good, thanks.

 
Post liked by - appdoze:_verified_uploader::_male::_turtle:

  Sitefriends