Urgent.News

What's breaking now, across hundreds of outlets.

AI

Preparing video for multimodal LLMs with one API call

Most multimodal pipelines can't "watch" a video file directly. In practice you sample frames, keep track of their timestamps, and send a grid plus some metadata to the model. Doing that well with FFmpeg means select , showinfo , passthrough timing and a bit of parsing — every single time. I got tired of rewriting that glue code, so I packaged it as Sawfish , a small pay-per-task FFmpeg API on…

Most multimodal pipelines cannot "watch" a video file directly. Instead, they sample frames, track their timestamps, and send a grid along with metadata to the model. This process can be cumbersome with FFmpeg, requiring the use of select, showinfo, passthrough timing, and parsing for each task. To streamline this process, Sawfish was created as a small FFmpeg API on Apify. It allows users to perform one simple call for video preparation.

Using Sawfish, one can make a post request to the API endpoint, providing the video URL, desired grid dimensions, and other parameters. The API returns a contact sheet (JPG or WebP) containing the original timestamps, a JSON manifest with metadata, grid specifications, frame timestamps, and a vision hint. This information is ready to be integrated into a vision prompt.

Additionally, Sawfish offers other recipe operations such as recipe/transcribe-prep for mono 16 kHz WAV files, loudness-normalized to -16 LUFS for speech-to-text, and recipe/shorts-prep for trimming videos into a 9:16 aspect ratio and normalizing audio to -14 LUFS.

Other operations available in Sawfish include probe for simple checks, trim for fast or frame-accurate cutting, extract-audio to isolate the audio track, normalize-audio (2-pass EBU R128) to ensure audio quality, contact-sheet to generate the image grid, and burn-subtitles to add SRT/ASS formatted subtitles to the video. The service charges per event rather than a subscription fee.

The vision-prep operation costs around $0.0095, while the probe costs about $0.002. Before executing any tasks, Sawfish verifies the user's spending cap and stops the job if it would exceed the limit.

Currently, Sawfish has some limitations, such as an input size of 100 MB, a maximum runtime of 10 minutes, and an output resolution of 1080p. Users can also call Sawfish as a tool from the Apify MCP server. The service is still new, so feedback on desired future recipes or potential issues is welcomed.

Rewritten by urgent.news; may contain errors — check the original. How we use AI.

Source: dev.to

Read the original at dev.to →

More from Dev.to on urgent.news

Get the news by email. Yesterday's most-covered stories, every morning.

We track opens and clicks to improve the newsletter.

See today's edition · More options

More in AI

More from Sunday, 6 December 2026 →