现在遇见了无声的影片画面,黑边和字幕不会加了。:(
我将MKV里的VIDEO,AUDIO,SSA分别提取出来,
然后用VIDEO(无声的影片画面)和SSA来做AVS,
sClip=avisource("I:\082.avi")
FontSize=48
SubtitleT= ""
SubtitleB= "I:\082a.ssa"
PAL_W= 352
PAL_H= 288
mux_mode="add"
BorderRevision=0
SubtitleFirst_frame=0
SubtitleLast_frame=framecount(sClip)-1
New_H= PAL_H-((BorderRevision+FontSize)*2)
temp= New_H % 4
New_H= (temp == 0) ? New_H : New_H-temp
New_W= Ceil(Float(New_H)/sClip.Height *sClip.Width)
temp= New_W % 4
New_W= (temp == 0) ? New_W : New_W-temp #=332
b= Ceil((PAL_W-New_W)/2)
MainP=NullClip(sClip, sClip.Framecount).BilinearResize(PAL_W,PAL_H).ConvertToYUY2
nClip=sClip.BilinearResize(New_W, New_H).ConvertToYUY2
c=Layer(AudioDub(MainP,sClip), nClip, mux_mode, 255, b,FontSize+BorderRevision)
Loadplugin("VSfilter.dll")
c= (SubtitleT=="") ? c : c.Subtitle(SubtitleT, font="Arial", size=FontSize, align=8)
return (SubtitleB=="")||(Findstr(SubtitleB,"\")>0) ? Get_Sub_File(c,"",SubtitleB,"Auto") : c.Subtitle(SubtitleB, font="隶书", size=FontSize-2,align=2)
function NullClip(clip "template", Int "Len")
{
Len = Default(Len, 0)
return Blackness(template, length= Len)
}
Function Get_Sub_File (clip v, String F_P, String F_N, String S_S) {
Loadplugin("VSfilter.dll")
Function Auto_Subtitle_Load (String A_Sub_Name) {
A_Sub_Style =
\ Exist(A_Sub_Name + "IDX") ? "IDX" :
\ Exist(A_Sub_Name + "SRT") ? "SRT" :
\ Exist(A_Sub_Name + "SSA") ? "SSA" :
\ Exist(A_Sub_Name + "ASS") ? "ASS" :
\ Exist(A_Sub_Name + "SMI") ? "SMI" : "NOS"
return A_Sub_Style
}
S_S_FrontNameChrNum = Get_File_Name_Info(S_S, ".")
F_N_FrontNameChrNum = Get_File_Name_Info(F_N, ".") #Findstr
S_N_Temp = LeftStr(F_N, F_N_FrontNameChrNum)
Sub_Style =
\ (UCase(S_S) == "AUTO") ?
\ Auto_Subtitle_Load(F_P + S_N_Temp) :
\ (S_S_FrontNameChrNum != 0) ?
\ UCase(RightStr(S_S, 3)) :
\ UCase(S_S)
Sub_Name =
\ (S_S_FrontNameChrNum == 0) ?
\ F_P + S_N_Temp + Sub_Style :
\ (Findstr(S_S, ":") > 0) ?
\ S_S :
\ F_P + S_S
Temp_Sub_IDX = (Sub_Style == "IDX") ? v.VobSub(Sub_Name) : nop
Temp_Sub_SRT = (Sub_Style == "SRT") ? v.TextSub(Sub_Name) : nop
Temp_Sub_SSA = (Sub_Style == "SSA") ? v.TextSub(Sub_Name) : nop
Temp_Sub_ASS = (Sub_Style == "ASS") ? v.TextSub(Sub_Name) : nop
Temp_Sub_SMI = (Sub_Style == "SMI") ? v.TextSub(Sub_Name) : nop
Temp_Sub_NOS = (Sub_Style == "NOS") ? v : nop
File_Subtitle = (Sub_Style <> "") ? Eval("Temp_Sub_"+ Sub_Style) : v
return(File_Subtitle) #string().Subtitle(Sub_Name)
}
Function Get_File_Name_Info (String ExWork_Movie_File, String Path_Or_Name) {
Function Do_GetStr (String ExWork_Movie_File, Int Str_Len_Num, Int Str_FilePath_necessary_word_Num, String Path_Or_Name) {
F_Str_Num = Str_Len_Num - Str_FilePath_necessary_word_Num + 1
F_Str = LeftStr(ExWork_Movie_File, F_Str_Num)
B_Str_Num = Str_FilePath_necessary_word_Num - 1
B_Str = RightStr(ExWork_Movie_File, B_Str_Num)
Return (Path_Or_Name == "PATH"?F_Str:(Path_Or_Name == "NAME")?B_Str:"")
}
Path_Or_Name = UCase(Path_Or_Name)
Str_Len_Num = StrLen(ExWork_Movie_File)
Str_FilePath_necessary_word_Num = Findstr(RevStr(ExWork_Movie_File), "\")
Str_FrontNameChrNum = (Findstr(RevStr(ExWork_Movie_File), ".") > 0)? Str_Len_Num - Findstr(RevStr(ExWork_Movie_File), ".") + 1 : 0
Return_Word =
\ (Str_FilePath_necessary_word_Num != 0) ?
\ Do_GetStr(ExWork_Movie_File, Str_Len_Num, Str_FilePath_necessary_word_Num, Path_Or_Name) : 0
return ((Path_Or_Name == ".")? Str_FrontNameChrNum : Return_Word)
}
然后电脑它就说“AudioDub:need an audio and video track (I:\082.avs,line 27)”
按图索骥,发现是:c=Layer(AudioDub(MainP,sClip), nClip, mux_mode, 255, b,FontSize+BorderRevision)
要如何改才比较好?