Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old May 9th, 2009   #1
budluva04
A Carafe of Ubuntu
 
Join Date: Oct 2005
Beans: 90
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!
__________________
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|

Last edited by budluva04; July 17th, 2009 at 11:27 AM..
budluva04 is offline   Reply With Quote
 

Bookmarks

Tags
.mp4, .mts, convert, handycam, xbox

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:06 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry