版面规则
提问时请注意:尽量详细描述操作过程、AVS脚本内容等,最好能写出片名,只贴图有时无法看出问题原因。
提示:发布原创内容请尽量使用附件上传。使用网盘会出现过期失效的问题,请注意。
头像
Billy Herrington
帖子: 83
注册时间: 2013-01-09 9:54

BillyTC - Billy's vfr maker

BillyTC - Billy's vfr maker

Author: Billy Herrington ( billy {DOT} herrington {DOT} ny {AT} gmail {DOT} com )

Do you feel tired of separating EasyVFR's EasyVFR_Create/EasyVFR_Append?
Do you need to append more than 1022 clips so that EPOutTimeCode/TimeCodeOutPut fails?
Do you hate MindShit's dotNet runtime?
Come on man, Billy with me!

Use as simple Splice (but audio will be killed)
Be calful do not unintentionally append the first clip after *last* clip

[syntax lang="avisynth"]clip1.BillyTC /* call me for the first clip */
\ .BillyTC(clip2) /* then append following clips afterwards */
\ .BillyTC(clip3)
\ .BillyTC(clip4)
\ .BillyTC(clip5)[/syntax]

Now let Billy show you an example of concating 1023 clips!
[syntax lang="avisynth" lines="f"]
/* === Need RecEval, which can be found here: http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&t=665 === */
global clipA = BlankClip(length=50000).AssumeFPS(24000, 1001)
global clipB = ColorBars().AssumeFPS(60000, 1001)
n = 1023
clipA.RecEval("""Eval("global clip"+String(times)+"="+(times%2==0?"clipB.Trim(0, "+String(times-1)+")":"clipA.Trim(0, "+String(times==1?-1:times-1)+")")+" clip"+String(times))""", n)
clipA.RecEval("""Eval(times==""" + String(n) + """ ? "clip1.BillyTC" : "last.BillyTC(clip"+String("""+String(n+1)+"""-times)+")")""", n)[/syntax]

You will find the output clip has exact 1+2+3+...+1023=523776 frames, with
clip1 = clipA.Trim(0, -1) # 1 frame
clip2 = clipB.Trim(0, 1) # 2 frames
clip3 = clipA.Trim(0, 2) # 3 frames
clip4 = clipB.Trim(0, 3) # 4 frames
clip5 = clipA.Trim(0, 4) # 5 frames
...
clip1022 = clipB.Trim(0, 1021) # 1022 frames
clip1023 = clipA.Trim(0, 1022) # 1023 frames

and timecodes file is:
[syntax lang="ruby" lines="f"]# timecode format v1
Assume 23.976024
0,0,23.976024
1,2,59.940060
3,5,23.976024
6,9,59.940060
10,14,23.976024
15,20,59.940060
21,27,23.976024
28,35,59.940060
36,44,23.976024
45,54,59.940060
55,65,23.976024
66,77,59.940060
...
519690,520709,59.940060
520710,521730,23.976024
521731,522752,59.940060
522753,523775,23.976024
[/syntax]

Enjoy Billy!


Download: [syntax lang="avisynth" lines="f" filename="BillyTC.avsi"]# BillyTC - Billy's vfr maker
#
# Author: Billy Herrington ( billy.herrington.ny@gmail.com )
#
# Do you feel tired of separating EasyVFR's EasyVFR_Create/EasyVFR_Append?
# Do you need to append more than 1022 clips so that EPOutTimeCode/TimeCodeOutPut fails?
# Do you hate MindShit's dotNet runtime?
# Come on man, Billy with me!
#
# Use as simple Splice (but audio will be killed)
# Be calful do not unintentionally append the first clip after *last* clip
#
# clip1.BillyTC /* call me for the first clip */
# \ .BillyTC(clip2) /* then append following clips afterwards */
# \ .BillyTC(clip3)
# \ .BillyTC(clip4)
# \ .BillyTC(clip5)
#
# Now let Billy show you an example of concating 1023 clips!
#
# /* ========== Need RecEval, which can be found here: http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&t=665 ========== */
# global clipA = BlankClip(length=50000).AssumeFPS(24000, 1001)
# global clipB = ColorBars().AssumeFPS(60000, 1001)
# n = 1023
# clipA.RecEval("""Eval("global clip"+String(times)+"="+(times%2==0?"clipB.Trim(0, "+String(times-1)+")":"clipA.Trim(0, "+String(times==1?-1:times-1)+")")+" clip"+String(times))""", n)
# clipA.RecEval("""Eval(times==""" + String(n) + """ ? "clip1.BillyTC" : "last.BillyTC(clip"+String("""+String(n+1)+"""-times)+")")""", n)
#
# You will find the output clip has exact 1+2+3+...+1023=523776 frames,
# with clip1 = clipA.Trim(0, -1) # 1 frame
# clip2 = clipB.Trim(0, 1) # 2 frames
# clip3 = clipA.Trim(0, 2) # 3 frames
# clip4 = clipB.Trim(0, 3) # 4 frames
# clip5 = clipA.Trim(0, 4) # 5 frames
# ...
# clip1022 = clipB.Trim(0, 1021) # 1022 frames
# clip1023 = clipA.Trim(0, 1022) # 1023 frames
#
# and timecodes file is:
# # timecode format v1
# Assume 23.976024
# 0,0,23.976024
# 1,2,59.940060
# 3,5,23.976024
# 6,9,59.940060
# 10,14,23.976024
# 15,20,59.940060
# 21,27,23.976024
# 28,35,59.940060
# 36,44,23.976024
# 45,54,59.940060
# 55,65,23.976024
# 66,77,59.940060
# ...
# 518671,519689,23.976024
# 519690,520709,59.940060
# 520710,521730,23.976024
# 521731,522752,59.940060
# 522753,523775,23.976024
#
# Enjoy Billy!
#
Function BillyTC(clip c1, clip "c2", string "tc"){

tc = Default(tc, "timecodes_v1.txt")
b2 = Defined(c2)

c1 = c1.KillAudio.NormalFPS
x1 = c1.FramerateNumerator
y1 = c1.FramerateDenominator
f1 = String(pFrac2Str(x1, y1, 6))
n1 = c1.framecount

c2 = b2 ? c2.KillAudio.NormalFPS : NOP
x2 = b2 ? c2.FramerateNumerator : NOP
y2 = b2 ? c2.FramerateDenominator : NOP
f2 = b2 ? String(pFrac2Str(x2, y2, 6)) : NOP
n2 = b2 ? c2.framecount : NOP

Lv = "# timecode format v1"
Ls = "Assume " + f1
L1 = "0," + String(n1-1) + "," + f1
L2 = b2 ? String(n1) + "," + String(n1+n2-1) + "," + f2 : NOP

return b2 ? c1 ++ c2.AssumeFPS(x1, y1)
\ .WriteFileStart(tc, "L2", append=True)
\ : c1.WriteFileStart(tc, "Lv", append=False)
\ .WriteFileStart(tc, "Ls", append=True )
\ .WriteFileStart(tc, "L1", append=True )
}


# Positive Fraction to String
# Workaround for String(24000./1001.)=23.976025, String(120000./1001.)=119.880119
#
Function pFrac2Str(int x, int y, int precision){
return x > y ? String(x/y) + RightStr(String(Float(x%y)/Float(y), "%0."+String(precision)+"f"), precision+1)
\ : String(Float(x)/Float(y), "%."+String(precision)+"f")
}


# Convert any NTSC based framerate to accurate value
# E.g., 23.976xxxxx to exact 24000./1001.
#
Function NormalFPS(clip c){
origFPS = c.framerate
NTSCnum = int(origFPS * 1.001 + 0.5)
epsilon = 0.01

b_conv = c.frameratedenominator!=1 && ( abs(origFPS - NTSCnum / 1.001) < epsilon )
return b_conv ? c.AssumeFPS(NTSCnum*1000, 1001) : c
}
[/syntax]
上次由 Billy Herrington 在 2013-02-20 12:13,总共编辑 1 次。
头像
-o-o-304-o-o-
超级版主
帖子: 640
注册时间: 2010-10-10 20:00
来自: US
联系: 网站

Re: BillyTC - Billy's vfr maker

\王♂之♂军♂势/
► 显示剧情透露 En Taro 06!Taro Pie NC Fanclub project始动!聊天用Q群开放中
► 显示剧情透露 胸中有万言,退敌无一策,是谓书生误国"
► 显示剧情透露 前辈们的信念
► 显示剧情透露 妇联招新广告,走过路过可以看看撒
► 显示剧情透露 香芋派,后期菊苣们的一致选择
► 显示剧情透露 众菊苣喜评香芋派
► 显示剧情透露 聊天用工具
头像
zhongpang
帖子: 93
注册时间: 2011-10-23 20:45

Re: BillyTC - Billy's vfr maker

can't love u more♂
akw28888
帖子: 171
注册时间: 2012-02-24 17:12

Re: BillyTC - Billy's vfr maker

Thank you very much!
話說這個和http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&t=11功能差不多?
头像
yabbay
帖子: 62
注册时间: 2012-05-31 10:39
来自: Tokyo

Re: BillyTC - Billy's vfr maker

Ass we can!!
          .∧__,,∧
         ( ´・ω・`) ブルブル
          (つまくら) アリと明日(ant and tomorrow)
          `u―u´ レッツ・エッグ・ペイン(Let`s egg pain)
头像
猫耳幽香
帖子: 22
注册时间: 2014-12-22 12:24

Re: BillyTC - Billy's vfr maker

不知道啥情况,下载链接挂了,于是贴一个上去。
BillyTC.7z
(1.68 KiB) 下载 113 次
mawen1250的签名档里有好多教程 | 带2+5.1ch声道ts的处理方法 | AssumeFPS、ChangeFPS、ConvertFPS的区别 | 关于音频抽出却延迟不同的一些疑问(未解决)
一些常用的文档和工具:(大多收录非记载在nmm论坛的内容)
H.264Level计算器 | x264参数介绍(中文翻译可以戳这里,但是不全) | x265参数介绍 | BillyTC下载链接修复
► 显示剧情透露 致那些“我看不懂”的人
► 显示剧情透露 我不懂为啥有人说HEVC慢Orz
► 显示剧情透露 鸠子的愤怒:我不明白
► 显示剧情透露 芳乃琴里樱这名字太长了,叫我琴乃多好。

回到 “AviSynth”