sudo apt-get install ffmpeg
|
NOTE: This website is alive and growing.
RenderingTable of Contents
How to use the Render dialog
How to stop renderingTo interrupt a rendering operation in progress click on the cancel operation cross-shaped button on the bottom right of the program window. How to choose the format for renderingThe list of formats you can choose for rendering is overwhelming. In fact you can do all your tasks with just a few formats, to be chosen depending on your target. Unlike image formats, a video format is just a container. It contains a few streams, usually the audio stream and the video stream. Audio and video streams are encoded using different and various methods. Any specific method is called codec. A video format can contain different codec types. So when you choose the format for your video, you must choose also the codecs for the streams. Here is a list of the recommended formats (and video codec/audio codec) for the most common uses:
When choosing the format also take in account that:
How to create a Master fileSometimes - especially if you have an HD project - it can be useful to render a high quality copy of your project as a master from which to derive different files for different uses (internet, DVD…). You create a master file in different ways. This is what I recommend to Grandmas: High quality (and big size)Open the render dialog and select the following parameters:
Make sure both audio and video checkboxes are checked.
Click on the Save profile button. You’ll find the saved setting in the Render profile dropdown menu for future re-use.
Maximum quality (and huge size)Open the render dialog and select the following parameters:
Make sure both audio and video checkboxes are checked.
Click on the Save profile button. You’ll find the saved setting in the Render profile dropdown menu for future re-use.
How to render you project to OGG formatOpen the Render dialog and choose OGG Theora/Vorbis as File Format. You can improve the video quality clicking on the Configure video compression wrench icon and moving the Quality slider, but remember that you are increasing the file size as well. As a guide, I just rendered 30 sec of MiniDV footage for you. Have a look at the file size (the smaller the better) and the bitrate (the higher the better quality) I got for some slider positions:
Selecting Fixed quality instead of Fixed bitrate decrease the file size with no quality loss. How to render you project to DVDV format needs at least one video track and two audio tracks. If you have no audio tracks or only one, just add empty tracks with the Audio→Add track menu. Only projects with resolution of 720x576 pixels and a framerate of 25 fps (PAL) can be rendered to Raw DV (or 720x480 pixels at a framerate of 30 fps for NTSC). Open the Format dialog with Settings→Format and make sure you project has PAL or NTSC settings. Then:
How to put you movie back to MiniDV tapeThis is a very easy thing to do thanks to that nice application called Kino. You can install it with Synaptic.
How to render your project to DVD-compliant formatIf you want to make a DVD out of your movies, you need your files in VOB format that is very much like standard MPEG-2. Cinelerra can’t render your project directly into VOB format. She need the help of other program-friends. Here are two possible ways of getting a DVD-compliant file, ready to be used in DVD authoring programs. From CinelerraYou have to render audio and video in Cin separately and then use ffmpeg to unite (mux) the two streams and produce a single DVD-compliant file. ffmpeg is a command line application that you use by typing in the terminal instead of clicking on icons. It’s much easier than it looks and is very flexible (e.g. you can change standard).
You final file mymovie.mpg is a VOB-like file that can be used for DVDs.
Converting from another formatIn some cases you might want to create your DVD-compliant file by conversion from another format. Render your project to a Master file first (Raw DV is OK for SD projects). Then convert your master file using one of the following recipes. As often happens, working with the GUI might seems friendlier, but using the command line is quicker and often ensures better results. Using the command line - ffmpeg
ffmpeg -i mymasterfile.mov -target pal-dvd mydvdcompliantfile.mpg
ffmpeg -i mymasterfile.mov -target ntsc-dvd mydvdcompliantfile.mpg Using the Graphical User Interface (GUI) - KinoThis recipe is recommended for DV files only. If you have another format, Kino will convert your file to DV first, adding an unwanted conversion.
This final file mymovie.mpeg is a VOB-like file that can be used for DVDs. Using the Graphical User Interface (GUI) - DeVeDe
The resulting file will have an odd name (something like movie_01_01.mpg). Rename and move it at will. How to mux audio and video stream changing standardWhen muxing audio and video streams for DVD, you can also change standard in the same pass using one of the following commands:
ffmpeg -i mymovie.ac3 -i mymovie.m2v -target ntsc-dvd -r ntsc -s 600x480 -padleft 60 -padright 60 mymovie.mpg
ffmpeg -i mymovie.ac3 -i mymovie.m2v -target pal-dvd -r pal -s 720x480 -padtop 48 -padbottom 48 mymovie.mpg How to join (concatenate) several files into a single oneFor a better Cinelerra workflow, it is recommended to keep your projects as small as possible, splitting it in several separated scenes, edited and rendered separately. Scenes can be joined afterwards. Since formats are technically different, every format has its own concatenation method. Concatenating is always much quicker than rendering, since it is just a particular kind of copying. RawDV filesThe DV format compresses the frames individually and the concatenation is very straightforward. Using CinelerraYou can load in Cinelerra all your just rendered .dv scenes in one single move. Just select all your files and use the Replace current project and concatenate tracks insertion method from the Load dialog. Your files will be loaded in alphanumeric order. Render this temporary project to RawDV. This will be no real rendering, with no preview in the Compositor. Using the Command Line - catAs usual, the command line is the quickest way to go. cat is a command for conCATenating files. For other uses of cat see the Linux Information Project. Here is a terminal command you can use. Replace the filenames with the names of your video files. cat myfile1.dv myfile2.dv myfile3.dv > mytotalfile.dv The quickest way of writing the list of files to be joined is:
If a file exists with the same name of the destination file, that file will be mercilessly overwritten with no warning. OGG Theora/Vorbis filesOgg Theora video files have timestamps in them, on which some players rely. If you join the files using cat the timestamps are not correctly altered and the players may throw errors. Compiling and using Ogg Video ToolsTo properly join OGG files you need a little utility Ogg Video Tools. Unfortunately you can’t install it with Synaptic. Actually you have to compile it yourself. Don’t panic: it will be painless and quick.
Congratulations! You have now Ogg Video Tools installed. To join your OGG files, simply use the following command: oggCat completefilm.ogv 'scene1.ogg' 'scene2.ogg' 'scene3.ogg' Note:
DVD-compliant .mpg video filesIf you are going to put your video on a DVD be aware that:
Using the Graphical User Interface - AvidemuxAvidemux can be easily installed using Synaptic Package Manager. It will be listed under Applications → Sound & Video menu.
Check that during encoding the streams are just copied (and not re-encoded) and the Container is MPEG DVD. The operation is usually pretty quick. If the encoding seems stuck it is possible that you have not enough space left on disk. Always check that all the files are appended. The resulting .mpg file is a DVD compliant MPEG-2 video streams and can be used for DVD authoring. How to render your project for Vimeo (MPEG4 h264/ACC)Files encoded with h264 video codec and ACC audio codec, wrapped in a MPEG4 container format have very small size and very good quality. That’s why they are Vimeo favorites. See the Vimeo Compression Guidelines. Pity they are proprietary formats. Unfortunately Cinelerra rendering to h264 is broken. Waiting for this bug to be fixed, here is a workaround: you can render to Raw DV (SD only), to a High Quality Master file (MOV container with MJPEG/MPEG-4 Audio), to a Maximum Quality Master File (MOV container with uncompressed video) or to DVD-compliant MPEG-PS (MPEG2/AC3) and then convert the resulting file. For the first steps see How to create a Master file or How to render your project to DVD-compliant format. For the conversion, you can use the command line (ffmpeg) or the GUI (Handbrake or Avidemux). It is recommended you resize the video to the size preferred by Vimeo, so to enjoy the full quality offered by that hosting site. The converted/resized file can be uploaded to Vimeo. You may want to add it to the Cinelerra Vimeo Group. Using the Command Line (CL) - ffmpegffmpeg is very tolerant and so kind to work with any format. Install ffmpeg with the following terminal command: sudo apt-get install ffmpeg To convert your master file, use one of the following commands, adjusting the input filename master.mov and the output filename ReadyForVimeo.mp4 to your case. For standard definition 4:3 video: ffmpeg -i master.mov -ab 320k -ar 44100 -vb 2000k -vc libx264 -s 640x480 -aspect 4:3 ReadyForVimeo.mp4 For standard definition 16:9 video: ffmpeg -i master.mov -ab 320k -ar 44100 -vb 2000k -vc libx264 -s 640x360 -aspect 16:9 ReadyForVimeo.mp4 For high definition 720p video: ffmpeg -i master.mov -ab 320k -ar 44100 -vb 5000k -vc libx264 -s hd720 -aspect 16:9 ReadyForVimeo.mp4 For high definition 1920×1080 video: ffmpeg -i master.mov -ab 320k -ar 44100 -vb 5000k -vc libx264 -s 1920×1080 -aspect 16:9 ReadyForVimeo.mp4 Let’s have a look at the ffmpeg options. -ab 320k: sets the audio bitrate to 320k -ar 44100: sets the audio samplerate to 44100 -vb: sets the video bitrate to 2000k for SD and to 5000k for HD. This is the main parameter for image quality. The higher the better, the higher the bigger. Be careful: if you go over the given limits, Vimeo might not upload you file. -vc libx264: sets the target codec to h264 (using x264, the free software library for encoding video streams into the H.264/MPEG-4 AVC format) -s: sets the size (resolution) to 640x480 pixels for 4:3 SD, to 640x360 for 16:9 SD, to 1280x720 for 720p HD and to 1920×1080 for full HD. -aspect: sets the display aspect ratio to 4:3 or 16:9. This option is needed only to fix the MOV master file aspect ratio issue (see above).
Using the Graphical User Interface (GUI) - HandbrakeTo install Handbrake, copy and paste the following terminal commands, one at the time: sudo add-apt-repository ppa:stebbins/handbrake-releases sudo apt-get update sudo apt-get install handbrake-gtk
Handbrake will be available from the Applications → Sound & Video menu (Gnome) or in the Application lens (Unity). You can convert your file in 10 steps:
While you wait for the conversion to finish you you can save for future use the parameters you’ve just set.
Using the Graphical User Interface (GUI) - AvidemuxAvidemux works best with DVD-compliant MPG files. MOV and DV master files are not supported. Avidemux can be easily installed using Synaptic Package Manager. It will be listed under Applications → Sound & Video menu.
Video:
Audio:
Format:
Click on Save and select your output file. Clicking on the Save button at the bottom will start the conversion. This will take sometime, depending on the filesize. ResizingVimeo recommended resolutions are: 640x480 for 4:3 SD video, 640x360 for 16:9 (wide) SD video, and 1280x720 for HD. In particular to enjoy the beauty of the HD Vimeo quality you need to upload a video with exact resolution of 1280x720 pixels. Unless your video has already one of those resolutions, you need resizing. That can be tricky especially if you have weird resolutions just like I have (1056x704). You can resize with ffmpeg. Note that the padding commands have changed in ffmpeg since Ubuntu 11.10. For HD files with resolution close to 1280x720 (e.g.: 1056x704) ffmpeg -i 'file.mp4' -acodec copy -sameq -vf scale="-1:720",pad="1280:720:(ow-iw)/2:(oh-ih)/2" Vimeo720p.mp4 For SD 4:3 (normal) files ffmpeg -i 'file.mp4' -acodec copy -sameq -vf scale="640:-1",pad="640:480:(ow-iw)/2:(oh-ih)/2" Vimeo4:3.mp4 For SD 16:9 (wide) files ffmpeg -i 'file.mp4' -acodec copy -sameq -vf scale="-1:360",pad="640:360:(ow-iw)/2:(oh-ih)/2" Vimeo16:9.mp4
You can upload the resulting file to Vimeo. How to render your project for your friend’s Mac computerTo show your masterpiece to your friend you must render your project to a format playable on his/her computer. Method one: mymasterpiece.mpg Apple QuickTime Player has no DVD decoder (MPEG-2 decoder) by default. It is an add-on sold separately. However most computers with a DVD player device have also the MPEG-2 decoder installed and are able to play DVD-compliant files. For instructions on rendering your project into DVD-compliant format, see How to render your project to DVD-compliant format. This method ensure a good quality. Method two: mymasterpiece.mov You can re-encode your video file into the QuickTime format using ffmpeg, a command line program. The package available in Synaptic doesn’t support the encoding of AAC audio codec, so you need to compile ffmpeg yourself. For instructions on compiling ffmpeg from source code see this this dedicated page. To convert your file use the following command.Replace mymasterpiece.ext with the filename and the extension of your video. ffmpeg -i mymasterpiece.ext -sameq mymasterpieceformac.mov Method three: mymasterpiece.ogg Tell your friend to download (here) and install the current stable version of Xiph, the free QuickTime Component that makes any QuickTime-based application be able to play Ogg Theora/Vorbis encoded files. For instructions on rendering your project into OGG Theora/Vorbis format, see How to render your project to OGG format. Method four: mymasterpiece.ogg Make your friend happy and tell him/her to download (here) and install VLC, the open source media player that support virtually every video and audio format. S/he will be very grateful. You can then render to any format. DVD-compliant files have a good quality but quite a big size. I recommend OGG: it’s an open format, you still get reasonably good quality but with a smaller file size. For instructions on rendering your project into OGG Theora/Vorbis format, see How to render your project to OGG format. How to render your project for your friend’s Microsoft Windows computerTo show your masterpiece to your friend you must render your project to a format playable on his/her computer. Method one: mymasterpiece.mpg Windows Media player has no DVD decoder (MPEG-2 decoder) by default. It is a plug-in sold separately. However most computers with a DVD player device comes with the MPEG-2 decoder preinstalled and are able to play DVD-compliant files. For instructions on rendering your project to DVD-compliant format, see How to render your project to DVD-compliant format. This method ensures a good quality. Method two: mymasterpiece.avi You can re-encode your video file into a format supported by Windows Media Player using ffmpeg, a command line program. This methods will slightly decrease quality and increase size. The resulting file format is not supported in Cinelerra. Install ffmpeg. In Ubuntu, just open a terminal and type: sudo apt-get install ffmpeg Copy and paste in the terminal the following command. Replace mymasterpiece.ext with the filename and the extension of your video. Press ENTER to start the encoding. ffmpeg -i mymasterpiece.ext -vcodec msmpeg4v2 -sameq mymasterpieceforwin.avi Note: If you have compiled ffmpeg and extended the codec support (see this dedicated page), you can use also the following command: ffmpeg -i mymasterpiece.ext -vcodec msmpeg4v2 -acodec libmp3lame -sameq mymasterpieceforwin.avi Method three: mymasterpiece.ogg Tell your friend to download (here) and install the current stable version of Directshow filters, the free plug-in that makes Windows Media Player be able to play Ogg Theora/Vorbis encoded files. For instructions on rendering your project into OGG Theora/Vorbis format, see How to render your project to OGG format. Method four: mymasterpiece.ogg Make your friend happy and tell him/her to download (here) and install VLC, the open source media player that support virtually every video and audio format. S/he will be very grateful. You can then render to any format. DVD-compliant format has good quality but quite a big size. I recommend OGG: it’s an open format, you still get reasonably good quality but with a smaller file size. For instructions on rendering your project into OGG Theora/Vorbis format, see How to render your project to OGG format. |