logoalt Hacker News

ghgryesterday at 4:08 PM6 repliesview on HN

> 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


Replies

alfgtoday at 1:32 AM

Building ffmpeg can be simple or complex, depending on how you configure the dependencies and if it's dynamic or static and of course it's target outputs.

I'm currently working on a cross-platform builder that runs within Github Actions runners, but the Mac and Windows builds take up so many of my monthly minutes.

https://github.com/video-commander/ffmpeg-builder

I'm using this as part of another multimedia app I'm working on for video engineers.

asveikauyesterday at 4:42 PM

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.)

nrhktoday at 1:46 AM

I had to build from source because of that CVE that dropped, couldn't do it so I just wrapped the whole thing and injected my own -version command, passed the scanners cleanly

Amorymeltzeryesterday at 5:49 PM

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."

shevy-javayesterday at 4:47 PM

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.

show 2 replies
blellyesterday at 6:35 PM

emerge ffmpeg ;)