如何将音频叠加到其他音频上?我想为 avisynth 中剪辑的音频通道制作 FadeIO(..) 功能。我有这个脚本
video = DirectShowSource("Z:\video\vvv.mp4", fps=fps_count, audio=true, convertfps=true).AssumeFPS(fps_count, 1).ConvertToYV12()
audio = BlankClip(audio_rate=audio_sample_rate, channels=2, length = logo_timeout).ResampleAudio(audio_sample_rate)
blank = BlankClip(logo_timeout, res_width, res_height, pixel_type = "RGB32", fps = fps_count).ConvertToYV12()
blank = Overlay(blank, blank_logo, mode = "blend", x = 0, y = 0)
blank = AudioDub(blank, blank_logo).AssumeFPS(fps_count, 1)
并且部分视频的平滑叠加是这样的:
blank.Trim(0 * fps_count, transparent_overlay_latency * fps_count).Overlay(video.Trim(0 * fps_count, transparent_overlay_latency * fps_count), mode="blend", mask=logo.showalpha(), x = 0, y = 0)
但这仅适用于视频。当第二个剪辑 (video.Trim()) 已经淡入时,音频开始。当剪辑出现时,我想要这个视频的声音“长大”。