PDA

View Full Version : HOWTO: Install and use the latest FFmpeg and x264



Pages : 1 2 3 [4] 5 6 7 8 9 10

Bachstelze
December 8th, 2009, 02:26 AM
(@FakeOutdoorsman: feel free to tell me to make my own thread to discuss my x264 builds if you don't want it here. ;) )

So I did some tests as per mc4man's question about the benefits of fprofile on a local build vs. a build made on another machine. I took my amd64 r1360 packages, which were built on my Phenom II desktop, and ran some tests on my MacBook laptop, which has a Core 2 Duo P7550 CPU. I used this script, which uses the same encoding settings that x264 uses when building with fprofile (I just added --quiet so as to not pollute the output):


#!/bin/sh

x264=$1 # path to x264
video=$2 # path to input video

$x264 --crf 30 -b1 -m1 -r1 --me dia --no-cabac --direct temporal --ssim --no-weightb --quiet -o /dev/null $video
$x264 --crf 16 -b2 -m3 -r3 --me hex --no-8x8dct --direct spatial --no-dct-decimate -t0 --slice-max-mbs 50 --quiet -o /dev/null $video
$x264 --crf 26 -b4 -m5 -r2 --me hex --cqm jvt --nr 100 --psnr --no-mixed-refs --b-adapt 2 --slice-max-size 1500 --quiet -o /dev/null $video
$x264 --crf 18 -b3 -m9 -r5 --me umh -t1 -A all --b-pyramid normal --direct auto --no-fast-pskip --no-mbtree --quiet -o /dev/null $video
$x264 --crf 22 -b3 -m7 -r4 --me esa -t2 -A all --psy-rd 1.0:1.0 --slices 4 --quiet -o /dev/null $video
$x264 --frames 50 --crf 24 -b3 -m10 -r3 --me tesa -t2 --quiet -o /dev/null $video
$x264 --frames 50 -q0 -m9 -r2 --me hex -Aall --quiet -o /dev/null $video
$x264 --frames 50 -q0 -m2 -r1 --me hex --no-cabac --quiet -o /dev/null $video

The test clip is a non-HD anime source (500 frames taken from episode 14 of Sky Girls, DVD source).

Package build:


firas@tsukino ~ % ./x264test.sh /usr/bin/x264 skygirls14.y4m
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 107.14 fps, 516.50 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 41.38 fps, 2419.51 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 35.59 fps, 706.32 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 9.72 fps, 2056.94 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 9.37 fps, 1085.09 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 50 frames, 6.29 fps, 1062.54 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 50 frames, 9.65 fps, 27883.58 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 50 frames, 54.67 fps, 32740.59 kb/s


Local non-fprofiled build:


firas@tsukino ~ % ./x264test.sh /usr/local/bin/x264 skygirls14.y4m
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 106.22 fps, 516.50 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 40.35 fps, 2419.51 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 36.09 fps, 707.28 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 9.43 fps, 2056.94 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 9.16 fps, 1085.09 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 50 frames, 6.75 fps, 1062.54 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 50 frames, 10.74 fps, 27883.58 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 50 frames, 51.30 fps, 32740.59 kb/s


Local fprofiled build (the clip used for the build is the same used for the package build):


firas@tsukino ~ % ./x264test.sh /usr/local/bin/x264 skygirls14.y4m
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 109.99 fps, 516.50 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 40.80 fps, 2419.51 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 34.78 fps, 707.78 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 9.41 fps, 2056.94 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 500 frames, 9.19 fps, 1085.09 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 50 frames, 7.10 fps, 1062.54 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 50 frames, 10.73 fps, 27883.58 kb/s
yuv4mpeg: 848x480@24000/1001fps, 0:0

encoded 50 frames, 53.05 fps, 32740.59 kb/s


So building with fprofile doesn't seem to make a big difference anyway, either build on another machine or on the local one. I'll run some test with other clips, but if this is confirmed, I might as well drop it altogether.

mc4man
December 8th, 2009, 03:02 AM
but if this is confirmed

doing a quick compare using a ffmpeg built off of a fprofiled and non x264 saw about a 1% increase ( also anime

though much about x264 is well above my head I'd probably do fprofiled makes anyway, the build time increase is relatively insignificant

mrfelton
December 8th, 2009, 09:40 AM
@FakeOutdoorsman:

Here is a sample .ogv file that I just recorded with gtkRecordMyesktop. gtkRecordMyesktop was installed from the repository and is using recordMyDesktop v0.3.8.1.

Fisslefink
December 8th, 2009, 10:14 AM
Firstly, many thanks to FakeOutdoorsMan for his continued updates on this important and complex tutorial. If only a more competent version of ffmpeg could be supplied in the official repositories... sigh...

Now, I can confirm the posts from the last few weeks about the SVN version not working with some of the suggested presets described in FakeOutdoorsMan's tutorial (post#1). Like others, the error I received was:


Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Through much trial and error, I determined that the "-vpre hq" or "-vpre normal" flags were required for my SVN version (downloaded 12-07-2009) to transcode using libx264. However, the "-vpre ipod640" and "-vpre ipod320" presets did not work. I did not try any other presets. To accomplish good transcoding of iPod video, I used the following command, based on the flags suggested by FakeOutdoorsMan and the ones hidden in "sourcedir/ffmpeg/ffpresets/libx264-ipod640.ffpreset".

Here is my suggested command, which produces nice iPod-compatible video. It is also compatible with metadata atom tags written by AtomicParsley:


/usr/bin/nice -n19 ffmpeg -i "YOURINPUTFILE.tmp" -pass 1 -an -vcodec libx264 -vpre fastfirstpass -vpre ipod640 -b 512k -bt 512k -s 640x480 -threads 0 -f rawvideo -y /dev/null && /usr/bin/nice -n19 ffmpeg -i "YOURINPUTFILE.tmp" -r 29.97 -acodec libfaac -ab 128k -ar 48000 -ac 2 -vcodec libx264 -vpre hq -threads 0 -coder 0 -bf 0 -refs 1 -maxrate 10000000 -bufsize 10000000 -level 30 -wpredp 0 -b 512k -bt 512k -s 640x480 "YOUROUTPUTFILE.m4v"

These tests were performed with a clean install of ffmpeg on Karmic Koala Ubuntu 9.10 with all current updates, following the tutorial in Post #1.

mocha
December 9th, 2009, 09:29 AM
doing a quick compare using a ffmpeg built off of a fprofiled and non x264 saw about a 1% increase ( also anime

though much about x264 is well above my head I'd probably do fprofiled makes anyway, the build time increase is relatively insignificant

I don't remember where I saw it but there was some interview with the ubuntu kernel devs where they talked about some change that is coming in kernels 2.6.32+ which should increase h264 encoding fps by approx twice what we get now. It has something to do with the kernel scheduler, it's above my head anyway.

Linuxforall
December 9th, 2009, 11:18 AM
I don't remember where I saw it but there was some interview with the ubuntu kernel devs where they talked about some change that is coming in kernels 2.6.32+ which should increase h264 encoding fps by approx twice what we get now. It has something to do with the kernel scheduler, it's above my head anyway.

As per the Phoronix test of the said kernel, it didn't really set it on fire over the existing kernel being used on Karmic.

Bachstelze
December 9th, 2009, 11:29 AM
As per the Phoronix test of the said kernel, it didn't really set it on fire over the existing kernel being used on Karmic.

Same here. My main encoding machine is running Lucid with a 2.6.32 kernel, and I didn't see any difference with Karmic. Maybe that was with another encoder, because x264 is highly optimized already.

Oh, and packages for r1361 are up. ;) Maybe I'll put them on my PPA once a week or so. Putting al the revisions would take too much space (not to mention that builds of packages for PPAs can take a while to be done).

pollcolingwood
December 9th, 2009, 11:58 AM
Hi,

Thanks for updating the post on how to install and use the latest FFmpeg and x264.

Trust me it is altogether a new topic to me. Before I read, I did not had any knowledge about it. The entire credit for increasing my knowledge goes to you.

In our office we are using ubuntu. I will surely forward this information to the IT guys in our company so that they can get the best advantage out of it.

Cheers.

Linuxforall
December 9th, 2009, 12:39 PM
http://www.phoronix.com/data/img/results/ubuntu_1004_alpha1/6.png

FakeOutdoorsman
December 9th, 2009, 06:51 PM
I don't remember where I saw it but there was some interview with the ubuntu kernel devs where they talked about some change that is coming in kernels 2.6.32+ which should increase h264 encoding fps by approx twice what we get now. It has something to do with the kernel scheduler, it's above my head anyway.

A better explanation than anything I could come up with:
Open source collaboration done right (http://x264dev.multimedia.cx/?p=185#more-185)



Hi,

Thanks for updating the post on how to install and use the latest FFmpeg and x264.

Trust me it is altogether a new topic to me. Before I read, I did not had any knowledge about it. The entire credit for increasing my knowledge goes to you.

In our office we are using ubuntu. I will surely forward this information to the IT guys in our company so that they can get the best advantage out of it.

Cheers.

Glad it was useful for you.

FakeOutdoorsman
December 10th, 2009, 09:20 PM
Now, I can confirm the posts from the last few weeks about the SVN version not working with some of the suggested presets described in FakeOutdoorsMan's tutorial (post#1). Like others, the error I received was:


Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Thanks for the update. I tried all of examples from the first page using FFmpeg revision 20790 and I got no errors. Perhaps you have an old ~/.ffmpeg directory containing outdated presets?


Through much trial and error, I determined that the "-vpre hq" or "-vpre normal" flags were required for my SVN version (downloaded 12-07-2009) to transcode using libx264. However, the "-vpre ipod640" and "-vpre ipod320" presets did not work.
Did the ipod presets fail to encode or fail to create videos that were transferable or playable on iPod?

talsemgeest
December 11th, 2009, 06:19 AM
Hey, in the OP you mentioned using 2 pass encoding to encode based on output file size. Is this possible with FFmpeg?

DarkFox.DK
December 11th, 2009, 05:50 PM
After using this guide I still can't encode AAC with ffmpeg.


ffmpeg -formats | grep aac
returns


FFmpeg version SVN-r20798, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Dec 11 2009 17:40:40 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 5. 1 / 50. 5. 1
libavcodec 52.43. 0 / 52.43. 0
libavformat 52.41. 0 / 52.41. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 2 / 0. 7. 2
D aac raw ADTS AAC

mc4man
December 11th, 2009, 06:36 PM
Code:

ffmpeg -formats | grep aac
try


ffmpeg -codecs |grep aac

DarkFox.DK
December 11th, 2009, 07:30 PM
$ ffmpeg -codecs |grep aac
FFmpeg version SVN-r20798, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Dec 11 2009 17:40:40 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 5. 1 / 50. 5. 1
libavcodec 52.43. 0 / 52.43. 0
libavformat 52.41. 0 / 52.41. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 2 / 0. 7. 2
DEA aac Advanced Audio Coding
EA libfaac libfaac AAC (Advanced Audio Codec)

Oh.. Well, that's not the problem then :)

Might be my something wrong with my arguments...


$ cat stream-any.sh
#!/bin/bash
vlc $1 -vv -L -I dummy --sout "#transcode{vcodec=h264,venc=x264{no-cabac,level=12,vbv-maxrate=256,vbv-bufsize=1000,keyint=75,ref=3,bframes=0},width=320, height=180,acodec=mp4a,ab=64,vb=256}:rtp{dst=0.0.0 .0,port=1234,sdp=file:///usr/local/movies/t.sdp,mp4a-latm}"

This is the error:


[0x1c60a98] avcodec encoder error: cannot find encoder MPEG AAC Audio
*** Your FFMPEG installation is crippled. ***
*** Please check with your FFMPEG packager. ***
*** This is NOT a VLC media player issue. ***
[0x1c60a98] main encoder error: Streaming / Transcoding failed
[0x1c60a98] main encoder error: It seems your FFMPEG (libavcodec) installation lacks the following encoder:
MPEG AAC Audio.
If you don't know how to fix this, ask for support from your distribution.

This is not an error inside VLC media player.
Do not contact the VideoLAN project about this issue.

Bachstelze
December 11th, 2009, 09:37 PM
Some possible causes:

* If you are using the VLC package from the repos, it might not support the newer ffmeg. Compiling a newer VLC could be a solution.

* If you still have the ffmpeg packages from the repos, they might conflict with yours. Uninstall them.

SuperSonic4
December 11th, 2009, 09:39 PM
Some possible causes:

* If you are using the VLC package from the repos, it might not support the newer ffmeg. Compiling a newer VLC could be a solution.

* If you still have the ffmpeg packages from the repos, they might conflict with yours. Uninstall them.

I agree, chances are you're VLC is out of date compared to ffmpeg. Be aware that if you want to compile vlc from git you may well need the git version of x264 too

FakeOutdoorsman
December 11th, 2009, 10:05 PM
Hey, in the OP you mentioned using 2 pass encoding to encode based on output file size. Is this possible with FFmpeg?

Yes, FFmpeg can do this, but you'll have to do some math. The general rule is:

desired output file size = bitrate / file duration
So, for example, I have a 30 second video and I want it to be roughly 1 megabyte. Remember that 1 MB (megabyte) = 8 Mb (megabits) = 1024 Kb (kilobits):

(8*1024)/30 = ~273 kilobits/s
I think then you may have to subtract your audio bitrate from this number, so in this example, with a desired audio bitrate of 64k/s I would try: -b 209k -bt 209k -ab 64k. For my test encode I got a final file size of 978K. When I tried -b 273k -ab 64k I got a final file size of 1.2M. Close enough? Not as exact as I thought it would be, but maybe my math or something else is wrong. You'll have to play around with it.

Update: OK, my math was wrong which isn't surprising because it's always been a lacking skill for me.

1 MB = (1048576 bytes * 8 to convert to bits)/30 seconds = 279620 bits/s. So you could use -b 279620 or round to -b 280k (FFmpeg "k" equals 1000, not 1024 ). Minus a 64kbit/s audio file = [I]-b 216k.

Chewbranca
December 11th, 2009, 10:18 PM
I was trying to get this installed with x264 support to work with gource video output. I followed the guide and everything installed properly but I was getting the annoying incorrect parameters errors. Eventually I found this which works fine:

sudo apt-get install ffmpeg libavcodec-extra-52

mc4man
December 11th, 2009, 10:38 PM
@ DarkFox.DK
While somewhat off topic to this thread, if you decide to build vlc then i'd follow the instr.'s here ( at least as to method (vlc needs a few changes to ffmpeg configure

You'll be far better off to build your vlc off of static builds of x264 and ffmpeg as described in post 1.
That way once vlc is built, libx264 and avcodec, ect. support will be built-into vlc, no dependencies to worry about or maintain ( at least as far as x264 and ffmpeg

You'll also be free to to upgrade, remove your static x264, ffmpeg builds as you see fit, vlc won't require them either.

Your only possible issue is vlc doesn't maintain sync with x264 and ffmpeg to the extent of something like mplayer, so the current svn's may or may not be good. (if not just get slightly earlier -r's
( did a vlc 1.0.3 about a week or so ago w/ ffmpeg from a day or so earlier with no issues

FakeOutdoorsman
December 11th, 2009, 10:47 PM
I was trying to get this installed with x264 support to work with gource video output. I followed the guide and everything installed properly but I was getting the annoying incorrect parameters errors.
I am unfamiliar with gource. What was the FFmpeg or x264 command the gource was using that resulted in the incorrect parameters error?

Eventually I found this which works fine:

sudo apt-get install ffmpeg libavcodec-extra-52
This means that gource is now using ffmpeg and libx264 from the repository and not your compiled versions.

talsemgeest
December 12th, 2009, 12:10 AM
Yes, FFmpeg can do this, but you'll have to do some math. The general rule is:

desired output file size = bitrate / file duration
So, for example, I have a 30 second video and I want it to be roughly 1 megabyte. Remember that 1 MB (megabyte) = 8 Mb (megabits) = 1024 Kb (kilobits):

(8*1024)/30 = ~273 kilobits/s
I think then you may have to subtract your audio bitrate from this number, so in this example, with a desired audio bitrate of 64k/s I would try: -b 209k -bt 209k -ab 64k. For my test encode I got a final file size of 978K. When I tried -b 273k -ab 64k I got a final file size of 1.2M. Close enough? Not as exact as I thought it would be, but maybe my math or something else is wrong. You'll have to play around with it.

Update: OK, my math was wrong which isn't surprising because it's always been a lacking skill for me.

1 MB = (1048576 bytes * 8 to convert to bits)/30 seconds = 279620 bits/s. So you could use -b 279620 or round to -b 280k (FFmpeg "k" equals 1000, not 1024 ). Minus a 64kbit/s audio file = [I]-b 216k.

Excellent, nothing too difficult. :)

Also, I may look into creating something to automate the process, as it is simple math. Thanks again FakeOutdoorsman :)

Bachstelze
December 12th, 2009, 12:15 AM
Excellent, nothing too difficult. :)

Also, I may look into creating something to automate the process, as it is simple math. Thanks again FakeOutdoorsman :)

There are lots of bitrate calculators around already. ;) I personally uses the one in the VfW Xvid distribution.

talsemgeest
December 12th, 2009, 02:00 AM
There are lots of bitrate calculators around already. ;) I personally uses the one in the VfW Xvid distribution.

Thanks, I will look into it :)

DarkFox.DK
December 12th, 2009, 03:37 AM
@ DarkFox.DK
While somewhat off topic to this thread, if you decide to build vlc then i'd follow the instr.'s here ( at least as to method (vlc needs a few changes to ffmpeg configure

You'll be far better off to build your vlc off of static builds of x264 and ffmpeg as described in post 1.
That way once vlc is built, libx264 and avcodec, ect. support will be built-into vlc, no dependencies to worry about or maintain ( at least as far as x264 and ffmpeg

You'll also be free to to upgrade, remove your static x264, ffmpeg builds as you see fit, vlc won't require them either.

Your only possible issue is vlc doesn't maintain sync with x264 and ffmpeg to the extent of something like mplayer, so the current svn's may or may not be good. (if not just get slightly earlier -r's
( did a vlc 1.0.3 about a week or so ago w/ ffmpeg from a day or so earlier with no issues


Compiling is not something I have great experience with.. I have the general concept of how things work... I tried fumbling through it a bit, but it's kind of hard to know what to do..

From searching a bit I ended up with this..


./configure --enable-x11 --enable-xvideo \
--enable-sdl --enable-ffmpeg --with-ffmpeg-mp3lame \
--enable-mad --enable-libdvbpsi --enable-a52 --enable-dca \
--enable-libmpeg2 --enable-dvdnav --enable-faad \
--enable-vorbis --enable-ogg --enable-theora --enable-faac\
--enable-mkv --enable-freetype --enable-fribidi \
--enable-speex --enable-flac --enable-caca \
--enable-skins --enable-skins2 --enable-alsa \
--disable-qt --enable-wxwindows --enable-ncurses \
--enable-asa --enable-release --enable-shared --enable-pic --with-x264-tree=/usr/src/x264

Of course, it fails when I try to compile it.. I'm sure there's stuff that I don't need there, and something I do need, that's missing..

Make fails with this:

/usr/local/lib/libavcodec.a: could not read symbols: Bad value

Could anyone point me in the direction of a tutorial on how to do this right?

mc4man
December 12th, 2009, 08:59 AM
Could anyone point me in the direction
I'm sure there are some decent how to's on vlc, though I've not seen any to recommend.
There are several methods to build vlc and dozens of ways to configure, so I could offer a few tips and you'd have to take it from there or search out a how to that suits your needs

First a suggestion - as FO has posted, medibuntu will shortly offer a libfaac enabled libavcodec package that may solve your problem, all you'd need to do is wait, install it and see if vlc works with it (probably should.

Otherwise

I build vlc as a package set for various reasons, and use some different configs for ffmpeg and vlc that suit my purposes so to see what you may encounter did a quick build of tonights ffmpeg and a straightforward, reasonably enabled vlc build, to test using a configure and make to build.

A few things
You should make sure you can scroll back at least 1000 lines in your terminal so you can read back thru your configure. 'Passing' a configure in vlc is relativly meaningless, if you had read back thru yours, you would have seen many of your configure options were invalid.

Running a ./configure --help will prove to be very informative -

Everything that is enabled by default will require you meet the deps and will be built whether you want or need it.

Everything that is disabled by default will not be built unless enabled in the configure. ( though there may be some autodetection in play

( the final build I do for any particular vlc release will contain far more disables in the configure than enables.

As an example, the configure you posted could be condensed to this, the rest was either invalid or already enabled


./configure --enable-libmpeg2 --enable-faad \
--enable-vorbis --enable-theora \
--enable-speex --enable-flac --enable-release


Another Ex.
this is what the package vlc I did today shows, I haven't pared it or the rules, install files down yet


doug@doug-laptop:~$ vlc -vv
VLC media player 1.0.3 Goldeneye
[0x9bb2140] main libvlc debug: VLC media player - version 1.0.3 Goldeneye - (c) 1996-2009 the VideoLAN team
[0x9bb2140] main libvlc debug: libvlc was configured with ./configure ' '--with-tuning=native' '--prefix=/usr' '--config-cache' '--enable-loader' '--disable-schroedinger' '--enable-fast-install' '--with-binary-version=1ubuntu4' '--disable-update-check' '--enable-cddax' '--enable-ggi' '--enable-sdl' '--enable-mad' '--enable-jack' '--enable-lirc' '--enable-a52' '--enable-snapshot' '--enable-aa' '--enable-dvbpsi' '--disable-fluidsynth' '--enable-mozilla' '--with-mozilla-pkg=xulrunner-plugin' '--enable-dvb' '--enable-ogg' '--enable-vorbis' '--enable-shout' '--enable-qt4' '--enable-flac' '--enable-skins2' '--enable-freetype' '--enable-mkv' '--enable-speex' '--enable-caca' '--enable-live555' '--enable-libmpeg2' '--enable-fribidi' '--enable-theora' '--enable-dvdnav' '--enable-gnutls' '--enable-ncurses' '--enable-smb' '--disable-gnomevfs' '--enable-bonjour' '--enable-mpc' '--enable-vcd' '--enable-vcdx' '--enable-notify' '--enable-twolame' '--enable-faad' '--disable-zvbi' '--enable-telx' '--disable-atmo' '--enable-taglib' '--enable-libass' '--enable-dca' '--enable-realrtsp' '--enable-real' '--disable-dv' '--enable-x264' '--enable-alsa' '--enable-v4l' '--enable-v4l2' '--enable-pvr' '--with-live555-tree=/usr/lib/live' '--enable-svgalib' 'CFLAGS=-g -O2' 'LDFLAGS=-Wl,--as-needed' 'CPPFLAGS=' 'CXXFLAGS=-g -O2'


The configure for the same build for a ./configure, make, make install would be this (minus flags

./configure --with-tuning=native --enable-loader --disable-schroedinger \
--enable-cddax --disable-fluidsynth --enable-vorbis --enable-shout \
--enable-flac --with-live555-tree=/usr/lib/live --enable-libmpeg2 \
--enable-theora --enable-twolame --enable-faad --disable-zvbi --enable-speex \
--enable-realrtsp --enable-real --enable-libass --enable-snapshop

The difference between the 2 are all the options that are enabled by default.

There are basically 3 things that could cause your configure or build to error

Missing a build dependency - either provide it or disable in configure (some deps must be present

Having a too old or rarely too new a library - same as above

A compiler error - shouldn't be an issue though I have noticed gcc-4.4.1 will once and a while have a random internal error - run a make distclean and try again

A simple build would be to follow F O's guide for x264 and ffmpeg exactly except add this to ffmpeg configure
--enable-postproc

Use preferably the vlc 1.0.3 source though 1.0.2 should be ok.

Remove your current vlc and companion packages (search vlc in synaptic, remove everything from libvlc2 down

Configure as such ( the blue is for 32 bit only

./configure --with-tuning=native --enable-loader --disable-schroedinger --enable-snapshot \
--disable-fluidsynth --enable-vorbis --enable-shout --enable-flac \
--enable-speex --enable-libmpeg2 --enable-theora --enable-twolame --enable-faad \
--disable-zvbi --enable-realrtsp --enable-real --enable-libass

If you don't wish shoutcast support or theora then remove, ect.

As far as build deps
the attached list from my control file shows most of what is needed, a few aren't needed, there may be something or 2 missing, haven't bothered to ck. and adjust

Read thru your configure, many no's are expected, some will be a issue

Make sure there are no ffmpeg -dev packages installed, search ffmpeg in synaptic and scroll down and look, remove if found ( libavcodec-dev, libavformat-dev, ect. (7 possible

If build succeeds, after sudo make install but before running vlc..
in terminal

sudo ldconfig

CoolDreamZ
December 12th, 2009, 01:08 PM
After, when i try to run ffmpeg i get this error:
bash: /usr/bin/ffmpeg: No such file or directory


I had the same problem today (on intrepid) ffmpeg is installed ok to /usr/local/bin but is not found. A reboot fixed it and the system now finds it ok. (It would be nice not to have to reboot though)

SuperSonic4
December 12th, 2009, 01:19 PM
I had the same problem today (on intrepid) ffmpeg is installed ok to /usr/local/bin but is not found. A reboot fixed it and the system now finds it ok. (It would be nice not to have to reboot though)

You might have to change your default PATH to look at /usr/local/bin first

CoolDreamZ
December 12th, 2009, 02:37 PM
Thanks for the tip, $PATH is as follows:


/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

My guess is that as the default ubuntu ffmpeg package is removed earlier in the session and before installing the compiled version something broke and the system could not find ffmpeg until after a re-boot.

seelk
December 12th, 2009, 06:46 PM
I'm getting an error when doing the checkinstall part of ffmpeg. The error is:


cmdutils.c:568: undefined reference to `av_filter_next'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

**** Installation failed. Aborting package creation.

I'm using Karmic 64bit.

zeus77
December 12th, 2009, 08:29 PM
seelk: i'm getting the same error... will let you know if i find a fix.

UPDATE: just re-grabbed the latest ffmpeg SVN, and noticed a few things were updated... works fine now.

seelk
December 14th, 2009, 04:14 PM
seelk: i'm getting the same error... will let you know if i find a fix.

UPDATE: just re-grabbed the latest ffmpeg SVN, and noticed a few things were updated... works fine now.

Good to hear! I'll give it a shot tonight...

danpaluska
December 17th, 2009, 07:05 PM
i just went through instructions for installing on 9.04(http://ubuntuforums.org/showpost.php?p=8345112&postcount=636)
and everything seemed to work fine.
but now i can't run ffmpeg.

centralsqwall@PowerSpec:~/Pictures/OMPD/test-12-16$ ffmpeg
bash: /usr/bin/ffmpeg: No such file or directory


i have to link the ffmpeg directory to the /usr/bin directory? or move it?

thanks,
dan

CoolDreamZ
December 17th, 2009, 07:08 PM
See post #777 - a reboot should fix it



Update Update: The "hash -r" command works. No more rebooting needed.

Very impressive!!, that command does not even have a man entry! (the shell had cached the original location of ffmpeg /usr/bin which is changed to /usr/local/bin when you install the compiled version, and "hash -r" clears the shell hash cache)

FakeOutdoorsman
December 17th, 2009, 07:18 PM
i just went through instructions for installing on 9.04(http://ubuntuforums.org/showpost.php?p=8345112&postcount=636)
and everything seemed to work fine.
but now i can't run ffmpeg.

centralsqwall@PowerSpec:~/Pictures/OMPD/test-12-16$ ffmpeg
bash: /usr/bin/ffmpeg: No such file or directory


i have to link the ffmpeg directory to the /usr/bin directory? or move it?

thanks,
dan

I'm trying to narrow down this issue, but I am unsure how to replicate it. Did you have FFmpeg installed before starting this guide? As CoolDreamZ mentioned, a reboot will take care of this, but I would like to find a less disruptive method. Reboot in Linux? Blasphemy!

Update: Instead of rebooting, if you haven't already, try the "hash -r" command. Does that work?

Update Update: The "hash -r" command works. No more rebooting needed.

pussfeller
December 19th, 2009, 06:33 AM
Great tut, it works, but every time i get it installed, aptitude wants to remove it!


The following packages will be REMOVED:
ffmpeg{u}

How to keep my custom ffmpeg? I followed the directions step by step!

mc4man
December 19th, 2009, 07:48 AM
Not sure how you got ffmpeg marked as automatically installed - there is a possibility or 2. Anyway just mark it as manually installed.

Going sudo aptitude unmarkauto ffmpeg may or may not work. What should always is to open synaptic, search ffmpeg, highlight it and under the package tab, uncheck 'automatically installed'

Now if it's not checked 'autom.... ...' then that would be, well, interesting.

pussfeller
December 19th, 2009, 07:53 AM
I figured it out...


aptitude hold ffmpeg

does it

FakeOutdoorsman
December 19th, 2009, 09:04 AM
Great tut, it works, but every time i get it installed, aptitude wants to remove it!


The following packages will be REMOVED:
ffmpeg{u}

How to keep my custom ffmpeg? I followed the directions step by step!

What version of Ubuntu are you using? I may have added the wrong checkinstall options during one of the revisions to this guide. There are four versions of this guide and although I try to test all updates I sometimes make occasional mistakes.

pussfeller
December 19th, 2009, 04:08 PM
I am using 9.10, but this has happened to me before, iirc, on earlier versions, but aptitude hold seems to take care of things.

If it helps, before i applied hold, 'show' revealed something about not being used by other programs, and so would be removed

Thanks!

spark3y
December 19th, 2009, 10:25 PM
Thx for the good guide, but i am having kind of a problem :/

Iam using the following command to convert.


/usr/local/bin/ffmpeg -i INPUT.avi -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 -f mp4 OUTPUT.mp4


The problem i am having is that the conversion is taking so much time. It can go on for hours depending on the filesize ofcource. The server i am converting on is not bad so that cant be the problem.

When converting it is converting in at most 380Kbits/s . Is this normal? :/

Bachstelze
December 19th, 2009, 10:37 PM
The problem i am having is that the conversion is taking so much time. It can go on for hours depending on the filesize ofcource. The server i am converting on is not bad so that cant be the problem.

Of course it can. Please give more details (hardware specs, resolution and length of encoded file, etc.).

spark3y
December 19th, 2009, 11:26 PM
Thx for your answer,

15k sas hdd
8gb FB PC2-5300
quad-core xeon E5420

1280x720
14:11 minutes
547MB

When converting to flv without x264 its over in no time, should mp4 take this much longer? Can i speed it up?

Bachstelze
December 19th, 2009, 11:32 PM
Hmm, I don 't know exactly what x264 settings the ffmpeg "hq" preset defines, but it shouldn't take that long on this machine. Since I don't use ffmpeg for video encoding, I'll leave this to someone with more experience using it.

FakeOutdoorsman
December 21st, 2009, 08:27 PM
Thx for the good guide, but i am having kind of a problem :/

Iam using the following command to convert.


/usr/local/bin/ffmpeg -i INPUT.avi -acodec libfaac -ab 96k -vcodec libx264 -vpre hq -crf 22 -threads 0 -f mp4 OUTPUT.mp4


The problem i am having is that the conversion is taking so much time. It can go on for hours depending on the filesize ofcource. The server i am converting on is not bad so that cant be the problem.

It all depends on your input video complexity, your encoding settings, and your hardware. Here's an example. I have low motion video of an art sculpture against a partly cloudy sky and using your command above I get an average of 3 fps. So, for a 15 minute input video it will take my Pentium 4 3.00GHz 150 minutes to encode the output:

(15 minutes x 60 sec) x 30 fps = (27000 frames / 3 fps) / 60 sec = 150 minutes
Changing your command to use -vpre normal will give me an average of 7 fps, so the encode will take around 64 minutes assuming the input video is fairly constant in complexity. The normal preset will trade some final file size, and perhaps a small about of quality, for a faster encode compared to hq.


When converting it is converting in at most 380Kbits/s . Is this normal? :/
Probably. Is this animation? The encoder will only allocate enough bits that are required to maintain a certain quality level (set in the -crf option). Conversely, if you use -b instead of -crf, the encoder will vary the quality to maintain a certain bitrate.

FakeOutdoorsman
December 21st, 2009, 08:31 PM
Hmm, I don 't know exactly what x264 settings the ffmpeg "hq" preset defines...

See /usr/share/ffmpeg/libx264-hq.ffpreset or the current libx264-hq.ffpreset (http://git.ffmpeg.org/?p=ffmpeg;a=blob;f=ffpresets/libx264-hq.ffpreset;hb=HEAD) on the git server.

fooey
December 22nd, 2009, 02:34 PM
del post.

squirtmph
December 23rd, 2009, 07:11 AM
Well I am brand new rocky on Linux, and I would like to know how complicate is to complete this task, I would love to get better screen resolution on my movies. I have on my system.

Some of my movies plays fine on VLC Media player but not well on Totem for what ever reason they freeze.

Will this movies would look better once I have finish updating FFmpeg?
or should i avoid this and continue what i have?

Note:
what command can I use to find out if I have the new release codecs from FFmpeg and once is done where do i have to go to matche them?

any suggestion or support would be very much appreciate.

Thank you.

Lost Linux user

Keith Hedger
December 24th, 2009, 01:19 PM
Excellent howto I have always used a compiled ffmpeg but after the last couple of updates from svn I was having a lot of compile errors but this worked great!
I just built this on Debian Lenny and aside from one small change to the dependences line no problems, well done!

FakeOutdoorsman
December 25th, 2009, 01:49 AM
Well I am brand new rocky on Linux, and I would like to know how complicate is to complete this task,
If you can copy text from your web browser and paste it into a terminal you will be able to compile FFmpeg.


I would love to get better screen resolution on my movies. I have on my system.

Some of my movies plays fine on VLC Media player but not well on Totem for what ever reason they freeze.

Will this movies would look better once I have finish updating FFmpeg?
No. VLC and other players from the Ubuntu repository will not use your compiled FFmpeg for decoding your videos unless you also compile these players or perhaps perform some package management wrangling that I have no idea how to do. If you want to re-encode your movies, then FFmpeg can be useful to you.


what command can I use to find out if I have the new release codecs from FFmpeg and once is done where do i have to go to matche them?
I'm sorry, but I don't understand your question. You can list all of the encoders and decoders your compiled FFmpeg supports with:

ffmpeg -codecs

FakeOutdoorsman
December 25th, 2009, 01:51 AM
Excellent howto I have always used a compiled ffmpeg but after the last couple of updates from svn I was having a lot of compile errors but this worked great!
I just built this on Debian Lenny and aside from one small change to the dependences line no problems, well done!

Thanks. It's nice to know it works on Debian as well.

Nixie Pixel
December 25th, 2009, 08:49 AM
I just wanted to thank FakeOutdoorsman for this excellent, well-maintained guide. It really is valuable and well done, I keep coming back to it whenever I make a new install or have problems.

Thank you again!

Mars73
December 26th, 2009, 03:41 PM
Thanks for the docs, I also keep coming back to this when doing a new Ubuntu install.
One thing I keep asking myself and this is more of a general linux question about compiling etc is this: what if I have some programs that use ffmpeg like Avidemux or some other frontends, then decide to update ffmpeg and/or x264, do I also have to compile those frontends again?
Or do they automatically pick up the new libraries?

Bachstelze
December 26th, 2009, 04:53 PM
Thanks for the docs, I also keep coming back to this when doing a new Ubuntu install.
One thing I keep asking myself and this is more of a general linux question about compiling etc is this: what if I have some programs that use ffmpeg like Avidemux or some other frontends, then decide to update ffmpeg and/or x264, do I also have to compile those frontends again?
Or do they automatically pick up the new libraries?

It depends whether they link the libraries statically or dynamically. If they were compiled with the libraries linked statically, the libraries are built in the program at compile time, so obviously, you have to recompile the program if you want it to use another version of the library. If they were compiled with the library linked dynamically, they will use the new one if (and only if) there was no ABI change between the version of the library the program was compiled with and the one you're using.

mc4man
December 27th, 2009, 01:00 AM
what if I have some programs that use ffmpeg like Avidemux or some other frontends

You would also need to keep in mind whether the app uses it's own internal ffmpeg or the system ffmpeg or libs

For instance avidemux provides it's owm ffmpeg, what ffmpeg or ffmpeg shared libs are installed is irrelevant.

FakeOutdoorsman
December 27th, 2009, 01:29 AM
I just wanted to thank FakeOutdoorsman for this excellent, well-maintained guide. It really is valuable and well done, I keep coming back to it whenever I make a new install or have problems.

Thank you again!

Thanks, Nixie Pixel!

Mars73
December 27th, 2009, 02:29 PM
You would also need to keep in mind whether the app uses it's own internal ffmpeg or the system ffmpeg or libs

For instance avidemux provides it's owm ffmpeg, what ffmpeg or ffmpeg shared libs are installed is irrelevant.

Thanks. I saw it indeed on the wiki pages of avidemux.
I'm more and more learning the cli of ffmpeg and mencoder, this way I'm free of any gui. WinFF does has some nice options though and be able to put in your own parameters and be able to save it as a preset. (and as I can see it, it uses your own compiled ffmpeg)

Sn3akyP3t3
December 28th, 2009, 08:30 PM
I understand the tutorial is undergoing changes due to adding the ability to add --enable-libopencore-amrnb --enable-libopencore-amrwb to the ./configure at this time.

I'm tying to install a missing dependency in Hardy Heron LTS 8.04 "libopencore-amrnb-dev". I've enabled both universe and multiverse repositories, but it is not available for this kernel. What is the recommended way to install this as a workaround?

FakeOutdoorsman
December 28th, 2009, 08:56 PM
I understand the tutorial is undergoing changes due to adding the ability to add --enable-libopencore-amrnb --enable-libopencore-amrwb to the ./configure at this time.

I'm tying to install a missing dependency in Hardy Heron LTS 8.04 "libopencore-amrnb-dev". I've enabled both universe and multiverse repositories, but it is not available for this kernel. What is the recommended way to install this as a workaround?

Are you modifing the tutorial on the first page to fit Hardy, or are you following the Hardy version of the tutorial?

Install FFmpeg and x264 on Ubuntu Hardy Heron 8.04 LTS (http://ubuntuforums.org/showpost.php?p=6963607&postcount=360)

Hardy does not have libopencore files in its repository, so they must be compiled. I was having trouble compiling libopencore-amr in Hardy Heron so I temporarily removed that section from the Hardy version of this tutorial. I must admit that I didn't spend that much time on it and meant to return to it, but I had to work over the weekend.

I'll try to take a look at it again today.

Update: I noticed I accidentally left the --enable-libopencore-amrnb and --enable-libopencore-amrwb options in the FFmpeg configuration in the Hardy version of the tutorial. I just removed those.

mc4man
December 28th, 2009, 10:10 PM
Never tried to build the opencore on hardy, should be resolvable though...

An easy way to get them pre-built would be from the rvm mplayer ppa, he has builds for hardy (though they're 0.1.1 versions

https://launchpad.net/~rvm/+archive/mplayer/+packages

edit;
on a vanilla hardy with basic build tools the 0.1.2 built fine, a checkinstall would suffice though would be simple to edit the karmic .diff to build as packages

FakeOutdoorsman
December 28th, 2009, 11:07 PM
I was having trouble compiling libopencore-amr in Hardy Heron...
Actually, I had no problems with compiling. It was installing with checkinstall that was problematic. I needed to add the --fstrans=no option to checkinstall to successfully install libtheora and libopencore-amr.

Anyway, I updated the Hardy tutorial and everything should work now.

andrew.46
December 29th, 2009, 01:05 AM
Hi Fakeoutdoorsman,


I needed to add the --fstrans=no option to checkinstall to successfully install libtheora and libopencore-amr.

A little aside of this it is interesting to note that there is a new checkinstall release (http://www.asic-linux.com.mx/~izto/checkinstall/) as of December 26th that hopefully will mean an end to tricky commandline and /etc/checkmail.rc settings.

Andrew

mc4man
December 29th, 2009, 05:32 AM
here is a new checkinstall release as of December 26th
Interesting, while i don't use too much, mainly atm ffmpeg and mplayer, I had occasion the other day where checkinstall was best option ( static totem-xine for karmic and lucid

While the 1.6.1 worked and installed fine it improperly created/installed an icons.cache file that could causes issues down the road. ( resolved with an --exclude, the file was not needed.
Curious to see how the 1.6.2 does

Built really quickly so didn't look too closely at why the first attempt failed. Instead applied 20glibc2.10-scandir patch which allowed 1.6.2 to build ( though there were numerous related 'warnings' - bears looking into.

Settled on patch, make, sudo make install, sudo checkinstall --install=no ( then installed the .deb, probably could just as well lose the --install=no

seems to deal with a few prior annoyances automatically

Building Debian package...OK

NOTE: The package will not be installed

Erasing temporary files...OK

Deleting doc-pak directory...OK

Writing backup package...OK

Deleting temp dir...OK



Maybe should be requested as a 'wishlist' for lucid before it's too late

andrew.46
December 30th, 2009, 06:27 AM
Hi Fakeoutdoorsman,

I am in the process of writing up a guide for compiling the git vlc, hopefully I will publish this for Lucid in April. Instead of giving directions for FFmpeg and x264 I will be placing a link to this guide, thus avoiding any confusion of FFmpeg/x264 installation on these forums and also sparing me a few hard yards :).

My only query is the option --enable-postproc which vlc looks for in FFmpeg. Does this option have a place in your guide?

All the best,

Andrew

Bachstelze
December 30th, 2009, 06:35 AM
My only query is the option --enable-postproc which vlc looks for in FFmpeg. Does this option have a place in your guide?


I'm +1 on this, --enable-postproc is also needed by other programs which rely on ffmpeg (Aegisub comes to mind).

FakeOutdoorsman
December 30th, 2009, 09:44 PM
Hi Fakeoutdoorsman,

I am in the process of writing up a guide for compiling the git vlc, hopefully I will publish this for Lucid in April. Instead of giving directions for FFmpeg and x264 I will be placing a link to this guide, thus avoiding any confusion of FFmpeg/x264 installation on these forums and also sparing me a few hard yards :).

My only query is the option --enable-postproc which vlc looks for in FFmpeg. Does this option have a place in your guide?

All the best,

Andrew

Updated with the inclusion of --enable-postproc. I think an older version of this guide used to include this option, but it was pruned long ago. Looking forward to your VLC guide!

andrew.46
December 31st, 2009, 01:58 AM
Hi FakeOutdoorsman,


Updated with the inclusion of --enable-postproc. I think an older version of this guide used to include this option, but it was pruned long ago. Looking forward to your VLC guide!

Thanks for that. Mind you I have finally managed to get vlc to read a copy of FFmpeg not installed to the system which should also make it a bit easier for those who wish to create a proper Debian package. The guide will probably be for Lucid but I may leak a preview copy for some feedback first :).

The painful details of the local FFmpeg for vlc can be seen here (http://ubuntuforums.org/showpost.php?p=8584942&postcount=19).

Andrew

mysoogal
December 31st, 2009, 06:56 PM
ffmpeg_4:0.5+svn20091231-1_i386.deb
http://www.filebox.com/u4n8t0ex5jgr

libtheora_1.1.1-1_i386.deb
http://www.filebox.com/d93g4nsg4atv

x264_1:0.svn20091231-1_i386.deb
http://www.filebox.com/46un68492qmo


my debs no need to complie all over again !

4llf0rn0t
January 3rd, 2010, 03:02 AM
hi FakeOutdoorsman,

I've installed ffmpeg and x264 following your guide.

When I tried converting some flvs to avi I got an error:


ffmpeg -i t0806.flv -vcodec libx264 -b 266k -r 25 -acodec copy t0806.avi
...
...
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height



$ which ffmpeg
/usr/local/bin/ffmpeg

$ sudo find / -name ffmpeg
/usr/local/bin/ffmpeg
/usr/local/share/ffmpeg
/usr/share/doc/ffmpeg
/home/4llfo/ffmpeg
/home/4llfo/ffmpeg/ffmpeg

$ ffmpeg
FFmpeg version SVN-r21003, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Jan 2 2010 18:48:11 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-x11grab

When I printed shared libraries there's no libx264

$ ldd /usr/local/bin/ffmpeg
linux-gate.so.1 => (0x00ba0000)
libz.so.1 => /lib/libz.so.1 (0x0068c000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x002bd000)
libfaac.so.0 => /usr/lib/libfaac.so.0 (0x00868000)
libfaad.so.0 => /usr/lib/libfaad.so.0 (0x00700000)
libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0x00d05000)
libxvidcore.so.4 => /usr/lib/libxvidcore.so.4 (0x00110000)
libasound.so.2 => /usr/lib/libasound.so.2 (0x002e3000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00946000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00856000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00e07000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00b55000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x003aa000)
/lib/ld-linux.so.2 (0x00572000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00223000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x00ae5000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00c9f000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00ec2000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0076a000)

checking for libx264:

$ ll /usr/lib | grep libx264
-rw-r--r-- 1 root root 628308 2009-06-21 12:18 libx264.so.67

How do I make ffmpeg use the libx264.so.67 shared library?

Thanks

mc4man
January 3rd, 2010, 04:57 AM
When I tried converting some flvs to avi I got an error:

While FO would be the one to help you there, I'd think you'd be better off using a preset - see page 1, using ffmpeg


How do I make ffmpeg use the libx264.so.67 shared library?
You don't need to or want to.

Your build flow was - static x264 -> static ffmpeg.
x264 is now built-into ffmpeg, that's why no shared lib showed up. ( and a much better ver. than -67. If you did today or so then core 80 I believe

4llf0rn0t
January 3rd, 2010, 05:47 AM
thank you mc4man.


While FO would be the one to help you there, I'd think you'd be better off using a preset - see page 1, using ffmpeg

You don't need to or want to.

Your build flow was - static x264 -> static ffmpeg.
x264 is now built-into ffmpeg, that's why no shared lib showed up. ( and a much better ver. than -67. If you did today or so then core 80 I believe

thank you for clarifying that out and pointing me in the right direction.

-vcodec libx264 -vpre <preset choices>
as explained here referencing from page 1:
FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/)

mysoogal
January 10th, 2010, 03:31 PM
my Debs for Ubuntu Hardy Heron 8.04 LTS

http://i45.tinypic.com/mkj0oy.png


Filename: ffmpeg_3:0.svn20100110-12ubuntu3-1_i386.deb
Size: 21.4 Mb
Download Link: http://www.filebox.com/5o43iwvd9qv5


Filename: libopencore-amr_0.1.2-1_i386.deb
Size: 646.5 Kb
Download Link: http://www.filebox.com/fhoaeo4oma19


Filename: libtheora_1.1.1-1_i386.deb
Size: 1.8 Mb
Download Link: http://www.filebox.com/ivow67iwe31i


Filename: x264_1:0.svn20100110-0.0ubuntu1-1_i386.deb
Size: 601.9 Kb
Download Link: http://www.filebox.com/yavnxzh3mvhx


Filename: yasm_0.8.0-1_i386.deb
Size: 1.4 Mb
Download Link: http://www.filebox.com/exv9sh85bysk


extra info


FFmpeg version SVN-r21123, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Jan 10 2010 14:15:54 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-p ostproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3 lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheo ra --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 7. 0 / 50. 7. 0
libavcodec 52.46. 0 / 52.46. 0
libavformat 52.46. 0 / 52.46. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 8. 0 / 0. 8. 0
libpostproc 51. 2. 0 / 51. 2. 0

camberofculdi
January 11th, 2010, 08:35 PM
I did the full procedure at Install FFmpeg and x264 on Ubuntu Jaunty Jackalope 9.04 (http://ubuntuforums.org/showpost.php?p=8345112&postcount=636)
I'm using Jaunty 9.10
Can't find ffmpeg in my applications.
How do i find it and/or run the program?
Thanks.

FakeOutdoorsman
January 11th, 2010, 08:57 PM
I did the full procedure at Install FFmpeg and x264 on Ubuntu Jaunty Jackalope 9.04 (http://ubuntuforums.org/showpost.php?p=8345112&postcount=636)
I'm using Jaunty 9.10
Can't find ffmpeg in my applications.
How do i find it and/or run the program?
Thanks.

FFmpeg is a command-line program. Open Terminal (Applications -> Accessories -> Terminal) and then run:

ffmpeg
See the Using FFmpeg and x264 section of this guide (the first post (http://ubuntuforums.org/showthread.php?t=786095)) for some examples.

camberofculdi
January 11th, 2010, 09:12 PM
Thanks, actually Added WinFF to make it easier for me.

gypsumwolf
January 12th, 2010, 03:08 PM
Ubuntu 9.10

I did everything in the tutorial and it worked just fine except the last step.


wolf@voyager:~$ cd ffmpeg
wolf@voyager:~/ffmpeg$ ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
ERROR: libtheora not found

If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.
wolf@voyager:~/ffmpeg$ make
Makefile:1: config.mak: No such file or directory
libavdevice/Makefile:1: libavdevice/../config.mak: No such file or directory
libavformat/Makefile:1: libavformat/../config.mak: No such file or directory
libavcodec/Makefile:1: libavcodec/../config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libswscale/Makefile:1: libswscale/../config.mak: No such file or directory
make: *** No rule to make target `libswscale/../config.mak'. Stop.
wolf@voyager:~/ffmpeg$ sudo checkinstall --pkgname=ffmpeg --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default

checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.



*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 - Maintainer: [ root@voyager ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ ffmpeg ]
3 - Version: [ 4:0.5+svn20100112 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ ffmpeg ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ ffmpeg ]

Enter a number to change any of them or press ENTER to continue:

Installing with make...Installing with install...

========================= Installation results ===========================
Makefile:1: config.mak: No such file or directory
libavdevice/Makefile:1: libavdevice/../config.mak: No such file or directory
libavformat/Makefile:1: libavformat/../config.mak: No such file or directory
libavcodec/Makefile:1: libavcodec/../config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libswscale/Makefile:1: libswscale/../config.mak: No such file or directory
make: *** No rule to make target `libswscale/../config.mak'. Stop.

**** Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

mysoogal
January 12th, 2010, 04:34 PM
Ubuntu 9.10

I did everything in the tutorial and it worked just fine except the last step.


wolf@voyager:~$ cd ffmpeg
wolf@voyager:~/ffmpeg$ ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
ERROR: libtheora not found

If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.
wolf@voyager:~/ffmpeg$ make
Makefile:1: config.mak: No such file or directory
libavdevice/Makefile:1: libavdevice/../config.mak: No such file or directory
libavformat/Makefile:1: libavformat/../config.mak: No such file or directory
libavcodec/Makefile:1: libavcodec/../config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libswscale/Makefile:1: libswscale/../config.mak: No such file or directory
make: *** No rule to make target `libswscale/../config.mak'. Stop.
wolf@voyager:~/ffmpeg$ sudo checkinstall --pkgname=ffmpeg --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default

checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.



*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 - Maintainer: [ root@voyager ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ ffmpeg ]
3 - Version: [ 4:0.5+svn20100112 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ ffmpeg ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ ffmpeg ]

Enter a number to change any of them or press ENTER to continue:

Installing with make...Installing with install...

========================= Installation results ===========================
Makefile:1: config.mak: No such file or directory
libavdevice/Makefile:1: libavdevice/../config.mak: No such file or directory
libavformat/Makefile:1: libavformat/../config.mak: No such file or directory
libavcodec/Makefile:1: libavcodec/../config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libswscale/Makefile:1: libswscale/../config.mak: No such file or directory
make: *** No rule to make target `libswscale/../config.mak'. Stop.

**** Installation failed. Aborting package creation.

Cleaning up...OK

Bye.



try to install the deb from my post

Filename: libtheora_1.1.1-1_i386.deb
Size: 1.8 Mb
Download Link: http://www.filebox.com/ivow67iwe31i

it should work on 9.10

how to install deb file


To install a .deb file, become root and use the command:

dpkg -i libtheora_1.1.1-1_i386.deb

FakeOutdoorsman
January 13th, 2010, 05:22 AM
Ubuntu 9.10

I did everything in the tutorial and it worked just fine except the last step.


ERROR: libtheora not found

Did you skip step 4. Install libtheora by mistake? I won't be able to perform a test run for a week, so I'm reduced to guessing. If you don't need to encode to Theora video, then you can skip step 4 and then exclude --enable-libtheora from step 5. If you choose to skip step 4, then it might be a good idea to update the FFmpeg source files as well, so your commands could be:

cd ffmpeg
make distclean
svn up
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab

ghost_zero
January 15th, 2010, 11:14 PM
Just a small question:
FFmpeg will be updated with Lucid Lynx again in the repository - because currently it is still the same as for Karmic but of course there is still some time until release.

I am asking because with the default installed FFmpeg version when converting my recorded HD .ts streams to .mkv, the mkv is either completely unreadable or the video can't be viewed.
However, with a newer (tried the Windows binary version where a newer one exists) it works fine which is the reason why I will now upgrade FFmpeg manually to the newest version - however, I hope I won't need to do this again with Lucid Lynx.

mc4man
January 16th, 2010, 12:17 AM
Just a small question:
FFmpeg will be updated with Lucid Lynx

Doesn't seem apparent yet, though a new package release does seem in order
(there's been a split in dirac libs, though that could be ignored I guess

You could file a bug (wishlist) and see what the response is..., they could certainly go more current without regresions, though it may not be seen that way

(debian squeeze is up to an -r from 20091224

cmay4
January 16th, 2010, 07:05 AM
I'm also getting the same error running ffmpeg that someone else reported:


ffmpeg: error while loading shared libraries: libtheoraenc.so.1: cannot open shared object file: No such file or directory
I am on 9.10 and I did every step in the instructions. This is a fresh install of Ubuntu server.

The libraries appear to be there. Anyone else solve this?

Thanks!


$ ll lib/libth*
-rw-r--r-- 1 root root 376522 2010-01-16 00:56 lib/libtheora.a
-rw-r--r-- 1 root root 118226 2010-01-16 00:56 lib/libtheoradec.a
-rwxr-xr-x 1 root root 954 2010-01-16 00:56 lib/libtheoradec.la
lrwxrwxrwx 1 root root 21 2010-01-16 00:56 lib/libtheoradec.so -> libtheoradec.so.1.1.4
lrwxrwxrwx 1 root root 21 2010-01-16 00:56 lib/libtheoradec.so.1 -> libtheoradec.so.1.1.4
-rwxr-xr-x 1 root root 99820 2010-01-16 00:56 lib/libtheoradec.so.1.1.4
-rw-r--r-- 1 root root 309694 2010-01-16 00:56 lib/libtheoraenc.a
-rwxr-xr-x 1 root root 960 2010-01-16 00:56 lib/libtheoraenc.la
lrwxrwxrwx 1 root root 21 2010-01-16 00:56 lib/libtheoraenc.so -> libtheoraenc.so.1.1.2
lrwxrwxrwx 1 root root 21 2010-01-16 00:56 lib/libtheoraenc.so.1 -> libtheoraenc.so.1.1.2
-rwxr-xr-x 1 root root 280104 2010-01-16 00:56 lib/libtheoraenc.so.1.1.2
-rwxr-xr-x 1 root root 941 2010-01-16 00:56 lib/libtheora.la
lrwxrwxrwx 1 root root 19 2010-01-16 00:56 lib/libtheora.so -> libtheora.so.0.3.10
lrwxrwxrwx 1 root root 19 2010-01-16 00:56 lib/libtheora.so.0 -> libtheora.so.0.3.10
-rwxr-xr-x 1 root root 337408 2010-01-16 00:56 lib/libtheora.so.0.3.10

KrisZero
January 17th, 2010, 02:12 AM
I'm also getting the same error running ffmpeg that someone else reported:


ffmpeg: error while loading shared libraries: libtheoraenc.so.1: cannot open shared object file: No such file or directory
I am on 9.10 and I did every step in the instructions. This is a fresh install of Ubuntu server.


I have the same problem:


% ffmpeg
ffmpeg: error while loading shared libraries: libx264.so.83: cannot open shared object file: No such file or directory

% which ffmpeg
/usr/local/bin/ffmpeg

% sudo find / -name ffmpeg
/usr/share/doc/ffmpeg
/usr/local/share/ffmpeg
/usr/local/bin/ffmpeg
/home/[username]/Work/c/svn/ffmpeg
/home/[username]/Work/c/svn/ffmpeg/ffmpeg

% x264 --version
x264 0.83.1391 3d0f110
built on Jan 17 2010, gcc: 4.4.1

% ldd `where mplayer` | grep 264
libx264.so.67 => /usr/lib/libx264.so.67 (0x00007f366bd02000)

% uname --all
Linux [username]-linux 2.6.31-18-generic #55-Ubuntu SMP Fri Jan 8 14:54:52 UTC 2010 x86_64 GNU/Linux

How can I fix this?
And how can I get MPlayer to work with "libx264.so.83"?
I am on 9.10 (64 bit)

mc4man
January 17th, 2010, 02:39 AM
The instructions for this how-to do are having one build static only builds of theora and x264.

If you build shared versions then you should run this

sudo ldconfig

And how can I get MPlayer to work with "libx264.so.83"?
Best way is to now (re)build a svn mplayer

KrisZero
January 17th, 2010, 03:02 AM
The instructions for this how-to do are having one build static only builds of theora and x264.

If you build shared versions then you should run this

sudo ldconfig

Best way is to now (re)build a svn mplayer

Thanks,"sudo ldconfig" worked. ffmpeg and ffplay is working.
Seems like I need a new version of mplayer..

EDIT:
Well,
"sudo apt-get remove mplayer" and
"sudo apt-get install mplayer" did not work, so I need to compile it

Will this Guide do?
http://ubuntuforums.org/showthread.php?t=1305181
Or do I need to change something for "libx264.so.83"?

mc4man
January 17th, 2010, 03:45 AM
That guide will work just fine
If you wish mencoder/x264 then use this configure

/configure --cc=gcc-4.3 --confdir=/etc/mplayer

(probably best atm anyway - see last page or so

tvkpz
January 19th, 2010, 09:30 AM
Hi fakeoutdoorsman,

Really appreciate your effort to put up the installation guides.

I am facing a problem with running ffmpeg on my Jaunty. I keep getting this error message.

> ffmpeg: symbol lookup error: /usr/local/lib/libavdevice.so.52: undefined symbol: av_free_packet

I have successfully compiled ffmpeg and am developing some code using ffmpeg. The function av_free_packet was not there when I compiled ffmpeg. So for my own code I just wrote a function that does the job of this function and my programs work. But since this function is not there in the compiled code I downloaded I think this error is coming.

Any way to get around it? Thanks in advance for your reply

FakeOutdoorsman
January 20th, 2010, 02:47 AM
cmay4

I'm also getting the same error running ffmpeg that someone else reported:


ffmpeg: error while loading shared libraries: libtheoraenc.so.1: cannot open shared object file: No such file or directory
I am on 9.10 and I did every step in the instructions. This is a fresh install of Ubuntu server.

The libraries appear to be there. Anyone else solve this?

Thanks!

Maybe you need to run sudo ldconfig? I can't duplicate this error, but I updated the guide to install libtheora with --disable-shared.


tvkpz

Hi fakeoutdoorsman,

Really appreciate your effort to put up the installation guides.

I am facing a problem with running ffmpeg on my Jaunty. I keep getting this error message.

> ffmpeg: symbol lookup error: /usr/local/lib/libavdevice.so.52: undefined symbol: av_free_packet

I have successfully compiled ffmpeg and am developing some code using ffmpeg. The function av_free_packet was not there when I compiled ffmpeg. So for my own code I just wrote a function that does the job of this function and my programs work. But since this function is not there in the compiled code I downloaded I think this error is coming.

Any way to get around it? Thanks in advance for your reply

What command are you using to get this error? Did you add --enable-shared to your FFmpeg ./configure?

tvkpz
January 20th, 2010, 01:01 PM
Hi

I am trying to do a simple format conversion using ffmpeg from command line. Changing avi to wmv file.

ffmpeg -i input file .....etc.

The standard command line command. I think the function av_packet_free is not there in the source code. Otherwise when I wrote the function myself and compiled my code, it compiled and it is working also. If it was there there would have been a conflict.

Any idea of what is going wrong?

FakeOutdoorsman
January 20th, 2010, 10:10 PM
Hi

I am trying to do a simple format conversion using ffmpeg from command line. Changing avi to wmv file.

ffmpeg -i input file .....etc.

The standard command line command. I think the function av_packet_free is not there in the source code. Otherwise when I wrote the function myself and compiled my code, it compiled and it is working also. If it was there there would have been a conflict.

Any idea of what is going wrong?

If you can, show your complete FFmpeg command and the full FFmpeg output that includes the undefined symbol: av_free_packet error, or at the very least, show the output of ffmpeg -version so I can see if you changed the FFmpeg ./configure options because /usr/local/lib/libavdevice.so.52 should not exist unless (I assume) you added --enable-shared. If you did add this additional option, then running sudo ldconfig after installing FFmpeg may remove this error.

FakeOutdoorsman
January 20th, 2010, 10:28 PM
Some recent revisions (20954 or 20955 probably) to FFmpeg now makes threads detection not to work as expected, so -threads 0 with libx264 will probably end up being translated to -threads 1. At least as far as I can tell.

Example for my graybeard P4 HT CPU (should = 3 threads):

$ ffmpeg -i input -vcodec libx264 -vpre hq -crf 22 -threads 0 out.mp4
$ strings out.mp4 | grep threads
... threads=1 ...

So for now you should manually choose your threads. Also, the above strings command is useful if you want to see what x264/libx264 settings were used to encode a video.

Update: Looks like this was addressed in r21358, although I haven't tested it yet.

Ralob
January 25th, 2010, 02:01 AM
This guide is the best I have seen yet.

I have one question though. Should the pkgversion be 5:0 now?

erotavlas
January 27th, 2010, 02:37 PM
Hi all,

I'm using Ubuntu 9.10. I read this post and after I have installed ffmpeg +h264 from source.

Now I would like to use VLC whose transcoding capabilities are based on ffmpeg.

I have installed VLC from source (1.0.4) e repository (1.0.2) with the same result.

I would like to use the following command that work with h.263 and h.263p


vlc image.jpg --rtsp-caching=12000 --fake-duration 60000 --sout '#transcode{vcodec=H264,vb=800,width=352,height=28 8}:duplicate{dst=rtp{sdp=rtsp://192.168.0.4:8080/test.sdp}}' vlc://quit

I can't understand if the problem is in ffmpeg transcoding capabilities or in VLC

before installing ffmpeg with h.264 support i got this error


avcodec encoder error: cannot find encoder H264 - MPEG-4 AVC (part 10)
*** Your FFMPEG installation is crippled. ***
*** Please check with your FFMPEG packager. ***
*** This is NOT a VLC media player issue. ***
[0x970fa90] stream_out_transcode stream out error: cannot find video encoder (module:any fourcc:H264)
[0x970fa90] stream_out_transcode stream out error: cannot create video chain
[0x9974b80] main packetizer error: cannot create packetizer output (fake)

after installation


[0x893ff20] stream_out_rtp stream out error: cannot add this stream (unsupported codec: H264)
[0x86f0910] stream_out_transcode stream out error: cannot add this stream

I think that the problem is in VLC...

thank you

andrew.46
January 27th, 2010, 10:15 PM
Hi erotavlas,

I also build my own vlc but I am not very familiar with the vlc commandline syntax. What are the results of:



andrew@skamandros~$ vlc -l | grep 264
VLC media player 1.1.0-git The Luggage
x264 H.264/MPEG4 AVC encoder (x264)
h264 H264 video demuxer
packetizer_h264 H.264 video packetizer


I believe, and feel free to contradict me here, that vlc uses x264 directly for encoding but decoding depends on an appropriately configured libavcodec at compile time. I am not completely sure of this though and would welcome correction...

Andrew

Henrikx
January 27th, 2010, 10:29 PM
vlc -l | grep 264
VLC media player 1.0.4 Goldeneye
h264 H264-Videodemuxer
x264 H.264/MPEG4 AVC encoder (x264)
packetizer_h264 H.264-Videopacketizer

erotavlas
January 28th, 2010, 09:30 AM
Hi,

VLC


tore@tore-desktop:~/Scrivania/vlc-1.0.4$ vlc -l | grep 264
VLC media player 1.0.2 Goldeneye
h264 Demuxer video H264
packetizer_h264 Pacchettizatore video H.264
x264 Codificatore H.264/MPEG4 AVC (x264)







FFmpeg


tore@tore-desktop:~/Scrivania$ ffmpeg -codecs | grep 264
FFmpeg version SVN-r21462, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Jan 26 2010 18:39:51 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 7. 0 / 50. 7. 0
libavcodec 52.48. 0 / 52.48. 0
libavformat 52.47. 0 / 52.47. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 9. 0 / 0. 9. 0
libpostproc 51. 2. 0 / 51. 2. 0
D V D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
tore@tore-desktop:~/Scrivania$ ffmpeg -formats | grep 264
FFmpeg version SVN-r21462, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Jan 26 2010 18:39:51 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 7. 0 / 50. 7. 0
libavcodec 52.48. 0 / 52.48. 0
libavformat 52.47. 0 / 52.47. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 9. 0 / 0. 9. 0
libpostproc 51. 2. 0 / 51. 2. 0
DE h264 raw H.264 video format
E ipod iPod H.264 MP4 format
tore@tore-desktop:~/Scrivania/vlc-1.0.4$

erotavlas
January 28th, 2010, 09:33 AM
Hi,

VLC


tore@tore-desktop:~/Scrivania/vlc-1.0.4$ vlc -l | grep 264
VLC media player 1.0.2 Goldeneye
h264 Demuxer video H264
packetizer_h264 Pacchettizatore video H.264
x264 Codificatore H.264/MPEG4 AVC (x264)







FFmpeg


tore@tore-desktop:~/Scrivania$ ffmpeg -codecs | grep 264
FFmpeg version SVN-r21462, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Jan 26 2010 18:39:51 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 7. 0 / 50. 7. 0
libavcodec 52.48. 0 / 52.48. 0
libavformat 52.47. 0 / 52.47. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 9. 0 / 0. 9. 0
libpostproc 51. 2. 0 / 51. 2. 0
D V D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
tore@tore-desktop:~/Scrivania$ ffmpeg -formats | grep 264
FFmpeg version SVN-r21462, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Jan 26 2010 18:39:51 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 7. 0 / 50. 7. 0
libavcodec 52.48. 0 / 52.48. 0
libavformat 52.47. 0 / 52.47. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 9. 0 / 0. 9. 0
libpostproc 51. 2. 0 / 51. 2. 0
DE h264 raw H.264 video format
E ipod iPod H.264 MP4 format
tore@tore-desktop:~/Scrivania/vlc-1.0.4$


What do you think? Where is the problem?

Thank you

Henrikx
January 28th, 2010, 10:00 AM
@erotavlas
Why without libavfilter?


ffmpeg -codecs | grep 264
FFmpeg version SVN-r21500, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Jan 28 2010 09:49:28 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-libdirac --enable-libschroedinger --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-avfilter --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libdc1394 --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex
libavutil 50. 7. 0 / 50. 7. 0
libavcodec 52.48. 0 / 52.48. 0
libavformat 52.47. 0 / 52.47. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.17. 0 / 1.17. 0
libswscale 0. 9. 0 / 0. 9. 0
libpostproc 51. 2. 0 / 51. 2. 0
D V D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10

ffmpeg -formats | grep 264
FFmpeg version SVN-r21500, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Jan 28 2010 09:49:28 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-libdirac --enable-libschroedinger --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-avfilter --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libdc1394 --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex
libavutil 50. 7. 0 / 50. 7. 0
libavcodec 52.48. 0 / 52.48. 0
libavformat 52.47. 0 / 52.47. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.17. 0 / 1.17. 0
libswscale 0. 9. 0 / 0. 9. 0
libpostproc 51. 2. 0 / 51. 2. 0
DE h264 raw H.264 video format
E ipod iPod H.264 MP4 format

erotavlas
January 28th, 2010, 03:02 PM
I have followed this post for installation http://ubuntuforums.org/showthread.php?t=786095

What do you think about the problem?

FakeOutdoorsman
January 29th, 2010, 09:31 PM
This guide is the best I have seen yet.

I have one question though. Should the pkgversion be 5:0 now?

I'm glad you like the guide. Are you referring to the epoch? According to the Ubuntu Policy Manual (http://people.canonical.com/~cjwatson/ubuntu-policy/policy.html/ch-controlfields.html#s-f-Version), the format is: [epoch:]upstream_version[-debian_revision] and the epoch is "provided to allow mistakes in the version numbers of older versions of a package, and also a package's previous version numbering schemes, to be left behind".

I had to look this up because I can't seem to make myself learn the proper way of versioning my self-compiled packages. I simply edit the pkgversion to properly reflect the build date which conincidentaly is always higher than the official repository version and therefore makes apt not suggest an upgrade with the official, and older, version.

brianwc
January 31st, 2010, 03:26 PM
I'm trying to follow this HOWTO on a Debian Lenny installation and I get an error (undefined reference to `x264_encoder_open_84') when I try to make ffmpeg:


ffmpeg.c: In function ‘do_video_out’:
ffmpeg.c:1023: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type
ffmpeg.c: In function ‘output_packet’:
ffmpeg.c:1317: warning: suggest parentheses around && within ||
gcc -L"/home/brian/Videos/ffmpeg"/libavcodec -L"/home/brian/Videos/ffmpeg"/libavdevice -L"/home/brian/Videos/ffmpeg"/libavfilter -L"/home/brian/Videos/ffmpeg"/libavformat -L"/home/brian/Videos/ffmpeg"/libavutil -L"/home/brian/Videos/ffmpeg"/libpostproc -L"/home/brian/Videos/ffmpeg"/libswscale -Wl,--warn-common -Wl,--as-needed -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libpostproc -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libswscale -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavfilter -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavdevice -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavformat -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavcodec -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavutil -Wl,-Bsymbolic -o ffmpeg_g ffmpeg.o cmdutils.o -lavdevice -lavformat -lavcodec -lpostproc -lswscale -lavutil -lz -lbz2 -pthread -lm -lfaac -lfaad -lmp3lame -lm -lopencore-amrnb -lm -lopencore-amrwb -lm -ltheoraenc -ltheoradec -logg -lx264 -lm -lxvidcore -lasound -ljack -ldl -lasound -ljack -lX11 -lXext -lXfixes -lasound
/home/brian/Videos/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/brian/Videos/ffmpeg/libavcodec/libx264.c:286: undefined reference to `x264_encoder_open_84'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
rm ffmpeg.o

I've tried to follow the steps very closely (with the exception of building all this in my /home partition as I worried my / partition would run out of space.) Any thoughts?

Bachstelze
January 31st, 2010, 03:34 PM
I'm trying to follow this HOWTO on a Debian Lenny installation and I get an error (undefined reference to `x264_encoder_open_84') when I try to make ffmpeg:


ffmpeg.c: In function ‘do_video_out’:
ffmpeg.c:1023: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type
ffmpeg.c: In function ‘output_packet’:
ffmpeg.c:1317: warning: suggest parentheses around && within ||
gcc -L"/home/brian/Videos/ffmpeg"/libavcodec -L"/home/brian/Videos/ffmpeg"/libavdevice -L"/home/brian/Videos/ffmpeg"/libavfilter -L"/home/brian/Videos/ffmpeg"/libavformat -L"/home/brian/Videos/ffmpeg"/libavutil -L"/home/brian/Videos/ffmpeg"/libpostproc -L"/home/brian/Videos/ffmpeg"/libswscale -Wl,--warn-common -Wl,--as-needed -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libpostproc -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libswscale -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavfilter -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavdevice -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavformat -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavcodec -Wl,-rpath-link,"/home/brian/Videos/ffmpeg"/libavutil -Wl,-Bsymbolic -o ffmpeg_g ffmpeg.o cmdutils.o -lavdevice -lavformat -lavcodec -lpostproc -lswscale -lavutil -lz -lbz2 -pthread -lm -lfaac -lfaad -lmp3lame -lm -lopencore-amrnb -lm -lopencore-amrwb -lm -ltheoraenc -ltheoradec -logg -lx264 -lm -lxvidcore -lasound -ljack -ldl -lasound -ljack -lX11 -lXext -lXfixes -lasound
/home/brian/Videos/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/brian/Videos/ffmpeg/libavcodec/libx264.c:286: undefined reference to `x264_encoder_open_84'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
rm ffmpeg.o

I've tried to follow the steps very closely (with the exception of building all this in my /home partition as I worried my / partition would run out of space.) Any thoughts?

There has been a lot of changes in the x264 ABI those past few days, make sure your x264 and ffmpeg sources are up-to-date. If you are using my x264 packages, an updated one will be available later today.

mc4man
January 31st, 2010, 04:35 PM
undefined reference to ..blah, blah
That can also occur when you have a previously installed libx264-dev
(typically a package version in /usr

brianwc
January 31st, 2010, 06:34 PM
Thanks mc4man, I think I did have a previously installed libx264-dev. apt-get removing everything and doing the x264 and ffmpeg builds over again did the trick.

david h george
February 4th, 2010, 06:38 PM
Love to get a free ride to FFmpeg. Got karmic koala and would like to down load the thing from the application menu.
Thanks for all the inside baseball though
David

Ralob
February 4th, 2010, 09:36 PM
I'm glad you like the guide. Are you referring to the epoch? According to the Ubuntu Policy Manual (http://people.canonical.com/~cjwatson/ubuntu-policy/policy.html/ch-controlfields.html#s-f-Version), the format is: [epoch:]upstream_version[-debian_revision] and the epoch is "provided to allow mistakes in the version numbers of older versions of a package, and also a package's previous version numbering schemes, to be left behind".

I had to look this up because I can't seem to make myself learn the proper way of versioning my self-compiled packages. I simply edit the pkgversion to properly reflect the build date which conincidentaly is always higher than the official repository version and therefore makes apt not suggest an upgrade with the official, and older, version.

Thanks for the guide. I myself always screw up the version numbers on my own debs, heh. I just thought I saw some other debs having a different epoch and wasn't certain. Doesn't really matter as I compile daily and slap apt for suggesting updates anyway :P

Again, thank you so much for your guide. It truly is a lifesaver.

FakeOutdoorsman
February 5th, 2010, 11:36 PM
Thanks for the guide. I myself always screw up the version numbers on my own debs, heh. I just thought I saw some other debs having a different epoch and wasn't certain. Doesn't really matter as I compile daily and slap apt for suggesting updates anyway :P

Again, thank you so much for your guide. It truly is a lifesaver.

Are Synaptic or apt(itude) suggesting updates to your compiled x264 and FFmpeg packages? They don't do that for me, but maybe I overlooked something.

Jive Turkey
February 7th, 2010, 03:23 AM
running through this today I'm getting this message when I go to compile ffmpeg:
ERROR: libx264 version must be >= 0.83.

If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.


my config.err ends with:
check_cpp_condition x264.h X264_BUILD >= 0.83
check_cpp
BEGIN /tmp/ffconf.dXIvShEq.c
1 #include <x264.h>
2 #if !(X264_BUILD >= 0.83)
3 #error "unsatisfied condition: X264_BUILD >= 0.83"
4 #endif
END /tmp/ffconf.dXIvShEq.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.ELAbnWvl.o /tmp/ffconf.dXIvShEq.c
In file included from /tmp/ffconf.dXIvShEq.c:1:
/usr/local/include/x264.h:32:4: warning: #warning You must include stdint.h or inttypes.h before x264.h
/tmp/ffconf.dXIvShEq.c:2:21: error: floating constant in preprocessor expression
ERROR: libx264 version must be >= 0.83.


Methinks someone broke something, but I'm not going to mess around with getting someone who knows what to do on IRC unless it still appears to be broken in a week or so. Also, I don't thing the git server at videolan.org likes me any more;( as it gives connection refused when I try to checkout.

Bachstelze
February 7th, 2010, 03:41 AM
running through this today I'm getting this message when I go to compile ffmpeg:
ERROR: libx264 version must be >= 0.83.

If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.


my config.err ends with:
check_cpp_condition x264.h X264_BUILD >= 0.83
check_cpp
BEGIN /tmp/ffconf.dXIvShEq.c
1 #include <x264.h>
2 #if !(X264_BUILD >= 0.83)
3 #error "unsatisfied condition: X264_BUILD >= 0.83"
4 #endif
END /tmp/ffconf.dXIvShEq.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.ELAbnWvl.o /tmp/ffconf.dXIvShEq.c
In file included from /tmp/ffconf.dXIvShEq.c:1:
/usr/local/include/x264.h:32:4: warning: #warning You must include stdint.h or inttypes.h before x264.h
/tmp/ffconf.dXIvShEq.c:2:21: error: floating constant in preprocessor expression
ERROR: libx264 version must be >= 0.83.


Methinks someone broke something, but I'm not going to mess around with getting someone who knows what to do on IRC unless it still appears to be broken in a week or so. Also, I don't thing the git server at videolan.org likes me any more;( as it gives connection refused when I try to checkout.

You can use my x264 packages (http://doom10.org/index.php?topic=3.msg414#msg414) in the meantime.. ;)

</shameless self-advertising>

n.hinton
February 7th, 2010, 05:00 AM
</shameless self-advertising>

Then why re quote it???

FakeOutdoorsman
February 7th, 2010, 05:13 AM
running through this today I'm getting this message when I go to compile ffmpeg:
ERROR: libx264 version must be >= 0.83.

If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.


my config.err ends with:
check_cpp_condition x264.h X264_BUILD >= 0.83
check_cpp
BEGIN /tmp/ffconf.dXIvShEq.c
1 #include <x264.h>
2 #if !(X264_BUILD >= 0.83)
3 #error "unsatisfied condition: X264_BUILD >= 0.83"
4 #endif
END /tmp/ffconf.dXIvShEq.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.ELAbnWvl.o /tmp/ffconf.dXIvShEq.c
In file included from /tmp/ffconf.dXIvShEq.c:1:
/usr/local/include/x264.h:32:4: warning: #warning You must include stdint.h or inttypes.h before x264.h
/tmp/ffconf.dXIvShEq.c:2:21: error: floating constant in preprocessor expression
ERROR: libx264 version must be >= 0.83.


Methinks someone broke something, but I'm not going to mess around with getting someone who knows what to do on IRC unless it still appears to be broken in a week or so. Also, I don't thing the git server at videolan.org likes me any more;( as it gives connection refused when I try to checkout.

Jive Turkey,

I just tested the guide and I can't duplicate your error message on my virtual 32-bit Karmic test system. What version of Ubuntu are you using? Did you change any of the commands in the guide?

Might be worth another try and if it doesn't work you can go from there. See the Updating Your Installation section of this guide.

qyot27
February 7th, 2010, 08:34 AM
If I'm interpreting that warning correctly, it means that there are old versions of libx264 lingering around and ffmpeg doesn't like that. As it said, it now requires a version of libx264 at or over 0.83 - which means, it needs to be a recent revision, as even r1373 was 0.80. Not sure when it kicked over (sometime in January, however - the relevant commit to FFmpeg requiring 0.83 was on January 19th, 2010), as I haven't kept up with building my stuff lately, but basically - purge all traces of x264, and then rebuild brand new from the latest git. If you have to, go straight to the git repo (http://git.videolan.org/?p=x264.git;a=summary) in Firefox and download the tarball from the web interface. I don't know if you'll get a proper SVN revision number that way, though.

markp1989
February 10th, 2010, 10:29 PM
Thanks for this thread, it helped me out alot :)

andrew.46
February 13th, 2010, 01:30 AM
Some big news for FFmpeg:


------------------------------------------------------------------------
r21770 | rbultje | 2010-02-13 01:22:41 +1100 (Sat, 13 Feb 2010) | 3 lines

WMAVoice decoder.

In a few quick tests on my system it still seems a little buggy but good to see this in FFmpeg:


andrew@skamandros~$ ffmpeg -codecs | grep wma
FFmpeg version SVN-r21783, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Feb 13 2010 11:08:43 with gcc 4.3.3
configuration: --prefix=/usr --mandir=/usr/man --enable-shared
--disable-static --enable-postproc --enable-avfilter --enable-pthreads
--disable-ffserver --enable-libtheora --enable-libvorbis
--enable-x11grab --enable-libmp3lame --enable-libx264 --enable-libfaac
--enable-libfaad --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-version3 --enable-libspeex --enable-zlib --enable-nonfree
--enable-gpl
libavutil 50. 9. 0 / 50. 9. 0
libavcodec 52.54. 0 / 52.54. 0
libavformat 52.52. 0 / 52.52. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.17. 0 / 1.17. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
D A wmapro Windows Media Audio 9 Professional
DEA wmav1 Windows Media Audio 1
DEA wmav2 Windows Media Audio 2
D A wmavoice Windows Media Audio Voice

Andrew

SuperSonic4
February 13th, 2010, 01:32 AM
Some big news for FFmpeg:


------------------------------------------------------------------------
r21770 | rbultje | 2010-02-13 01:22:41 +1100 (Sat, 13 Feb 2010) | 3 lines

WMAVoice decoder.

In a few quick tests on my system it still seems a little buggy but good to see this in FFmpeg:


andrew@skamandros~$ ffmpeg -codecs | grep wma
FFmpeg version SVN-r21783, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Feb 13 2010 11:08:43 with gcc 4.3.3
configuration: --prefix=/usr --mandir=/usr/man --enable-shared
--disable-static --enable-postproc --enable-avfilter --enable-pthreads
--disable-ffserver --enable-libtheora --enable-libvorbis
--enable-x11grab --enable-libmp3lame --enable-libx264 --enable-libfaac
--enable-libfaad --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-version3 --enable-libspeex --enable-zlib --enable-nonfree
--enable-gpl
libavutil 50. 9. 0 / 50. 9. 0
libavcodec 52.54. 0 / 52.54. 0
libavformat 52.52. 0 / 52.52. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.17. 0 / 1.17. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
D A wmapro Windows Media Audio 9 Professional
DEA wmav1 Windows Media Audio 1
DEA wmav2 Windows Media Audio 2
D A wmavoice Windows Media Audio Voice

Andrew

Sweet I have it too, although you're a few revisions ahead of me :o *updates*

What would it be used for? I don't have a test file to convert from:(

andrew.46
February 13th, 2010, 02:15 AM
Hi SuperSonic,


I don't have a test file to convert from:(

There are a couple here:

http://samples.mplayerhq.hu/A-codecs/WMA9/WMAVoice/

Edit: And here http://samples.mplayerhq.hu/A-codecs/WMSP/

The interesting part will be when MPlayer picks up the new avcodec.

Andrew

mc4man
February 13th, 2010, 04:46 AM
Andrew - very interesting - considering the wmas dmo was broken in vlc it makes for a workable replacement (needs a little maturing possibly, but does work ok atm.


[0x87c0d30] asf demux debug: added new audio stream(codec:0xa,ID:1)
[0x87c0d30] main demux debug: using demux module "asf"
[0x87c0d30] main demux debug: TIMER module_need() : 3.796 ms - Total 3.796 ms / 1 intvls (Avg 3.796 ms)
[0x8636220] main input debug: looking for a subtitle file in /home/doug/Videos/
[0x87c1cd0] main decoder debug: looking for decoder module: 33 candidates
[0x87c1cd0] avcodec decoder debug: libavcodec initialized (interface 0x343600)
[0x87c1cd0] avcodec decoder debug: ffmpeg codec (Windows Media Audio Speech) started

andrew.46
February 13th, 2010, 06:57 AM
Hi mc4man,


Andrew - very interesting - considering the wmas dmo was broken in vlc it makes for a workable replacement (needs a little maturing possibly, but does work ok atm.

How do I force cvlc to use avcodec? I have tried and failed with my wma speech files :(.

Andrew

falken78
February 15th, 2010, 09:09 PM
First: Thanks for a great guide!

But I have a problem... I am running Ubuntu 8.10 with an mythtv installtion. This comes with a packaged named libx264-59. When I run the installation guideline I can compile and install x264, but I run into problem when trying to install ffmpeg.

The error message:
ERROR: libx264 version must be >= 0.83.

My first try was to remove this libx264-59 package, but then the system wants to uninstall a lot of other packages (like mythtv, ... bla bla bla..) which all have dependencies to this libx264-59 package.

How can I upgrade my x264 without losing my mythtv installation?

mc4man
February 15th, 2010, 09:29 PM
You can leave libx264-59, it's just a shared lib and no problem having installed and needed by some repo apps

Make sure though that you remove libx264-dev, preferably before starting the how-to, certainly before configuring and building ffmpeg

(refer to page 1 - step 1 of this guide

sudo apt-get remove ffmpeg x264 libx264-dev

You can have multiple libx264-XX packages installed ( 1 per core version #), but should only have 1 set of dev files installed at one time - either a static x264 build as in this how-to or a libx264-dev package like from ubuntu repo or ppa

falken78
February 15th, 2010, 09:48 PM
thanks for the quick reply, but I still get errors.

Could this be something else then... should I point the ffmpeg ./configure to the point where the correct x264 is?

Here is what I did since my last post:

1. (removing as described in step 1)

(Reading database ... 169337 files and directories currently installed.)

Removing ffmpeg ...

Removing libx264-dev ...

Removing x264 ...



2. Result from x264 installation

Done. The new package has been installed and saved to

Maybe this could be of interest:
Installing with make install...

========================= Installation results ===========================
install -d /usr/local/bin /usr/local/include
install -d /usr/local/lib /usr/local/lib/pkgconfig
install -m 644 x264.h /usr/local/include
install -m 644 libx264.a /usr/local/lib
install -m 644 x264.pc /usr/local/lib/pkgconfig
install x264 /usr/local/bin
ranlib /usr/local/lib/libx264.a



3. I get error with libtheora (but this is no requriment from my side, so no worries with this issue)

4. installtion ffmpeg (removing the libtheora option)

./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-x11grab

ERROR: libx264 version must be >= 0.83.



If you think configure made a mistake, make sure you are using the latest

version from SVN. If the latest version fails, report the problem to the

ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.

Include the log file "config.err" produced by configure as this will help

solving the problem.

Still same issue... :-(

When checking for the libx264 i get this:

/usr/lib$ ls libx264*
libx264.so.59

/usr/local/lib$ ls libx264*
libx264.a

mc4man
February 15th, 2010, 10:43 PM
Still same issue...
Don't quite get why yet, what's this show at top..

x264 --help
I just built a new x264 & ffmpeg - for above I have this


doug@doug-laptop:~/ffmpeg$ x264 --help
x264 core:85 r1442 781d300

FakeOutdoorsman
February 16th, 2010, 08:00 AM
3. I get error with libtheora (but this is no requriment from my side, so no worries with this issue)

You found an omission in my guide. I added the missing options and now libtheora should install. Not sure how I missed that one.


ERROR: libx264 version must be >= 0.83.
...
Include the log file "config.err" produced by configure as this will help
I would guess that you still have an old x264 on your system. Did you make sure to use make distclean after removing libx264-dev as described in Updating Your Installation on the first page of this guide?

Does config.err contain anything useful (usually at the end of the file)?

falken78
February 16th, 2010, 02:26 PM
Now I feel a bit stupid.. maybe I was tiered when starting this upgrade of x264 on my system.

I manage to solve my issues... and it was simple, I just hade to follow the guide for the correct version of my system (8.10):
http://ubuntuforums.org/showpost.php?p=8345112&postcount=636

Just as stated on page 1...


sorry for all the fuss... :popcorn:

Everything looks good now on my 8.10 Ubunt 64:

ffmpeg -version
FFmpeg version SVN-r21847, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Feb 16 2010 14:18:00 with gcc 4.3.2
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 9. 0 / 50. 9. 0
libavcodec 52.54. 0 / 52.54. 0
libavformat 52.52. 0 / 52.52. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
FFmpeg SVN-r21847
libavutil 50. 9. 0 / 50. 9. 0
libavcodec 52.54. 0 / 52.54. 0
libavformat 52.52. 0 / 52.52. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0


x264 --version
x264 0.85.1442 781d300
built on Feb 16 2010, gcc: 4.3.2

Objekt
February 17th, 2010, 05:19 PM
First, thanks to the OP for an excellent HOWTO. I now have ffmpeg installed & am able to convert from the native *.avi files produced by my Canon Powershot A540, to a more useful format, like mpeg4.

Second, is there any way to put a convenient GUI frontend on ffmpeg? The "ffmpeg GUI" app from the Ubuntu repositories doesn't work. If I try to convert my .avi's to mpeg4 there, I get the "libx264 not found" error, even though I definitely have x264 stuff installed, thanks to this HOWTO.

I assume this is a shortcoming of the ffmpeg GUI app, not anything to do with ffmpeg itself, since the latter seems to work. So is there an alternate GUI app for converting vids?

nevaeh.aaric
February 18th, 2010, 07:21 AM
Yes locking versions work but how about trying to get synaptic to see that you installed libx264 via the source code with check install so far according to synaptic i only have x264 the binary installed and not libx264 and libx264-Dev so now other multimedia apps will not install without using the ropes version of libx264 if i try to install via synaptic

FakeOutdoorsman
February 18th, 2010, 09:39 AM
First, thanks to the OP for an excellent HOWTO. I now have ffmpeg installed & am able to convert from the native *.avi files produced by my Canon Powershot A540, to a more useful format, like mpeg4.

Second, is there any way to put a convenient GUI frontend on ffmpeg? The "ffmpeg GUI" app from the Ubuntu repositories doesn't work. If I try to convert my .avi's to mpeg4 there, I get the "libx264 not found" error, even though I definitely have x264 stuff installed, thanks to this HOWTO.

I assume this is a shortcoming of the ffmpeg GUI app, not anything to do with ffmpeg itself, since the latter seems to work. So is there an alternate GUI app for converting vids?

Do you mean WinFF? What version of Ubuntu are you using?


Yes locking versions work but how about trying to get synaptic to see that you installed libx264 via the source code with check install so far according to synaptic i only have x264 the binary installed and not libx264 and libx264-Dev so now other multimedia apps will not install without using the ropes version of libx264 if i try to install via synaptic

I don't know how to split the self-compiled package into separate x264, libx264-xx, and libx264-dev packages. However, you could rename the package as x264-git (or whatever you like) during the checkinstall process. I should probably test this theory, but it would probably work fine along with the repository versions.

Objekt
February 18th, 2010, 04:02 PM
Do you mean WinFF? What version of Ubuntu are you using?

Yes, that one. 9.10 64-bit.

I did get what I needed done with the command line, but it is a bit tedious when dealing with very long pathnames.

SuperSonic4
February 18th, 2010, 04:08 PM
Even with tab completion?

mc4man
February 19th, 2010, 02:46 AM
--disable-lavf-input disables libavformat input
--disable-ffms-input disables ffmpegsource input


Am curious about these 2 options ( which are obviously enabled by default.

Hadn't had a reason to ck. the ./configure lately till the other day when a x264 build failed - had a ffmpeg installed that was built off of a 83 core, the new x264 (85 core) checked ffmpeg during the build and failed on that..

Bachstelze
February 19th, 2010, 03:06 AM
Am curious about these 2 options ( which are obviously enabled by default.

They are actually not really enabled by default, but are autodetected like all other options (enabled if the relevant headers are installed).

As the description says, it compiles x264 with libavformat input support, which allows to use files of any format libavformat supports as input for x264, something like:


x264 -o output.264 input.mkv

It's really only useful if you use the CLI x264 encoder. If using mencoder or ffmpeg, the input is handled by libavformat anyway since that's what those programs use.

FakeOutdoorsman
February 19th, 2010, 03:18 AM
I have only heard of ffmpegsource (http://code.google.com/p/ffmpegsource/) but have never used it myself. As for lavf and getting around the circular dependency if you want to use both FFmpeg/libx264 and x264/lavf, I suppose you would have to compile FFmpeg without --enable-libx264, compile x264, remove FFmpeg, and then re-compile FFmpeg with --enable-libx264.

Sounds good to me, but I haven't tried it.

mc4man
February 19th, 2010, 03:25 AM
They are actually not really enabled by default, but are autodetected like all other options (enabled if the relevant headers are installed).

Thanks - that actually makes more sense than what I was at first thinking. though an even dumber question may be which comes first, - ffmpeg or x264, .. or x264 (no ffmpeg headers,), ffmpeg, an x264 redo..?
(in light of the core ver. changing very quickly lately

edit:
didn't see last reply, which seems another way..

FakeOutdoorsman
February 19th, 2010, 03:30 AM
Thanks - that actually makes more sense than what I was at first thinking. though an even dumber question may be which comes first, - ffmpeg or x264, .. or x264 (no ffmpeg headers,), ffmpeg, an x264 redo..?
(in light of the core ver. changing very quickly lately

edit:
didn't see last reply, which seems another way..

I like your way better. Much less compiling time.

qyot27
February 19th, 2010, 05:40 PM
Well, FFmpegSource originated as an AviSynth plugin (which is how I started out with it a few years ago), but as of the 2.x branch, is cross-platform.

You wouldn't have to compile x264 first, as the base requirement for FFmpegSource is only the decoding support, which x264 doesn't affect. There are certain benefits of using FFMS2 input over LAVF, but I can't remember exactly what they were (probably frame accuracy and some other things - it was listed in the posts concerning the difference over on Doom9 & Doom10).

I'd compile the decoder-only FFmpeg to a separate prefix, build FFMS2 against that prefix, build x264 as usual but against the decoder-only FFmpeg prefix and FFMS2, and then do a regular FFmpeg compile against that x264. That's probably the cleanest way. Don't ask me how to do that exactly, though - I only tried it once and didn't give it that kind of meticulous attention. I have no need for LAVF and FFMS2 input, so I just leave them out.

Bachstelze
February 23rd, 2010, 04:44 PM
Just a FYI: if x264 r1460 segfaults, it's not just you. :p It segfaults for me on five different machines, running three different OSes.

verb3k
February 24th, 2010, 01:01 AM
AviSynth provides an encoder with a critical feature, that is the ability to do frame-accurate trimming on both video and audio. Once FFmpeg gets frame-accurate seek/trim, the need for avis will be decreased. Just for the record, there already is an extension to allow frame-accurate seek in ffmpeg (http://github.com/lbrandy/ffmpeg-fas).

But I think you just can't beat the amount of powerful functions and plugins avis has. It certainly is more convenient to use, at least on windows.

Bachstelze
February 24th, 2010, 07:36 AM
AviSynth provides an encoder with a critical feature, that is the ability to do frame-accurate trimming on both video and audio. Once FFmpeg gets frame-accurate seek/trim, the need for avis will be decreased. Just for the record, there already is an extension to allow frame-accurate seek in ffmpeg (http://github.com/lbrandy/ffmpeg-fas).

But I think you just can't beat the amount of powerful functions and plugins avis has. It certainly is more convenient to use, at least on windows.

You can use it on Linux (http://ubuntuforums.org/showthread.php?t=1333264), and it's not that much of a hassle (as long as you don't use VSFilter :p).

Objekt
February 24th, 2010, 03:21 PM
I'll have to give that a look. I've been messing with Pitivi Video Editor, but it has some issues. In one case, the output had desynced video & audio. As in, the sound lagged slightly behind the video. Very annoying.

May have been because I was using .avi clips to make one larger clip. I guess Pitivi doesn't do "frame accurate" editing.

I tried again, using .mp4 files (converted courtesy ffmpeg at the command line) of the same source material. Video and audio came out in sync, but I also got some kind of audio artifact. Bah. :(

flander3444
February 25th, 2010, 08:07 PM
when trying to install ffmpeg after make I get lots of garbage, then it finishes off with...

libavcodec/svq3.c:552: error: subscripted value is neither array nor pointer
libavcodec/svq3.c:553: error: subscripted value is neither array nor pointer
libavcodec/svq3.c:627: warning: passing argument 1 of ‘memset’ makes pointer from integer without a cast
/usr/include/bits/string3.h:78: note: expected ‘void *’ but argument is of type ‘int8_t’
libavcodec/svq3.c: In function ‘svq3_decode_slice_header’:
libavcodec/svq3.c:733: warning: cast discards qualifiers from pointer target type
libavcodec/svq3.c:736: warning: cast discards qualifiers from pointer target type
libavcodec/svq3.c:777: warning: passing argument 1 of ‘memset’ makes pointer from integer without a cast
/usr/include/bits/string3.h:78: note: expected ‘void *’ but argument is of type ‘int8_t’
libavcodec/svq3.c:778: warning: passing argument 1 of ‘memset’ makes pointer from integer without a cast
/usr/include/bits/string3.h:78: note: expected ‘void *’ but argument is of type ‘int8_t’
libavcodec/svq3.c:781: warning: passing argument 1 of ‘memset’ makes pointer from integer without a cast
/usr/include/bits/string3.h:78: note: expected ‘void *’ but argument is of type ‘int8_t’
libavcodec/svq3.c:784: error: subscripted value is neither array nor pointer
make: *** [libavcodec/svq3.o] Error 1


i am using 9.10 64bit

anyone got any idea what I did wrong?

thanks

Bachstelze
February 25th, 2010, 08:11 PM
when trying to install ffmpeg after make I get lots of garbage, then it finishes off with...

libavcodec/svq3.c:552: error: subscripted value is neither array nor pointer
libavcodec/svq3.c:553: error: subscripted value is neither array nor pointer
libavcodec/svq3.c:627: warning: passing argument 1 of ‘memset’ makes pointer from integer without a cast
/usr/include/bits/string3.h:78: note: expected ‘void *’ but argument is of type ‘int8_t’
libavcodec/svq3.c: In function ‘svq3_decode_slice_header’:
libavcodec/svq3.c:733: warning: cast discards qualifiers from pointer target type
libavcodec/svq3.c:736: warning: cast discards qualifiers from pointer target type
libavcodec/svq3.c:777: warning: passing argument 1 of ‘memset’ makes pointer from integer without a cast
/usr/include/bits/string3.h:78: note: expected ‘void *’ but argument is of type ‘int8_t’
libavcodec/svq3.c:778: warning: passing argument 1 of ‘memset’ makes pointer from integer without a cast
/usr/include/bits/string3.h:78: note: expected ‘void *’ but argument is of type ‘int8_t’
libavcodec/svq3.c:781: warning: passing argument 1 of ‘memset’ makes pointer from integer without a cast
/usr/include/bits/string3.h:78: note: expected ‘void *’ but argument is of type ‘int8_t’
libavcodec/svq3.c:784: error: subscripted value is neither array nor pointer
make: *** [libavcodec/svq3.o] Error 1


i am using 9.10 64bit

anyone got any idea what I did wrong?

thanks

Probably nothing, this seems to indicate a bug in the ffmpeg source code.

EDIT: I can't reproduce those results though, it works fine here both on Linux and OS X. Maybe update your ffmpeg source code?

FakeOutdoorsman
February 25th, 2010, 08:27 PM
Probably nothing, this seems to indicate a bug in the ffmpeg source code.

You're correct and it's already been fixed (not sure if anyone tested the fix though). Nothing you did wrong, flander3444. Just update the FFmpeg source and start again. Refer to the Updating Your Installation section of this guide for more details on how to do that.

flander3444
February 25th, 2010, 09:19 PM
ok cheers guys installed now and seems to be working :D

andrew.46
February 26th, 2010, 11:26 AM
It looks like libavcodec never stops, I have just seen the libavcodec native amr narrow band decoder arrive:



andrew@skamandros~$ ffmpeg -codecs | grep amr
FFmpeg version SVN-r22073, Copyright (c) 2000-2010 the FFmpeg developers
built on Feb 26 2010 21:23:17 with gcc 4.3.3
configuration: --prefix=/usr --mandir=/usr/man --enable-shared
--disable-static --enable-postproc --enable-avfilter --enable-pthreads
--disable-ffserver --enable-libtheora --enable-libvorbis
--enable-x11grab --enable-libmp3lame --enable-libx264 --enable-libfaac
--enable-libfaad --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-version3 --enable-libspeex --enable-zlib --enable-nonfree
--enable-gpl
libavutil 50. 9. 0 / 50. 9. 0
libavcodec 52.55. 0 / 52.55. 0
libavformat 52.54. 0 / 52.54. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.17. 0 / 1.17. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
D A amrnb Adaptive Multi-Rate NarrowBand
DEA libopencore_amrnb OpenCORE Adaptive Multi-Rate (AMR) Narrow-Band
D A libopencore_amrwb OpenCORE Adaptive Multi-Rate (AMR) Wide-Band


Very exciting times indeed :).

Andrew

FakeOutdoorsman
February 26th, 2010, 09:09 PM
It looks like libavcodec never stops, I have just seen the libavcodec native amr narrow band decoder arrive:

Very exciting times indeed :).

Andrew

Good news. Also somewhat recent is the Indeo 5 decoder and a patch for a HE-AAC v1 decoder has been bouncing around in ffmpeg-devel lately.

FakeOutdoorsman
March 2nd, 2010, 08:53 PM
All of the x264 presets have recently been added to FFmpeg. There are a few x264 options (--aq-mode and --rc-lookahead, maybe some others) that do not have have equivalents in FFmpeg, but it's a fairly close approximation.

New presets:

ultrafast
veryfast
faster
fast (somewhat similar to normal)
medium (the default x264 settings, similar to default preset)
slow (similar to hq)
slower
veryslow
placebo (similar to the max preset)


Each of these presets also have an associated firstpass preset. Just append the name with _firstpass. For example:

-vpre slower_firstpass

verb3k
March 3rd, 2010, 12:52 AM
All of the x264 presets have recently been added to FFmpeg. There are a few x264 options (--aq-mode and --rc-lookahead, maybe some others) that do not have have equivalents in FFmpeg, but it's a fairly close approximation.

New presets:

ultrafast
veryfast
faster
fast (somewhat similar to normal)
medium (the default x264 settings, similar to default preset)
slow (similar to hq)
slower
veryslow
placebo (similar to the max preset)


Each of these presets also have an associated firstpass preset. Just append the name with _firstpass. For example:

-vpre slower_firstpass

Now it's much more consistent, thanks for the update.
/me thinks about updating his guide.

sbelz79
March 3rd, 2010, 01:29 AM
I got stuck on Step 3:


user@computer:~$ git clone git://git.videolan.org/x264.git
Initialized empty Git repository in /home/sbelz/x264/.git/
git.videolan.org[0: 91.121.111.144]: errno=Connection refused
fatal: unable to connect a socket (Connection refused
user@computer:~$


There were some problems updating my repositories in step 2:

sbelz@Fate:~$ sudo apt-get update
[sudo] password for sbelz:
Get:1 http://dl.google.com stable Release.gpg [189B]
Hit http://security.ubuntu.com karmic-security Release.gpg
Ign http://security.ubuntu.com karmic-security/main Translation-en_US
Ign http://archive.ubuntu.com karmic Release.gpg
Ign http://archive.ubuntu.com karmic/main Translation-en_US
Hit http://archive.canonical.com karmic Release.gpg
Ign http://archive.canonical.com karmic/partner Translation-en_US
Hit http://ppa.launchpad.net karmic Release.gpg
Ign http://ppa.launchpad.net karmic/main Translation-en_US
Hit http://packages.medibuntu.org karmic Release.gpg
Ign http://packages.medibuntu.org karmic/free Translation-en_US
Hit http://us.archive.ubuntu.com karmic Release.gpg
Ign http://us.archive.ubuntu.com karmic/main Translation-en_US
Ign http://security.ubuntu.com karmic-security/restricted Translation-en_US
Ign http://security.ubuntu.com karmic-security/universe Translation-en_US
Ign http://security.ubuntu.com karmic-security/multiverse Translation-en_US
Hit http://security.ubuntu.com karmic-security Release
Ign http://archive.ubuntu.com karmic/universe Translation-en_US
Ign http://archive.ubuntu.com karmic Release
Hit http://archive.canonical.com karmic Release
Hit http://ppa.launchpad.net karmic Release.gpg
Ign http://ppa.launchpad.net karmic/main Translation-en_US
Hit http://ppa.launchpad.net karmic Release.gpg
Ign http://ppa.launchpad.net karmic/main Translation-en_US
Hit http://ppa.launchpad.net karmic Release.gpg
Ign http://ppa.launchpad.net karmic/main Translation-en_US
Hit http://ppa.launchpad.net karmic Release
Ign http://packages.medibuntu.org karmic/non-free Translation-en_US
Ign http://us.archive.ubuntu.com karmic/restricted Translation-en_US
Ign http://us.archive.ubuntu.com karmic/universe Translation-en_US
Ign http://us.archive.ubuntu.com karmic/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com karmic-updates Release.gpg
Ign http://us.archive.ubuntu.com karmic-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com karmic-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com karmic-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com karmic-updates/multiverse Translation-en_US
Hit http://packages.medibuntu.org karmic Release
Ign http://archive.ubuntu.com karmic/main Packages
Hit http://security.ubuntu.com karmic-security/main Packages
Hit http://ppa.launchpad.net karmic Release
Hit http://ppa.launchpad.net karmic Release
Hit http://ppa.launchpad.net karmic Release
Hit http://archive.canonical.com karmic/partner Packages
Hit http://us.archive.ubuntu.com karmic Release
Hit http://packages.medibuntu.org karmic/free Packages
Hit http://us.archive.ubuntu.com karmic-updates Release
Ign http://archive.ubuntu.com karmic/universe Packages
Hit http://security.ubuntu.com karmic-security/restricted Packages
Hit http://security.ubuntu.com karmic-security/main Sources
Hit http://security.ubuntu.com karmic-security/restricted Sources
Hit http://ppa.launchpad.net karmic/main Packages
Hit http://ppa.launchpad.net karmic/main Sources
Hit http://packages.medibuntu.org karmic/non-free Packages
Hit http://us.archive.ubuntu.com karmic/main Packages
Hit http://us.archive.ubuntu.com karmic/restricted Packages
Hit http://us.archive.ubuntu.com karmic/main Sources
Hit http://us.archive.ubuntu.com karmic/restricted Sources
Ign http://archive.ubuntu.com karmic/main Packages
Hit http://security.ubuntu.com karmic-security/universe Packages
Hit http://security.ubuntu.com karmic-security/universe Sources
Hit http://security.ubuntu.com karmic-security/multiverse Packages
Hit http://security.ubuntu.com karmic-security/multiverse Sources
Hit http://repository.glx-dock.org karmic Release.gpg
Ign http://repository.glx-dock.org karmic/cairo-dock Translation-en_US
Hit http://ppa.launchpad.net karmic/main Packages
Hit http://ppa.launchpad.net karmic/main Packages
Hit http://ppa.launchpad.net karmic/main Packages
Ign http://archive.ubuntu.com karmic/universe Packages
Hit http://us.archive.ubuntu.com karmic/universe Packages
Hit http://us.archive.ubuntu.com karmic/universe Sources
Hit http://us.archive.ubuntu.com karmic/multiverse Packages
Hit http://us.archive.ubuntu.com karmic/multiverse Sources
Hit http://us.archive.ubuntu.com karmic-updates/main Packages
Hit http://us.archive.ubuntu.com karmic-updates/restricted Packages
Hit http://us.archive.ubuntu.com karmic-updates/main Sources
Hit http://repository.glx-dock.org karmic Release
Err http://archive.ubuntu.com karmic/main Packages
404 Not Found [IP: 91.189.88.45 80]
Hit http://us.archive.ubuntu.com karmic-updates/restricted Sources
Hit http://us.archive.ubuntu.com karmic-updates/universe Packages
Hit http://us.archive.ubuntu.com karmic-updates/universe Sources
Hit http://us.archive.ubuntu.com karmic-updates/multiverse Packages
Hit http://us.archive.ubuntu.com karmic-updates/multiverse Sources
Hit http://repository.glx-dock.org karmic/cairo-dock Packages
Err http://archive.ubuntu.com karmic/universe Packages
404 Not Found [IP: 91.189.88.45 80]
Ign http://dl.google.com stable/main Translation-en_US
Get:2 http://dl.google.com stable Release [2,540B]
Get:3 http://dl.google.com stable/main Packages [909B]
Fetched 3,638B in 2min 1s (30B/s)
W: Failed to fetch http://archive.ubuntu.com/dists/karmic/main/binary-amd64/Packages.gz 404 Not Found [IP: 91.189.88.45 80]

W: Failed to fetch http://archive.ubuntu.com/dists/karmic/universe/binary-amd64/Packages.gz 404 Not Found [IP: 91.189.88.45 80]

E: Some index files failed to download, they have been ignored, or old ones used instead.


This is my output from the next command in Step 2

sbelz@Fate:~$ sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
subversion is already the newest version.
git-core is already the newest version.
checkinstall is already the newest version.
yasm is already the newest version.
texi2html is already the newest version.
libfaac-dev is already the newest version.
libfaad-dev is already the newest version.
libmp3lame-dev is already the newest version.
libopencore-amrnb-dev is already the newest version.
libopencore-amrwb-dev is already the newest version.
libsdl1.2-dev is already the newest version.
libx11-dev is already the newest version.
libxfixes-dev is already the newest version.
libxvidcore4-dev is already the newest version.
zlib1g-dev is already the newest version.
The following packages were automatically installed and are no longer required:
libwxbase2.8-0 python-wxgtk2.8 libqt4-script libqt4-designer libqt4-dbus lsb-desktop libavfilter0 m4 libavdevice52 libqt4-sql-sqlite libqt4-gui libwxgtk2.8-0 lsb pax libqt4-sql wine1.2-gecko
libqt4-assistant imagemagick libqt3-mt lsb-graphics winbind lsb-core ncurses-term python-wxversion lsb-cxx
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I was able to successfully complete Step1: "Uninstall x264, libx264-dev, and ffmpeg"

FakeOutdoorsman
March 3rd, 2010, 02:28 AM
I got stuck on Step 3:


user@computer:~$ git clone git://git.videolan.org/x264.git
Initialized empty Git repository in /home/sbelz/x264/.git/
git.videolan.org[0: 91.121.111.144]: errno=Connection refused
fatal: unable to connect a socket (Connection refused
user@computer:~$


This command works for me. Are you having connection problems? Do you have firewall interfering with your connection?


There were some problems updating my repositories in step 2:


W: Failed to fetch http://archive.ubuntu.com/dists/karmic/main/binary-amd64/Packages.gz 404 Not Found [IP: 91.189.88.45 80]

Your /etc/apt/sources.list probably contains a misconfigured entry. As your error states, there is no file at the URL. The correct URL is:

http://archive.ubuntu.com/ubuntu/dists/karmic/main/binary-amd64/Packages.gz

sbelz79
March 3rd, 2010, 05:37 PM
This command works for me. Are you having connection problems? Do you have firewall interfering with your connection?

Thanks! I had tried shutting down firestarter and mobloquer before and it didn't work, but this time I tried leaving both programs open but stopping their activity, and this works.


Your /etc/apt/sources.list probably contains a misconfigured entry. As your error states, there is no file at the URL. The correct URL is:

http://archive.ubuntu.com/ubuntu/dists/karmic/main/binary-amd64/Packages.gz

I solved this problem with help from someone in another thread.

qyot27
March 4th, 2010, 08:36 PM
For those wondering about getting LAVF and FFmpegSource2 to work, the below does. It could use some refinement to match the existing tutorial, of course (namely because I didn't want to mess with using checkinstall on FFMS2). Three things to be aware of - FFMS2 requires pkg-config (at or above 0.22) and autotools (it complains about the version numbers but still seems to do fine regardless; just something to note, but recompiling them/grabbing newer versions from a ppa may be necessary), and that the decoder-only ffmpeg I use initially can be extended with more than just libfaad, I just didn't want to bother. However, be aware of which external libs actually will help, and which ones are useless - many of the common external libs are just encoders and would be worthless in the initial step.


So, anyway, here we are (I put all three steps for grabbing the source first for ease of switching between directories later).

Grab the source:

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
svn checkout http://ffmpegsource.googlecode.com/svn/trunk/ ffms2
git clone git://git.videolan.org/x264.git

Compile a decoding-only ffmpeg:

mkdir ffms2_build
cd ffmpeg
./configure --prefix=$HOME/ffms2_build --enable-gpl --enable-version3 --enable-postproc --enable-pthreads --disable-encoders --disable-muxers --disable-debug --disable-network --enable-libfaad --disable-decoder=aac --disable-hwaccels --disable-filters --disable-indevs --disable-outdevs --enable-runtime-cpudetect
make
make install

Compile FFmpegSource2:

cd ../ffms2
./configure --prefix=$HOME/ffms2_build PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig
make
make install

Compile x264:

cd ../x264
PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig ./configure --enable-shared
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`+`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default
sudo ldconfig
make distclean

Clean up after ffmpeg and ffms2:

cd ../ffms2
make uninstall
make distclean

cd ../ffmpeg
make uninstall
make distclean

And finally, compile a fully-functional FFmpeg linked against x264:

./configure --enable-gpl --enable-version3 --enable-postproc --enable-pthreads --enable-libx264 --enable-libfaad --disable-decoder=aac --enable-runtime-cpudetect
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default
hash ffmpeg
make distclean



I sadly could not get my custom prefix idea to work, although I am open to it if anyone knows how to make it play nice. x264 seemed to be fine with it in FFmpeg's case (which would give you LAVF support), but FFMS2 was incapable of finding FFmpeg and therefore would fail. I even tried all the custom ??FLAGS and PKG_CONFIG_PATH options and still no dice. So the safest way I could find was to install FFmpeg and FFMS2 as usual, build x264 (which would autodetect them), then remove FFmpeg and FFMS completely and utterly, and compile FFmpeg again without the crazy restrictions it had the first time.

To test, I then gave x264 an H.264 MKV file I'd encoded with ffmpeg, and it accepted it just fine: indexed it, encoded it, output a nice new .mp4 (only because I use GPAC-enabled builds). However, there did seem to be some issues with AVIs (or perhaps just ffvhuff and ASP, as the ffvhuff and XviD-encoded files I tested with it gave me a ticks_per_frame invalid warning - but strangely enough I don't think it had a problem with such files on Windows, and I was using the exact same source packages; of course, my GCC environment on Windows is using 4.4.3, and Ubuntu is still stuck back on 4.4.1 - there could be other environment-specific reasons, but it just struck me as odd).

verb3k
March 4th, 2010, 08:44 PM
@qyot27:
Thanks for mini howto.
I did the same thing today. The new lavf/ffms integration is very good. Dark_Shikari says there will also be an API for filtering (deinterlacing, resizing, crop etc...) and hopefully trimming support (ranges of frames).

Bachstelze
March 4th, 2010, 09:03 PM
I sadly could not get my custom prefix idea to work, although I am open to it if anyone knows how to make it play nice.

The trick is to set the PKG_CONFIG_PATH environment variable so that the correct ffmpeg gets used. Something like:


firas@momiji ffmpeg % ./configure --disable-encoders --enable-shared --enable-postproc --enable-gpl --prefix=$PWD/../ffmpeg-decoder-only
[...]
firas@momiji ffmpeg % make
[...]
firas@momiji ffmpeg % make install
[...]
firas@momiji ffmpeg % cd ../ffms2-2.13_src
firas@momiji ffms2-2.13_src % PKG_CONFIG_PATH=../ffmpeg-decoder-only/lib/pkgconfig ./configure

FakeOutdoorsman
March 5th, 2010, 12:23 AM
Another new addition that I forgot to mention is FFprobe, a "simple multimedia streams analyzer". I haven't used it much, but here's an example:

$ ffprobe -show_streams nimbus2.mp4
FFprobe version SVN-r22144, Copyright (c) 2007-2010 the FFmpeg developers
built on Mar 1 2010 21:14:27 with gcc 4.4.3
configuration: --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-pthreads --enable-x11grab --arch=x86_64
libavutil 50. 9. 0 / 50. 9. 0
libavcodec 52.55. 0 / 52.55. 0
libavformat 52.54. 0 / 52.54. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'nimbus2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf52.54.0
Duration: 04:48:16.76, start: 0.000000, bitrate: 35 kb/s
Stream #0.0(und): Video: h264, yuv420p, 640x360 [PAR 1:1 DAR 16:9], 31 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc

index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
codec_type=video
codec_time_base=1/60
codec_tag_string=avc1
codec_tag=0x31637661
width=640
height=360
has_b_frames=2
sample_aspect_ratio=1:1
display_aspect_ratio=1:1
pix_fmt=yuv420p
r_frame_rate=30/1
avg_frame_rate=30/1
time_base=1/30
language=und
start_time=0.000000
duration=17296.766667
TAG:language=und

mc4man
March 6th, 2010, 09:11 AM
have just seen the libavcodec native amr narrow band decoder arrive:
D A amrnb Adaptive Multi-Rate NarrowBand

While overall don't see any issues there - enabling the opencore along with this new built-in support, did see it have an effect on something

Was packaging the new xine-libs 1.18 for karmic for the flac fixes and wmap support (both of which work fine), and amr decoding broke.
A re-build of ffmpeg with --disable-decoder=amrnb and a xine-lib re-build resolved that.
(only mentioning in case it happened to something else built off/or dependant of a recent ffmpeg

qyot27
March 7th, 2010, 02:27 AM
The trick is to set the PKG_CONFIG_PATH environment variable so that the correct ffmpeg gets used. Something like:


firas@momiji ffmpeg % ./configure --disable-encoders --enable-shared --enable-postproc --enable-gpl --prefix=$PWD/../ffmpeg-decoder-only
[...]
firas@momiji ffmpeg % make
[...]
firas@momiji ffmpeg % make install
[...]
firas@momiji ffmpeg % cd ../ffms2-2.13_src
firas@momiji ffms2-2.13_src % PKG_CONFIG_PATH=../ffmpeg-decoder-only/lib/pkgconfig ./configure

I wonder why I wasn't able to find references to that directory being the one PKG_CONFIG_PATH needed to be pointed to. The obvious answers are always the hardest to see, I guess.

Unfortunately, while FFMS2 did pick up FFmpeg when I did it that way, x264 still failed to pick up FFMS2...even though it was installed to the same prefix as FFmpeg, and LAVF was picked up just fine. On Windows, MSys/MinGW had no problems with that step - x264 detected both from the custom prefix. So maybe there's a version mismatch somewhere other than in GCC that's messing this up for me.

Bachstelze
March 7th, 2010, 02:38 AM
Unfortunately, while FFMS2 did pick up FFmpeg when I did it that way, x264 still failed to pick up FFMS2...even though it was installed to the same prefix as FFmpeg, and LAVF was picked up just fine. On Windows, MSys/MinGW had no problems with that step - x264 detected both from the custom prefix. So maybe there's a version mismatch somewhere other than in GCC that's messing this up for me.

If you just do a normal sudo make install on FFMS2, x264 will pick it. I don't think you need both FFMS2 and LAVF anyway... I'll try with FFMS2 in a custom prefix, though.

EDIT

If I do this:


firas@momiji ffms2-2.13_src % PKG_CONFIG_PATH=../ffmpeg-decoder-only/lib/pkgconfig ./configure --prefix=$PWD/../ffms2 && make && make install
[..]
firas@momiji ffms2-2.13_src % cd ../x264
firas@momiji x264 % PKG_CONFIG_PATH=../ffmpeg-decoder-only/lib/pkgconfig:../ffms2/lib/pkgconfig ./configure

The configure script for x264 picks up FFMS2, but not LAVF...

EDIT2

Apparently x264 doesn't work with a decoder-only ffmpeg, it needs libavutil too.

qyot27
March 7th, 2010, 02:51 AM
If you just do a normal sudo make install on FFMS2, x264 will pick it. I don't think you need both FFMS2 and LAVF anyway... I'll try with FFMS2 in a custom prefix, though.
In the steps I'd posted, I did do a normal sudo make install on FFMS2, when it installed to the default system area. My test for custom prefixes was to make sure both the decoding FFmpeg and FFMS2 were isolated and easy to delete after I was done with them (even though the initial problem was that FFMS2 wasn't seeing FFmpeg, but now it's x264 not picking up both even when they're in the same *custom* place).

Of course, it's not that both are required, it's just nice to have both if you were already making sure FFMS2 is there. I honestly don't know of a situation where LAVF is preferable to FFMS2, but hey, it's there, so might as well (and if by chance FFMS2 does have a problem with something, you can try dropping down to LAVF and see if it does it correctly).

qyot27
March 7th, 2010, 03:03 AM
Ok, so here's a thread that mentioned this:
http://forum.doom9.org/showthread.php?p=1369396

Seems that you can use PKG_CONFIG_PATH on x264, too (although I distinctly remember it failing...idk). There's another solution there concerning --extra-cflags/--extra-ldflags, but that's what I was trying to get work - I pointed it toward the /include and /lib directories in the install directory, though, not the ones that generate in the original ffmpeg and ffms2 directories. And like I said, MSys/MinGW doesn't have a problem with detecting both when it's pointing to the install directory.

EDIT: Beat me to it. In my notes, when I say 'decoding-only' I only mean that FFmpeg was compiled without encoders or muxers or things like that. libavutil still is built on mine.

andrew.46
March 7th, 2010, 04:14 AM
Is it just me that has been gaving some issues building FFmpeg over the last 12 hours? A variety of errors I suspect linked to the new build process...

Andrew

Bachstelze
March 7th, 2010, 04:28 AM
Is it just me that has been gaving some issues building FFmpeg over the last 12 hours? A variety of errors I suspect linked to the new build process...

Andrew

Works For Me™ with this configure line:


./configure --enable-gpl --enable-shared --enable-postproc --enable-libfaad --enable-libvorbis

sportspool7
March 7th, 2010, 01:19 PM
I have tried to follow this way but still can not use. When I convert songs, application of this state 'FFPlay' not found. How do I solve this problem?

I using Ubuntu 9.10

mc4man
March 7th, 2010, 05:08 PM
...application of this state 'FFPlay' not found.

If you followed the guide exactly then ffplay (and ffmpeg) would have been installed to /usr/local/bin

At the risk of misunderstanding your question if some app is saying it can't find ffplay then see if you can adjust the path in it's config or prefs.

mc4man
March 7th, 2010, 05:21 PM
me issues building FFmpeg over the last 12 hours? A variety of errors I suspect linked to the new build process...

no problem here either - have done 3 different builds, (for vlc, xine-libs, and in general

The terminal output is different than previously (similar to vlc 1.1), the verbose part is mainly relegated to warnings or errors, - a make distclean just does it - no output.

qyot27
March 7th, 2010, 07:13 PM
Seems that you can use PKG_CONFIG_PATH on x264, too (although I distinctly remember it failing...idk).
Finally figured it all out. FFMS2 isn't picky about where PKG_CONFIG_PATH is declared, but x264 is. I'd been trying with PKG_CONFIG_PATH declared at the end, but x264 only accepts it if it's before ./configure. FFMS2 has no issue with it placed at the end of the command. Doing so means x264 picks up both LAVF and FFMS2 from the custom prefix.

I'll edit the steps I posted before to reflect this now.

FakeOutdoorsman
March 7th, 2010, 08:13 PM
I have tried to follow this way but still can not use. When I convert songs, application of this state 'FFPlay' not found. How do I solve this problem?

I using Ubuntu 9.10

Are you using WinFF?

andrew.46
March 7th, 2010, 10:08 PM
Hi mc4man,


no problem here either - have done 3 different builds, (for vlc, xine-libs, and in general

Looks like I left out the vital information that I build shared libraries only :). This was in fact broken for a brief time but fortunately it has been resolved in r22280 and now compiles cleanly with --enable-shared --disable-static.

Andrew

mc4man
March 7th, 2010, 11:51 PM
This was in fact broken for a brief time
There seems to have been some changes of late including some significant ones to dsputil.h (finally rendering the asm_64 patch I had unusable for the moment


On another note, saw this in lucid which pretty much sets in stone what ffmpeg will be - the 0.5.1 release


fmpeg (4:0.5.1-1) unstable; urgency=low

* new upstream release:
- clarifies documentation on metadata, Closes: #570050, LP: #501729
- further security backports, Closes: #570713
* adapt to new versioning scheme
* use '<<' instead of '<' relationship for internal shlib file
* merge changes from ubuntu packaging
* drop wmapro backport again as discussed with upstream. The unrelated
changes seem too risky for a stable release.

-- Reinhard Tartler <siretart@tauware.de> Wed, 03 Mar 2010 22:28:24 +0100

ffmpeg (4:0.5+svn20090706-6) unstable; urgency=low


At least now ffmpeg is shown for what is is - 0.5.1, not +svn20090706-6 (-r19352) as karmic incorrectly reports

I guess one gives the benefit of doubt to "unrelated changes", the source itself has no issues being patched (had to use a wmapro patch from late last march) and works fairly well, though the current included support has advanced quite a bit from that patch.


FFplay version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2003-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-libmp3lame --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libxvid --enable-libdc1394 --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 7 2010 00:18:48, gcc: 4.4.1
[wmapro @ 0x912c4b0][18] [0] [3] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [e0] [0] [0] [0]
[wmapro @ 0x912c4b0] ed sample bit depth = 16
[wmapro @ 0x912c4b0] ed decode flags = e0
[wmapro @ 0x912c4b0] samples per frame = 2048
[wmapro @ 0x912c4b0] log2 frame size = 18
[wmapro @ 0x912c4b0] max num subframes = 16
[wmapro @ 0x912c4b0] len prefix = 1
[wmapro @ 0x912c4b0] num channels = 2
[wmapro @ 0x912c4b0] lossless = 0

Blue shows clearly that karmic is not using -r19352

andrew.46
March 8th, 2010, 01:56 AM
Hi mc4man,


There seems to have been some changes of late including some significant ones to dsputil.h (finally rendering the asm_64 patch I had unusable for the moment

I am a little heartened that I chose to remain with an older revision of FFmpeg for my vlc-git guide that patches cleanly... It would be very nice if no patch were required at all but I am not clear if the FFmpeg devs or the vlc devs should be approached, in the meantime I am waiting further developments :).


On another note, saw this in lucid which pretty much sets in stone what ffmpeg will be - the 0.5.1 release

By virtue of the timing of the lucid release just missing out on the upcoming .6 release (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-March/084101.html).

Andrew

mc4man
March 8th, 2010, 02:50 AM
out on the upcoming .6 release.

That doesn't seem to be too far away, I do remember some comments by Reinhard Tartler that no ffmpeg upgrade would be considered short of a release (0.6).
I suppose there's a chance though most likely 10.10

Overall I think they've done a very commendable job multimedia wise with lucid - (except for mplayer, though there is a good guide around here somewhere...

On the 64 bit deal - I was just creating new xine-lib 1.18 package sets for karmic and lucid (fixes some flac issues, has wmapro support) and ran into a similar issue when doing the 64 bit ones.
Except in this case it was with x264 instead of ffmpeg - would not accept a static x264 (w/fPIC) at all.
(easily resolved though

So it's not just vlc that can have some issues when doing builds with static linking in 64 bit

andrew.46
March 8th, 2010, 03:20 AM
Hi mc4man,


On another note, saw this in lucid which pretty much sets in stone what ffmpeg will be - the 0.5.1 release

I am not running lucid yet, but I guess amr support is still not included despite the free libraries now available?

Andrew

mc4man
March 8th, 2010, 05:54 AM
but I guess amr support is still not included despite the free libraries now available?
Yes and no...
gstreamer now supports amr thru the ugly plugin, but due to the opencore libs being GPLv3 there's no ffmpeg support, and by extension no support for apps using ffmpeg libs.
(even though 0.5.1 can support opencore, it can't atm (or ever..) be enabled in the ubuntu ffmpeg, though native amr in ffmpeg would probably be ok but it's not in 0.5.1


( the gst plugin is quite good - can be added to karmic by building or even better this ppa
https://launchpad.net/~gstreamer-developers/+archive/ppa

frenkiel
March 8th, 2010, 12:30 PM
I get the following error when compiling
ffmpeg:
*
libavcodec/pthread.c:136: error: no previous prototype for ?avcodec_thread_execute2?

what do you suggest?

madmak
March 8th, 2010, 12:59 PM
Iv been trying to build on intrepid this morning and im getting the same error


libavcodec/pthread.c:136: error: no previous prototype for 'avcodec_thread_execute2'
make: *** [libavcodec/pthread.o] Error 1

when i come to make ffmpeg aswell, i cant find anything on google about it hopefully someone here can help?

sportspool7
March 8th, 2010, 02:17 PM
Yes, I using WinFF. If you know how, please taught one by one because I was beginner

madmak
March 8th, 2010, 03:39 PM
i managed to get past the pthread error and build ffmpeg by using the snapshot of ffmpeg heres the link

http://ffmpeg.mplayerhq.hu/releases/ffmpeg-checkout-snapshot.tar.bz2

im guessing it must be a temp problem with the svn version :D

Linuxforall
March 8th, 2010, 03:52 PM
Yep I am getting the libavcodec error1 as well on my Karmic x64. I tried upgrading today, hope its temporary.

Update, its working now, just compiled it, must have been some error.

mc4man
March 8th, 2010, 03:55 PM
Yes, I using WinFF
Open up winff and go edit -> preferences -> linux
You should edit the path for both ffmpeg and ffplay to where they are, if you used this guide exactly then make the paths - screen1
/usr/local/bin/ffmpeg
/usr/local/bin/ffplay

or if you wish use the browse button on the right to select (filesystem -> usr -> local -> bin

verb3k
March 8th, 2010, 04:18 PM
"no previous prototype for 'avcodec_thread_execute2'" error fixed in svn.

qyot27
March 8th, 2010, 08:38 PM
Yes and no...
gstreamer now supports amr thru the ugly plugin, but due to the opencore libs being GPLv3 there's no ffmpeg support, and by extension no support for apps using ffmpeg libs.
Could you explain this? There is that --enable-version3 parameter, and from http://ffmpeg.org/legal.html (emphasis mine), "FFmpeg is licensed under the GNU Lesser General Public License (LGPL) version 2.1 or later. However, FFmpeg incorporates several optional parts and optimizations that are covered by the GNU General Public License (GPL) version 2 or later. If those parts get used the GPL applies to all of FFmpeg.".

From that it seems whether something is GPLv3 (or even GPLv2) doesn't matter. But as I mostly get confused by all the stipulations and directives within the GPL and LGPL, that's only what it looks like to me. I could be wrong.

mc4man
March 9th, 2010, 02:01 AM
Could you explain this?
Probably not too well, licensing stuff makes my head spin. My take on it is that the issue isn't ffmpeg per se but it's shared libraries and the packages that depend on it

There are quite a number of bugs threads that you could read, this one may do the trick - skip down to post 47 or so (good luck ...

https://bugs.launchpad.net/ubuntu/+source/mplayer/+bug/93849

trinay123
March 9th, 2010, 09:18 AM
I have installed FFMPEG PHP version 9.10 ubuntu. Now working Perfectly like flv converter also.

But, 1. I want know The details how to compress the video? like small size?

2. How to set Aspect Ratio FFMPEG PHP?

3. How to install x264 ? because I got the code and I tried to install. But In FFMPEG there is no compilation in x264 codec? So, what I can do? This is My Major Priority? Please If Anyone knows Help me........................

n.hinton
March 9th, 2010, 11:11 AM
Follow the instructions on the first page of this 'howto'

sportspool7
March 9th, 2010, 12:33 PM
It is really working. Thanks a lot my friendz especialy to mc4man and FakeOutdoorsman:P.

raja8912
March 10th, 2010, 07:22 AM
Can you Please provide light on How to integrate the installed ffmpeg libraries with existing players like totem or Rhythmbox??? :)

qyot27
March 10th, 2010, 06:23 PM
Can you Please provide light on How to integrate the installed ffmpeg libraries with existing players like totem or Rhythmbox??? :)
That would require re-compiling the gstreamer-ffmpeg plugin(s). You can't do it with the libraries from a regular ffmpeg compile, although those libraries would probably be used in the compile of the plugin.

Not that I think it would matter too much - the decoding libraries don't change all too often, and unless you're using really obscure video or audio formats, the right decoders have been there for a long, long time, and would be included in the gstreamer plugin (even if only by using the restricted-extras package or Medibuntu or so on).

madhi19
March 11th, 2010, 06:21 PM
Followed the Jaunty tutorial to the letter everything went fine except for ffmpeg I got this

make: *** No rule to make target `libavformat/rtp_asf.h', needed by `libavformat/rtpdec.o'. Stop.

Any idea what I did wrong

FakeOutdoorsman
March 11th, 2010, 08:55 PM
Followed the Jaunty tutorial to the letter everything went fine except for ffmpeg I got this

make: *** No rule to make target `libavformat/rtp_asf.h', needed by `libavformat/rtpdec.o'. Stop.

Any idea what I did wrong

You probably did nothing wrong. Since development is so active (so far 5 revisions just today), you will encounter compilation errors occasionally. Fortunately, these are often found and fixed within a day or even a few hours. Try updating your FFmpeg source and compiling again as shown in the Updating Your Installation section of the guide.

I just compiled FFmpeg r22470 without errors.

madhi19
March 12th, 2010, 02:11 AM
You probably did nothing wrong. Since development is so active (so far 5 revisions just today), you will encounter compilation errors occasionally. Fortunately, these are often found and fixed within a day or even a few hours. Try updating your FFmpeg source and compiling again as shown in the Updating Your Installation section of the guide.

I just compiled FFmpeg r22470 without errors.
Fixed it by adding these lines
cd ffmpeg
git clone git://git.ffmpeg.org/libswscale/

qyot27
March 12th, 2010, 05:31 AM
Fixed it by adding these lines
cd ffmpeg
git clone git://git.ffmpeg.org/libswscale/
I'm sure that's probably why the guide uses the SVN repository for ffmpeg, and not git. The SVN checkout automatically grabs libswscale into the correct directory too (and it gives you the nice revision numbers that the git ffmpeg doesn't).

trinay123
March 12th, 2010, 08:29 AM
Follow the instructions on the first page of this 'howto'


I have installed PHP FFMPEG. It is working perfectly. But I have tried after libx264 install it is showing error? there is no compliation. What I can do?

FakeOutdoorsman
March 12th, 2010, 08:55 PM
I have installed PHP FFMPEG. It is working perfectly. But I have tried after libx264 install it is showing error? there is no compliation. What I can do?

Show any errors you are getting. I can attempt to help you if it is a FFmpeg or x264 error, but I know nothing of PHP.

drsouvikkumar
March 23rd, 2010, 05:36 PM
Thank you very much

codenomad
March 24th, 2010, 05:37 AM
I just installed the Lucid Lynx beta and followed this tutorial. However, I'm not able to get AAC encoding.

I've double checked all the steps, and then I looked at the supported formats reported by ffmpeg. I thought this was a bit strange:

arrakis:~/src/ffmpeg$ ffmpeg -formats|grep aac
FFmpeg version SVN-r22652, Copyright (c) 2000-2010 the FFmpeg developers
built on Mar 24 2010 11:14:12 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50.12. 0 / 50.12. 0
libavcodec 52.60. 0 / 52.60. 0
libavformat 52.57. 1 / 52.57. 1
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
D aac raw ADTS AAC

I did compile it with libfaac but it isn't compiled in? :confused:

Does anybody have any ideas or suggestions? Anybody have luck with Lucid and encoding aac? Thanks much!!

FakeOutdoorsman
March 24th, 2010, 06:30 AM
I just installed the Lucid Lynx beta and followed this tutorial. However, I'm not able to get AAC encoding.

I've double checked all the steps, and then I looked at the supported formats reported by ffmpeg. I thought this was a bit strange:

arrakis:~/src/ffmpeg$ ffmpeg -formats|grep aac
...
Does anybody have any ideas or suggestions? Anybody have luck with Lucid and encoding aac? Thanks much!!

Did you attempt a test encode? Try ffmpeg -codecs | grep aac. The codecs list was separated from the formats list a little while ago.

codenomad
March 24th, 2010, 08:09 AM
Thanks for your reply, and my bad! You're right, it is there:



codenomad@arrakis:~$ ffmpeg -codecs|grep aac
FFmpeg version SVN-r22652, Copyright (c) 2000-2010 the FFmpeg developers
built on Mar 24 2010 11:14:12 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50.12. 0 / 50.12. 0
libavcodec 52.60. 0 / 52.60. 0
libavformat 52.57. 1 / 52.57. 1
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
DEA aac Advanced Audio Coding
EA libfaac libfaac AAC (Advanced Audio Codec)
I still have the problem though..



codenomad@arrakis:~$ vlc
VLC media player 1.0.5 Goldeneye
[0x9b8d668] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
x264 [info]: using cpu capabilities: none!
x264 [info]: profile Main, level 5.1
[0xa0c4880] avcodec encoder error: cannot find encoder MPEG AAC Audio
*** Your FFMPEG installation is crippled. ***
*** Please check with your FFMPEG packager. ***
*** This is NOT a VLC media player issue. ***
[0xa06be00] stream_out_transcode stream out error: cannot find audio encoder (module:any fourcc:mp4a)
I have reinstalled vlc as well, but still get the same error. Any ideas? Thanks!!

Linuxforall
March 24th, 2010, 08:47 AM
Hi, Where did you get the latest VLC 1.05?

codenomad
March 24th, 2010, 09:12 AM
Hi, thanks for responding. I got the 1.0.5 "Goldeneye" version straight from the default repos in Lucid.

FakeOutdoorsman
March 24th, 2010, 05:55 PM
Hi, thanks for responding. I got the 1.0.5 "Goldeneye" version straight from the default repos in Lucid.

VLC from the repository won't use your compiled FFmpeg. I don't use VLC but perhaps installation of the libavcodec-extra-52 package will fix this issue (I'm not sure if that will help or not). Or see this detailed guide by andrew.46:

Howto: Build the development version of vlc under Ubuntu (http://ubuntuforums.org/showthread.php?t=1398119)

cor2y
March 27th, 2010, 06:37 PM
Is it just me or has developement/updates to x264 stopped/slowed down?
git pull reports that everything is uptodate.
Almost 3 weeks without an update to it.
My build is
x264 0.88.1471 1144615

Just wondering if its just me.

qyot27
March 27th, 2010, 06:57 PM
Is it just me or has developement/updates to x264 stopped/slowed down?
git pull reports that everything is uptodate.
Almost 3 weeks without an update to it.
My build is
x264 0.88.1471 1144615

Just wondering if its just me.
Nope, not just you. The last commit was on Feb 26th. (http://git.videolan.org/?p=x264.git;a=summary)

There's comments on Doom9 and Doom10 about things being committed locally or being ready for the next release, though. So it is being worked on, but I guess maybe the features are so dependent on interworking that it has to be done all at once instead of incrementally. Or maybe not, I don't know, and there isn't any posting I can find relating to the lack of commits this past month either.

But I wouldn't say it's 'stopped'. SoC participation for this year was announced on the 18th. (http://x264dev.multimedia.cx/?p=332#comments)

FakeOutdoorsman
March 27th, 2010, 07:21 PM
The trend for x264 lately is to dump a bunch of updates all at once. Not sure why. One advantage is that it helps with scheduled upgrades. I'm about to re-encode several dozen videos for a client (moving from a Sorensen Spark encoder to x264) and the next x264 updatestorm will probably be well timed for me.

FakeOutdoorsman
March 29th, 2010, 01:08 AM
Just compiled to use lavf with x264 for the first time. To make a decoding only FFmpeg I used the new-ish --disable-everything option (also note the lack of --enable-libx264):

./configure --enable-gpl --disable-everything --enable-decoders --enable-pthreads
I then installed this FFmpeg, compiled/installed x264 normally, uninstalled the decoder only FFmpeg I just compiled, and then re-compiled/installed FFmpeg normally. Just another way of doing it I guess. I didn't feel like fiddling with any path stuff.

andrew.46
March 29th, 2010, 03:52 AM
Hi cor2y,



Almost 3 weeks without an update to it.
My build is
x264 0.88.1471 1144615

Perhaps the x264 developers heard you:



andrew@skamandros~$ x264 --version
x264 0.92.41 33d382a
built on Mar 29 2010, gcc: 4.3.3


All the best,

Andrew

Henrikx
March 29th, 2010, 01:02 PM
?


x264 --version
x264 0.92.1510 33d382a
built on Mar 29 2010, gcc: 4.4.1

Linuxforall
March 29th, 2010, 02:51 PM
?

same here my build is with gcc 4.4.1

qyot27
March 29th, 2010, 06:26 PM
Not everyone uses the version of GCC the repos default to. 4.3 are 4.2 are still in there, and I have 3.4.6 - which I pulled from Jaunty's repo - installed alongside 4.4.1 (I'd prefer to use 4.4.3 like I do on Windows, but I'm not crazy enough to try and compile GCC myself...but Lucid uses 4.4.3, so it won't be a big deal a month from now).

FakeOutdoorsman
March 29th, 2010, 06:50 PM
Hi cor2y,



Perhaps the x264 developers heard you:



andrew@skamandros~$ x264 --version
x264 0.92.41 33d382a
built on Mar 29 2010, gcc: 4.3.3


All the best,

Andrew

My guess: Slackware!

andrew.46
March 29th, 2010, 10:54 PM
Hi FakeOutdoorsman,


My guess: Slackware!

Oops, I sometimes forget which distro I am on :).

Andrew

andrew.46
April 6th, 2010, 01:40 AM
Hi Fakeoutdoorsman,

I hereby award you 200 geek points:


svn log -r 22714 svn://svn.mplayerhq.hu/ffmpeg/trunk

Congratulations on having your work included in FFmpeg!!

Andrew

FakeOutdoorsman
April 6th, 2010, 02:52 AM
Hi Fakeoutdoorsman,

I hereby award you 200 geek points:


svn log -r 22714 svn://svn.mplayerhq.hu/ffmpeg/trunk

Congratulations on having your work included in FFmpeg!!

Andrew

You caught me! It's the only patch I understand how to make since I've never touched a line of C in my life.

Thank you for the Geek Points. When I collect enough I'll be able to trade them in for a Wang Computers (http://en.wikipedia.org/wiki/Wang_Laboratories) t-shirt or a USB Monkey Shaped Hand Warmer.

demonic_crow
April 6th, 2010, 06:38 PM
I'm new with using FFmpeg to capture live screen. Where does it save the video at? I tried looking different folders and can't seem to find it.

FakeOutdoorsman
April 6th, 2010, 07:09 PM
I'm new with using FFmpeg to capture live screen. Where does it save the video at? I tried looking different folders and can't seem to find it.

FFmpeg will save your file where you tell it to save. There is no default save location, and if you just give an output file name it will save to your current directory. Can you show your FFmpeg command? I might be able to tell you where it saved.

demonic_crow
April 6th, 2010, 08:10 PM
I found it thanks. I notice my cursor have a shadow. Is there a way to not have it liked that. Also the sound didnt seem to work.

ffmpeg -f alsa -i pulse -f x11grab -r 30 -s 1024x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv

ffmpeg -i output.mkv -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -crf 22 -threads 0 our-final-product.mp4

wingnux
April 10th, 2010, 01:06 AM
I keep getting this error on Ubuntu 10.04 beta2 64bit:


wingnux@wingnux-desktop:~/ffmpeg$ ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
FAAD test failed.

If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.

Any help? Thanks in advance!

Bachstelze
April 10th, 2010, 01:10 AM
I keep getting this error on Ubuntu 10.04 beta2 64bit:



Any help? Thanks in advance!

Make sure you have libfaad-dev installed.

austin512
April 12th, 2010, 01:46 AM
(deleted)

FakeOutdoorsman
April 13th, 2010, 12:59 AM
Install FFmpeg and x264 on Ubuntu Karmic Koala 9.10

Karmic is unsupported and this guide will not be updated.

Get the Dependencies
1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:

sudo apt-get remove ffmpeg x264 libx264-dev
2. Next, get all of the packages you will need to install FFmpeg and x264 (you may need to enable the universe and multiverse repositories (https://help.ubuntu.com/community/Repositories/Ubuntu#head-5bbef89639d9a7d93fe38f6356dc17847d373096)):

sudo apt-get update
sudo apt-get install build-essential git-core checkinstall yasm texi2html libfaac-dev \
libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev \
libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev


Install x264
3. Get the current source files, compile, and install x264.

cd
git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion="1:0.svn$(date +%Y%m%d)+$(git rev-list \
HEAD -n 1 | head -c 7)" --backup=no --deldoc=yes --default


Install libvpx (optional)
4. This is used to encode and decode VP8 video. Add --enable-libvpx to the ./configure line in step 7 if you decide to install libvpx:

cd
git clone git://review.webmproject.org/libvpx
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \
--deldoc=yes --default


Install libtheora (optional)
5. This is used to encode to Theora, the video type usually found in OGG/OGV files. The repository libtheora is too old, so it must be compiled. Add --enable-libtheora to the ./configure line in step 7 if you decide to install libtheora.

sudo apt-get install libogg-dev
cd
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --disable-shared
make
sudo checkinstall --pkgname=libtheora --pkgversion="1.1.1" --backup=no --deldoc=yes \
--default


Install LAME (optional)
6. This is used to encode to mp3 audio. Once again, the repository version is too old. Add --enable-libmp3lame to the ./configure line in step 7 if you decide to install LAME:


sudo apt-get remove libmp3lame-dev
cd
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
tar xzvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --deldoc=yes \
--default



Install FFmpeg
7. Get the most current source files, compile, and install FFmpeg.


cd
git clone git://git.videolan.org/ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
--deldoc=yes --default

hash x264 ffmpeg ffplay ffprobe ffserver
That's it for installation. You can keep the ~/x264 and ~/ffmpeg directories if you later want to update the source files to a new revision. See "Updating Your Installation" on the first page of this guide for more details.

Now head back to the FFmpeg guide (http://ubuntuforums.org/showthread.php?t=786095) for usage instructions and more.

Reverting Changes Made by This Guide
To remove FFmpeg/x264 and other packages added for this guide:

sudo apt-get autoremove x264 ffmpeg build-essential git-core checkinstall yasm \
texi2html libfaac-dev lame-ffmpeg libogg-dev libsdl1.2-dev libtheora libvorbis-dev \
libvpx libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
Lastly, delete the ffmpeg, libtheora, libvpx, lame-3.98.4, and x264 directories in your home folder.

FokkerCharlie
April 13th, 2010, 11:12 PM
Thanks for the guide; helped me a lot.

Charlie

darkeclypse
April 15th, 2010, 11:03 AM
Hi, i'm on Lucid Lynx x64, after a successful make, I was checkinstall ffmpeg and I've got this error message:
"dpkg-deb - erreur*: version (amont) («*SVN-r*») ne contient pas de chiffres
dpkg-deb: 1 erreurs dans le fichier de contrôle"
in inglish: dpkg-deb - error*: version (amont) («*SVN-r*») doesn't containt digit
dpkg-deb: 1 errors in the control file

Thanks for your help

prupert
April 15th, 2010, 04:53 PM
ffmpeg

Hi

I have used your excellent script on numerous occasions for various machines. To make it easier, I have created a script that runs all this for me automatically. There are two scripts, one for the first time I use your method for installing ffmpeg and then another to update to the latest version (with, if I can get it to work, a list of the new revisions from SVN can't seem to get that info from git yet).

I was hoping to make this script public on my website and also on Google code, but as the majority of it comes from your excellent post (I just wrapped it in some not-so-clever bash goodness) I wanted to check that this would be ok with you first.

The script does acknowledge that I took the commands from you and gives your name and the link to this thread...

So, is it ok if I post my script on google code and on my website?

Cheers

FakeOutdoorsman
April 15th, 2010, 06:50 PM
darkeclypse,

Hi, i'm on Lucid Lynx x64, after a successful make, I was checkinstall ffmpeg and I've got this error message:
"dpkg-deb - erreur*: version (amont) («*SVN-r*») ne contient pas de chiffres
dpkg-deb: 1 erreurs dans le fichier de contrôle"
in inglish: dpkg-deb - error*: version (amont) («*SVN-r*») doesn't containt digit
dpkg-deb: 1 errors in the control file

Thanks for your help

It worked for me. Are you using a nightly FFmpeg snapshot instead of subversion? You can get the current FFmpeg source files with subversion as shown in this guide:

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
or you can download a nightly FFmpeg snapshot. Some users may prefer using snapshots, but I did not test the checkinstall command on this method. Here is a new checkinstall command for you to try:

sudo checkinstall --pkgname=ffmpeg --pkgversion "5:0.5.1" --backup=no --default

I'm not sure why the original checkinstall command didn't work for you. Is anyone else having trouble with the checkinstall command on the first page of this guide?


prupert,

Hi

I have used your excellent script on numerous occasions for various machines. To make it easier, I have created a script that runs all this for me automatically. There are two scripts, one for the first time I use your method for installing ffmpeg and then another to update to the latest version (with, if I can get it to work, a list of the new revisions from SVN can't seem to get that info from git yet).

Perhaps can use the svn log to see new updates. This example will show you the last 12 revisions:

svn log -l 12 svn://svn.mplayerhq.hu/ffmpeg/trunk
You could also display these entries by date or revision number.


I was hoping to make this script public on my website and also on Google code, but as the majority of it comes from your excellent post (I just wrapped it in some not-so-clever bash goodness) I wanted to check that this would be ok with you first.

The script does acknowledge that I took the commands from you and gives your name and the link to this thread...

So, is it ok if I post my script on google code and on my website?

Cheers

Yes, of course. Thanks for asking. Can you share the link to your web site when you are finished?

kamatschka
April 16th, 2010, 09:13 AM
Thank you for your tutorial.

Now ps3mediaserver can transcode much more of my media than before.

Thank you

prupert
April 16th, 2010, 11:53 AM
Install FFmpeg and x264 on Ubuntu Karmic Koala 9.10


Hi, whilst going through all this, I noticed a minor error in the Karmic instructions. Whilst the Removal instructions for the other Distros also removes the optional dependencies, your instructions for Karmic don't include the removal off libtheora. For completenesses sake, it might be good to add it.

Also, I was wondering, there is a problem with the removal instructions. The install side is fine, since if a user already has some of the tools used (some of which are quite common, like build-essential) it doesn't matter having them included in the install instructions.

However, including them in the Removal instructions may mean a user removes a package that they were actually using elsewhere and already had installed. I guess there is no way round this though (I suppose you could have a complicated logging procedure to see what was already installed maybe).

So are you relying on the user knowing what they are doing when they reverse the changes?

prupert
April 16th, 2010, 12:27 PM
Hi me again ;)

Also, I notice for the Lucid install, you say at the end of installing x264:

hash x264

But for the other Distros, you don't do the same thing for x264.

Can you hash x264 for the other distros (it would make my update script a lot more simple since the commands would be the same for all distros)??

Cheers

prupert
April 16th, 2010, 05:11 PM
Hi All

As mentioned earlier, I have written a script, with his permission, to automate FakeOutdoorsman's excellent how tos (http://ubuntuforums.org/showthread.php?t=786095) for updating to the latest versions of ffmpeg and x264 from source.

I have written up about the script on my personal blog here:

http://www.prupert.co.uk/2010/04/16/automatically-update-ffmpeg-and-x264-from-source-svn-in-ubuntu/

And the scripts themselves are hosted on Google Code here:

http://code.google.com/p/x264-ffmpeg-up-to-date/

As stated on both sites, this is BETA code, and these scripts do some powerful things to your system, like installing and removing packages and making and deleting files. I would only recommend using them if you know what you are doing. Also, the completelyclean.sh script can really cause a few problems if you are aren't careful, I wouldn't use it.

That being said, the scripts seem to work well and I find them useful. Please feel free to try them out, but if you have any problems or questions, please post them on the new thread I created (http://ubuntuforums.org/showthread.php?p=9131229#post9131229) to keep this thread clean, on my blog or, better still, on the Google Code page. Cheers.

FakeOutdoorsman
April 16th, 2010, 07:12 PM
Hi, whilst going through all this, I noticed a minor error in the Karmic instructions. Whilst the Removal instructions for the other Distros also removes the optional dependencies, your instructions for Karmic don't include the removal off libtheora. For completenesses sake, it might be good to add it.
Thanks for letting me know. I forgot to add it to the removal section when I added libtheora. Too many versions of this guide! It's fixed now.


Also, I was wondering, there is a problem with the removal instructions. The install side is fine, since if a user already has some of the tools used (some of which are quite common, like build-essential) it doesn't matter having them included in the install instructions.
I tried to write this guide as if the user has a newly installed minimal or "command-line only" type system. I included the build-essential package because last I checked it is not installed by default.


However, including them in the Removal instructions may mean a user removes a package that they were actually using elsewhere and already had installed. I guess there is no way round this though (I suppose you could have a complicated logging procedure to see what was already installed maybe).

So are you relying on the user knowing what they are doing when they reverse the changes?
Removal instructions are part of the criteria (http://ubuntuforums.org/showthread.php?t=677396) for submitting to the Tutorials & Tips (http://ubuntuforums.org/forumdisplay.php?f=100) section. Yes, you are correct that the removal instructions can remove some packages that the user may want to keep, but I don't see any other simple way around that possibility. The good thing is that most of these packages are specific to compiling and are not required for a general system to work fine.


Can you hash x264 for the other distros (it would make my update script a lot more simple since the commands would be the same for all distros)??

Updated. I added x264 to the original hash command in the FFmpeg instructions to reduce the number of user inputted lines. Not a required command unless the user installed x264 and/or FFmpeg previously and their system is still looking in /usr/bin for the binaries (this guide installs to /usr/local/bin/). Can prevent a re-login or reboot.

darkeclypse
April 17th, 2010, 12:51 AM
darkeclypse,


It worked for me. Are you using a nightly FFmpeg snapshot instead of subversion? You can get the current FFmpeg source files with subversion as shown in this guide:

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
or you can download a nightly FFmpeg snapshot. Some users may prefer using snapshots, but I did not test the checkinstall command on this method. Here is a new checkinstall command for you to try:

sudo checkinstall --pkgname=ffmpeg --pkgversion "5:0.5.1" --backup=no --default

I'm not sure why the original checkinstall command didn't work for you. Is anyone else having trouble with the checkinstall command on the first page of this guide?

The command "sudo checkinstall --pkgname=ffmpeg --pkgversion "5:0.5.1" --backup=no --default" worked for me.
It seems like it is "`svn info | grep Revision | awk '{ print $NF }'`" that made the problem.

Thanks anyway

bigblaq
April 18th, 2010, 06:19 PM
Followed the Jaunty tutorial to the letter everything went fine except for ffmpeg I got this

make: *** No rule to make target `libavformat/rtp_asf.h', needed by `libavformat/rtpdec.o'. Stop.

Any idea what I did wrong

You did not do anything wrong, I had the same problem and an SVN update did not fix the issue. I was able to get it to build by changing the library referencs in two of the .d makefiles:

in libavformat/rtpdec.d:
change rpt_asf.h to rtpdec_asf.h
change rtp_h263.h to rtpdec_h263.h
change rtp_h264.h to rtpdec_h264.h
change rtp_vorbis.h to rtpdec_xiph.h

libavformat/rtsp.d
change rpt_asf.h to rtpdec_asf.h
change rtp_vorbis.h to rtpdec_xiph.h

Here are the build options I used for ffmpeg:
./configure --enable-gpl --enable-version3 --enable-nonfree \
--enable-postproc --enable-pthreads --enable-runtime-cpudetect \
--enable-libdirac --enable-libfaac --enable-libfaad --enable-libmp3lame \
--enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libopenjpeg --enable-libschroedinger --enable-libspeex \
--enable-libtheora --enable-libvorbis --enable-libx264 \
--enable-libxvid --enable-x11grab

glitch23
April 19th, 2010, 06:28 PM
Awesome Howto, thanks guys.

jarmore
April 25th, 2010, 02:46 AM
Thank you FakeOutdoorsman. Copy/paste guru's like myself really appreciate it. :) Worked flawlessly.

mullens101
April 28th, 2010, 05:46 PM
I'm trying my best to have custom built ffmpeg play nice with Synaptic and it's driving me crazy. In their infinite wisdom, the Ubuntu folks split ffmpeg into several packages including libavcodec, libavutil and all. If I build ffmpeg and install it through checkinstall so that synaptic sees it, a ton of other crap in synaptic breaks and is removed (vlc, mplayer, a bunch of others).

I've figured out that I can install most of the libraries individually by cd'ing into, for example, the libavcodec folder and running checkinstall for just libavcodec. The problem then arises when I back out to the root of the build tree to install ffmpeg itself. Here, checkinstall fails because it tries to include all of the sub packages again. Oh, and the checkinstall in libavfilter fails with an error about no rule to make some package config file)

Why the hell did they decide to make this such a PITA by breaking out the subpackages and is there an easy way to properly install a SVN version of ffmpeg and all associated libraries that will make synaptic happy?

I've tried using the 'provides' argument to checkinstall and the items "provided" show up in the ffmpeg package description but the provided packages are not marked as installed. (Ex: run checkinstall on ffmeg with a provides argument of "libavcodec52". Synaptic shows ffmpeg as installed, the description of ffmpeg shows that it provides libavcodec52 but libavcodec is not marked as installed.

Overall, the overwhelming pain in the *** I'm having with building very common packages and installing them PROPERLY is causing me to seriously question Ubuntu as a whole. I have been using it for years but am getting frustrated beyond belief. Something as simple as being able to manually mark a package as installed in synaptic would fix it (or stopping the process of breaking packages apart ... or reducing the number of required dependencies assigned to every package ...)

Am I the only one feeling this way? (BTW, this all started because I need to have javascript support in mediatomb and the packagers for mediatomb in lofty disabled javascript support)

Sorry for the rant.

Bachstelze
April 28th, 2010, 05:56 PM
All I have to say is: if you're unhappy with Ubuntu, there"s a lot of other distros out there. Ubuntu (and Debian, from which it originates) is not intended to be "user-compilation"-friendly. There are other distros in which to do that (Slackware comes to mind).

prupert
April 28th, 2010, 06:10 PM
Sorry for the rant.

Personally, I think rants are good for the soul, so long as they are informative and interesting, like yours was. Just saying f$$$$ you Ubuntu, is not welcome, your rant, however, I think is ;)

I am guessing you might be using checkinstall in the wrong way maybe. I have used the How To here (and the script I made to automate the whole shebang) and it hasn't messed with VLC or anything else as far as I am aware...are you sure you are giving the correct parameters to checkinstall?

FakeOutdoorsman
April 28th, 2010, 06:27 PM
I'm trying my best to have custom built ffmpeg play nice with Synaptic...

Other users have asked how to do this before, but I will admit that I never figured out how to compile FFmpeg and all of the associated libav* packages while still making Ubuntu's package management system happy. I don't see why it couldn't be done, but I'm not too excited to spend time figuring out the intricacies of package wrangling. Of course other users are welcome to contribute if they do figure this out or see a better method than what I use in this guide.

Bachstelze does raise a good point. One reason I use Arch Linux most of the time is because I find it easier to compile packages, and I know a few forumites that prefer Slackware for probably the same reasons. Fire up a virtual machine and try these distros if they sound more like your thing.

Bachstelze
April 28th, 2010, 06:35 PM
Other users have asked how to do this before, but I will admit that I never figured out how to compile FFmpeg and all of the associated libav* packages while still making Ubuntu's package management system happy. I don't see why it couldn't be done, but I'm not too excited to spend time figuring out the intricacies of package wrangling. Of course other users are welcome to contribute if they do figure this out or see a better method than what I use in this guide.


That's something I'll probably look into sometime across the summer. I would like to at least add FFMS2 support to my x264 packages, but that will require also making packages of newer ffmpeg revisions. It's probably nothing too complicated, the ffmpeg build process hasn't changed much since the version UBuntu packages were built against, so it would really just be copying over the debian/ folder and editing a few files, just like for x264.

mullens101
April 28th, 2010, 06:47 PM
Thanks for the replies ...
Bachstelze, while I understand where you're coming from, but it's a bit of a cop out I think. It's linux - built to be free and to allow users to be able to do what they want. In general I have been using and loving Ubuntu for years ... this is my only major gripe and a simple feature like allowing me to override the package dependencies system would alleviate this particular issue. (Basically, let me check a box in synaptic to say "hey, this is installed"). I see your comment about coming back to it over the summer ... that would be appreciated. meanwhile, I'm doing my best to work it out from here. I don't mean to insinuate that I'm not truly grateful for all the work others have done ... just trying to get an annoying point across to see if anyone else has figured it out. I've been googling for this answer for weeks and have not found a solution yet.

prupert - followed the directions exactly for the configure and install, ffmpeg goes in fine and the libraries all install too. ffmpeg is marked as installed in synaptic but none of the libav* libraries are. I then go to install vlc. it says it needs libavcodes52 and tries to install it ... that bombs when libavcodec tries to overwrite files from ffmpeg and vlc is not installed.

Fakeoutdoorsman - So I'm not nuts, thanks for verifying that and I appreciate the recommendations ... I probably will try a couple of different VM installs of arch, Slackware, Fedora ... just takes so much damned time to learn a new system when I'm used to this one

FakeOutdoorsman
April 28th, 2010, 06:47 PM
That's something I'll probably look into sometime across the summer. I would like to at least add FFMS2 support to my x264 packages, but that will require also making packages of newer ffmpeg revisions. It's probably nothing too complicated, the ffmpeg build process hasn't changed much since the version UBuntu packages were built against, so it would really just be copying over the debian/ folder and editing a few files, just like for x264.

Excellent. Let us know what you find out.

I have yet to even try FFMS2, although I now often use the LAVF support in x264 and it certainly has been useful.


...I then go to install vlc. it says it needs libavcodes52 and tries to install it ... that bombs when libavcodec tries to overwrite files from ffmpeg and vlc is not installed.

You might be interested in andrew.46's throughly well-written guide:

Howto: Build the development version of vlc under Ubuntu. (http://ubuntuforums.org/showthread.php?t=1398119)


... just takes so much damned time to learn a new system when I'm used to this one
You'll get a good start with the Arch Linux Beginners' Guide (http://wiki.archlinux.org/index.php/Beginners%27_Guide) and the Official Arch Linux Install Guide (http://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide).

Bachstelze
April 28th, 2010, 07:10 PM
this is my only major gripe and a simple feature like allowing me to override the package dependencies system would alleviate this particular issue. (Basically, let me check a box in synaptic to say "hey, this is installed").

The problem is that such a feature would have a lot of implications at numerous levels. The package manager's job is not merely to keep track of installed packages, but also keep track of installed files, know which files belong to which packages, and make sure (using the dependency system) that all packages are compatible with each other. I don't know if the version of VLC from the repos works with the current ffmpeg, but even if it does, nothing guarantees that tomorrow, there wil not be a ffmpeg update that will make it ABI-incompatible and will break VLC. And what if you want to install a package that normally conflicts with ffmpeg because they want to install the same file? Since the package manage won't know exactly which files belong to your "dummy" ffmpeg packages, it will happily install the new one, thus overwriting the file you installed manually when you installed ffmpeg, and possibly breaking the whole thing.

I'm not saying such a feature would be impossible to implement, but it would 1) be much less trivial than you seem to think, and 2) not reallly conform to the Debian/Ubuntu philosophy.

mc4man
April 28th, 2010, 09:53 PM
I don't see any great mystery here or big issue with building a more current ffmpeg as shared.

Though for the most part there is very little to be gained by doing so - I do it once per release (ubuntu), then ffmpeg is built as static from then on.

If you wish a shared build that integrates and doesn't break most ubuntu repo apps (or most ppa apps), then simply build as a debian package set.

(the only app I've seen semi break is audacity and it's ffmpeg import/export function, the cause being it's coded to only look for a specific major/minor version - easily resolved

Most sources that build depend of ffmpeg can be statically linked and become self contained so to speak. And there are advantages to doing a specific ffmpeg build for a particular source

For instance the ffmpeg I built and statically linked for xinelibs 1.8 was different than the one for vlc 1.0.6 which is different than the current installed ffmpeg.

As far as the shared build I only install the shared lib packages - the -devs can be temporally installed if need be, then removed, though myself usually don't use

If you use a simple .diff as a starting point to a package set build then with a few changes is quite simple - the .diff from debian-multimedia can be easily adapted for good ubuntu builds (the ubuntu .diff(s) are overly complicated

Combine that with a local repo and it becomes easy to maintain, install and redo on fresh install - checkinstalls don't go in a local repo, i.e. here mplayer, ffmpeg, x264, totem-xine

current repo on lucid - the ffmpeg -r probably won't be redone unless there is some advantage from a shared lib perspective - which is doubtful

doug@doug-laptop:~/repo$ ls *.deb
abcde_2.4.1-1ubuntu1_all.deb
faac_1.28-0.3_i386.deb
libavcodec52_0.5.1+svn22615_i386.deb
libavcodec-dev_0.5.1+svn22615_i386.deb
libavdevice52_0.5.1+svn22615_i386.deb
libavdevice-dev_0.5.1+svn22615_i386.deb
libavfilter1_0.5.1+svn22615_i386.deb
libavfilter-dev_0.5.1+svn22615_i386.deb
libavformat52_0.5.1+svn22615_i386.deb
libavformat-dev_0.5.1+svn22615_i386.deb
libavutil50_0.5.1+svn22615_i386.deb
libavutil-dev_0.5.1+svn22615_i386.deb
libdvdcss2_1.2.10-0.2_i386.deb
libfaac0_1.28-0.3_i386.deb
libfaac-dev_1.28-0.3_i386.deb
libmediainfo0_0.7.30-1~ppa1~lucid1_i386.deb
libmp4v2-1_1.9.1-0.1_i386.deb
libmp4v2-dev_1.9.1-0.1_i386.deb
libpostproc51_0.5.1+svn22615_i386.deb
libpostproc-dev_0.5.1+svn22615_i386.deb
libswscale0_0.5.1+svn22615_i386.deb
libswscale-dev_0.5.1+svn22615_i386.deb
libtotem-plparser12_2.28.1-1_i386.deb
libva1_0.31.0-1+sds12_i386.deb
libva1-dbg_0.31.0-1+sds12_i386.deb
libva-dev_0.31.0-1+sds12_i386.deb
libvlc2_1.0.6-2ubuntu2_i386.deb
libvlccore2_1.0.6-2ubuntu2_i386.deb
libxine1_1.1.18-1ubuntu2_i386.deb
libxine1-all-plugins_1.1.18-1ubuntu2_all.deb
libxine1-bin_1.1.18-1ubuntu2_i386.deb
libxine1-console_1.1.18-1ubuntu2_i386.deb
libxine1-dbg_1.1.18-1ubuntu2_i386.deb
libxine1-doc_1.1.18-1ubuntu2_all.deb
libxine1-ffmpeg_1.1.18-1ubuntu2_i386.deb
libxine1-gnome_1.1.18-1ubuntu2_i386.deb
libxine1-misc-plugins_1.1.18-1ubuntu2_i386.deb
libxine1-plugins_1.1.18-1ubuntu2_all.deb
libxine1-x_1.1.18-1ubuntu2_i386.deb
libxine-dev_1.1.18-1ubuntu2_i386.deb
libzen0_0.4.12-1~ppa1~lucid1_i386.deb
mediainfo_0.7.30-1~ppa1~lucid1_i386.deb
mediainfo-gui_0.7.30-1~ppa1~lucid1_i386.deb
pana_1.4.15-1ubuntu2_i386.deb
pana-common_1.4.15-1ubuntu2_all.deb
pana-dbg_1.4.15-1ubuntu2_i386.deb
pana-engines_1.4.15-1ubuntu2_all.deb
pana-engine-xine_1.4.15-1ubuntu2_i386.deb
pana-engine-yauap_1.4.15-1ubuntu2_i386.deb
rubyripper_0.6b.2_all.deb
vdpau-video_0.6.7-1_i386.deb
vdpau-video-dbg_0.6.7-1_i386.deb
vlc_1.0.6-2ubuntu2_i386.deb
vlc-data_1.0.6-2ubuntu2_all.deb
vlc-nox_1.0.6-2ubuntu2_i386.deb
vlc-plugin-pulse_1.0.6-2ubuntu2_i386.deb
vlc-plugin-sdl_1.0.6-2ubuntu2_i386.deb
w32codecs_20071007-0medibuntu5_i386.deb

andrew.46
April 29th, 2010, 04:09 AM
Hi mullens101,


... I probably will try a couple of different VM installs of arch, Slackware, Fedora ... just takes so much damned time to learn a new system when I'm used to this one

I can only speak for Slackware which is my primary distro (Ubuntu in VM) but you will find that the absence of dependency checking and the policy of installing source package in their complete form makes life so much easier.

Andrew

macey
April 30th, 2010, 01:56 PM
Can someone tell me how to compile this install for 64 bit Ubuntu please?

Bachstelze
April 30th, 2010, 02:00 PM
Can someone tell me how to compile this install for 64 bit Ubuntu please?

There should be no difference between a 32- and 64-bit Ubuntu.

qyot27
April 30th, 2010, 08:29 PM
There should be no difference between a 32- and 64-bit Ubuntu.
Indeed, the process is exactly the same. I've done it on 64-bit Intrepid and Karmic, haven't gotten around to even testing out 64-bit Lucid (I don't even know if it'll play nice with that computer since it's got a VIA chipset) but I don't expect there to be a difference there, either.

Linuxforall
May 1st, 2010, 04:41 AM
Installed in Lucid yesterday, works perfect with WinFF.

n.hinton
May 1st, 2010, 06:10 PM
I had upgraded from karmic to lucid and noted lucid had replaced my ffmpeg with the one from the repos. Thought I would update the lazy way with prupert's very good ffmpegup script, all went well with x264 but ffmpeg failed (ffmpegup.log attached), I note the log file says Removing ffmpeg, but it didn't and maybe that was the problem.

I uninstalled ffmpeg with synaptic, deleted my source dirs and started from scratch with FakeOutdoorsman's howto which worked flawlessly.

I haven't tried to update yet though.

FakeOutdoorsman
May 1st, 2010, 07:00 PM
I had upgraded from karmic to lucid and noted lucid had replaced my ffmpeg with the one from the repos. Thought I would update the lazy way with prupert's very good ffmpegup script, all went well with x264 but ffmpeg failed (ffmpegup.log attached), I note the log file says Removing ffmpeg, but it didn't and maybe that was the problem.

I uninstalled ffmpeg with synaptic, deleted my source dirs and started from scratch with FakeOutdoorsman's howto which worked flawlessly.

I haven't tried to update yet though.

Line 252 of the log shows: ERROR: libxvid not found. This error occurred directly after the FFmpeg ./configure command. The configure line probably contains --enable-libxvid but libxvidcore-dev probably wasn't installed.

sebald
May 2nd, 2010, 01:47 AM
Thank you, thank you, thank you. The power of ffmpeg is now in my hands. Having heard about it, I dutifully installed the standard package but of course found all its crippled-ness due to licensing concerns. Your build procedure worked flawlessly (at least for the formats I've tried it with so far...)

FakeOutdoorsman
May 2nd, 2010, 03:41 AM
Thank you, thank you, thank you. The power of ffmpeg is now in my hands. Having heard about it, I dutifully installed the standard package but of course found all its crippled-ness due to licensing concerns. Your build procedure worked flawlessly (at least for the formats I've tried it with so far...)

You have the power!

andrew.46
May 2nd, 2010, 03:47 AM
Hi Fakeoutdoorsman,

I think the privilege of making the 1,000th post in your incredible guide belongs to you :). Thanks for introducing me to FFmpeg in the first place!

All the very best,

Andrew

Linuxforall
May 2nd, 2010, 09:59 AM
You have the power!


The thanks goes to you and andrew, now for all my LTS Lucid installs, every month I can upgrade to latest FFMPEG, x264 and mplayer thanks to both your hard work. So for next three years, I and many others are all set.