Skip to content

Commit

Permalink
examples: update examples, remove deprecated features
Browse files Browse the repository at this point in the history
  • Loading branch information
sinsanction committed May 29, 2024
1 parent 2163374 commit 9d12629
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 31 deletions.
15 changes: 14 additions & 1 deletion dist/windows/examples/00001.m2ts.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,18 @@
"VspipeArgs" : [
"op_start=8000",
"op_end=16000"
]
],
"EnableReEncode" : true,
"ReExtractSource" : false,
"ReEncodeOldFile" : "output\\BDMV\\STREAM\\00002.m2ts [6BB45BA9].mkv",
"ReEncodeSliceArray" : [{
"begin" : 2400,
"end" : 2900
},{
"begin" : 4500,
"end" : -1
},{
"begin" : 40,
"end" : 2400
}]
}
13 changes: 3 additions & 10 deletions dist/windows/examples/demo.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"Version" : 3,
"VSVersion" : "20210901",
"VSVersion" : "2024H1",
"ProjectName" : "Demo - 1080p",
"EncoderType" : "x265",
"Encoder" : "x265-10b.exe",
"EncoderParam" : "-D 10 --deblock -1:-1 --preset slower --limit-tu 4 --no-strong-intra-smoothing --ctu 32 --crf 16 --qg-size 8 --pbratio 1.2 --cbqpoffs -2 --crqpoffs -2 --no-sao --me 3 --subme 5 --merange 38 --b-intra --no-amp --ref 4 --weightb --keyint 360 --min-keyint 1 --bframes 6 --aq-mode 1 --aq-strength 0.7 --rd 5 --psy-rd 1.5 --psy-rdoq 0.8 --rdoq-level 2 --no-open-gop --rc-lookahead 80 --scenecut 40 --qcomp 0.65 --vbv-bufsize 40000 --vbv-maxrate 30000 --colormatrix bt709 --range limited",
"ContainerFormat" : "mkv",
"AudioTracks" : [{
Expand All @@ -15,21 +14,15 @@
"Language" : "eng",
"Optional": true
}],
"InputScript" : "demo.vpy",
"Fps" : 23.976,
"SubtitleTracks" : [{
"Language" : "jpn"
}],
"InputScript" : "demo.vpy",
"InputFiles" : [
"Main_Disc\\BDMV\\STREAM\\00000.m2ts",
"Main_Disc\\BDMV\\STREAM\\00001.m2ts",
"Main_Disc\\BDMV\\STREAM\\00002.m2ts",
],
"Config" : {
"VspipeArgs" : [
"op_start=10000",
"op_end=15000"
]
},
"Fps" : 23.976,
"Rpc" : true
}
10 changes: 2 additions & 8 deletions dist/windows/examples/demo.vpy
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import vapoursynth as vs
import sys
import os.path
import math
from vapoursynth import core
import havsfunc as haf
import mvsfunc as mvf

core.num_threads = 8

#OKE:PROJECTDIR
projDir = '.'
sys.path.insert(1, projDir) # some packages rely on having '' as sys.path[0]
#import custom # import python modules under the project directory
#core.std.LoadPlugin(os.path.join(projDir, 'libcustom.dll')) # or load custom plugins

#OKE:MEMORY
core.max_cache_size = 8000

#OKE:INPUTFILE
a="00000.m2ts"
src8 = core.lsmas.LWLibavSource(a)
Expand All @@ -29,8 +23,8 @@ res = core.std.Trim(src16, 0, int(op_start) - 1) + core.std.Trim(op, int(op_star
#OKE:DEBUG
Debug = 1
if Debug:
res=core.std.Interleave([src16, res])
res=mvf.ToRGB(res,full=False,depth=8)
res=core.std.Interleave([src16, res])
res=mvf.ToRGB(res,full=False,depth=8)
else: res = mvf.Depth(res, 10)

res.set_output()
Expand Down
6 changes: 2 additions & 4 deletions dist/windows/examples/demo_720p.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@
"EncoderParam" : "--preset veryslow --tune animation --crf 19.0 --deblock 0:0 --keyint 360 --min-keyint 1 --bframes 8 --ref 9 --pbratio 1.25 --qcomp 0.7 --rc-lookahead 70 --aq-strength 0.9 --merange 24 --psy-rd 0.00:0.20 --no-dct-decimate --no-fast-pskip --colormatrix bt709 --fgo 1",
"ContainerFormat" : "mp4",
"AudioTracks" : [{
"TrackId" : 0,
"OutputCodec" : "aac",
"Bitrate" : 128
},{
"TrackId" : 1,
"OutputCodec" : "flac",
"MuxOption" : "Skip"
}],
"InputScript" : "demo_720p.vpy",
"Fps" : 23.976,
"SubtitleTracks" : [{
"MuxOption" : "Skip"
}],
"InputScript" : "demo_720p.vpy",
"InputFiles" : [
"00000.m2ts",
"00001.m2ts",
"00002.m2ts",
],
"Fps" : 23.976,
"Rpc" : true
}
6 changes: 0 additions & 6 deletions dist/windows/examples/demo_720p.vpy
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import vapoursynth as vs
import sys
from vapoursynth import core
import havsfunc as haf
import mvsfunc as mvf

core.num_threads = 12

#OKE:MEMORY
core.max_cache_size = 9000

#OKE:INPUTFILE
a="00001.m2ts"
src8 = core.lsmas.LWLibavSource(a)
Expand Down
4 changes: 2 additions & 2 deletions dist/windows/examples/vfr.vpy
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ res = core.std.AssumeFPS(res, fpsnum=27000, fpsden=1001)
#OKE:DEBUG
Debug = 0
if Debug:
res=core.std.Interleave([src16, res])
res=mvf.ToRGB(res,full=False,depth=8)
res=core.std.Interleave([src16, res])
res=mvf.ToRGB(res,full=False,depth=8)
else: res = mvf.Depth(res, 10)

res.set_output()
Expand Down

0 comments on commit 9d12629

Please sign in to comment.