YUV4MPEG to MPEG-2

If you edited a movie with Cinelerra (video editing software) and you want it burnt on a DVD, the best way probably is to render and save the movie as a YUVMPEG file, and then convert this YUVMPEG file to a DVD compatible MPEG-2 file. Audio is usually rendered as AC3 and can be added (multiplexed) later.

option 1

In this example we use a low quality video bitrate of 1100kbits/sec, while scaling to 352x288 at a 4:3 aspect ratio (--export_asr 2). For better quality use a much higher bitrate and a resolution of 720x576 pixels. The video is assumed to be interlaced with top field first (--encode_fields t).

transcode -i infile.m2v -y ffmpeg -F mpeg2 -Z 352x288 --export_asr 2 --encode_fields t -o outfile -w 1100

Please note that the suffix of the output file is added automatically. The example above creates a file called outfile.m2v.

option 2

Here is an alternative way to do it. We will pipe the YUVMPEG to a script calling mpeg2enc (from the mjpegtools package) instead of transcode / ffmpeg. Create a file called cine_render.sh with the following content:

#/bin/bash

mpeg2enc -v 0 -M 4 -K tmpgenc -r 16 -4 1 -2 1 -D 10 -E 10 -g 15 -G 15 \
   -q 6 -b 8600 -f 8 -o $1

The -b option specifies the bitrate and -M specifies the number of threads (in this example it is 4, for use on a quad core processor). Make it executable (chmod 700 cine_render.sh) and in cinelerra, use the "Use pipe" option with the following command:

cine_render.sh %

(the percent sign will get replaced automatically by the output filename).

This approach assumes the video is already scaled to the correct size. For PAL it should be 720x576 pixels.