import videodb
from videodb.editor import Timeline, Track, Clip, VideoAsset
conn = videodb.connect(api_key="your_api_key")
# Create and generate a timeline (see Create Timeline v2)
timeline = Timeline(conn)
track = Track()
video_asset = VideoAsset(id="m-abc123def", start=0)
clip = Clip(asset=video_asset, duration=10)
track.add_clip(0, clip)
timeline.add_track(track)
# Generate the stream
stream_url = timeline.generate_stream()
# Download the timeline as a video file
download_result = timeline.download_stream(stream_url)
print(f"Download URL: {download_result.get('download_url')}")
print(f"Status: {download_result.get('status')}")