İçeriğe geç

FFmpeg API Compose

Entegre et

Model kimliği ffmpeg-api/compose
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ffmpeg-api/compose?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tracks": [
      {
        "id": "your-id",
        "type": "example",
        "keyframes": [
          {
            "timestamp": 1,
            "duration": 1,
            "url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
          }
        ]
      }
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Bu istek: ≈$0,001 1 API kredisi Bu sayfada çalıştır

API anahtarı al
Utility Videodan Videoya #ffmpeg

Tam olarak bir görsel parça ve istenen sayıda ses parçasıyla birden çok parçayı tek videoda birleştirir

Utility · Veri (JSON)

İlk sonucunuz burada görünecek

Aşağıda bir istek oluşturun ve API anahtarınızla çalıştırın. Çıktılar depolamamıza kopyalanır ve sonsuza kadar veya ücretsiz olarak 7 gün boyunca saklanır.

İstek oluştur

Kontroller model şemasından oluşturulur. Değerleri değiştirdikçe kod ve fiyat güncellenir.

•gerekli

Tam olarak bir video veya görsel parçası ile sınırsız sayıda ses parçasından oluşan nihai medyayı birleştirmeye yönelik parça listesi.

POST /run/ffmpeg-api/compose?wait=20 fiyat → $0,001
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ffmpeg-api/compose?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tracks": [
      {
        "id": "your-id",
        "type": "example",
        "keyframes": [
          {
            "timestamp": 1,
            "duration": 1,
            "url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
          }
        ]
      }
    ]
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Bu isteği çalıştır

Anahtarınız bu tarayıcıda kalır: yalnızca Doitong API'ye gönderilir ve yalnızca Hatırla seçeneğini işaretlerseniz localStorage'a kaydedilir. API anahtarı al

FFmpeg API Compose hakkında

Bir `tracks` listesinden nihai video oluşturur. Liste tam olarak bir video veya görüntü biçiminde görsel parça içermeli ve istenen sayıda ses parçası içerebilir. Çıktı, `video_url` ve `thumbnail_url` içeren JSON'dur.

Parametreler

AdTür Varsayılanİzin verilen Açıklama
tracksgerekli
Türobject[]
Tam olarak bir video veya görsel parçası ile sınırsız sayıda ses parçasından oluşan nihai medyayı birleştirmeye yönelik parça listesi.
tracks[].idgerekli
Türstring
Parçayı benzersiz şekilde tanımlayan tanımlayıcı.
tracks[].typegerekli
Türstring
Parça kategorisi: 'video', 'audio' veya 'image'.
tracks[].keyframesgerekli
Türobject[]
Liste olarak sağlanan, parçayı oluşturan anahtar kareler.
tracks[].keyframes[].timestampgerekli
Türnumber
Anahtar karenin milisaniye cinsinden ifade edilen başlangıç zamanı.
tracks[].keyframes[].durationgerekli
Türnumber
Anahtar karenin milisaniye cinsinden ifade edilen uzunluğu.
tracks[].keyframes[].urlgerekli
Türstring
Bu anahtar karenin medya dosyasına erişim sağlayan URL.
gerekli

Çıktı

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "ffmpeg-api/compose",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 1,
    "usd": "0.001",
    "charged": 1,
    "refunded": 0
  },
  "input": {
    "tracks": [
      {
        "id": "your-id",
        "type": "example",
        "keyframes": [
          {
            "timestamp": 1,
            "duration": 1,
            "url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
          }
        ]
      }
    ]
  },
  "output": {
    "video_url": "string",
    "thumbnail_url": "string"
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Dosyalarınız, seçiminizHer outputs[].url, depolamamızdaki bir kopyadır: sonsuza kadar (GB-ay başına ücretli) veya ücretsiz olarak 7 gün boyunca, hesap ayarınızla ya da ?storage= ile saklanır.
Her modelde aynı yapıGörüntüler, video ve ses için type, url, content_type, width, height ve duration aynıdır. output, modelin kendi sonuç nesnesidir.
Çıktı alanları
video_url
string (video URL)İşlenmiş videoya işaret eden URL.
thumbnail_url
stringVideonun küçük görseline işaret eden URL.

Daha fazla model: Videodan Videoya

AI aracıları için: bu sayfanın Markdown biçimi şurada: https://doitong.com/tr/developers/models/ffmpeg-api/compose.md. Tüm modeller ve kılavuzlar: https://doitong.com/developers/llms.txt