viz3dvideo.audio package
Submodules
viz3dvideo.audio.add module
- viz3dvideo.audio.add.add_to_video(video_path, audio_path, start_time=0, output_path='output.mp4')
Adds an audio track to a video starting at a specified time. If the audio duration plus the start time exceeds the video duration, the audio is truncated to match the video length.
- Parameters:
video_path (str) – Path to the original video file.
audio_path (str) – Path to the audio file (e.g., MP3).
start_time (float) – Time in seconds at which the audio should start. Default is 0.
output_path (str) – Path for the resulting video with audio.
- Returns:
None
Module contents
viz3dvideo.audio
Subpackage for audio processing.
Provides functions to add audio tracks to existing videos.
Available functions:
add_to_video(video_path, audio_path, start_time=0, output_path=”output.mp4”)
Example:
from viz3dvideo.audio import add_to_video
add_to_video("video.mp4", "audio.mp3", start_time=5)