Pure Go Engine
Zero-dependency core compiler that turns declarative timeline trees into optimized FFmpeg filtergraphs in sub-millisecond speeds.
Declarative video composition, intermediate representation DAG compiler, and modern non-linear desktop workstation.


Compose and render a multi-layered video with picture-in-picture in pure Go:
package main
import (
"context"
"time"
"github.com/farshidrezaei/vidonex/composer"
"github.com/farshidrezaei/vidonex/timeline"
"github.com/farshidrezaei/vidonex/types"
)
func main() {
tl := timeline.New(
timeline.WithCanvas(types.Res1080p),
timeline.WithFPS(types.FPS60),
)
// Layer 0: Background Video
baseTrack := timeline.NewTrack("video", timeline.TrackKindVideo)
baseTrack.AddClip(timeline.NewClip("intro", "gameplay.mp4", 0, 10*time.Second))
// Layer 1: Facecam PiP Overlay
pipTrack := timeline.NewTrack("pip", timeline.TrackKindOverlay).SetZIndex(1)
pipTrack.AddClip(
timeline.NewClip("webcam", "facecam.mp4", 0, 10*time.Second).
WithScale(0.3).
WithPosition(types.Point{X: 1300, Y: 40}),
)
tl.AddTrack(baseTrack, pipTrack)
// Compile & Render via OS FFmpeg
c := composer.New()
_, _ = c.Render(context.Background(), tl, "output.mp4", nil)
}