Archive for March 6th, 2010

I love working with Cinelerra, I really do, but sometimes I find myself having to make a few compromises when it comes to getting it to work seamlessly with newly recorded footage. Normally I would have to convert the original video to a format that Cinelerra can edit. From the various cameras I’ve worked with, the original footage has already been compressed, converting it to another format before editing it is unpleasant because it can degrade the quality further.

Canon 7D uses the .MOV container format to hold a h264 encoded video and a 2 channel pcm_s16le encoded audio track together. Works fine when you play it with VLC or run it through some Transcoding tools like Avidemux. With Cinelerra though, it’s somewhat problematic. Although you can import the video file just fine and run it through the timeline, Cinelerra is unable to play the audio portion of the file. Cinelerra is able to read h264 encoded videos separately just fine , likewise for pcm_s15le encoded audio but the problem lies with the container format. Run it through ffmpeg and you’ll get a message like this:

“Seems stream 0 codec frame rate differs from container frame rate: 50000.00 (50000/1) -> 25.00 (25/1)”

At the moment Cinelerra 4.1 only decides to work with the video stream and ignores the audio stream, normally in this case I would extract the audio portion of the file, import it separately into the project and manually attach it to the video file in the timeline but that’s far too tedious to make it worthwhile. Instead, repackaging the file into another container will do the trick. My choice is the Maktroska format, an open source container format similar to MOV, AVI or MP4 but much more flexible in terms of how much media content it can hold and what codecs it supports. You can read more about the format from this Wikipedia article. The important thing to note is that Cinelerra 4.1 does support it.

Canon 7D .mov footage with no playable audio

Changing the container takes only a few seconds with very negligible difference in the size of the original video file and the recently produced MKV file. Most importantly the audio and video content remains untouched. The quickest way of changing the container is through the command line using ffmpeg as the transcoding tool, this command will do the trick:

“ffmpeg -i mvi_8927.mov -vcodec copy -acodec copy mvi_8927.mkv”

Explanation: So here the “mvi_8947.mov” is used as the input file, the video codec ( vcodec ) is to set to copy the input instead of converting to another format, same goes for the audio codec ( acodec ) and finally “mvi_8947.mkv” is the file output with the Matroska video extension. Ffmpeg then goes ahead copies the audio and video portions into a Maktroska file which you can then import into Cinelerra 4.1 . Now we’re able to work with Canon 7D files with both audio and video portions made playable in Cinelerra.

Canon 7D footage repackaged into MKV format, now with audio and weird artefacts in the video preview

But it’s not without its oddities, version of Cinelerra 4.1 has some artefacting issues in the Compositor when the video is paused. Despite this, the artefacting never shows up when played or rendered in Cinelerra. It’s nothing to be too worried about.

Note: This tutorial won’t work with community version of Cinelerra, for the time being Cinelerra 2.1 ( 22nd February 2010 build version ) is unable to read MKV properly for me.

Read Full Post »