Thursday, February 11, 2010

compiling Cinelerra on Fedora 12, x86-64 from source

Happily, I'm over the hurdle with my server rebuild from Fedora 10 to Fedora 12 and have successfully built Cinelerra from source on my Fedora 12, x86-64 box! Yes!

The install was generally smooth, with the exception of a minor glitch: as aac encoding is proprietary, ffmpeg does not include faac support. Doh! So, you'll need to compile and install ffmpeg with faac support from source as per these excellent instructions from Doran:
http://fozzolog.fozzilinymoo.org/tech/2009/11/recompiling-ffmpeg-for-fedora-12-to-add-faac-support.html

RPM Fusion Yo!
Note that you'll need both the free and non-free repositories from RPM Fusion enabled in yum. Don't use the ATrpms repos if you're going to compile from source. I've had strange system problems when I've used them in combination with the Fusion repos.

So here's the deal..

Summary Steps to Installing Cinelerra from Source
  1. download source code
  2. install dependencies for ffmpeg compile
  3. compile ffmpeg with faac support for fedora 12
  4. install rest of Cinelerra dependencies
  5. compile cinelerra

Detailed Steps to Installing Cinelerra from Source
1. Get the Cinelerra source code
git clone git://git.cinelerra.org/j6t/cinelerra.git my_cinelerra

2. Install dependencies for ffmpeg compile
Feel free to use the following script (don't forget to chmod a+x it!):
yum install dirac-devel faac-devel faad2-libs gsm-* imlib2-devel lame-libs* libdc1394-devel libvdpau-devel openjpeg-devel schroedinger-devel speex-devel texi2html x264-* xvidcore-* yasm

3. Compile ffmpeg with faac support

Highlights
[sodo@computer ~]$ yumdownloader --source ffmpeg

[sodo@computer ~]$ rpm -ivh ffmpeg-0.7.6-1.fc15.src.rpm

[sodo@computer ~]$ vi rpmbuild/SPECS/ffmpeg.spec
[sodo@computer ~]$ rpmbuild -ba ~/rpmbuild/SPECS/ffmpeg.spec --with faac

[sodo@computer ~]$ cd rpmbuild/RPMS/
[sodo@computer RPMS]$ cd x86_64/
[sodo@computer x86_64]$ ls -ltr
total 39164
-rw-rw-r--. 1 sodo sodo  259049 Dec 18 14:56 ffmpeg-0.7.6-1.fc15_fozz.x86_64.rpm
-rw-rw-r--. 1 sodo sodo 3138877 Dec 18 14:56 ffmpeg-libs-0.7.6-1.fc15_fozz.x86_64.rpm
-rw-rw-r--. 1 sodo sodo  166417 Dec 18 14:56 ffmpeg-devel-0.7.6-1.fc15_fozz.x86_64.rpm
-rw-rw-r--. 1 sodo sodo 9860213 Dec 18 14:56 ffmpeg-debuginfo-0.7.6-1.fc15_fozz.x86_64.rpm
[sodo@computer x86_64]$ sudo rpm -Uvh ffmpeg-libs-0.7.6-1.fc15_fozz.x86_64.rpm ffmpeg-0.7.6-1.fc15_fozz.x86_64.rpm ffmpeg-devel-0.7.6-1.fc15_fozz.x86_64.rpm ffmpeg-debuginfo-0.7.6-1.fc15_fozz.x86_64.rpm
[sudo] password for sodo: 
Preparing...                ########################################### [100%]
   1:ffmpeg-libs            ########################################### [ 25%]
   2:ffmpeg                 ########################################### [ 50%]
   3:ffmpeg-devel           ########################################### [ 75%]
   4:ffmpeg-debuginfo       ########################################### [100%]


4. Install rest of Cinelerra dependencies
Feel free to use the following script (don't forget to chmod a+x it!):
yum install gsm-devel libvorbis* libogg* libtool* libtheora* libpng* libjpeg* libtiff* esound* audiofile* libraw1394* libavc1394* freetype* fontconfig* nasm e2fsprogs* OpenEXR* fftw fftw-devel libsndfile* libiec61883* libdv* libquicktime ffmpeg xvidcore* lame lame-devel a52* faad2* x264* mjpegtools* faac* vlc*

5. Compile Cinelerra
If you used the same default directory when you downloaded the source code, cd into that directory and type:
./autogen.sh

This will build your configuration files. Next, to configure Cinelerra with default options, type:
./configure

If you want to customize your configuration, just type "./configure --help". At which point, configure will spill its guts to you about all the Secrets of Cinelerra.

Then, to compile the code, run:
make

If you have multiple processors, you can even run "make -j N" where "N" is the number of processors you have minus one.

Finally, if make was successful or you are just feeling good about yourself, go ahead and install Cinelerra:
make install

Hopefully, this post has gotten you started on your way to using Cinelerra, Linux's "50,000 watt flamethrower of multimedia of editing"

Much thanks to Jack Crossfire, our patron saint of compositing code.

the mule

Reference
Don't forget to read the manual!

14 comments:

jona said...

How can you upgrade the compiled cinelerra?

Cacasodo said...

I'm not sure what you're asking. However, #1 - you can't upgrade or change a compiled version of Cinelerra.

#2 - if you've already installed a compiled version of Cinelerra (either the CV version (cvs.cinelerra.org) or the heroinewarrior.com version), but want to change something with the software, you'd want to deinstall it. After deinstalling it, download the source code, change it to your liking and compile that.

Dennis said...

'If you have multiple processors, you can even run "make -j N" where "N" is the number of processors you have minus one.' Number of processors/cores *plus* one. E.g. For dual core -j3.

Cacasodo said...

Dennis,
Indeed! My other post relates to that very fact:
/2010/01/compile-times-performance-improved.html

Robert Olmstead said...

Hi, I'm also a Fedora man but in distribution number 13 -

I saw that Cinelerra was by default in this rpms repository :

>>> http://packages.atrpms.net/
for Fedora 13 and 14 (and even the 15!)

may be interesting people inc ase of update or to study the rpms composition.

Alban

Cacasodo said...

Alban,
Good call; however, as I called out in the top of this post, be careful of ATRpms. I had a boatload of incompatibilities when using ATRpms software as basis for compiling Cinelerra. I suppose, tho, that if you were to download the Cinelerra package only from ATrpms, you'd be OK. Just don't mix RPM Fusion and ATrpms softwares.

Maybe the situation has changed in the last few versions, but previously, mixing the two became a nightmare.

Robert Olmstead said...

Thanks for the information, in fact Iwas thinking to do my own Fedora distro (through Revisor)including only "movie making softwares" (Developement, Pre-production, production, post-production and distribution ones and EXCLUDING all the rest) and add after manually the ones which are not in the rpms library (like Cinelerra)

Do you know if this was already done? And do you recommand this solution?

Alban

Cacasodo said...

Alban,
That's always a good idea..provide a Live CD of sorts through Revisor with the latest Fedora version and associated tools. I've tended to approach this using virtual machines. For instance, a couple years ago, I built a Fedora 10, 64-bit box that has all the compile tools for Cinelerra including media players and encoders:
http://crazedmuleproductions.blogspot.com/2009/05/vmware-virtual-appliance-for-video.html

I don't have much experience with Revisor, so I'm not sure about the level of effort involved there. My experience with VMware or Virtual Box is that the virtual machines are fairly easy to setup. The hosting and distribution of the large VM file is another matter. ;) And I do like the ability to spin up a VM within your already running OS.

Food for thought,
'sodo

rubS said...

Hi, Cacasodo.

I have already done your steps on Fedora 15, but when I run configure, I receive this message at the summary:

"libx264 libraries missing"

But I have installed "x264-devel" and "x264-libs". Do you know what could be done? Thanks.

Cacasodo said...

Hey Rub,
Hmmm..offhand, I'm not sure. I did encounter that issue. Can u at least run "x264" at a prompt?
Mule

Hai Le said...

Thank you a lot. I have installed Cinelerra successfully on my Fedora KDE 14.

Cacasodo said...

Hai,
No problem. Glad you found what you needed!
'sodo

Gregory Hildstrom said...

Thanks a ton for posting this. It's still relevant and very helpful for getting Cinelerra working on Fedora 18. I only ran into a couple snags. Here's what I did differently:

* yum install autoconf automake gcc
* yum install ffmpeg instead of compiling it from scratch
* yum install libpng-devel instead of libpng*
* yum install gettext-devel gcc-c++ libXv-devel libuuid-devel

Cacasodo said...

Thanks Greg..appreciate the update!
cm