How to render H.264

Use the YUV4MPEG pipe as a workaround

Why ?

If you cannot render videos in the H.264 format, you've stumbled over a major bug.
As it turns out, recent versions of libx264 are incompatible with libquicktime - the library Cinelerra-CV uses to render its videos.
There is no fix for this yet - but rendering H.264 isn't completely broken. Please see the instructions below.

How ?

Video and audio have to be rendered separately and -later on- combined into your final video.

To render the video portion of your project, we will use the YUV4MPEG pipe. Your render options have to look like this:


Now open up the additional render options and make sure it's set up like this:


This is the command for easy copy-pasting:

ffmpeg -f yuv4mpegpipe -i - -y -threads 0 -vcodec libx264 -crf 21 -preset medium %

The various switches explained in detail:
  • -threads 0 - depends on the number of your CPU cores
  • -crf 21 - video quality, explained here
  • -preset medium - use this option to control speed<->filesize, also explained here

You can now render your video.

To render audio, choose the following settings:


Now two files have been created - your-video.m2v (video) and your-audio.wav (audio).

You can combine these into your final video file with a program like Tragtor or via command line:

ffmpeg -i your-video.m2v -i your-audio.wav -acodec libmp3lame -ab 192k -ar 48000 -vcodec copy final-video.avi

Can I get more control ?

Yes. The YUV4MPEG pipe even allows you to do multi-pass rendering, which is not available through Cinelerra-CV itself.

Please see:

  • here for a tutorial in English, by Cacasodo (crazedmuleproductions)
  • here for a tutorial in English, by n1njahacks
  • here for a tutorial in English, by
  • here for a tutorial in English, by
  • here for a tutorial in English, by
  • here for a tutorial in English, by ("My steps to making a DVD under Linux")
  • here for a tutorial in English, by ("Compression to mpeg2(mpeg2enc) (DVD release)")
  • here for a tutorial in Dutch, by
  • here for a tutorial in French, by Zigazou
  • here for a patch for Cinelerra, by (in French)
  • here for a video tutorial in Russian by Alexey Korelsky aka snakeonmoon
  • yuv4mpeg pipe through mpeg2enc and yuv4mpeg pipe through ffmpeg sections in the official Cinellerra-CV Manual.