VideoDB Editor uses two separate start parameters that control different aspects of video composition. Understanding these parameters is key to controlling what plays and when.
Use this file to discover all available pages before exploring further.
VideoDB Editor uses two separate “start” parameters that control different aspects of video composition. This trips up almost everyone at first - you set start=10 and expect the video to play 10 seconds into your timeline, but it actually just skips the first 10 seconds of the source video. Understanding these two parameters is key to controlling both what plays and when it plays.
VideoAsset(start=…) skips the beginning of the source file.
asset = VideoAsset( id=video.id, start=10 # Skip first 10 seconds of source video)
This controls which part of your source material gets used. Think of it like fast-forwarding to a specific timestamp before hitting play - you’re extracting a segment from your original video.
Positions when the clip appears in the final timeline.
track.add_clip( start=5, # Place clip at 5-second mark in final video clip=clip)
This controls when your clip plays in the composed output - like dragging a clip to a specific position on an editing timeline. It’s completely independent of what part of the source is playing.
These parameters are completely independent, operating in two different coordinate systems.Asset.start works in “source video time” (which part of the original file), while track.add_clip(start=…) works in “output timeline time” (when it appears in the final video).You can extract any segment from your source and place it anywhere on your timeline.
# Extract seconds 10-20 from source, place at 5-second mark in timelineclip = Clip( asset=VideoAsset(id=video.id, start=10), # TRIMMING: skip first 10s duration=10 # Play for 10 seconds)track = Track()track.add_clip(start=5, clip=clip) # TIMING: appears at 5s in final
Timeline structure:
0-5 seconds: Blank (background color)
5-15 seconds: Video plays (showing seconds 10-20 from source)
from videodb.editor import Timeline, Track, Clip, VideoAssettimeline = Timeline(conn)# Extract 15 seconds starting at 30s from sourceclip1 = Clip( asset=VideoAsset( id=video.id, start=30 # Skip first 30s of source ), duration=15 # Play for 15 seconds (shows 30s-45s of source))track = Track()track.add_clip(start=10, clip=clip1) # Place at 10s in final timelinetimeline.add_track(track)stream_url = timeline.generate_stream()
Result: Final video has blank 0-10s, then shows seconds 30-45 from source at 10-25s position.