Hi r/dotnet,
I maintain TensorSharp, an open-source .NET inference engine and agent runtime. I recently added Video Studio, which combines local AI video generation with a persistent timeline editor.
It runs in both the browser interface and TensorAgent, the .NET MAUI app. I thought the implementation might be interesting to people building desktop applications with .NET.
The implementation
The application has a shared C# core, TensorSharp.Studio, targeting .NET 10. It manages projects, media assets, timeline commands, editing history, persistence, and background jobs.
The browser and desktop hosts share the same HTML/JavaScript/CSS editor. The server exposes Studio through ASP.NET Core endpoints, while TensorAgent hosts it in a MAUI WebView connected to its local HTTP host.
Video generation uses TensorSharp’s existing inference pipeline and native compute backends. FFmpeg/ffprobe handle media inspection, timeline composition, and MP4 output.
One design choice is that manual editing and LLM-assisted editing use the same command system. Timeline operations become validated commands such as moveClip, trimClip, and updateClip. A tool-capable local chat model can propose those operations too.
The user reviews an assistant proposal before applying it. Proposals are checked against the project revision, and applying a proposal creates one undo step.
Rendering also captures a specific project revision. Users can continue editing while a render runs, and subsequent changes mark the previous preview as outdated. Generated footage stays in the asset library when its timeline insertion is undone, so reusing a take doesn’t require generating it again.
The attached demo
This runs locally on my MacBook Pro with an M5 Pro chip and 48GB of memory.
I import an image, animate it with LTX 2.5 Distilled, place the generated clip on the timeline, append a five-second still, and render the result.
- Generated clip: 1024 × 1024, 145 frames at 24 fps, approximately 6.04 seconds, with audio enabled.
- Generation time: 13 minutes 15 seconds on this machine.
- Final composition: 11.04 seconds, combining the generated clip and the still.
The recording is sped up.
The editor also supports multiple video/audio tracks, trimming, splitting, rearranging, volume adjustments, fades, autosave, and undo/redo. Manual editing works without a model loaded.
A current limitation is that the host has one active model slot, so using the text assistant and generating video requires explicitly switching models.
Source: TensorSharp on GitHub
Architecture: Video Studio design
Setup and usage: Video Studio guide
If you’ve built desktop or media applications with .NET, I’d appreciate feedback on this shared C# core and MAUI/WebView approach, especially how you handle long-running native jobs while users continue editing.