ffmprovisr
ffmprovisr copied to clipboard
compiling from source
Ben mentioned this as a possibility in https://github.com/amiaopensource/ffmprovisr/issues/351
I think that this could come in very handy for those of us who occasionally need to compile things like mediainfo/ffmpeg/rawcooked/dvdrip(!) when testing out a branch or something.
So I'm thinking of the simplest scenarios like:
'If a project has a configure file, you may just need to cd
into the directory that contains the configure script, and run:
./configure && make
and if you wish to install the build so that it is accessible from all folders, you can run
make install
However you may need to have several dependencies installed, such as gcc
, g++
, make
, autotools
etc. You often just have to keep trying and keep fixing each error that pops up. For example you may get an error saying that libtoolize not found
, so a quick google search should let you know how to install that dependency for your operating system. In the case of ubuntu
, it is apt install libtool
.
I think that is a great idea! Maybe a note for make clean
could be helpful too for the times when things take a few tries to get built right.
YES, make clean
has solved my issues a million times. I also notice that mediaarea use autogen a lot, but another tip is that you can often figure out how to build something just by looking at a travis file, for example here's how I build rawcooked: https://github.com/MediaArea/RAWcooked/blob/master/.travis.yml#L44
also here's my awful but effective ubuntu build script for ffmpeg a bunch of other things for when i reinstall ubuntu: https://gist.github.com/kieranjol/116bd33a75cae438cfe125693be50beb
Good idea! It's ages since I've compiled ffmpeg from source - I don't remember specifically, but I assume I just followed the wiki compilation guide. That guide is pretty exhaustive, so there's probably value in having more basic info on compiling from source, preferably something relatively generic that could be applied to other programs than ffmpeg too.
Yeah, maybe the key skill here is just not being deterred by the build failures due to a missing dependency. I think that linux and maybe OSX have it so much easier than Windows in this regard, as you can use package managers to install most if not all major dependencies. I don't think I've ever successfully built anything on windows :(
Ha, I don't think I've ever even attempted to build something from source on Windows. My advice to Windows users would probably be to use the Linux subsystem. 😆
Currently it can be done also under Windows 10 Pro and Home with the apps (Ubuntu and Debian tested here). There are a few additional installations to be done, but after that is works like a charm. We have an installation script that configures our new computer, running under Linux, macOS or Windows. I can prepare a PR after the AMIA conference, when nobody else does it before.
+++++++++++++++++++
I'd like to see this added and also we should mention that paths need to be changed/updated to point to the locally-compiled ffmpeg rather than the one installed via apt or homebrew, etc. I'm doing that right now! ;D
Oh I'll add that I think there is value in presenting this as a thing to do and just pointing towards the resources (above) that help do this. Knowing what can be done and where to go is at least 80% of the battle, imo! :potato:
Update:
status / thoughts on this?
Things are becoming better, but there are still a few issues for an easy cross compiling for all common platforms. (I will possibly meet later this week Carl Eugen in Vienna.)
Tell Carl I say hello!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Update:
- Terminal on Windows 10 works very well now (I presume, it will be officially launched on 28th May with the Version 2004)
This allows to use the same commands on Linux, macOS and Windows!
Update:
- Terminal on Windows 10 works very well now (I presume, it will be officially launched on 28th May with the Version 2004)
This allows to use the same commands on Linux, macOS and Windows!
That's really cool!
If you'd said a decade ago that Microsoft would now be a big proponent of open-source ...
Somethink like
git clone "https://git.ffmpeg.org/ffmpeg.git" <path>
cd <path/folder>
#for <patch>; do git apply <patch>; done
./configure --prefix=/usr/local --enable-shared --enable-version3 \
--cc=clang --enable-gpl --enable-libfreetype --enable-libmp3lame \
--enable-librubberband --enable-libtesseract --enable-libx264 \
--enable-libx265 --enable-libxvid --disable-lzma --enable-libopenjpeg \
--disable-decoder=jpeg2000 --extra-version=$(date +'%F')
make -j <threads>
make -j <threads> install
make clean
with a few explanation would fit?