← Back to context

Comment by ghgr

6 hours ago

> Oh there's a new version of ffmpeg, I'll just quickly build it from source... no I can't wait I'll download the binary

https://www.youtube.com/watch?v=9kaIXkImCAM

For anyone vaguely familiar with ffmpeg, don't sleep on this video. Quite funny, and everything from `yadif` (which I dealt with today!) to mkvtoolnix to "But then it will explode if you have an apostrophe in your file name. Because it doesn't understand that."

I tend to build ffmpeg from source because package managers don't usually include support for patented codecs.

(Yes I know there are repos to get binaries for some, things like deb-multimedia.)

Building ffmpeg itself from source is actually quite easy.

The hardest part IMO is getting the necessary codecs to work; this can take a little while. If you know what audio and video codecs you want and need, and if you get them installed properly, then compiling ffmpeg is really simple and straightforward. It works almost always for me, and I have compiled ffmpeg from source for like +10 or even +15 years.

For reference purposes, my current configure options are:

  ./configure --prefix=/usr/ --enable-gnutls --enable-gpl --enable-libmp3lame --enable-libaom --enable-libopus --enable-libspeex --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-nonfree --enable-pthreads --enable-shared --enable-version3 --extra-libs=\"-ldl\" --disable-doc --disable-libopenjpeg --disable-libpulse --disable-static

Probably more codecs could be added, and some options may not be necessary anymore (I changed this last ... years ago, too), but this works for the most part fairly well.

One focus I have is mostly on a few .mp4 files, and for these I think you kind of want x264 x265 and so forth (I think one more codec from google too or so). But it is really quite trivial once you are past the codecs step. You can also start simple with just a few codecs, e. g. one good audio codec and one good video codec. One reason I like to have ffmpeg support many codecs is so I can use mpv, which in itself is really awesome; I like it more than vlc, which is also ok though.

  • quite easy? like learning to draw an owl?

    getting the stock ffmpeg to compile/build might be "easy", but once you start adding on additional codecs and other features that get you into dependency nightmares "easy" is not the word I would use. I have not been able to use the stock ffmpeg since forever. for example, i see no openssl enabled in your config. I see no freetype. I see you've disabled openjpeg. clearly, you and i use ffmpeg differently which just goes to show your "easy" is very misleading