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:

render-pipe-video.png


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

render-pipe.png


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:

render-pipe-audio.png


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: