Skip to content

Instantly share code, notes, and snippets.

@odixon
Forked from trisweb/ffmpeg-avchd-conversion.md
Created July 23, 2018 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odixon/d63ba19ba0d7bc2efe5c39307eba8fb7 to your computer and use it in GitHub Desktop.
Save odixon/d63ba19ba0d7bc2efe5c39307eba8fb7 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)

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