Skip to content

Instantly share code, notes, and snippets.

@trisweb
Created March 5, 2012 18:13
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save trisweb/1980082 to your computer and use it in GitHub Desktop.
Save trisweb/1980082 to your computer and use it in GitHub Desktop.
ffmpeg commands for converting AVCHD-Lite video to better format(s)

FFMpeg Commands for Transcoding MTS video (from AVCHD-Lite Cameras, like Panasonic DMC-TS1/2)

720p -> H.264 (x264) video + AAC 128kbps audio:

Medium quality 720p:

ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -sameq -acodec libfaac -ab 128k -ar 44100 -ac 2 -s 1280x720 -vpre normal -b 1M output.mp4

High quality 720p:

ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -sameq -acodec libfaac -ab 192k -ar 44100 -ac 2 -s 1280x720 -vpre normal -b 2M output.mp4

Medium quality 1080p:

ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -sameq -acodec libfaac -ab 128k -ar 44100 -ac 2 -s 1920x1080 -vpre normal -b 1.5M output.mp4

High quality 1080p:

ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -sameq -acodec libfaac -ab 192k -ar 44100 -ac 2 -s 1920x1080 -vpre normal -b 3M output.mp4

(You could also omit the -s switch to keep the size the same as the input and adjust the -b param to adjust quality more predictably, or leave it out altogether to make ffmpeg automatically determine a good quality)

@JesseHerrick
Copy link

-sameq and -vpre normal don't exist in ffmpeg version 2.3.1.

@nigillon
Copy link

nigillon commented Dec 7, 2015

Have you tried the following method?

http://www.faasoft.com/articles/avchd-to-mp4.html

It can help you convert AVCHD to MP4, AVI, MOV, MKV, WMV, MP3, WAV, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment