July 28th, 2024

StreamPot: Run FFmpeg as an API with fluent-FFmpeg compatibility, queues and S3

StreamPot simplifies media transformation tasks like video trimming and audio extraction, offering a client library for integration. Users can self-host or use a hosted version, with installation guides available.

Read original articleLink Icon
StreamPot: Run FFmpeg as an API with fluent-FFmpeg compatibility, queues and S3

StreamPot is a project aimed at simplifying media transformation tasks within applications, including video trimming, audio extraction, and format transcoding. It offers a client library for easy integration, allowing developers to manipulate media efficiently. Users have the option to self-host the server or utilize a hosted version. To get started with self-hosting, an installation guide is available on the StreamPot website. For client library installation, users can execute a command using pnpm. An example code snippet demonstrates how to initialize the client, submit a job for video processing, and check the job status after a delay. The project is built on contributions from the ffmpeg and fluent-ffmpeg teams. Developers encourage feedback and discussions for potential improvements, providing contact options via email or scheduling a call. More information can be found on the StreamPot website.

Link Icon 8 comments
By @aargh_aargh - 6 months
Specification of ffmpeg commands can get quite complex, especially once you get to filters.

I never understood why it hasn't grown a DSL to specify the input/output/transformation. Could be JSON-based for what I care. Then we could have nice things like easy programmatic generation of these scripts and schema verification (for each particular ffmpeg version).

Also, when I looked at how LosslessCut (an Electron app) does the timeline preview thumbnails, it just calls the ffmpeg CLI app however many times it needs (once per thumbnail). With the number of heavy users of ffmpeg, I'm wondering how nobody has yet started a project to run ffmpeg in-memory as a server and avoid the process startup cost as I'm sure LosslessCut isn't the only one who does this.

By @justin_murray - 6 months
Seeing the need for polling the job status is off putting, especially for a js api that already is using async. If you _need_ to use polling, at least provide a convenience method I can just await. Better yet, add some signaling to the http api via eventsource or something.
By @jackbridger - 6 months
Jack from StreamPot here. So happy to see it shared here. We'd love you to try it out and give us any feedback or requests.
By @ggernov - 6 months
Is there any way I can run this in a fully local setup? Curious if a config for nginx could be provided?
By @gelatocar - 6 months
This is great, I don't have a concrete use-case right now but can definitely see myself returning to this in the future. One thing that would be handy is having a way to either accept a ffmpeg cli command, or convert from a cli command to the typescript syntax. My experience with ffmpeg if you often do a lot of copying and pasting of commands from documentation or random guides, it'd save a bit of time if you didn't need to transcribe the commands into streampot's syntax.
By @rustcleaner - 6 months
Somebody please bring fully functional ffmpeg to Android via F-Droid please, one which is not compiled against /storage/emulated/0/ like Termux, etc, are. Many users rely on multiple profiles and don't run anything in the primary profile. I know of nothing right now like this. No FFshare doesn't work for purpose as outlined.

Bonus if all of Termux can be fixed for secondary Android profiles,

By @egonschiele - 6 months
I see there's a paid version of Streampot. My understanding is the ffmpeg license is pretty restrictive, and doesn't allow for any commercial use unless you sign a contract with them. Is that something Streampot has done? Just wondering because I have looked into using ffmpeg in a commercial project and the license stopped me from doing so.
By @leros - 6 months
Looks really cool. I've thought about building a business around ffmpeg myself. Btw, your self hosting link is broken.