6 ms·
Ffmprovisr – Making FFmpeg Easier
- jmiskovic 3y agoI use ffmpeg often because it's so powerful, but its api cannot fit in my head. It should have a LLM frontend.
- yorwba 3y agoThe API doesn't fit in my head either, but grepping through https://ffmpeg.org/ffmpeg-all.html https://ffmpeg.org/ffmpeg-all.html usually gives me the option I need.
- BasedAnon 3y agoif you want to improve a page like this include a screenshot
- forgotpwd16 3y agoThe page is a collection of commands to perform specific actions like transcoding, syncing video/audio/subs, etc. Screenshot(s) won't offer any additional information/help.
- stilwelldotdev 3y agoThis is a great idea! Trying to get FFmpeg to do what I want it to do is always daunting. ChatGPT has been helpful, but not perfect. Thanks for this :)
- mewpmewp2 3y agoChatGPT totally made ffmpeg very accessible to me. I think minor issues I have is intricacies between different operation systems.
- nirav72 3y agoChatgpt made lot of CLI tool args/options easy to use. I always had a hard time remembering OpenSSL options and arguments. Now I just use gpt
- Am4TIfIsER0ppos 3y ago> Transcode to an H.264 access file You use "access" several times but I don't know what you mean by it. I'm going to guess that is some non-english usage slipping in. Nothing else to complain about at this time. [EDIT] I should say "is used" and "they mean" because I don't know if the author is also the poster.
- tyingq 3y agoI think it might just be autocorrect translating "AAC" into "access".
- deleted 3y ago[deleted]
- shellac 3y ago'Access' copies are versions of originals intended for viewing, in contrast to the original ('preservation') video which may be impractically large to use, or in an unusual format. (At least that is how the term is used by collections librarians. Even there terminology may vary)
- bmsleight_ 3y agovectorscope is a great commend to bookmark.
- toxik 3y agoNice idea, but needs a better name!
- naillo 3y agoI like the name
- tap-snap-or-nap 3y agoName is perfect.
- ChrisMarshallNY 3y agoGreat stuff! ffmpeg is infrastructure-level important, and tools like this keep it going.
- ta1243 3y agoNo they don't. There's maybe 20 people that keep it going
- ChrisMarshallNY 3y agoFair point
- asicsp 3y agoSee also: * https://ffmpeg.guide/ https://ffmpeg.guide/ — create complex FFmpeg filtergraphs quickly and correctly * https://www.hadet.dev/ffmpeg-cheatsheet/ https://www.hadet.dev/ffmpeg-cheatsheet/ — clipping, adding fade in/out, scaling, concat, etc
- arun-mani-j 3y agoffmpeg.guide is really awesome. Do we have something similar for ImageMagick?
- asicsp 3y agoI'm not aware of one. I checked my bookmarks and found https://imagemagick.org/Usage/basics/ https://imagemagick.org/Usage/basics/ which has examples, discusses philosophy and methodology
- boomboomsubban 3y agoThe second link's clipping command is not ideal in my experience. For some god known reason, ffmpeg behaves differently depending on whether you put the -ss and -t/-to flags before or after the -i flag. And for me, before worked better. It's also an issue in the original post.
- throw7 3y agomy understanding is options in the cli are tied to either global options, input file options, or output file options; so placing options after -i option(s) would tie it to the output file... i'm definitely not an ffmpeg expert though.
- zebracanevra 3y agoEffectively, placing ss before the input filename seeks the file (the container?) without decoding it. Placing it after will decode the streams while skipping to the point you specify. Seeking the container is usually much faster than decoding and then throwing away what you don't need, but it has fatal flaw: most videos use p-frames and thus require you to decode the frames before it. So, say you want to skip to 60 seconds in. The solution is to do "-ss 50 -i input.mkv -ss 10", which is fast and should get the keyframes you need.
- TekMol 3y ago[flagged]
- legends2k 3y agoYou and the developers you know don't encompass all of humanity.
- vultour 3y agoConversely, I do not know any developers that use AI instead of google. And considering the horrific garbage it has given me the few times I tried, I’d be worried about what you’re doing with it.
- mbork_pl 3y agoI do use ChatGPT, and while it helped me with things like obscure issues with bash syntax, it hallucinated some CLI tools options often enough that I never trust it with anything important. (And I tried to ask it even fairly easy questions.) While it works pretty well when I forget some CLI tool option, in cases when some tool does not have an option doing what I want, ChatGPT is worse than useless - instead of telling me that it doesn't know an option doing something exists, it just tries to "think something up". In the world when the right answer is "no, there is no option doing what you want" even a small amount of time, ChatGPT is actively harmful.
- RockRobotRock 3y agoTo be fair, googling so many things nowadays will lead you to dogshit blog sites with a million CTA modals and needless prose
- remram 3y agoYou could input your opinions directly into AIs rather than here, all developers I know don't want to read such ludicrous unsubstantiated claims.
- forgotpwd16 3y agoA nice collection. Wish those examples, or part of them, were included in ffmpeg manual. The ImageMagick section can easily be expanded to a site of its own.
- alexkrkn 3y agoVery useful! I started using chatgpt to come up with ffmpeg commands, just so much faster and easier to find what I need. I made a small tool so I can do it right in the cli: https://github.com/alexkrkn/help-cli https://github.com/alexkrkn/help-cli and made a video about it: https://www.youtube.com/watch?v=pOda6TDBqcY https://www.youtube.com/watch?v=pOda6TDBqcY
- deleted 3y ago[deleted]
- tonetheman 3y ago[dead]
- jameskerr 3y agoAll Ive ever wanted was to convert mp4 to gif.
- robertoandred 3y agoWhy?
- Terretta 3y agoPerhaps it's a form of hipster irony, since by and large all GIF sites and social media sites now convert source GIFs to mp4.
- account42 3y agoThere are still plenty of contexts where you can embed images but not videos (or at least not with automatic looping playback) - forums, github README.md, other markdown-based comment/post systems. Gif compression limitations also encourage you to cut down to the essential parts - too many videos waste the viewers time with delays and irrelevant bits.
- Terretta 3y ago> irrelevant bits Hmm.
- chefandy 3y agoWhat's more confounding about this than translating between any other two formats?
- robertoandred 3y agoGIF is a terrible format for video
- chefandy 3y ago
- Paianni 3y agoProbably the biggest barrier to ffmpeg adoption is all the offline 'freemium' and web frontends, the host sites for which have been SEO'd for phrases people commonly put into Google like "avi to mp4", "mp3 to wav", etc.. It took me more time than I wish it did to become open to using CLI apps, the Windows world had taught me to expect a GUI for everything.
- Tactician_mark 3y agoI thought most of those file conversion sites were just ffmpeg on top of nginx or something?
- vxNsr 3y agoThey almost certainly are, cli is not always the best interface but ffmpeg covers such a wide swath of video utilities that I’m not sure how you could include all of its functionality in a GUI.
- mrob 3y agoThis guide recommends "yadif" as a deinterlacing filter. I find "w3fdif" looks better. Like yadif, it does not do motion tracking, so it's reasonably fast and avoids the distracting artifacts that motion tracking sometimes causes (I'd rather have consistently mediocre results than sometimes great and sometimes bad), but it considers three fields at a time instead of yadif's two, which lets it hide the interlacing artifacts better.
- Trixter 3y agoAs previously suggested, w3fdif has mostly been supplanted by bwdif. w3fdif can produce shimmering, whereas yadif does not, which is why bwdif operates like yadif but uses the better field matching of w3fdif.
- brucethemoose2 3y agoThere is an extension of that: https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Bwdif https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Bw... Though if you are reencoding, you mind as well go whole hog and use QTGMC.
- kierank 3y ago"bwdif" is a hybrid of "yadif" and "w3fdif"
- yard2010 3y agoA bit off topic, IMO ffmpeg is one of the best software ever written. Fabian Fabrice (ff) is one talented engineer and people such as him are a gift to the FOSS community. I used to work in a ~2 bil unicorn in which a big part of the products we worked on relied on ffmpeg.
- edent 3y agoAnd you gave a sizable donation, right? https://ffmpeg.org/donations.html https://ffmpeg.org/donations.html
- Xeoncross 3y agoI have a feeling the ~$2b wasn't his Still, good reminder to speak up about the products to leadership and see if we can get them to donate.
- slacka 3y agoAbsolutely. For the first startup that I worked for, I earned a position with budgeting authority. Once we achieved profitably, I added donations to the open source tools we relied upon. I received some pushback and defended it. Looking back, I am proud of that choice. I encourage you all to do the same.
- justsomehnguy 3y agoCan you share what you chose as your points and what convinced them at the end?
- hutzlibu 3y agoWhat likely works better in conservative environments, are not donations, but (generous) support contracts. This is something buisness people can understand.
- 3y ago
- Eisenstein 3y agoPeople like to say that ffmpeg is complicated but when you make it into a nice gui it doesn't get any easier -- it is video compression itself that is complicated. No software could make it easier without making the decisions for you, like handbrake or some other click-through interface. I'm not certain, but I highly suspect that if I sat down and learned about digital video encoding and compression on a granular enough level then figuring out how to do things in ffmpeg would be rather intuitive. Does anyone have experience doing this?
- legends2k 3y agoI've written DirectShow filters around 17 years back for WindowsMobile (not Windows Phone) so I've a decent understanding of codecs and containers. Formats like mkv or codecs like HEVC didn't exist back then but the concept of manipulating audio/video through a bunch of filters is a wonderful one and most (all?) a/v transforming software does it. When I started looking into FFmpeg's man pages I could connect the dots and start using it after a day of fooling around. I'm a CLI lover and man page reader so perhaps it worked to my advantage.
- brucethemoose2 3y agoSince ffmpeg CLI still makes me pull my hair out, even with excellent guides, I am going to plug vapoursynth: https://www.vapoursynth.com/ https://www.vapoursynth.com/ Its optimized Pythonic video filtering... But also so much more: https://vsdb.top/ https://vsdb.top/ And Staxrip, which makes such good use of ffmpeg, vapoursynth, and dozens of other encoders and tools that I reboot from linux to Windows just to use it: https://github.com/staxrip/staxrip https://github.com/staxrip/staxrip
- krick 3y agoI would really appreciate just an ffmpeg wrapper with better CLI. It is unnecessarily convoluted, and while I don't know if there's a point of view from which it actually all makes sense, it is just inadequate in performing all sorts of extremely common tasks it is perfectly able to perform, if one knows which magic words it needs to hear. I probably have dozens of bash-aliases, that are nothing more than encoding 150-character ffmpeg commands into 2 simple words. It is also incredibly stupid how 99% of time ffprobe is used without any arguments to just quickly see something as mundane as duration, resolution, framerate, MAYBE number of audio-tracks, yet 99% of its output is some completely irrelevant bullshit like compiling options.
- brucethemoose2 3y ago>> I would really appreciate just an ffmpeg wrapper with better CLI. There were (are?) tons of them on GitHub. But many are still obscure, or are single dev efforts that fizzled out. Some focused, purpose built CLI frontends (like Av1an, specifically for transcoding) are excellent at what they do. Perhaps that is the better way than an all encompassing wrapper.
- ta1243 3y agohttps://ffmpeg.org/ffmpeg-filters.html https://ffmpeg.org/ffmpeg-filters.html makes ffmpeg easier, not stuff like this.
- 7373737373 3y agoThe navigation layout of this is not ideal yet. Specific recipes that should be added: Removing audio: ffmpeg -i $input_file -c copy -an $output_file Halving resolution: ffmpeg -i $input_file -vf "scale=iw/2:ih/2" $output_file
- chefandy 3y agoThose anchors don't work on Firefox on Android. The author is losing... I dunno.... 1e-20% or whatever of the browser market share among my fellow Android FF users.
- boomboomsubban 3y agoThey do work, just poorly. The text opens, but it scrolls you down to the end of the text.
- chefandy 3y agoThere must be something else happening on my install, then.
- giovannibonetti 3y agoRelated: I have a small library of personal videos, including from my wedding, and I'd like to compress it as much as I can to reduce its storage footprint. I don't care much about codec compatibility, as long as I can watch them on my (ARM) MacBook, it's good. In the past (over 10 years ago), I used to work with H.264, but I remember fiddling with parameters was a pain. I wonder if nowadays there are some promising new codecs based on ML. Again, as long as it works in my machine it's good, so anything from GitHub, HuggingFace and so on is acceptable, as long as it doesn't need too much effort and specialized knowledge to run it.
- danjc 3y agoI'd recommend not re-encoding as you'll have irrevocably lost data. Whatever it's size, in the future it won't be large.
- Given_47 3y agoYea can get wonky, -c:v copy is the correct flag to not re-encode
- frankplow 3y agoThere are some promising codecs based on neural networks, however they are all very much research projects and have major limitations. Additionally, the compression ratios are only marginally higher than state-of-the-art engineered codecs. I think for your use case a more modern engineered codec such as VVC (H.266) or AV1 is perhaps more suitable.
- justsomehnguy 3y agoDefine 'small'? In GB/TB
- drewtato 3y agoThis depends on how much time you want to spend. If you want the transcode to take less time than the playtime of your videos, it'll probably be best to just use the best hardware encoder you have with high quality settings. If you have more time, then AV1 is good. Read through the trac page [1] and do test encodes with 5-10 seconds of video to determine what settings give you your desired quality. Note that low `-cpu-used` or `-preset` values will give great quality but take incredibly long. Then, encode a few minutes of video with various settings to determine what settings give you your desired file size. For human time usage, keep track of the commands and options you use and how those affect the output. If the job will take more than a few hours, write your script to be cancellable and resumable. [1]: https://trac.ffmpeg.org/wiki/Encode/AV1 https://trac.ffmpeg.org/wiki/Encode/AV1
- xenodium 3y agoHuge ffmpeg fan, though I could never remember the magical incantations I've used. Nowadays I wrapped them all with Emacs functions. This makes them easily accessible as a "right-click" menu of sorts via M-x. https://xenodium.com/emacs-ffmpeg-and-macos-alias-commands https://xenodium.com/emacs-ffmpeg-and-macos-alias-commands
- mynameisfunk 3y agoIn the spirit of making FFmpeg and video processing easier, we open-sourced a chat-based agent to assist video production - https://github.com/remyxai/FFMPerative https://github.com/remyxai/FFMPerative
- fladd 3y agoI am a bit confused. This seems to be about the command line programme "ffmpeg" that comes with the library, but not the library itself. That programme seems already very well documented, with a help option, a man page and everything. It is usually the library that no one knows how to properly use, due to a lack of documentation :-)
- thentherewere2 3y agoAs someone who uses ffmpeg daily (mostly basic functions), I now rely on chatGPT to approximate the command and fine tune from there. Haven't used too many of the advanced features of ffmpeg so glad someone seems to be covering those use cases as most tutorials dont cover them.
- vorticalbox 3y agoI had a whole folder of videos I wanted to convert to 720p, asked chatGPT and it gave me this: find . -maxdepth 1 -type f -name "" -exec sh -c 'pv "$1" | ffmpeg -i pipe:0 -filter:v scale=720:-2 -c:a copy "${1%.}.mp4" 2> /dev/null' _ {} \; Not sure if it can be improved but it works well
- colecut 3y agoI was looking for a ffmpeg UI recently and came across Shutter Encoder. It's open source, mac/windows, very good software. I've finally started compressing my 15 year, 300GB personal video collection.. https://www.shutterencoder.com/ https://www.shutterencoder.com/ I'm compressing everything using, H.265 and videos are shrinking to sometimes 1/10th the size.. Is there who would give me reasons why I would not want to do this? I've read that it takes more processing power to watch these compressed videos, but not sure that will cause much trouble in the future...
- hsbauauvhabzb 3y agoI tried this automated across a large video collection and the quality was subpar because my CRV settings were weak despite looking fine on the test videos. Consider that a word of warning, validate many videos before removing the masters. But with 300gb, storage is cheap enough that you could just keep the masters.
- harrygeez 3y agoOne reason for me to still pick h.264 is many aging (or budget?) hardware doesn't have hardware decoding for h.265. Also it's just easier on my homelab to use Plex without having to transcode
- andrewstuart 3y agoFfmpeg and ChatGPT are a match made in Heaven.
- parentheses 3y agoThis is something a GPT would do way better.