Aaand it's minimally working, so: https://ffmpeg.app is now live!

Use FFmpeg recipes without fiddling with the command line!

Consider this an early beta. There's still a ton missing:

- Ability to tweak the command line (i.e. hand editing, or selectors)
- Proper mobile styles
- About, disclaimers, etc
- Many more command recipes
- Better accessibility
- "Bug fixes and performance improvements"

But, it's doing the thing!

#ffmpeg #video

FFmpeg.app

A website where you can search for and perform video and audio conversions, right on your browser.

Some disclaimers:

- In the above video it works super duper fast because removing an audio track is basically just a copy. Other things usually take longer.
- Files are not uploaded anywhere. Your content NEVER leaves your computer. It's all processed on the client side.
- There's no user tracking, scripts, Google fonts, etc. A bunch of JS, but mostly local; the only exception is the FFmpeg wasm, which comes from unpkg.com (it's 31mb, too scary to host myself).
- No AI! (that's a feature)

BTW, issues are welcomed:

https://github.com/zeh/ffmpeg.app/issues

And I track a roadmap of sorts here:

https://github.com/users/zeh/projects/2/views/1

I should have this better exposed in the README of the repo soon to make it easier for anyone to provide feedback.

Issues · zeh/ffmpeg.app

A visual web interface to FFmpeg. Contribute to zeh/ffmpeg.app development by creating an account on GitHub.

GitHub
@zeh Wow, this is incredibly cool! One note: It was impossible for me to understand what the start button was for without watching your video, and impossible to know that everything happens locally without reading your toot about it. If you could find a way to add this info in some logical way, it would seem pretty perfect to me :)
@forteller Thanks! That's good feedback.

@zeh

Cons:

It is a web app, an app built for your phoneOS to use off network would probably not be allowed in an official App Store.

Serving host has a reputation for being highly untrustworthy regarding privacy, etc.

If these opinions are wrong, please refute them, but they show up fairly early in the response thread.

@Chancerubbage Not exactly sure what you're talking about.

Everything is processed in the client side. What's the privacy concern here?

@zeh That's amazing! Feature request: Create mp4 and webm in decent web quality

@claus Yeah, honestly, that's mostly what I use it for. Was tired of copying & pasting the same thing every time I need a decent web-sized video with faststart, etc.

Right now it's a bit hardcoded (always same quality & speed when creating mp4) but once I have the selectors it should be easier to change.

@zeh Everybody wants it, nobody has it, it's ALMOST AS IF there's a business opportunity ;)
@zeh nice work! i've thought about some kind of playground/"REPL" for ffmpeg but have few ideas how it would actually work

@wader My hope is that this becomes a bit like that. I've always wanted something of the sort, hence this project.

It's just a start, but once there's more recipes, some selection, editing commands, previews, that sort of stuff, it can be that.

@zeh me too! i've experiment with using ffmpeg in jupyter notebook https://fosstodon.org/@wader/110231082376932569 but would be great with something that could play video, maybe "link" output(s) to next command, understand the cli syntax and filter graph syntax... dreaming on here :)
Mattias Wadman (@[email protected])

Attached: 1 image Why didn't I start using #jupyter bash kernel earlier? #ffmpeg #jq #fq

Fosstodon
@zeh i did try to build a graph based web UI for the CLI some years ago (no wasm, ffmpeg running on server) but it got very messy and complex and i lost motivation. found an old screenshot of it :)

@wader Wow, this is amazing.

I do think FFmpeg commands would work well as a graph - I sorta assume that's how it is, internally. Would be an interesting exercise.

@zeh yeap the ffmpeg CLI sort of turns the args into a avfilter graph but there is lots of non-trivial glue to handle decoding and encoding which i guess it hard to express as a graph. i remember working on the graph UI that it got hard to visualize and detect non-supported things for example
@wader @zeh I did something similar a year ago https://www.youtube.com/watch?v=tg7KN13-zlc but lost interest too. For a highlevel tool there were too many side-effects (requiring still lots of expertise from the user).
So much non-trivial glue like you said.
These days I just use https://ffmpeg.lav.io or https://github.com/richardpl/lavfi-preview (which also suffer from the same issues)
shellmix WiP

YouTube

@lvk @zeh wow that looks cool! so it was something even more generic for building shell pipelines with "plugins" for ffmpeg etc? how was the interaction with ffmpeg done, using the cli binary?

remember spending quite a lot of time to somehow map errors from ffmpeg to show up in the graph to explain why things don't work but never really felt stable or useful enough

@wader @zeh

So back then I've basically built a ffmpeg-scanner (it would parse the output of 'ffmpeg -filters' iirc) and generate node-definitions from that.
In theory all was awesome, in practice some sort of meta-nodes would've been better (which would generate snippets of ffmpeg-filtergraph which deal with all the edgecases like format-conversion, same-resolution restrictions etc).

@lvk @zeh that sounds familiar https://github.com/wader/ffcat/blob/master/internal/goffmpeg/features/features.go 😬 (it's the go package i used for the backend... here used for another project)
ffcat/internal/goffmpeg/features/features.go at master · wader/ffcat

Preview media files in the shell. Contribute to wader/ffcat development by creating an account on GitHub.

GitHub

@wader It's not super graph-y, but the way I'm building the command-line definitions, I hope it'll be easy to turn stuff on and off, and select from templates, so one can build some mini-programs-ish things that can take a bunch of options and output a video/audio based on a common task.

Not very obvious now, but once there's optional stuff, predefined selections, etc, should make more sense: https://github.com/zeh/ffmpeg.app/blob/c491a3b7c419f98d915cfadcb910979025ca87b1/src/utils/commands/commands.json

ffmpeg.app/src/utils/commands/commands.json at c491a3b7c419f98d915cfadcb910979025ca87b1 · zeh/ffmpeg.app

A visual web interface to FFmpeg. Contribute to zeh/ffmpeg.app development by creating an account on GitHub.

GitHub
@zeh aha your thinking show the command line but for example codec could be a select box etc? yeap that would be nice to make it easer to explore options
@wader Yeah. The command lines would still be very specific recipes (I am trying to avoid forcing people to "think" too much - otherwise we're just back to a command line; I want the tool to be useful for non-experts) but to give them options to tweak what they have, if they want to.
@zeh Yes I think that makes sense, probably just confusing to show or use graph terminology for most users. One think i've thought about is if it would be possible to visualize the relation between input/output/map/format/codec somehow
@zeh I typed "h265" and got no suggested results, then when I pressed enter it just wiped the input field (Firefox on Android)
@zeh Oh it actually runs frmpeg in the browser, could be very useful in restricted environments
@Exagone313 Yep, it's part of the idea - running it without the need for the cli, when you're more hard pressed for easiness/access rather than performance.

@Exagone313 Yeah, I only have a selected number of entries. I should have a richer list later, including adding better tags.

I know about the FF bug on Android (it's my main mobile browser) - it's something about it not being able to handle large blobs in memory. I'll need to investigate more. Mostly works in Chrome Android FWIW.

@Exagone313 Also, you're right on "enter" - it's a regression! Should have picked the first item. Will fix
@Exagone313 Thanks again for the report - https://github.com/zeh/ffmpeg.app/issues/3 should fix the "enter" key issue, both on mobile and on desktop (currently deployed to https://dev.ffmpeg.app/, will promote to production at a later time).
[Search] Pressing "enter" in the search box wipes out input · Issue #3 · zeh/ffmpeg.app

If we enter a word in search, and press "ENTER", it simply empties the search field. We need better logic there. Requirements When pressing "ENTER", it needs to select the first available option, o...

GitHub
@zeh I like how it also gives you the option to run the software in your own command loping and not in a server, that I may or may not trust. I was looking to remove sound from a video that has sensitive information but I would never put them on an online app cause it’s dangerous but I could just use this and find the command and do everything locally.

@louisrcouture So it doesn't run in the server, it runs in your own browser via a local FFmpeg copy! It's 100% private, I can never see the contents (or even the file names).

That said, I do need a "copy" button to copy the command line to the clipboard without any selector/input shenanigans. It's always faster in the command line anyway, so some people could still prefer that.

@zeh that is even better. But still, there's so many apps that are cloud based and it's kinda annoying. Like first how can I trust you superimageconvertermega dot com ? And why bother with buying a computer if I am meant to use software through a connection to an Amazon supercomputer
@louisrcouture it's true, I probably need to make the privacy focus more obvious.
@zeh @josh thank goodness someone did this finally!! Thank you 🙏🏻

@zeh

Thanks! This look super helpful.

@zeh I tried to transcode a video on my iphone but just get this “FAILED” message, is that expected?

@viv thanks for testing. Running on phones is giving all sorts of errors, mostly due to file sizes being a bit more than what browsers are willing to handle locally. ☹️

In your case it's surprisingly failing gracefully (rather than crashing catastrophically) - the JS console might be showing the specific error it's encountering. Feel free to share with me if you want, would give me more clues.

I'll investigate more soon when I work on the mobile styles, might need some specialized changes.

@zeh it’d be nice if it printed a more detailed error message, even if it’s not directly actionable by a user

@viv it's a good suggestion actually. Thanks. Added to the list.

It needs to get better at parsing the logs from ffmpeg in any case.

@zeh it seems like one of the problems here is that the h264 codec is trying to malloc and failing (see attached screenshot)

i'm guessing that @ffmpeg/ffmpeg is the single-threaded version that starts with 32mb allocated and can grow. the multithreaded version preallocates its (1gb) heap and would fail to be created at all, instead of failing partway.

256mb appears to be a safe initial size on ios but this isn't a primary source

i couldn't find any details about what emscripten does if MAXIMUM_MEMORY isn't set but ALLOW_MEMORY_GROWTH is. i started a build of ffmpeg.wasm with that set to 1gb and will probably try that at some point

ffmpeg.wasm/build/ffmpeg-wasm.sh at 0a220257fed2519c6359d26fabd56ea3176cb1e3 · ffmpegwasm/ffmpeg.wasm

FFmpeg for browser, powered by WebAssembly. Contribute to ffmpegwasm/ffmpeg.wasm development by creating an account on GitHub.

GitHub

@viv nice! Very insightful.

And yeah, I'm wondering if I'll need my own builds for mobile clients with some tweaks. In FF Android for example it just crashes entirely. So I might need some tweaks there.

Will need to look into that soon.

@viv If you have the interest and time, you can re-test using https://dev.ffmpeg.app/ - I've done an update to the latest version of the ffmpeg wasm dependency, which fixed a bunch of stuff... and surprisingly, it seems to have fixed memory/crash issues on mobile, as encoding now works on the two failed devices I had failing (Android Pixel 7 on Firefox, and iPhone 12 Pro on Safari).
FFmpeg.app

A website where you can search for and perform video and audio conversions, right on your browser.

@zeh I’m still getting “FAILED” when trying to transcode a video to h.264 (tried a couple videos with lengths 12s and 2s) and muting a video. this is on an iphone 11 with safari

@viv thanks for testing, will try some more. Bummer.

Planning on exposing the error message correctly soon too, at the very least.

@zeh This is super-cool! Really shows the power of #WebAssembly

It's about one layer of abstraction away from a completely different #idea I had to make an in-browser meme editor via WASM ffmpeg. Would love to see someone take the same approach there.

@zeh oh my gosh this is so handy. I use ffmpeg infrequently and it's always kinda painful to look up and remember the parameters. Thanks for making my video files tasks better!
@depereo thanks! Hope to have it even better soon! It's rough around the edges I'll admit, but I have a ton planned to make this really shine.