Saturday, 13 November 2010

Editing videos from a Pentax Optio M40 camera

In a previous post I have a link to a Vimeo video, which was created by:
  1. recording a video with my Pentax Optio M40 camera
  2. cutting the beginning and the end of the video with the PiTiVi software
PiTiVi is not the video editing software that I would choose to do anything serious, but I had a problem with Kdenlive and OpenShot: the audio and video would be out of sync when importing the clip to any of them; but worse still, after cutting the beginning of the video, the problem just got much worse, and the audio would be out of sync by around a full second. With PiTiVi it was also out of sync, but only by a fraction of a second, so it was not too bad.

Today I decided to find a solution to this, so that I could edit the clip with Kdenlive, which is right now my preferred video editing software. The solution seems to use an intermediate software to create the clips to be imported to Kdenlive: Avidemux.

I just load the AVI file from the camera in Avidemux, select the starting and end points of the clip I want to use, and press the "Save" button. A screenshot can be seen here:

Then this clip can be imported into Kdenlive, without any synchronization problems. With Kdenlive we can now add a title, add effects, etc. and if we want a decent quality we can render it as the template MPEG-4 10000k 2-pass (which translates to:
f=mp4 acodec=libmp3lame ab=128k ar=44100 vcodec=mpeg4 minrate=0 b=10000k aspect=%dar mbd=2 trellis=1 mv4=1 pass=2).

The resulting file has perfect synchronization and can be uploaded to Vimeo without any problems and with much better quality than the one generated in my previous post. Here is the resulting video.

No comments: