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. |
|
22nd September 2020, 22:57 | #1 | Link |
Registered User
Join Date: Sep 2020
Posts: 15
|
my resizing method
how to convert 2D video to 360 degree VR video, or resize-upscale 2D video
step 1 the basic software and resizing vr software: virtual desktop, watch with windows movie & TV program, roll the video up with your mouse so you can see it. avisynth+ https://github.com/AviSynth/AviSynthPlus/releases avisynth shader, i deleted shader.dll because otherwise its the 32 bit version in the 64 bit folder, and that would cause an error when opening the avs file with virtualdub x64. https://github.com/mysteryx93/AviSynthShader/releases AviSynth AiUpscale v1.0.1, put shaders folder and AiUpscale.avsi file into avisynth plugins folder https://github.com/Alexkral/AviSynth...ses/tag/v1.0.1 FFmpeg, i unzip using 7 zip, the put folder in c drive, then add the bin folder to my path; C:\ffmpeg-4.4-full_build\bin - Open the Start Search, type in “env”, and choose “Edit the system environment variables” - Click the “Environment Variables…” button - Under the “System Variables” section (the lower half), find the row with “Path” in the first column, and click edit - The “Edit environment variable” UI will appear. Here, you can click “New” and type in the new path you want to add. From this screen you can also edit or reorder them. - Dismiss all of the dialogs by choosing “OK”. Your changes are saved! You will probably need to restart apps for them to pick up the change. Restarting the machine would ensure all apps are run with the PATH change. https://www.gyan.dev/ffmpeg/builds/ LSMASHSource http://avisynth.nl/index.php/LSMASHSource avidemux http://avidemux.sourceforge.net/ daa() http://avisynth.nl/index.php/DAA Nnedi3 http://avisynth.nl/index.php/Nnedi3 MaskTools2 http://avisynth.nl/index.php/MaskTools2 RgTools http://avisynth.nl/index.php/RgTools Microsoft Visual C++ 2019 Redistributable Package (x86 / x64) https://support.microsoft.com/en-us/...al-c-downloads SmoothD2 http://avisynth.nl/index.php/SmoothD2 DeHalo alpha http://avisynth.nl/index.php/DeHalo_alpha LSFmod http://avisynth.nl/index.php/LSFmod Last NVEnc codec https://github.com/rigaya/NVEnc/releases/ install python 2 for windows 10; https://www.python.org/downloads/release/python-2718/ converter: https://github.com/google/spatial-me...a.Tool.win.zip staxrip https://github.com/Revan654/staxrip/...es/tag/2.0.2.4 resize Code:
video = LSMASHVideoSource("C:\Users\office\Downloads\Enya - It's In The Rain.mp4").Crop(0, 56, 0, -56).ConvertToYV12(interlaced = false) audio = LSMASHAudioSource("C:\Users\office\Downloads\Enya - It's In The Rain.mp4") AudioDubStep = AudioDub(video, audio) step1 = SmoothD2(AudioDubStep, ZWlmDark = 50, Qtype = 3, Matrix = 4, quant = 12) step2 = daa(step1) step3 = LSFmod(step2, strength = 200) step4 = AiUpscale (step3, Luma = "HQ", Width = 1280, Height = 736 ) step5 = DeHalo_alpha (step4, rx = 1.2, ry = 1.2, lowsens = 1, highsens = 2) resizeVideo = Spline64Resize(step5, 1920, 1104 ) step6 = LSFmod(resizeVideo, strength = 200) return (step6) Code:
video = LSMASHVideoSource("C:\do it.mp4").Crop(0, 0, 0, 0).ConvertToYV12(interlaced = false) blank = BlankClip(video) step4a = StackVertical(blank, blank, blank) step4b = StackVertical(blank, blank, video) step4c = StackVertical(blank, blank, blank) step5 = StackHorizontal(step4a, step4b, step4c) audio = LSMASHAudioSource("C:\do it.mp4") AudioDubStep = AudioDub(audio, step5) return (step5) i like to speed up a section into either 170 percent or 30 percent, using movavi video editor. for warzone i use movavi video editor and change the speed, save as 1920,1080, and fps 60. setup staxrip - move staxrip.exe and staxrip.exe.config from \Staxrip.2.0.2.4.x64\v4.8 folder, into \Staxrip.2.0.2.4.x64 folder - apps, manage update NVEnc and avisynth versions - drag and drop from NVEnc folder into the staxrip Staxrip.2.0.2.4.x64\Apps\Encoders\NVEnc folder. - replace the LSMASHSource.dll in Staxrip.2.0.2.4.x64\Apps\Plugins\AVS\L-Smash-Works with the LSMASHSource.dll in C:\Program Files (x86)\AviSynth+\plugins64+ - nvidia h.265 encoder options basic, mode, vbr hq - variable bitrate hq basic depth 8 bit Slice Decision, GOP Length = 33 make new profile nvidia h.265 8 bit ok, change encoder from nvidia h.265 to the profile you just made. mp4 - audio aac 318 - 1080p resize video bitrate 5000 1080p 2d to 360d video bitrate 5000. - file, save project as template, check box load template on startup you can then encode multiple avs files with staxrip, make a bunch of sets of video files, a bunch of avs files, save the avs files into the same folder, then in staxrip, file, open video file, file batch, add, add folder. or, for the one video, open staxrip, file, open video file, choose avs file click target and choose where to save the file, click next, start. use converter software open the file staxrip made and convert to 360 degree video ("my video is spherical 360"). if the video stutters and your videocard supports h.265 decoding, then your not using hw decoding, then you need to use the hw decoding on the videocard, "If you are on the latest Windows 10 Fall Creators Update, make sure to download the HEVC Video Extension to get the best hardware decoding performance. It used to be part of Windows but is now a separate download, from the microsoft store." which means the microsoft store hevc codec you buy is really good to use instead of klite which is free. or install klite; k_lite_mega_codec_pack https://m.majorgeeks.com/files/detai...odec_pack.html i installed the klite codec pack and set h.265 decoder to lav in "preferred decoders" tab using the tweak tool in the klite software. i just set everything to use lav in the "preferred decoders" tab though. do not open file with vlc it is buggy as of today i put in a bug report, - if the youtube 360 degree downloaded video plays in regular 2d video, then you need to use the converter tool again, to reconvert the 2d video back to 360 degree video. https://www.movavi.com/videoeditor/ Last edited by ISmileAtYouuu; 18th April 2021 at 23:53. |
22nd September 2020, 23:25 | #2 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,823
|
For some reason, there's no link for the mod version of MCTemporalDenoise at the top of the page. You have to use the link at the bottom.
http://avisynth.nl/index.php/MCTemporalDenoise http://pastebin.com/raw.php?i=xuRuW787 The function name of the mod version is MCTD(), although now I've looked, it appears to also be using the original Sangnom. Last edited by hello_hello; 22nd September 2020 at 23:31. |
23rd September 2020, 00:17 | #3 | Link | |
Registered User
Join Date: Jan 2018
Posts: 2,153
|
Quote:
https://github.com/realfinder/AVS-St...alDenoise.avsi And last MCTD too https://github.com/Asd-g/AviSynthPlu...ter/MCTD_.avsi Can put 2 script above in one folder |
|
23rd September 2020, 00:25 | #5 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
my edit of MCTemporalDenoise still use SangNom since https://github.com/Asd-g/AviSynth-SangNom2 added SangNom
__________________
See My Avisynth Stuff |
23rd September 2020, 04:37 | #7 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,153
|
libfftw3f-3.dll 3.3.8 (faster than 3.3.5)
https://drive.google.com/file/d/1KUz...w?usp=drivesdk |
30th September 2020, 16:58 | #9 | Link | |
Registered User
Join Date: Sep 2020
Posts: 15
|
Quote:
sounds cool. i might try this out later on. how would i double the size of a video with spline144resize()? Last edited by ISmileAtYouuu; 30th September 2020 at 17:00. |
|
30th September 2020, 19:21 | #10 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
If your final goal is to upscale, I wouldn't just use a resizing kernel and trust it blindly, but I would use it through NNEDI3 instead.
For instance: Code:
nnedi3_resize16(target_width=1920, target_height=1080, mixed=true, thr=1.0, elast=1.5, nns=4, qual=2, etype=0, pscrn=4, threads=0, tv_range=true, kernel_d="Spline", kernel_u="Spline", taps=6, f_d=1.0, f_u=2.0, sharp=0, lsb_in=true, lsb=true) This way, you can have Spline16, Spline36, Spline64, Spline144 and so on. Right now I already set it to "taps=6" for you so that it's gonna be Spline144Resize. Feel free to test it and report. Some people find Spline36Resize to be ok and Spline64 to be perfect for pretty much everything, but some other people like Katie say that going to 144 actually makes sense and it's noticeable. Ultimately, I think it's up to you and your eyes as it's really just a tradeoff between what you consider to be worth quality wise and speed. Side note: this works in 16bit stacked. Put lsb_in=true, lsb=true for 16bit stacked, set them to false for 8bit planar. For instance, in Avisynth+: Code:
ConvertBits(16) ConverttoStacked() nnedi3_resize16() #with the parameters you want ConvertFromStacked() Code:
Dither_convert_8_to_16() nnedi3_resize16() I personally use NNEDI3 in 16bit with Spline64 by the way. Cheers, Frank |
1st October 2020, 21:48 | #11 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
2nd October 2020, 18:00 | #13 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
1st October 2020, 01:38 | #14 | Link |
Registered User
Join Date: Sep 2020
Posts: 15
|
ty francebb, i like to use the sw called AiUpscale though. it works and that's all i care about. if i was younger i might have tried everything in the avisynth wiki including nnedi3_resize16 and tweaked it too, but its not in me anymore, sry. ty tho. weary traveler smiles at yu.
Last edited by ISmileAtYouuu; 1st October 2020 at 01:40. |
2nd October 2020, 20:21 | #15 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Uhm... I updated nnedi3_resize16, resizex and zrf_share with the latest ones you uploaded on Doom9 / GitHub and I tried something really simple (and stupid):
Code:
ColorBars(848, 480, pixel_type="YV12") ConvertBits(32) nnedi3_resize16(target_width=1920, target_height=1080, kernel_u="Spline", taps=6) If I get rid of the "kernel_u=" parameter, then it works: Code:
nnedi3_resize16(target_width=1920, target_height=1080) I can of course specify it as: Code:
nnedi3_resize16(target_width=1920, target_height=1080, kernel_u="Spline64") For instance, although I'm gonna be fine with Spline64, if someone like Katie wants to specify taps=6 in Spline to use Spline144Resize, it's not possible. Wouldn't it be better to port ResizeX to planar High Bit Depth as well? (Or at least add a conversion/fallback to stacked for it?) |
2nd October 2020, 20:38 | #16 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
as the message said, there are no Spline without lsb, unless someone did this port https://forum.doom9.org/showpost.php...postcount=1125 then I will update ResizeX to use it, I avoid use "HBD to hack then HBD" in first place, and even if it done you can't use anything from HBD except 16bit so it's not worth it
__________________
See My Avisynth Stuff |
|
5th November 2020, 09:57 | #19 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Well, since we're talking about VR and 360 videos, I used to encode HD 3D SBS videos, but I've never really encoded a VR one.
Out of curiosity, before I make any tests, is there something I should be aware of before I encode one, converting from 2D with your script? I mean, is there a flag I gotta put when I encode with x264? You know, I'm not really a fan of VR stuff, so this is all pretty new to me... |
5th November 2020, 12:08 | #20 | Link |
Registered User
Join Date: Sep 2020
Posts: 15
|
the souce file can be too big a resolution which will crash avidemux and staxrip when you open the avs file. i find 1080p files work and look nice, but 720p videos look nice too. and larger a source video and it will probably not even open the avs file.
you need movavi video editor, if you follow my guide. if you find some other way for free then please do share. its impossible otherwise to split and have the same files length for the three videos which causes lip sync errors. https://www.movavi.com/videoeditor/ all the flags for the encoder are detailed in the guide i updated the guide a minute ago to be more clear. assuming a 1080p source file resolution, if you crop in the avs code you need to adjust the crop in the code from 540 for height to the half height value, and the width instead of 960 to half the width. heres some of my videos so you can see what they look like, look in the vr videos to see some mmd dance videos with miku and rin: https://www.youtube.com/channel/UCO_...1x0KH9fog5gTkA Last edited by ISmileAtYouuu; 7th November 2020 at 22:34. |
Tags |
guide, mctemporaldenoise, resize |
Thread Tools | Search this Thread |
Display Modes | |
|
|