High Definition Video

From MEPIS Documentation Wiki

Jump to: navigation, search

With Hi-Definition Video (AVCHD) fast becoming the norm, it is important to be able to convert the video and view it with Mepis.

You will need a version of mencoder greater than or equal to 2:1.0rc2svn20081229-0.1mlrepo1

Download the video from the camera to a folder in your home folder open a konsole window displaying the contents of the folder (press F4 when viewing the contents of the folder with Konqueror)

Copy and paste the following code into the konsole window, replacing input.mts with the name of the file you want to recode and output.avi with the name of the file you want to create.

Pasting is easily achieved by clicking once in the konsole window with the left mouse button, then using the scroll wheel as a button to click (paste) the command into the konsole. The first line will run as soon as you have clicked the scroll wheel, (or middle mouse button), when the first pass has finished, press return (enter key on keyboard) to run the second pass and enter again to remove the log file.

2-Pass Encode for midrange systems

mencoder input.mts -o output.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=8000:vpass=1:turbo -fps 50 -vf scale=1280:720
mencoder input.mts -o output.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=8000:vpass=2 -fps 50 -vf scale=1280:720 
rm ./div*.log

2-Pass Encode for older computers

mencoder input.mts -o output.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2500:vpass=1:turbo -fps 50 -vf scale=960:540
mencoder input.mts -o output.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2500:vpass=2 -fps 50 -vf scale=960:540
rm ./div*.log

You may have to adjust the scale to match your cameras aspect ratio. This is for cameras that record at 1920x1080, a 1.7777 aspect ratio. Other cameras record at 1440x1080, which has a 1.3333 aspect ratio, so you could use scale=960x720

Different models of cameras also may record at various framerates, so you might have to adjust the -fps parameter to match.

If you don't want to do a 2-pass encode, delete the vpass=1:turbo from the first line and simply do not use the second line.

The resulting avi should be playable with almost any media player in Mepis

Personal tools