3 ms·
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 pr
by Hello71 6y ago
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:
ffmpeg -i infile.mp4 -c:v copy -af volume=.5 outfile.mp4
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.
- timc3 6y agoI am wondering whether you can put this as an issue into github so others can see? I would hate to see other projects start using this. That being said I need to dig into this library some more to review.
- 7kmph 6y agoWhat do you expect from a programmer who chooses JavaScript as the language of a cli tool?
- deleted 6y ago[deleted]
- bryanrasmussen 6y agoIt's sad that Basic isn't so popular anymore and people are forced to use JavaScript to workout their inner Dijkstra. on edit: somehow I posted this twice. but deleted one.
- FraKtus 6y agoI 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.
- Hello71 6y agoIMO, 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.