0429名無しさん@編集中 (ワッチョイ 93a2-Ockd)
2018/05/25(金) 18:24:51.05ID:g3WNEyH+0{
Assert( !(start_base < 0 || start_alt < 0 || length < 1), "ReplaceClip: start must be the positive number")
Assert( !(FrameCount(base) < start_base + length), "ReplaceClip: length is too large (check the frame count of base)")
Assert( !(FrameCount(alt) < start_alt + length), "ReplaceClip: length is too large (check the frame count of alt)")
audio = KillVideo(base)
video = (length == 1) ? trim(alt, 0, -1) : trim(alt, start_alt, start_alt + length -1)
video = (start_base == 0) ? video : (start_base == 1) ? trim(base, 0, -1) + video : trim(base, 0, start_base -1) + video
video = (FrameCount(base) == (start_base + length)) ? video : video + trim(base, start_base + length, 0)
return HasAudio(base) ? AudioDub(video, audio) : KillAudio(video)
}