import sys
sys.path.insert(0, 'agent_recipes/templates/ai-video-merger')
from tools import merge_audio_video, sync_tracks
# Merge audio with video
result = merge_audio_video(
video_path="video.mp4",
audio_path="voiceover.mp3",
output_path="merged.mp4",
replace_audio=True
)
# Sync with offset
synced = sync_tracks(
video_path="video.mp4",
audio_path="voiceover.mp3",
output_path="synced.mp4",
audio_offset=0.5 # Delay audio by 0.5s
)