Friday, December 16, 2011

Edit AVCHD files (*.mts) with Blender or Cinelerra::Convert .mts to DNxHD .mov

AVCHD (*.mts and *.m2ts files) are tough to handle in Blender VSE, or Cinelerra, especially 1440x1080 anamorphic interlaced files. (produced by Canon LEGRIA HF R16)

Using an intermediate file format, better suited for video editing, works for both, Blender and Cinelerra.

Cinelerra (a dedicated NLE) has come long ways, and the community version offers a lot of features, I still find it buggy at times. (has good potential though)
Blender VSE, very professional, but it has a very high learning curve. (so much more than a dedicated NLE)


My camera produces 1440x1080 50i anamorphic video files. (*.mts)
Before importing into Blender or Cinelerra, convert the clips to an intermediate file format as follows.

1. Convert the clips to a AVID file, and Convert to 1:1 square pixels.

ffmpeg -i inputclip.mts -vcodec dnxhd -b 185M -s 1920x1080 -aspect 16:9 -deinterlace -r 25 -acodec pcm_s16be outputclip.mov

This will produce a very large file at 1920x1080 resolution and 25 frames progressive, with square pixels, 16:9 display aspect ratio.

2. Import the converted clips in Blender or Cinelerra to process.(create your master piece :-) )

3a Using Blender you can save the rendering in a format of choice (I prefer xvid or h264)
3b Using Cinelerra, you currently can't export to h264 direct (well I couldn't) So you have to use a 2 step system where you save your video and audio stream separate, and mux them together with with ffmpeg. (still in an intermediate format) 

4. Final step if you were using Cinelerra: Encoding with ffmpeg to produce size and quality desired for your application. (not covered here)

No comments:

Post a Comment

Please be courteous, even if you do not share the same view.