Sunday, May 29, 2011

Fedora 15 cinelerra install works, breaks MP2

Fedora 15, x86-64 Cinelerra CV install from source
The Fedora 15, x86-64 installation of Cinelerra went well. I followed my previous Fedora 12, x86-64 installation instructions from my document here:
http://crazedmuleproductions.blogspot.com/2010/02/fedora-12-x86-64-cinelerra-install.html

The same instructions apply, along with the RPM build of FFMPEG for libfaac, the Apple Audio Codec.

Remove Video for Linux and IOMega Buzz drivers
Before I compiled the latest Cinelerra CV, I had to patch the codebase to remove Video for Linux and IOMega Buzz drivers, as they are not supported under the kernel (kernel 2.6.38) that Fedora 15 runs under. Here is the patch:
http://e.kevb.net/lurker/message/20110522.154000.ac0bc424.en.html

MPEG2 audio rendering broken
Once I got the code compiled, I tried reading and encoding video. An immediate problem I noticed is that MPEG Layer II encoding is broken. The rendering output gives no indication that there is a problem:
Input File : 'stdin' 48.0 kHz Output File: '/home/sfrase/videos/stormpigs/2010_12_28/testmp2monty_384.m2a' 384 kbps MPEG-1 Layer II j-stereo Psy model 1 [De-emph:Off Copyright:No Original:No CRC:Off] [Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off] ATH adjustment 0.000000 -------------------------------------------- encode_init: using tablenum 0 with sblimit 27 Hit end of audio data Avg slots/frame = 1152.000; b/smp = 8.00; bitrate = 384.000 kbps Render::run: Session finished.

However, both mplayer and ffplay spit out similar messages that the MP2 has a header missing:
mplayer
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 384.0 kbit/12.50% (ratio: 48000->384000)
Selected audio codec: [ffmp2float] afm: ffmpeg (FFmpeg MPEG layer-1 and layer-2 audio)
==========================================================================
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)
Video: no video
Starting playback...
[mp2float @ 0x327153c6a0]Header missing
[mp2float @ 0x327153c6a0]Header missing
A: 0.0 (00.0) of 342.7 (05:42.6) ??,?%


FFplay
Input #0, mp3, from 'testmp2monty_384.m2a':
Duration: 00:05:42.67, start: 0.000000, bitrate: 384 kb/s
Stream #0.0: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
[mp2 @ 0x7f27c8000af0] Header missing


Playing back the audio is garbled. This isn't a deal breaker, but it is a little upsetting. I thought I might escape it this time, but I guess I will have to bite the bullet and compatibility test all my Cinelerra file formats with Fedora 15.

Compiling Cinelerra Monty from source
Since Cinelerra CV worked at a basic level, I wanted to compile my preferred Cinelerra distro, Cinelerra Monty:
http://crazedmuleproductions.blogspot.com/2010/07/green-beret-parachutes-in-to-help.html

However, this codebase also needed the updates to remove Video for Linux and IOMega Buzz drivers. Since Monty's code base differs from CV, I had to manually patch the code myself using the instructions above. Once that was complete, I was able to successfully compile CinMonty.

References
http://bugs.cinelerra.org/ticket/949
Nicola's patch
Creating a patch using Diff

2 comments:

Robert Olmstead said...

Not sure that is the right place for the comment but I joined the Apertus community which goal is: " to create a powerful, free (in terms of liberty) and open cinema camera" In their sitre there is an interesting article - GPL Workflow - (http://cinema.elphel.com/es/node/60) about a research for a disgital workflow under Linux... with Cinelerra of course. Hope that will interest you

Robert Olmstead

Cacasodo said...

Cool..thanks for the article, Robert! Looks like another crazy guy doing video production on Linux.

peace,
cm