Results 1 to 8 of 8

Thread: Jaunty 9.04 - Convert Sony Handycam (AVCHD) .mts files to x264

Threaded View

  1. #1
    Join Date
    Oct 2005
    Location
    Canada
    Beans
    105
    Distro
    Ubuntu Development Release

    Jaunty 9.04 - Convert Sony Handycam (AVCHD) .mts files to x264

    Here is the tutorial I wrote on my site....now i'm writing it here, sorry, didn't know I could just post a link. Enjoy.

    ORIGINAL http://blog.thefrozencanuck.ca/?p=12

    I have a Sony Handycam HDR-XR100 and it's my first videocamera, and it takes great HD video, but I couldn't get it to play on my Xbox 360, or my computer, as the video the camera outputs is interlaced and in .MTS format. So I'll tell you how I figured out how to convert the .MTS files to .MP4 that will playback fine on your PC or Xbox 360. I found alot of information from this post, thanks to the author.

    I will be using Ubuntu Jaunty 9.04 and FFMPEG for this tutorial. First we need to compile FFMPEG with x264 support.

    1) Make sure any previous installations of ffmpeg and x264 are removed.
    Code:
    sudo apt-get purge ffmpeg x264 libx264-dev
    2) Download packages and install
    Code:
    sudo apt-get update
    sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libtheora-dev libxvidcore4-dev
    3) Download the latest version of x264 from GIT, then compile
    Code:
    cd ~
    git clone git://git.videolan.org/x264.git
    cd x264
    ./configure
    make
    sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --default
    4) Download the latest version of FFMpeg from SVN, then compile
    Code:
    cd ~
    svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
    cd ffmpeg
    ./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
    make
    sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --default
    5) Convert your .MTS to .MP4 (Single Pass)
    Code:
    ffmpeg -i INPUT.MTS -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -crf 22 -threads 0 -deinterlace OUTPUT.MP4
    Change your INPUT and OUTPUT, and you can play around with the ffmpeg preset's (-vpre) the availabe presets are default, normal, hq, and max.

    *** NOTE FOR XBOX 360 PLAYBACK ***
    Playback requires the Audio stream be 2 Channel AAC (-ac 2)

    To remove all packages and the changes made to your system from my how-to...
    Code:
    sudo apt-get purge x264 ffmpeg build-essential yasm subversion git-core checkinstall texi2html libfaac-dev libfaad-dev libmp3lame-dev libtheora-dev libxvidcore4-dev
    Thanks, have fun with your videos. Don't be afraid to play around with the setting's either. And please feel free to post you comments/suggestions, thanks...until next time!
    Last edited by budluva04; July 17th, 2009 at 04:27 PM.
    AMD X2 7750 Kuma OC'd to 3.1ghz||ASUS M2N68-AM||4GB OCZ Reaper HPC DDR2||EVGA Nvidia GeForce 9800GTX+||Arctic Cooling Freezer 64 PRO||OCZ MODXSTREAM-PRO 600W||Seagate 1x500GB IDE 2x500GB SATA(RAID1)||Antec Three Hundred||1x140mm 2x120mm Antec Fans|

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •