I anticipate some much more savvy than myself saying this wrapper is unnecessary as you can do all of this “easily” with ffmpeg. I welcome tools like this that have a more common user in mind, evidenced immediately in the beginning of the README with common use cases.
Ffmpegs documentation on the other hand forces me to feel as though it’s normal to assume knowledge about a point in a video and what it means if my encoders are different from input to output.
I consider myself pretty savvy and have used ffmpeg many times over the years. I struggle through it like hell every time. I'd gladly use something like this.
There are a number of issues with this program. First, there are a large number of bugs and general implementation issues. For example, "vdx --help" does not print help output, but instead raises "Need a glob pattern for input files". Invalid options are ignored, and debug output is non-existent: "vdx myfile.mp4 --asdf garbage" results in "error build/myfile.garbage" with no other explanation. It turns out that it is interpreted as "vdx myfile.mp4 -f garbage". The list goes on and on.
More fundamentally, however, FFmpeg supports both simple and complex operations. This program takes simple operations and does them wrong, and takes complex operations and throws them out. For example, the command to halve the audio volume of an mp4 file containing audio and video would be:
There are a number of problems with this command. Most importantly, it always encodes audio output with the built-in AAC encoder at 128 kbps. A better command would take into account the input quality and desired output quality and codec, then specify something like "-c:a libopus -b:a 80k" to select the desired result. vdx solves this complexity by simply ignoring it and using the FFmpeg default. A similar problem applies to its video codec settings, which always uses libx264 with the default settings. This is a poor choice. Almost always, either a slow setting (for better quality and smaller file size) or a fast setting (for worse quality and larger file size) is desired. Also, in my experience, either a lower CRF (for high-quality film content) or a higher CRF (for low-quality phone/ripped content) is desired. If you're going to punt on doing it properly and just use the defaults, you might as well just use ffmpeg directly.
The issues go far deeper than that, however. The entire design of the program is flawed. It appears to try to process the file twice: once for video, and once for audio. However, the author seems not to know that ffmpeg will re-encode video by default. Therefore, a simple command like "vdx myfile.mp4 --volume 0.5" unnecessarily re-encodes the entire video, twice. It applies operations in what seems to be undefined order, which is a problem when (for example) cropping and also resizing a video.
I use FFmpeg for many years, and I did wonder many times why isn't there a CLI that would be simpler to use but still useful for most tasks.
To my knowledge, no project succeeded in doing that. It's not difficult to code a simple reader and a basic encoder, but then you have many cases not supported correctly, as you wrote.
IMO, the main problem with ffmpeg is that the official documentation is overly intimidating to newcomers. While the command syntax isn't great, it's not terrible either. Probably one of the contributing factors is overcomplicated poorly written internet tutorials copying out-of-date technical memes, like how people complain about tar -zxcvbnwhatever despite tar -xf file covering 99.9% of decompression cases.
This is great! I'd love to see more wrappers like these for ffmpeg. Despite 5 years of using it, I can rarely run any ffmpeg commands without looking at StackOverflow. I wrote a similarly-inspired wrapper because of this as well, with a different subset of features, some of which rely on moviepy: https://github.com/achalddave/vid
Would be great if vdx learned more "common" ffmpeg features (creating a slideshow from a set of images, speeding up videos, simple drawing, etc.) while maintaining its simplicity!
There's the rub isn't it. There's a reason ffmpeg is so hard to use: it does so much. It does so much because efficient processing of media often requires you to do more than one thing in a single pass, or end up taking wayyy more resources than needed.
I'm still all for simpler frontends being available but there's going to be a limit of how many things can be covered before it is just as hard to use as ffmpeg.
The FFmpeg project has 8 libraries. libavcodec only deals with decoding/encoding and bitstream parsing & filtering. Demuxing/muxing, frame filtering, scaling.. are all handled by other separate libraries.
I'm wondering why ffmpeg is more popular than other media libraries like gstreamer.
I'm currently learning gstreamer and it seems to cover more features than ffmpeg. Its CLI command, gst-launch is fantastic to prototype. Is there a specific reasons why more people choose ffmpeg over gstreamer for go-to media processing library?
My experience with gstreamer consists almost entirely of battling with the system's package manager trying to install whichever codec packs I need and then convincing a gstreamer-powered media player to recognize said plugins and actually play my media. This process ended in frustration more often than it should've.
By contrast ffmpeg-powered projects tend to just work out of the box with practically any set of files imaginable… much more pleasant.
It's what I know and it's never let me down. It powers other software I like, particularly mpv. I have very little experience with gstreamer and don't presently see a need to learn it when ffmpeg already has my needs filled.
Maybe it was made to scratch an itch and the developer is most comfortable in JS. Why judge someone else who made something and shared it without asking for anything in return?
If you’re okay to run things in the cloud, https://transloadit.com made an abstraction over FFmpeg that chunks files up, and parallely encodes them on many machines to speed things up (“turbo mode”). 5GB free each month. Disclosure: I’m a founder :)
Slightly off topic, but are there easy-to-use GUI wrappers for FFmpeg you would recommend? I find myself using FFmpeg about five times a year, and each time I had to google what I wanted to do. I feel a good GUI application will be extremely helpful.
ff-works is pretty fantastic in my experience. A decent GUI with tons of the options exposed plus a place to add additional terminal commands if needed. But as simple as permute if you don’t wanna dig.
can i process each frame of the video as a picture (so i can filter the frames by whether they have a particular logo in them, and make a video of just those frames)
Ffmpegs documentation on the other hand forces me to feel as though it’s normal to assume knowledge about a point in a video and what it means if my encoders are different from input to output.