TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Vdx – An intuitive CLI for processing video, powered by FFmpeg

152 pointsby cheeaunover 4 years ago

10 comments

technoplatoover 4 years ago
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.<p>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.
评论 #24883903 未加载
评论 #24883039 未加载
评论 #24883758 未加载
Hello71over 4 years ago
There are a number of issues with this program. First, there are a large number of bugs and general implementation issues. For example, &quot;vdx --help&quot; does not print help output, but instead raises &quot;Need a glob pattern for input files&quot;. Invalid options are ignored, and debug output is non-existent: &quot;vdx myfile.mp4 --asdf garbage&quot; results in &quot;error build&#x2F;myfile.garbage&quot; with no other explanation. It turns out that it is interpreted as &quot;vdx myfile.mp4 -f garbage&quot;. The list goes on and on.<p>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:<p><pre><code> ffmpeg -i infile.mp4 -c:v copy -af volume=.5 outfile.mp4 </code></pre> 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 &quot;-c:a libopus -b:a 80k&quot; 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&#x2F;ripped content) is desired. If you&#x27;re going to punt on doing it properly and just use the defaults, you might as well just use ffmpeg directly.<p>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 &quot;vdx myfile.mp4 --volume 0.5&quot; unnecessarily re-encodes the <i>entire</i> video, <i>twice</i>. It applies operations in what seems to be undefined order, which is a problem when (for example) cropping and also resizing a video.
评论 #24883883 未加载
评论 #24884990 未加载
评论 #24884267 未加载
achalover 4 years ago
This is great! I&#x27;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: <a href="https:&#x2F;&#x2F;github.com&#x2F;achalddave&#x2F;vid" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;achalddave&#x2F;vid</a><p>Would be great if vdx learned more &quot;common&quot; ffmpeg features (creating a slideshow from a set of images, speeding up videos, simple drawing, etc.) while maintaining its simplicity!
评论 #24884632 未加载
shaicolemanover 4 years ago
There&#x27;s Handbrake-CLI which is easy to use, but very powerful nonetheless <a href="https:&#x2F;&#x2F;handbrake.fr&#x2F;docs&#x2F;en&#x2F;latest&#x2F;cli&#x2F;command-line-reference.html" rel="nofollow">https:&#x2F;&#x2F;handbrake.fr&#x2F;docs&#x2F;en&#x2F;latest&#x2F;cli&#x2F;command-line-referen...</a>
评论 #24883594 未加载
kbumsikover 4 years ago
I&#x27;m wondering why ffmpeg is more popular than other media libraries like gstreamer.<p>I&#x27;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?
评论 #24884253 未加载
评论 #24883787 未加载
评论 #24884021 未加载
评论 #24885782 未加载
评论 #24883835 未加载
评论 #24886111 未加载
high_priestover 4 years ago
These are, in majority, ffmpeg abstractions. WHY in tarnation would you need Node.js as a basic dependency?
评论 #24883072 未加载
评论 #24882952 未加载
kvzover 4 years ago
If you’re okay to run things in the cloud, <a href="https:&#x2F;&#x2F;transloadit.com" rel="nofollow">https:&#x2F;&#x2F;transloadit.com</a> 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 :)
评论 #24884797 未加载
SCLeoover 4 years ago
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.
评论 #24906432 未加载
评论 #24891850 未加载
评论 #24885870 未加载
droctothorpeover 4 years ago
This is a great idea. FFMPEG is as arcane as it is amazing. This should have been written in a compiled language, however.
评论 #24883257 未加载
purplecatsover 4 years ago
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)