Skip to content
Proyek

Tentang

Full-stack Generative Video Cloud

Desain dan media

Cara angka ini diukur

Yang dapat Anda lakukan

  • Generate complete videos: prompt-to-video and image-list-to-video with narration, music, subtitles, and optional avatars, footers, and CTA outros.
  • Edit after generation: reroll scenes, retranslate narration, and refine layers in Studio.
  • Create individual assets: images, edits, video clips, speech, music, lip sync, and sound effects.
  • Build media workflows: API access, assistants, semantic search, and recommendations over reusable embedding indexes.

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
0
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Samsar

Turn prompts and images into finished videos. Create, edit, and automate through Studio or the API.

Open Studio · API docs · Demos · MIT license

Tests on develop

Quick start · Architecture · Workflows · API · Guides · Operations

Features

  • Generate complete videos: prompt-to-video and image-list-to-video with narration, music, subtitles, and optional avatars, footers, and CTA outros.
  • Edit after generation: reroll scenes, retranslate narration, and refine layers in Studio.
  • Create individual assets: images, edits, video clips, speech, music, lip sync, and sound effects.
  • Build media workflows: API access, assistants, semantic search, and recommendations over reusable embedding indexes.
  • Run your own stack: Docker setup wizard, configurable model providers, local or external storage, and optional local logs.

Quick start

Goal Start here
Create a video now Hosted Studio
Build with the managed API Samsar.js example and a Samsar API key
Deploy your own Studio and workers Follow the Docker setup below

1. Clone

git clone https://github.com/samsarone/samsar.git
cd samsar

Already have a checkout? Run the next command from its root.

2. Launch the setup wizard

Linux, macOS, or WSL:

./setup.sh

Windows PowerShell:

.\setup.ps1

Windows Command Prompt also supports setup.cmd.

The launcher checks Docker, installs or updates it where supported, and opens the setup wizard at http://localhost:8089. Node.js, npm, and Yarn are not required on the host. Add a Samsar key or compatible provider credentials, choose services and storage, then complete the admin setup to deploy.

macOS and Windows require Docker Desktop 4.84.0 or newer; native Linux requires Docker Engine 20.10.0+, Compose 2.20.0+, and Buildx. Set SAMSAR_SETUP_INSTALL_DOCKER=0 to manage Docker yourself. See the setup guide for platform behavior and remote setup over SSH.

3. Open Studio

Service Default URL
Studio http://localhost:3000
Processor API http://localhost:3002
MinIO console, when enabled http://localhost:9001
Grafana logs, when enabled http://localhost:4000

MinIO and Grafana bind to loopback and use generated credentials in runtime/secrets/. The default data services are local MongoDB and MinIO; external storage and public access are optional.

[!NOTE] Studio and processor ports are published on the host. Use firewall rules or localhost-only port bindings when the instance should be reachable only from your machine. See external access.

Architecture

Studio and SDK call the processor; workers consume MongoDB-backed jobs and use configured providers. The processor also calls providers directly for inference and embeddings. State and media storage are shared. Studio and SDK call the processor; workers consume MongoDB-backed jobs and use configured providers. The processor also calls providers directly for inference and embeddings. State and media storage are shared.

The processor owns authentication, sessions, billing, and job state. Workers coordinate generation and render media through configured adapters. MongoDB stores durable work and status; media lives in mounted volumes and the configured object store. Browsers retrieve local output through the processor or reverse proxy.

Request flow · Services and profiles · Storage and media · Provider routing

Explore the repository by responsibility
Responsibility Location
Studio and VidGenie apps/samsar-client
Setup wizard apps/setup-wizard
API, auth, billing, sessions, search services/processor
Video workflow coordination services/express-video-listener
Image, audio, AI video generation generator, audio-generator, ai-video-layer-generator
Frame composition and final render frames-processor, video-generator
Assistants and background tasks assistant-query-processor, task-processor
Optional GMICloud gateway services/genblaze-gateway
Compose and runtime tooling deploy/compose, scripts
Generated local config and secrets runtime/config, runtime/secrets (gitignored)

Visual workflows

Expand a workflow for its overview. Select a diagram for the complete guide, or use the links below it to jump to a stage. The rows summarize dependencies; parallel work is called out explicitly.

Text to video — prompt to narrated, rendered scenes Validate request → plan narrative → generate images, speech and music in parallel → animate and finish → render and deliver. Motion waits for initial media; eligible finishing jobs overlap. Validate request → plan narrative → generate images, speech and music in parallel → animate and finish → render and deliver. Motion waits for initial media; eligible finishing jobs overlap.

Request and plan · Parallel media · Motion and finishing · Render and delivery

Image list to video — source images to a product or story video Prepare source images → plan scenes and CTA → prepare images and audio in parallel → animate eligible scenes → render and deliver. Generated terminal outros skip AI motion. Prepare source images → plan scenes and CTA → prepare images and audio in parallel → animate eligible scenes → render and deliver. Generated terminal outros skip AI motion.

Sources and plan · Parallel media · Motion and finishing · Render and delivery

Search — index once, query a reusable corpus Indexing: prepare and embed records, then store a reusable template. Querying: reuse its ID to search, filter, and optionally rerank results. Indexing: prepare and embed records, then store a reusable template. Querying: reuse its ID to search, filter, and optionally rerank results.

Create an index · Query · Manage templates · Retrieval fallbacks

Recommendations — find related items using the same index Reference text or item → match rules → shared embedding search → compact ID and score matches. Reuses an existing index without LLM reranking. Reference text or item → match rules → shared embedding search → compact ID and score matches. Reuses an existing index without LLM reranking.

Inputs · Filters · Usage · Differences from search

API

Install samsar-js and keep your API key in the server environment:

npm install samsar-js
import SamsarClient from 'samsar-js';

const samsar = new SamsarClient({ apiKey: process.env.SAMSAR_API_KEY });
const available = await samsar.getSupportedTextToVideoModels();
console.log(available.data); // Check models enabled for this deployment.

const job = await samsar.createVideoFromText({
  prompt: 'A cinematic product launch in a sunlit gallery.',
  image_model: 'GPTIMAGE2.6',
  video_model: 'RUNWAYML',
  duration: 30,
  aspect_ratio: '16:9',
});
console.log(job.data.request_id); // Save this ID to poll status.

Follow the status and delivery contract for completion and output URLs. The Studio one-shot flow supports up to 3 minutes; the text-to-video API accepts 10–240 seconds.

For a standalone processor, set baseUrl: 'http://localhost:3002/v1' and use a credential accepted by that instance. Hosted requests consume Samsar credits. Pricing and retry behavior are documented separately for images, video model calls, and assistants.

Models, adapters, and storage

Choose models from the model matrix, then configure compatible providers and credentials. The registry covers inference, vision, images, video, speech, music, lip sync, sound effects, embeddings, and transcription. Availability depends on the deployment and workflow; Studio and Express do not expose identical model lists.

Use the Samsar managed adapter, native providers, partner adapters, or registered custom endpoints. Standalone administrators can set compatible adapter order in Settings → Model Adapters. Accepted asynchronous jobs stay with their submitting provider while polling.

Media storage supports local MinIO, external S3-compatible storage / CloudFront, and Backblaze B2. See storage setup and remote-provider access to local media.

Documentation

Task Guide
Install or configure a deployment Setup wizard · Operations · Architecture
Compare models and routes Model matrix · Provider routing
Generate or edit media Text to video · Image list to video · Image edits · Audio and performance
Build assistants Context and local knowledge · Billing and retries
Search, recommend, or enhance text Search · Recommendations · Text enhance
Integrate with the hosted API API reference · Narrative and branching · External users · Publications
Understand charges and recovery Pricing · Images · Video models · Assistants

Deployment and operations

Use the wizard for initial setup. The host-side commands below require Node.js and npm:

Command Purpose
npm run docker:up Open the wizard, then deploy the saved configuration if present.
npm run docker:update Rebuild and replace changed services.
npm run docker:restart Rebuild the configured stack; preserve data volumes.
npm run docker:down Stop the stack without deleting data volumes.
npm run docker:maintenance Rebuild with job consumers disabled; maintenance persists until explicitly disabled.
npm run docker:check / npm run docker:watch Inspect Docker health from the host without restarting it.

Manual configuration and logs · Maintenance and recovery limits · Domains and HTTPS

For media fetch failures, inspect the local media tunnel. For stale browser builds, downloads, or remote Grafana access, see troubleshooting.

Development

This repository packages sibling source projects into apps/ and services/. In a parent workspace, edit the original service project and sync it into the monorepo. Use develop for integration and merge validated changes into main through a pull request.

npm test
npm run test:deployment

CI runs these checks for pushes and pull requests to develop and main. Deployment validation renders local runtime files and requires Docker. Keep credentials, uploads, dependencies, and build output out of commits.

Diagram sources live in scripts/render-readme-pipeline-diagrams.py. Regenerate the light and dark SVGs with python3 scripts/render-readme-pipeline-diagrams.py (no third-party dependencies).

Blog · Enterprise deployments

Jelajahi proyek terkait

Memuat…