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.

 

Go Back   Doom9's Forum > General > Newbies
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th June 2021, 12:52   #1  |  Link
Satoshi18
Registered User
 
Join Date: Jul 2020
Posts: 22
Help me write the encoding script

I'm familiar only with handbrake , and I'm new to coding, scripting etc
Can anyone please help me how to make a great encode
I don't know any filters etc.
I opened AVSpmod and open'd a vob file which I want to encode

Code:
DirectShowSource("C:\Users\Admin\Desktop\VTS_02_1.VOB")
This is what I got, what to do next upto the encode is done? I'm new to everything.
I want to upscale it from 720x480 to 768 x 576. Suppose This is how.
Code:
LanczosResize(768, 576)
Want to encode it in Hi10p
Source is NTSC 29.970 FPS VOB which I need to decimate/IVTC i suppose, back to 23.976 fps, but not sure how to do that.


Encoding settings I want to use are the following: ref=16:trellis=2:subme=10 CRF=18

Can anyone please write a script for me and guide me through whole encoding process?
Thanks!

Last edited by Satoshi18; 24th June 2021 at 13:16.
Satoshi18 is offline   Reply With Quote
Old 26th June 2021, 11:46   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Best start with something like StaxRip, MeGui to get some basic understanding of how the whole thing works.
As a side note: Using DirectShowSource is usually a mistake.

That said, here's a simple Avisynth+ example which applies IVTC and resizes.
Code:
# for multi-threading 
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
## START - only needed if you use a portable Avisynth version
ClearAutoloadDirs()
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\LoadDll.dll")
LoadDLL("I:\Hybrid\32bit\avisynthPlugins\libfftw3f-3.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\DGDecodeNV.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\TIVTC.dll")
## END - only needed if you use a portable Avisynth version

# loading source: G:\TestClips&Co\files\interlaceAndTelecineSamples\telecine\apollo_440_-_lost_in_space(jason_nevis_lunar_landing).m2v
# color sampling YV12@8, matrix: bt709, scantyp: telecine, luminance scale: limited
DGSource(dgi="E:\Temp\m2v_edadb2b3022d17feece2e4645c57aa58_853323747.dgi",fieldop=2) # .dgi-file was created using DGIndexNV
# current resolution: 720x480

# deinterlacing/IVTC
TFM()
TDecimate()
AssumeFrameBased()

# additional filtering

# scaling to 768x576
Spline36Resize(768,576)

# adjusting bit depth current 8 to target 10

# convert to 10bit for encoder
ConvertBits(10)

# for muli-threading, 16 might be to high for your system
PreFetch(16)

# setting output fps to 23.976fps
AssumeFPS(24000,1001)
#  output: color sampling YV12@10, matrix: bt709, scantyp: progressive, luminance scale: limited
return last
The script used/generated by StaxRip, MeGui and similar GUIs should look similar.
Alternatively to DGDecNV+DGIndexNV one could also use MPEG2Source + DGIndex:
Code:
# for multi-threading 
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
## START - only needed if you use a portable Avisynth version
ClearAutoloadDirs()
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\LoadDll.dll")
LoadDLL("I:\Hybrid\32bit\avisynthPlugins\libfftw3f-3.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\DGDecode.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\TIVTC.dll")
## END - only needed if you use a portable Avisynth version

# loading source: G:\TestClips&Co\files\interlaceAndTelecineSamples\telecine\apollo_440_-_lost_in_space(jason_nevis_lunar_landing).m2v
# color sampling YV12@8, matrix: bt709, scantyp: telecine, luminance scale: limited
MPEG2Source(d2v="E:\Temp\m2v_edadb2b3022d17feece2e4645c57aa58_853323747.d2v") # .d2v was created using DGIndex
# current resolution: 720x480

# deinterlacing/IVtC
TFM()
TDecimate()
AssumeFrameBased()

# additional filtering

# scaling to 768x576
Spline36Resize(768,576)

# adjusting bit depth current 8 to target 10
# convert to 10bit for encoder
ConvertBits(10)

# for muli-threading, 16 might be to high for your system
PreFetch(16)

# setting output fps to 23.976fps
AssumeFPS(24000,1001)
#  output: color sampling YV12@10, matrix: bt709, scantyp: progressive, luminance scale: limited
return last

Cu Selur

Ps.: No, I'm not guiding anyone through any process, like I wrote best start small and use a GUI to start with.
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 26th June 2021 at 11:50.
Selur is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.