11 ms·
FFmpeg is 20 years old today
- ed25519FUUU 6y agoFfmpeg is an unusual piece of software. It’s CLI arguments (to me) are baffling. But it’s been around so long that there’s so many answered questions online for virtually anything you want it to do. Don’t bother reading the man page, go to google first.
- donatj 6y agoI felt the same for years, but when you really dig into it you can learn a handful of flags that will get you what you want 90% of the time, and you can Go to Google after that set fails you.
- the_only_law 6y agoRidiculously useful piece of software, but yeah the docs baffle me more than help me.
- kyriakos 6y agoIts cli became so complex to account for all its use cases which could have been replaced by a config file at this point.
- asveikau 6y agoA config file makes sense if every run takes the same config. But most ffmpeg options are specific to a task and inapplicable to many others.
- m-p-3 6y agoYeah I just make bunch of bash files (which also contains comment) for specific scenarios.
- Griffinsauce 6y agoWhat's the difference with selecting different config files then?
- naniwaduni 6y agoYou don't need a config file for simple cases. There's no firm boundary between simple cases and cases where you'd want to use a config file; it's partly a quantity thing, partly familiarity. It could probably be nicer with a way to specify a file to read options from, but it's not as if there aren't plenty of ways to represent an argv as a text file already, so it doesn't seem like a high priority.
- deleted 6y ago[deleted]
- asveikau 6y agoI feel like the basics are simple and intuitive. Enough use of it and you will not consult docs for the most basic tasks. Then you start to think "but how do I...?" and go to google. I tend to also forget the answer after a few months.
- bigbubba 6y ago> I tend to also forget the answer after a few months You can add comments to the end of tricky commands with the # character. Then at a later date you can search for commands using the contents of those comments, using something like C-r.
- asveikau 6y agoOn some machines I don't have ~/.history. On others, there is a size limit so when I grep the history file after a few months it might not be there. Personally, rather than interactively putting comments in my shell input, I prefer to write scripts or take notes in a text file.
- riidom 6y agoThere are also tools with a GUI that make use of ffmpeg (calling them a GUI-wrapper is probably not fair). And ofc, they likely can't do everything ffmpeg CLI can. One I know is https://handbrake.fr https://handbrake.fr Are there more?
- ars 6y ago> Are there more? http://www.avidemux.org/ http://www.avidemux.org/
- verylittlemeat 6y agoI use Axiom to do basic ffmpeg stuff on a regular basis and it's never let me down. https://axiomui.github.io/ https://axiomui.github.io/
- mbeex 6y agoCloser to the underlying originals CLI: https://www.videohelp.com/software/FFmpeg-Batch https://www.videohelp.com/software/FFmpeg-Batch
- alfg 6y agoSomething I've been working on lately. Not really a GUI wrapper, but more a command generator for some of the common operations. https://alfg.github.io/ffmpeg-commander/ https://alfg.github.io/ffmpeg-commander/
- m-p-3 6y agoThat, and I usually comment my ffmpeg commands to understand what I wanted it to do when I get back to it later.
- the_cat_kittles 6y agoits a very good example of what is truly useful conflicting with widely held notions of whats important to make good software. basically, despite the arcane invocations, i find it gets the job done more painlessly than any alternative most of the time.
- heavyset_go 6y agoThere are wrappers over it, the Python one[1] is pretty good and it lets you build complex pipelines represented with graphs. [1] https://github.com/kkroening/ffmpeg-python https://github.com/kkroening/ffmpeg-python
- h2odragon 6y agoI remember reading about it initially and saying "that sounds ambitious,and useful"... I think its safe to say they changed the world for the better with that single A/V swiss army knife tool. Amazing achievement.
- cpach 6y agoI remember in the 90s when Microsoft, Apple and RealNetworks pushed hard for their own codecs and tools. IMHO those where dark times for digital video. ffmpeg and Xiph.org played a large part in changing that.
- zinekeller 6y ago... which is really disappointing when you learn that H.261/MPEG1, a broadcast-ready standard, was already frozen at that time. (Of course, even more worry-free formats are already here - it is just the time needed to replace existing equipment).
- cpach 6y agoWhen did they freeze it?
- zinekeller 6y ago1988. [1] That even precedes MP3. 1: https://www.itu.int/rec/T-REC-H.261-198811-S/en https://www.itu.int/rec/T-REC-H.261-198811-S/en
- cpach 6y agoWow. Had no idea it occurred so early.
- zinekeller 6y agoWell, analogue HDTV and digital music formats were already experimented in '70s and '80s by Japanese [MUSE, Hi-Vision, CDs] and European [HD-MAC, NICAM, also CDs] researchers, so it is no surprise that similar research into digital realm are being performed [H.26*, MPEG-1 Audio Layer I to III and AAC (MPEG-2 Audio), and DVB and DAB were spearheaded by EBU and ETSI so no surprise there].
- ghoomketu 6y agoThe creator of ffmpeg Fabrice Bellard(1) is truly a genius and has created so many amazing software that have been an amazing benefit to the world. (1) https://bellard.org/ https://bellard.org/
- jjeaff 6y agoHow much of it is genius and how much of it is just an amazingly productive work ethic? Or maybe it requires genius to be this productive? I'm just amazed at what some people are able to build. Especially open source. Does he make money from ffmpeg? Or just do it as a side gig? Reminds me of the photopea guy. He has basically built a browser based clone of photoshop. Something that took Adobe thousands of engineers and decades to build up over time.
- fouronnes3 6y agoYeah, genius could even be an understatement in my opinion. He is up there with the greatest of the greats. Anyone with a quarter of his productive output would easily qualify as genius already. He has basically no presence online besides his remarkabke work and of course that only strengthens the legend.
- umvi 6y ago> Something that took Adobe thousands of engineers and decades to build up over time. It's not true in every case, but the efficiency of solo developers and tiny teams is a massive advantage vs. inefficient huge teams crippled by corporate bureaucracy and layers of management. Even though the latter has astronomical budget vs the first, it doesn't actually guarantee better software.
- zinekeller 6y agoSome might have commented that FFmpeg is a very complex software but in its defence codecs are complex - especially in the encoding side where you basically have the whole control on the parameters. If you somehow work at a media company (on the engineering side, not the creative side which usually does not know (and care) what is the difference between P and B frames) the switches are important especially in one-way broadcasting (where there is no way to basically go backward and you need to fit everything into a very constrained transmission, which as one of my friends say that engineers at YouTube has a much more easier job due to the two-way communication nature of the internet).
- dstick 6y agoComplex is a boon in this case, is it not? It -can- do everything. You need to invest some time into understanding it. There’s no fancy UI, no modern branding. It’s a work horse. It’s so powerful, I love it! Amazing piece of software.
- georgiecasey 6y agoDoesn't the H264 codec used by ffmpeg come from the VideoLan/VLC team?
- _Gyan_ 6y agoNo. The h264 decoder is internal. The repo for the commonly used H.264 encoder x264, is hosted at Videolan but its developers were a separate group. VLC also hosts the ffmpeg repo.
- blululu 6y agoFFmpeg is one of those pieces of infrastructure that unpins modern media in such a fundamental way that it is hard to even imagine life without it. In the words of John Carmack: https://twitter.com/id_aa_carmack/status/1258531455220609025?lang=en https://twitter.com/id_aa_carmack/status/1258531455220609025...
- DC-3 6y agoIt's funny when you think about it how much money is made by people writing relatively trivial tech on top of incredibly complex and technically impressive software written for far less reward and acclaim (at least, outside of engineering circles). https://xkcd.com/2347/ https://xkcd.com/2347/
- ChrisMarshallNY 6y agoffmpeg has become the de facto infrastructure for video processing. It seems to have done a great job of keeping up to date, with things like GPUs and shader language and whatnot. I guess that's because he designed a good extension mechanism. I'm grateful for it.
- dylan604 6y agoTo do large quantities of transcoding, the industry was dominated in the world of using dedicated server and nodes to create a "farm". One system I managed was a $15k server, with each node being $5k each. Of course, you needed the hardware to run it as well. Now, install FFMPEG, create an image, and then spin up a new instance as needed. A big Thank You to any and all who have brought FFMPEG to where it is!
- anonacct37 6y agoSo youtube used ffmpeg quite extensively. https://multimedia.cx/eggs/googles-youtube-uses-ffmpeg/ https://multimedia.cx/eggs/googles-youtube-uses-ffmpeg/ It wouldn't be too surprising if they still did.
- petters 6y agoIt's pretty interesting that YouTube offers such a huge surface area for processing user-uploaded files. Some of those obscure formats should have a security flaw. But the ffmpeg processes are surely sandboxed with seccomp or similar, so it probably does not matter at all.
- franga2000 6y agoAt their scale, they're almost certainly running entire racks' worth of servers entirely dedicated to just transcoding video and only able to access input and output files. (quite likely, those are all actually virtual through some auto-scaling IaaS magic)
- dkh 6y agoThe best ffmpeg-based video platform exploit I've ever seen was this one [1] where a user could upload a specially-doctored video to your YouTube-esque platform and while encoding it would trick ffmpeg into reading system files on the server and baking them into the encoded output. Literally the hacker would upload a video, wait for it to encode, and then once it was available for viewing on the website, they'd be looking at a video containing the text from `/etc/passwd` or your envvars or some secrets file or whatever. Yes, most encoding services are very well-sandboxed and even when our tiny streaming platform at the time got hit by this when it was first appeared a few years ago, it was a non-issue because there was nothing valuable or compromising on the encode servers for them to read. (I think Ubuntu AppArmor stopped it dead in its tracks on its own, anyway.) [0] https://docs.google.com/presentation/d/1yqWy_aE3dQNXAhW8kxMxRqtP7qMHaIfMzUDpEqFneos/edit#slide=id.g22371f2702_0_108 https://docs.google.com/presentation/d/1yqWy_aE3dQNXAhW8kxMx...
- spicyramen 6y agoFfmpeg saved my life when I was troubleshooting some quality issues video calls and customer was about to cancel the contract, we reconstructed the video from packet captures and ffmpeg helped us track the issue to be a H245 media reset that was happening every now and then, ffmpeg was able to detect the fps variation. All free and well documented
- tomaszs 6y agoYears years ago I have used FFmpeg to create a video tutorial website. It worked like a charm on my CentOS VPS. I was able to scale videos uploaded by users to different resolutions, cut out frames for video cover, get size, resolution, convert video to different formats supported by various browsers. It was amazing and only solution available. The project was eventually suspended because of various reasons, but working with FFmpeg was amazing experience and still, when working with videos it is a great solution. Surely FFmpeg impact on today's internet is far bigger than anyone of us can assume. It is for video internet, what mp3 was for audio internet.
- heavyset_go 6y agoffmpeg is great. I've run into more than a few consumer devices that use it for transcoding, which I thought was pretty cool.
- js2 6y agoLiterally just used it today to re-sync the audio and video in some movies I recorded where I needed to add a 210ms delay to the audio. There's no better tool that I know of for doing this, even on macOS: ffmpeg \ -i "$input" -itsoffset "$offset" \ -i "$input" \ -map 0:0 \ -map 1:1 \ -acodec copy \ -vcodec copy \ "$output"
- jedberg 6y agoI'm curious as to how you figured out the audio was 210ms ahead of the video.
- hiq 6y agoPlayers like vlc and mpv allow you to dynamically shift the audio wrt the video while playing, so one can just play around a bit until the perfect setting is found.
- js2 6y agoSo I had recorded my son playing keyboard for a recital. The audio was recorded via MIDI into GarageBand into QuickTime Player. The video was off my iPhone via EpocCam over USB also into QuickTime Player. I was able to get the audio routing setup via a Multi-Output Device I configured in Audio MIDI Setup. The video had a slight delay which I didn’t quite notice till after I’d recorded it. I basically wrote a quick script to generate variations of the recorded movies with delays from 50ms to 500ms in 50ms increments and then just watched each of them to see which appeared most correct for his hands playing the keys and the sound of the notes. It was slightly over 200ms and less than 250ms. 210ms seemed the best. I have now learned the importance of a clapperboard. (Originally I was going to record the audio in GarageBand and the video on my phone and join them later, but I was learning as I went and I wanted to see if I could record the two streams together.)
- jedberg 6y agoThat's an awesome story. > I have now learned the importance of a clapperboard. Ha! Good tip! Never thought about using one when doing recordings of recitals and stuff. Good idea.
- irrational 6y agoSo the Web is 30 years old today and FFmpeg is 20 years old today? Did the creator of FFmpeg purposefully start it on the 10 year anniversary of the WWW?
- oger 6y agoffmpeg is a true swiss army knife. I used it last week to add subtitles to interviews I recorded (via SRT files generated from Amazon Transcription JSON). I also upscaled, so-mo‘d and blurred a video background with some X-Massy theme for some video calls. All literally within minutes and a bit of Google. A true lifesaver!
- mraza007 6y agoThe guy who created this is truly a genius. His software has been really helpful for me And i truly appreciate people who create useful software and open source it
- zadokshi 6y ago^^ upvoting Just in case the author reads this.
- dkh 6y agoFFmpeg is a miraculous tool and I have relied on it for a couple decades now. Beyond the plethora of personal use-cases, it has enabled individuals and smaller companies to possess the same abilities as the bigger guys, who themselves are all pretty much using FFmpeg these days. The only folks who need to build/use alternatives are the platforms at the top of the market and/or with immense scaling needs who are truly pushing beyond the realm of FFmpeg's practical abilities. Twitch is one of those very few, and have been nicely open in discussing it. [1] [2] Couple highlights for my careering using it over the years. The first was when I was working on production and post-production for a small studio that had a popular web series and was just about to transition to their first "big" shows that would be produced for Hulu. This was when 6K raw video was just becoming a thing, we had over 50tb of footage, GPU decoding was brand-new, Windows machines couldn't work practically with Apple ProRes, lots of challenges. I ended up building a system that did things like transcode raw footage into various formats automatically whenever the server noticed there was new footage, automatically collected and stored the metadata from every shot somewhere we could centrally browse/search/filter it, etc. When it came time to deliver, it would automatically create various outputs for the web. We had to deliver ProRes masters in the end and had recently transitioned entirely to PCs. This was around when somebody successfully implemented a pretty good ProRes encoder for FFmpeg, so we were then able to encode and deliver these huge ProRes outputs not only without needing a Mac, but also entirely on our servers, no longer requiring someone's workstation to be hijacked for an entire day to do this. It all may not seem too revolutionary, but there was no way we would've been able to work with the same efficiency, for the same cost, in the same timeframe otherwise. A couple years later, at a new (now defunct) video platform with millions of videos and maybe 5 back-end engineers, FFmpeg allowed us to build our own service to encode all uploads into the many resolutions and formats required. Encoding services were (and still are) very expensive, but in just a couple weeks we had our own that ran on standard Ubuntu server instances, spinning up/down depending on load. Immense cost savings, and not tied to any particular company. Shortly thereafter, GPU instances were available from most cloud providers and `nvenc` was available in FFmpeg, so we were able to dramatically speed up the encode process with maybe a day of work by adding GPU encoding into the mix. These may seem like pretty obvious possibilities now, but it cannot be overstated how insane it was, especially at the time, for tiny and/or cash-strapped teams to be able to do all of this so easily, and that at the tool at the crux of it all, FFmpeg, was completely free. Yes, FFmpeg can be a pain in the ass to figure out, and it's easy these days to take it for granted, but in my opinion it has been truly revolutionary. [1] https://www.youtube.com/watch?v=LsF5bHRxC_M https://www.youtube.com/watch?v=LsF5bHRxC_M [2] https://blog.twitch.tv/en/2017/10/10/live-video-transmuxing-transcoding-f-fmpeg-vs-twitch-transcoder-part-i-489c1c125f28/ https://blog.twitch.tv/en/2017/10/10/live-video-transmuxing-...
- panabee 6y agoFor anyone interested in trying FFmpeg in the browser: https://github.com/ffmpegwasm/ffmpeg.wasm https://github.com/ffmpegwasm/ffmpeg.wasm No affiliation -- found it while searching for browser-based ports of FFmpeg.
- xmichael0 6y agoProps out to Michael Niedermayer, he's been maintaining ffmpeg for years and does the bulk of the heavy lifting! Thanks! https://www.linkedin.com/in/michaelniedermayer https://www.linkedin.com/in/michaelniedermayer
- ggm 6y agoPossibly more --runtime switches than any other command i use
- deleted 6y ago[deleted]
- rootsudo 6y agoWow. I never realized when I started using it it was so new. It's hilarious how my introduction to this taught me so much in terms of codecs and compression. All to just share fansubbed anime.
- Snelius 6y agoAnd still rocks! :)
- ponderingfish 6y agoTHe best video processing and editing tool ever made!
- PostThisTooFast 6y agoAnd Apple is trying to scare people away from using it. Sad.
- BlackLotus89 6y agoI sometimes miss mencoder... I always found it way more intuitive than ffmpeg, but I have to admit that by now I'm more proficient with ffmpeg than I ever was with mencoder. Happy birthday ffmpeg, RIP mencoder. Edit: just realized mencoder seems to be still alive and kicking. Thought it was lost in the transition of mplayer starting to use ffmpeg code -> mpv... Have to take a look at mencoder and if it is as easy as I remember :)