Можно спросить? При попытке кодирования в Xvid4PSP 5 с GameDropFix_v4 выбивает сообщение "AviSynth Encoder Error: I don't know what "stereo_type" means"
После того, как убрал весь раздел ########## BEGIN OF MSMoothFps.avs ########## - только тогда заработало. Но ведь когда я прошу SVP сформировать скрипт для Xvid4PSP 5 - программа мне выдает его как часть скрипта. Выносил этот раздел и после FILTERING и в середине FILTERING - пока не убрал полностью не хотело работать..
Видео у меня VRF. Frame rate : 57.903 fps | Original frame rate : 60.000 fps | Minimum frame rate : 0.231 fps | Maximum frame rate : 112.570 fps
Записывал геймплей, лаги были видимо. SVP пишет Assume 57.902.
Вопрос а) как мне нужно писать значения фпс в скрипте, чтобы и фиксило дропы и четко все было (60? 57.903?). Желательный итог 60.000 Constant, чтоб на youtube залить можно было.
Прав ли я, что в источнике нужно ASSUME=60, а сразу после ConverttoYuv12 писать ChangeFPS(60.000) и тогда уже можно делать Filtering GameDropFix?
Ибо если строку Change не писать - то в итоге видео и аудио размера одинаковы, но из-за лагов в исходнике с под 0 фпс синхронизация скачками все хуже и хуже вплоть до 5 сек.
Вопрос б) Я в скрипте GamedDropFix в самый первый раз забыл выставить значение фпс и оно решило, что видео 25 к/с. На будущее, можно ли будет перемуксить в 57 или 60 (как там надо?) файл ИМЯ.264? Или заново кодировать?
SCRIPT
------------------------------
Import("C:\Program Files (x86)\XviD4PSP 5\dlls\AviSynth\functions\AudioFunctions.avs")
Import("C:\Program Files (x86)\XviD4PSP 5\dlls\AviSynth\functions\VideoFunctions.avs")
LoadPlugin("C:\Program Files (x86)\XviD4PSP 5\dlls\AviSynth\plugins\FFMS2.dll")
LoadPlugin("C:\Program Files (x86)\XviD4PSP 5\dlls\AviSynth\plugins\MVtools2mod.dll")
LoadPlugin("C:\Program Files (x86)\XviD4PSP 5\dlls\AviSynth\plugins\masktools2-25.dll")
Import("C:\Program Files (x86)\XviD4PSP 5\dlls\AviSynth\plugins\FFMS2.avsi")
LoadPlugin("C:\Program Files (x86)\XviD4PSP 5\dlls\AviSynth\plugins\bass\bassAudio.dll")
video = FFmpegSource2("D:\Left 4 Dead 2 01.21.2015 - 17.10.17.03.DVR.mkv", rffmode=0, threads=1, cachefile="T:\Temp\Left 4 Dead 2 01.21.2015 - 17.10.17.03.DVR.mkv.ffindex").AssumeFPS(25.000)
audio = bassAudioSource("T:\Temp\0003_0.aac")
AudioDub(video, audio)
ConvertToYV12()
###[FILTERING]###
# This script was generated by SmoothVideo Project (SVP) Manager.
# Check http://www.svp-team.com for more details.
SetMemoryMax(1024)
global svp_scheduler=true
global threads=5
global svp_cache_fwd=threads+10
LoadPlugin("C:\Program Files (x86)\SVP\plugins\svpflow1.dll")
LoadPlugin("C:\Program Files (x86)\SVP\plugins\svpflow2.dll")
SetMTMode(3,threads)
SetMTMode(2)
src=last
super_params_mini="{scale:{up:0},gpu:1}"
analyse_params_mini="{block:{w:8,h:8}}"
miniW = int(width/64)*32
miniW = (miniW<320) ? 320 : miniW
miniH = int(height/64)*32
miniH = (miniH<160) ? 160 : miniH
mini=BicubicResize(miniW,miniH).TemporalSoften(1, 1, 0, scenechange=1, mode=2)
super_mini=mini.SVSuper(super_params_mini)
vectors_mini=SVAnalyse(super_mini, analyse_params_mini)
vectors_Forward=SVConvert(vectors_mini, false)
HorizontalSpeed_luma=mini.MMask(vectors_Forward, kind=3).convertToRGB32().PointResize(miniW/8, miniH/8).PointResize(miniW/4, miniH/4).ConvertToYV12().mt_lut(y=2, u=128, v=128)
VerticalSpeed_luma=mini.MMask(vectors_Forward, kind=4).convertToRGB32().PointResize(miniW/8, miniH/8).PointResize(miniW/4, miniH/4).ConvertToYV12().mt_lut(y=2, u=128, v=128)
size=16
luma_lft=HorizontalSpeed_luma.crop(0,0,miniW/16,0).BicubicResize(size,size)
luma_rgh=HorizontalSpeed_luma.crop(miniW/16+miniW/8,0,0,0).BicubicResize(size,size)
luma_top=VerticalSpeed_luma.crop(0,0,0,miniH/16).BicubicResize(size,size)
luma_btm=VerticalSpeed_luma.crop(0,miniH/16+miniH/8,0,0).BicubicResize(size,size)
luma_drop=luma_lft.mt_lut(y=-1, u=128, v=128)
move_idx=5
y_idx=3
min_move=0.2
max_stop=0.5
drop_clip=luma_drop.ScriptClip("
AvgLuma_lft=128-luma_lft.AverageLuma
AvgLuma_rgh=128-luma_rgh.AverageLuma
AvgLuma_lft_prev=128-(luma_lft.trim(1,1)+luma_lft).AverageLuma
AvgLuma_rgh_prev=128-(luma_rgh.trim(1,1)+luma_rgh).AverageLuma
AvgLuma_lft_next=128-luma_lft.trim(1,0).AverageLuma
AvgLuma_rgh_next=128-luma_rgh.trim(1,0).AverageLuma
AvgLuma_top=128-luma_top.AverageLuma
AvgLuma_btm=128-luma_btm.AverageLuma
AvgLuma_top_prev=128-(luma_top.trim(1,1)+luma_top).AverageLuma
AvgLuma_btm_prev=128-(luma_btm.trim(1,1)+luma_btm).AverageLuma
AvgLuma_top_next=128-luma_top.trim(1,0).AverageLuma
AvgLuma_btm_next=128-luma_btm.trim(1,0).AverageLuma
Max_lft=max(abs(AvgLuma_lft_prev),abs(AvgLuma_lft),abs(AvgLuma_lft_next))
Max_rgh=max(abs(AvgLuma_rgh_prev),abs(AvgLuma_rgh),abs(AvgLuma_rgh_next))
Max_top=max(abs(AvgLuma_top_prev),abs(AvgLuma_top),abs(AvgLuma_top_next))
Max_btm=max(abs(AvgLuma_btm_prev),abs(AvgLuma_btm),abs(AvgLuma_btm_next))
Max_all=max(Max_lft,Max_rgh,Max_top,Max_btm)
MaxLuma=max(abs(AvgLuma_lft),abs(AvgLuma_rgh),abs(AvgLuma_top),abs(AvgLuma_btm))
MaxLuma_prev=max(abs(AvgLuma_lft_prev),abs(AvgLuma_rgh_prev),abs(AvgLuma_top_prev),abs(AvgLuma_btm_prev))
MaxLuma_next=max(abs(AvgLuma_lft_next),abs(AvgLuma_rgh_next),abs(AvgLuma_top_next),abs(AvgLuma_btm_next))
dif=mini.YDifferenceFromPrevious
dif_next=mini.trim(1,0).YDifferenceFromPrevious
dif_prev=(mini.trim(1,1)+mini).YDifferenceFromPrevious
GoodContrast = (max(mini.YPlaneMinMaxDifference,mini.trim(1,0).YPlaneMinMaxDifference)>20) ? 1 : 0
drop = (MaxLuma<0.1 && MaxLuma*2<Max(MaxLuma_prev,MaxLuma_next) && dif*y_idx<max(dif_prev,dif_next)) ? 1 : 0
drop_lft = (AvgLuma_lft_prev*AvgLuma_lft_next>0 && abs(AvgLuma_lft*move_idx)<Max_lft && abs(AvgLuma_lft)<=min_move && dif*y_idx<max(dif_prev,dif_next)) ? 2 : 0
drop_rgh = (AvgLuma_rgh_prev*AvgLuma_rgh_next>0 && abs(AvgLuma_rgh*move_idx)<Max_rgh && abs(AvgLuma_rgh)<=min_move && dif*y_idx<max(dif_prev,dif_next)) ? 3 : 0
drop_top = (AvgLuma_top_prev*AvgLuma_top_next>0 && abs(AvgLuma_top*move_idx)<Max_top && abs(AvgLuma_top)<=min_move && dif*y_idx<max(dif_prev,dif_next)) ? 4 : 0
drop_btm = (AvgLuma_btm_prev*AvgLuma_btm_next>0 && abs(AvgLuma_btm*move_idx)<Max_btm && abs(AvgLuma_btm)<=min_move && dif*y_idx<max(dif_prev,dif_next)) ? 5 : 0
drop = (drop==0 && MaxLuma<Max_stop && Max_lft==Max_all) ? drop_lft : drop
drop = (drop==0 && MaxLuma<Max_stop && Max_rgh==Max_all) ? drop_rgh : drop
drop = (drop==0 && MaxLuma<Max_stop && Max_top==Max_all) ? drop_top : drop
drop = (drop==0 && MaxLuma<Max_stop && Max_btm==Max_all) ? drop_btm : drop
drop_dif = (dif<0.4 && MaxLuma<min_move) ? 6 : 0
drop = (drop==0 && drop_dif>0) ? drop_dif : drop
drop = (drop>0 && Max_all<0.2) ? 0 : drop
drop = (drop>0 && GoodContrast==0) ? 0 : drop
luma=mini.AverageLuma
luma_next=mini.trim(1,0).AverageLuma
max_luma=max(luma,luma_next)
drop = (drop>0 && max_luma<16.5) ? 0 : drop
(drop>0) ? luma_drop : \
(Max_lft==Max_all) ? luma_lft : \
(Max_rgh==Max_all) ? luma_rgh : \
(Max_top==Max_all) ? luma_top : luma_btm
")
fix_r50=luma_lft.mt_lut(y=-1, u=128, v=128)
fix_lr33=luma_lft.mt_lut(y=-2, u=128, v=128)
fix_l50=luma_lft.mt_lut(y=-3, u=128, v=128)
fix_r133=luma_lft.mt_lut(y=-4, u=128, v=128)
fix_r66=luma_lft.mt_lut(y=-5, u=128, v=128)
AvgDrop=127
MaxMulty=10
dblMulti=1.3
fix_clip=luma_drop.ScriptClip("
drop=drop_clip.AverageLuma
AvgLuma=abs(128-drop_clip.AverageLuma)
AvgLuma_prev=abs(128-(drop_clip.trim(1,1)+drop_clip).AverageLuma)
AvgLuma_prev_= (AvgLuma_prev==AvgDrop) ? 0 : AvgLuma_prev
AvgLuma_prev2=abs(128-(drop_clip.trim(1,2)+drop_clip).AverageLuma)
AvgLuma_next=abs(128-drop_clip.trim(1,0).AverageLuma)
AvgLuma_next_= (AvgLuma_next==AvgDrop) ? 0 : AvgLuma_next
AvgLuma_next2=abs(128-drop_clip.trim(2,0).AverageLuma)
RightZero = (AvgLuma_prev_*MaxMulty<AvgLuma_next_) ? (AvgLuma_prev_>max_stop || AvgLuma_next_>max_stop) ? 1 : 0 : 0
LeftZero = (AvgLuma_next_*MaxMulty<AvgLuma_prev_) ? (AvgLuma_prev_>max_stop || AvgLuma_next_>max_stop) ? 1 : 0 : 0
drop = (AvgLuma==AvgDrop && AvgLuma_next==AvgDrop) ? -50 : 0
drop = (AvgLuma==AvgDrop && AvgLuma_prev==AvgDrop) ? 50 : drop
drop = (drop==0 && AvgLuma==AvgDrop && LeftZero==0 && RightZero==0) ? \
AvgLuma_prev_>AvgLuma_next_*dblMulti ? -50 : \
AvgLuma_prev_*dblMulti>=AvgLuma_next_ ? AvgLuma_next2==AvgDrop ? 50 : 33 : 50 : drop
drop = (drop==0 && AvgLuma==AvgDrop && RightZero==0 && AvgLuma_next2==AvgDrop) ? -50 : drop
drop = (drop==0 && AvgLuma==AvgDrop && LeftZero==0 && AvgLuma_prev2==AvgDrop) ? 66 : drop
(drop==50) ? fix_r50 : \
(drop==33) ? fix_lr33 : \
(drop==-50) ? fix_l50 : \
(drop==133) ? fix_r133 : \
(drop==66) ? fix_r66 : drop_clip
")
r50=1
lr33=2
l50=3
r133=4
r66=5
super_params="{scale:{up:0},gpu:1}"
analyse_params="{main:{search:{coarse:{distance:4,bad:{sad:2000}},type:2,distance:4},penalty:{lambda:1,pglobal:10000}},refine:[{thsad:65000}]}"
smoothfps_params="{rate:{num:12,den:1},algo:13,scene:{blend:true}}"
super=SVSuper(super_params)
vectors=SVAnalyse(super, analyse_params)
fix_all = SVSmoothFps(super, vectors, smoothfps_params, mt=threads, url="www.svp-team.com")
fix50 = fix_all.SelectEvery(12,6).Subtitle("fix50", align=3, size=12)
fix33 = fix_all.SelectEvery(12,4).Subtitle("fix33", align=3, size=12)
fix66 = fix_all.SelectEvery(12,8).Subtitle("-fix33", align=3, size=12)
fix66p = fix_all.SelectEvery(12,8).Subtitle("fix66", align=3, size=12)
fix75 = fix_all.SelectEvery(12,9).Subtitle("-fix25", align=3, size=12)
fix50n = fix_all.SelectEvery(12,6).Subtitle("-fix50", align=3, size=12)
fix133 = fix_all.SelectEvery(12,4).Subtitle("fix133", align=3, size=12)
fix125 = fix_all.SelectEvery(12,3).Subtitle("fix125", align=3, size=12)
ScriptClip("
AvgFix=fix_clip.AverageLuma
AvgFix_next=fix_clip.trim(1,0).AverageLuma
AvgFix_next2=fix_clip.trim(2,0).AverageLuma
AvgFix_next3=fix_clip.trim(3,0).AverageLuma
AvgFix_prev=(fix_clip.trim(1,1)+fix_clip).AverageLuma
(AvgFix==r50) \
? (AvgFix_next2==lr33 || AvgFix_next2==l50) ? fix33 : fix50 : \
(AvgFix==lr33) ? fix33 : \
(AvgFix_next==lr33) \
? (AvgFix_prev==r66) ? fix75.trim(1,1)+fix75 : fix66.trim(1,1)+fix66 : \
(AvgFix_next==l50) \
? (AvgFix_prev==lr33 || AvgFix_prev==r50) ? fix66.trim(1,1)+fix66 \
: (AvgFix_prev==r66) ? fix75.trim(1,1)+fix75 : fix50n.trim(1,1)+fix50n : \
(AvgFix==r66) \
? (AvgFix_next2==lr33 || AvgFix_next2==l50) ? fix50 : fix66p : \
(AvgFix_next==r66) \
? (AvgFix_next3==lr33 || AvgFix_next3==l50) ? fix125.trim(1,0) : fix133.trim(1,0) : \
last
")
trim(0,framecount-10)
###[FILTERING]###
AUDIO ENCODING
------------------------------
Encoding audio to: T:\Temp\0006.m4a
AAC Q0,45 2ch 16bit 48000khz
neroAacEnc.exe: -ignorelength -q 0.45 -lc -if - -of "T:\Temp\0006.m4a"
VIDEO ENCODING
------------------------------
Encoding video to: T:\Temp\0006.264
x264 Q21.0 1920x1080 25.000fps (38203 frames)
x264.exe: --crf 21.0 --ref 8 --deblock -1:-1 --direct auto --b-adapt 2 --trellis 2 --no-fast-pskip --psy-rd 1.0:0.1 --partitions all --me umh --rc-lookahead 50 --sar 1:1 --output "T:\Temp\0006.264" "T:\Temp\0006.avs"
avs [info]: 1920x1080p 1:1 @ 25/1 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 5.0
P.P.S. Фух, потратил опять не один час на обновление dll файлов xvid4psp. По какой-то причине пришлось добавить строки addplugin: MVtools2, masktools2, хотя вы писали, что GameDropFix работает только на SVP плагинах.
Так же еще кучу каких-то других dll пришлось искать и обновлять.