4 ms·
ffmpeg is amazing, but it’s like tar on steroids: I can never remember the right incantation. Google is required for even the simplest of things. I don’t know
by tambourine_man 6y ago
ffmpeg is amazing, but it’s like tar on steroids: I can never remember the right incantation. Google is required for even the simplest of things.
I don’t know if it’s their goal, but I’d love a more user friendly set of command line arguments.
- coldpie 6y agoI think gstreamer's gst-launch syntax is a bit easier to read and write, although it has a different set of capabilities than ffmpeg, so may not be a whole replacement for what you want to do.
- the8472 6y agoIt's fine for simple transcoding jobs. Once it reaches certain complexity you at the very minimum want to outsource it to a shell script to organize the arguments in multiple lines or switch to some other language bindings that aren't limited by shell argument parsing. Compare the CLI and python invocation in this example: https://github.com/kkroening/ffmpeg-python#complex-filter-graphs https://github.com/kkroening/ffmpeg-python#complex-filter-gr... For some subsets of ffmpeg functionality (e.g. creating webm videos from other sources) there also are dedicated GUIs.
- jtchang 6y agoThat example is fantastic and really illustrates why a solid API can make things so much easier for the developer. Reading the command line I could barely tell what ffmpeg was doing. This also could mean the command line is badly designed.
- the8472 6y agoAs mentioned, splitting over multiple lines can help https://trac.ffmpeg.org/wiki/FilteringGuide#Multipleinputoverlayin2x2grid https://trac.ffmpeg.org/wiki/FilteringGuide#Multipleinputove...
- at_a_remove 6y agoSeveral years ago I was attempting to automate a very long chain of AV transformations using ffmepg and such. I distinctly remember having a dream of a green-text black window command line prompt of ffmpeg incantations and that is when I realized that I had been perhaps digging too deep.
- tenebrisalietum 6y ago`ffmpeg` reminds me of `convert` from ImageMagick, it's complex because there's a lot of media formats and the command lets you do a lot things to the media as well. I liked using WinFF a time ago for simple conversion jobs though where I didn't care too much about tweaking all the knobs.
- ravenstine 6y agoIs WinFF still around in some capacity? The website doesn't load for me. Too bad if it's abandoned, because I remember it being pretty amazing. EDIT: From Big Matt's blog: > Unfortunately I lost the WinFf.org domain. I was broke but I don't think it's that important after all these many years. You can still go to github, video help, and others. https://www.biggmatt.com/2020/04/winfforg.html https://www.biggmatt.com/2020/04/winfforg.html
- tambourine_man 6y agoImageMagick's convert is much friendlier than ffmpeg: convert image.png image.jpg Does what it's suppose to and it's as simple as possible. Sure, you can get really fancy with resizing proportions but easy stuff should be easy.
- zerocrates 6y agoI mean, ffmpeg -i something.avi something.mp4 works as well, but there's just _so_ many more options inherently involved in converting a video: most inputs and outputs will be at least 2 tracks, so that's 2 codecs, and the majority of containers used now (MP4, MKV, etc.) support all sorts of codecs, so while ffmpeg will "guess" what you want just like ImageMagick does in your short example, the chances that it guesses right are a lot lower just on the basic level of what format you wanted your output to be. But it's not exactly ffmpeg's fault.
- tambourine_man 6y agoTrue, but that -i is telling. Remove it and it breaks spectacularly
- fb03 6y agoI don't know if it fits you but there are several GUI frontends dedicated to help with the sheer amount of arguments/flags. https://github.com/swl-x/MystiQ https://github.com/swl-x/MystiQ is what comes to mind
- crazygringo 6y agoThis is where GUI's shine, as opposed to command-line. Perhaps this is slightly off-topic, but my dream is an interface that combines the best of both worlds. Kind of an automated GUI-builder for command-line tools, that analyzes the combinations of options used most, breaks them down into workflows with options (that can be manually named), and you can thus execute one-off commands easily and quickly without having to hunt through man pages, but still export the command as a command-line incantation for reuse, to use in a script, etc.
- darzu 6y agoThis sounds great! Expanding on this a little: Seems like you'd need a universal CLI tool usage traverser and parser to figure out what's possible. Likely this would produce a decision tree of sorts with different modes and options excluding or including new options. We'd need a way to show all this, maybe nested tabs for modes and check boxes and other inputs at each appropriate level. Layer on this a way to optimize for the most common cases like you said. Further, if this becomes popular, CLI tools could emit some sort of standard description language that would optionally customize the GUI. The GUI's output should be both the text command it constructed and the ability to run that command directly. More future steps would be a way to reason about multiple commands, pipes, and other combinators. Adding this to my side projects backlog. Thanks for the idea!
- crazygringo 6y agoExactly that -- all of it. And I love the idea of CLI tools optionally emitting their own defaults for it too. I (selfishly) hope you build it, since I don't have the time!
- iib 6y agoIn the emacs world, there are textual interfaces like magit's [0] or dired's [1] interface, that tick many, perhaps most, boxes that you mention. Magit is basically that interface, but tailored to `git`, that also constructs the actual git command, should you want to see it. Dired is like that for ls, rm, cp, mv and other file utils. So, as a general design, they _may_ be of useful interest. A tool to automatically parse `man` pages or help prompts from tools would be a dream come true, basically. Apart from the possible commands, it may be useful for the GUI to also show some kind of state, for example filesize (akin to invoking `ls` before `ffmpeg`, as you would normally do on the CLI). Done with the right abstractions, command combinations should come almost for free. [0] https://magit.vc/ https://magit.vc/ [1] https://en.wikipedia.org/wiki/Dired https://en.wikipedia.org/wiki/Dired
- deleted 6y ago[deleted]
- amyjess 6y agoYou might want to look into Handbrake. I understand it's basically just a GUI frontend for ffmpeg.
- tambourine_man 6y agoI use it almost everyday.
- antoineMoPa 6y agoOn my side, I frequently forget my own age, people's name, things my girlfriend remembers from 5 summers ago. However, I'll never forget things like "tar -zxvf", "ffmpeg -i vid.mp4 image-%04d.png" and "convert image-*.png +dither anim.gif".
- meigwilym 6y agoI have muscle memorized "youtube-dl --extract-audio --audio-format mp3 https://YouTube.com?v=123etc" https://YouTube.com?v=123etc"
- majewsky 6y agoYou probably want "-f bestaudio" instead of "--extract-audio". The former will download just the audio and skip the video which is significantly faster (and cheaper when on a metered connection). However you will have to do the conversion to MP3 yourself afterwards (e.g. with ffmpeg) if you want that format specifically.
- lozf 6y agoThese days, with AAC being supported pretty much everywhere you're probably better off just using the " -f 140" option to get the 128kbps m4a file, which at least saves the further (albeit subtle) degradation caused by another lossy to lossy transcode.