|
|
Register | Forum Information | Ubuntu Community | Today's Posts | Search |
Notices |
Hello, Unregistered. Tutorials and Tips is now closed to new threads. Please take a moment to read the details in the sticky, which you can find by clicking here.
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
New Reply
|
|
|
Thread Tools | Display Modes |
May 7th, 2008 | #1 |
Skinny Extra Sweet Ubuntu
Join Date: Sep 2006
Beans: 3,013
|
HOWTO: Install and use the latest FFmpeg and x264
This guide has been moved to the official FFmpeg wiki:
How to Compile FFmpeg and x264 on Ubuntu The guide will be kept up to date and all supported Ubuntu versions will be included. Last edited by sandyd; 1 Week Ago at 01:46 AM.. Reason: Change requested -see reported thread |
May 12th, 2008 | #2 |
100% Pure Ubuntu
Join Date: Jan 2005
Location: Baltimore, MD, USA
Beans: 873
Ubuntu Development Release
|
Re: HOWTO: Compile the latest ffmpeg and x264 from source
Great guide. Thanks a lot. One problem:
When I configure x264 I get the error: Code:
./configure --enable-pthread --enable-mp4-output --enable-shared No suitable assembler found. x264 will be several times slower. Please install 'yasm' to get MMX/SSE optimized code. But I figured it out! All I had to do was go to: www.tortall.net/projects/yasm/wiki/Download Grab the 0.7.0 tarball, then ./configure, make, sudo checkinstall, then build x264, then ffmpeg. Now I can encode much faster. A note to those who are interested: I used the ffmpeg encoding script: Code:
#!/bin/sh ffmpeg -i $1 -y -an -pass 1 -vcodec libx264 -threads 4 -b 1024kbps -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me epzs -subq 1 -trellis 0 -refs 1 -bf 3 -b_strategy 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 $2 ffmpeg -i $1 -y -acodec libfaac -ab 128k -pass 2 -vcodec libx264 -threads 4 -b 1024kbps -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +mixed_refs -me umh -subq 5 -trellis 1 -refs 5 -bf 3 -b_strategy 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 $2 Code:
./scriptname myfile.avi myfile.mp4
__________________
Knowledge is half the battle. The other half is violence! |
May 12th, 2008 | #3 | |
Skinny Extra Sweet Ubuntu
Join Date: Sep 2006
Beans: 3,013
|
Re: HOWTO: Compile the latest ffmpeg and x264 from source
Quote:
As of March 14, '08 (I think), x264 requires a newer yasm >= 0.6.0 than what is in the Ubuntu universe repository (yasm 0.5.0). x264 should fallback to nasm if yasm isn't detected and worked for me just fine despite the following error: Code:
./configure: 330: yasm: not found Before I wrote this tutorial I tested the speed of x264 either using a compiled yasm 0.7.0, nasm from the repository, or no assembler. The speed differences were very small between compiled yasm and nasm from the repo: x264/mencoder/ffmpeg on a dual quad core. Edit: Tutorial updated with yasm compilation. Last edited by FakeOutdoorsman; May 12th, 2008 at 07:11 PM.. |
|
May 14th, 2008 | #4 |
100% Pure Ubuntu
Join Date: Jan 2005
Location: Baltimore, MD, USA
Beans: 873
Ubuntu Development Release
|
Re: HOWTO: Compile the latest ffmpeg and x264 from source
I tried using both nasm and yasm from the repos, and x264 would compile but it would say it was building without support for yasm and nasm.
Then, when I used it to convert a file it would say that it was using no cpu extensions, as opposed to saying "MMX SSE ...". It would also take significantly longer (like 2-5 times as long). But just installing the yasm from source fixed it, and it wasn't very difficult to do.
__________________
Knowledge is half the battle. The other half is violence! |