View Full Version : HOWTO: Install and use the latest FFmpeg and x264
FakeOutdoorsman
May 8th, 2008, 02:20 AM
This guide has been moved to the official FFmpeg wiki:
How to Compile FFmpeg and x264 on Ubuntu (https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu)
The guide will be kept up to date and all supported Ubuntu versions will be included.
Paerez
May 12th, 2008, 09:48 PM
Great guide. Thanks a lot. One problem:
When I configure x264 I get the error:
./configure --enable-pthread --enable-mp4-output --enable-shared
No suitable assembler found. x264 will be several times slower.
Please install 'yasm' to get MMX/SSE optimized code.
I tried nasm and yasm from the repos but they didn't work :-(
But I figured it out!
All I had to do was go to:
http://www.tortall.net/projects/yasm/wiki/Download
Grab the 0.7.0 tarball, then ./configure, make, sudo checkinstall, then build x264, then ffmpeg. Now I can encode much faster.
A note to those who are interested:
I used the ffmpeg encoding script:
#!/bin/sh
ffmpeg -i $1 -y -an -pass 1 -vcodec libx264 -threads 4 -b 1024kbps -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me epzs -subq 1 -trellis 0 -refs 1 -bf 3 -b_strategy 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 $2
ffmpeg -i $1 -y -acodec libfaac -ab 128k -pass 2 -vcodec libx264 -threads 4 -b 1024kbps -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +mixed_refs -me umh -subq 5 -trellis 1 -refs 5 -bf 3 -b_strategy 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 $2
Which can be run:
./scriptname myfile.avi myfile.mp4
And the result plays in Flash 9 using their h264 playback stuff. Pretty neat and high quality too.
FakeOutdoorsman
May 12th, 2008, 11:34 PM
Great guide. Thanks a lot. One problem:
When I configure x264 I get the error:
./configure --enable-pthread --enable-mp4-output --enable-shared
No suitable assembler found. x264 will be several times slower.
Please install 'yasm' to get MMX/SSE optimized code.
I tried nasm and yasm from the repos but they didn't work :-(
...
Thanks for pointing that out. I'll update it with a section on yasm compilation. Was the error the same if you tried using just nasm?
As of March 14, '08 (I think), x264 requires a newer yasm >= 0.6.0 than what is in the Ubuntu universe repository (yasm 0.5.0). x264 should fallback to nasm if yasm isn't detected and worked for me just fine despite the following error:
./configure: 330: yasm: not found
If I omitted nasm, I got the same error as you. I'm not sure why nasm worked for me and not for you.
Before I wrote this tutorial I tested the speed of x264 either using a compiled yasm 0.7.0, nasm from the repository, or no assembler. The speed differences were very small between compiled yasm and nasm from the repo:
x264/mencoder/ffmpeg on a dual quad core (http://ubuntuforums.org/showpost.php?p=4905281&postcount=5).
Edit: Tutorial updated with yasm compilation.
Paerez
May 14th, 2008, 04:45 PM
I tried using both nasm and yasm from the repos, and x264 would compile but it would say it was building without support for yasm and nasm.
Then, when I used it to convert a file it would say that it was using no cpu extensions, as opposed to saying "MMX SSE ...". It would also take significantly longer (like 2-5 times as long).
But just installing the yasm from source fixed it, and it wasn't very difficult to do.
ractalfece
June 24th, 2008, 06:39 AM
Thanks a million. Great in depth job on this one.
d_mcqueen
June 26th, 2008, 04:44 PM
This is a great howto, since in my opinion ffmpeg is broken due to these issues.
Therefore, what are the additional steps to fully replace ffmpeg, x64 and the libx264 packages such that it satisfies dependencies for other applications that use ffmpeg and my update manager does not keep asking me to upgrade from the checkinstall packages?
Nais
June 26th, 2008, 06:04 PM
When I try to "make" x264, I get this error.
/usr/bin/ld: common/mc.o: relocation R_X86_64_32S against `a local symbol' can not be used
when making a shared object; recompile with -fPIC
common/mc.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libx264.so.60] Error 1
I'm on 64-bit Ubuntu, is there something else I should be doing? Dunno what "-fPIC" means.
UPDATE: Never mind. Cleaned up my folder of a previous failed build attempt and it seems to be okay now. Thanks for the guide!
FakeOutdoorsman
June 26th, 2008, 06:09 PM
This is a great howto, since in my opinion ffmpeg is broken due to these issues.
Therefore, what are the additional steps to fully replace ffmpeg, x64 and the libx264 packages such that it satisfies dependencies for other applications that use ffmpeg and my update manager does not keep asking me to upgrade from the checkinstall packages?
I believe your compiled versions should satisify as dependencies for other packages as long as the packages are named correctly and compiling options that are required by the parent package are enabled. I don't use update-manager so I can't give instruction on that, but you can try:
sudo aptitude hold ffmpeg
If you prefer Synaptic, then select the package and then choose "Package -> Lock Version" from the menu. I haven't tested either of these commands, so I'm unsure how effective they are.
cor2y
June 27th, 2008, 02:38 AM
Yes locking versions work but how about trying to get synaptic to see that you installed libx264 via the source code with checkinstall 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 repos version of libx264 if i try to install via synaptic
FakeOutdoorsman
June 28th, 2008, 06:58 PM
Yes locking versions work but how about trying to get synaptic to see that you installed libx264 via the source code with checkinstall 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 repos version of libx264 if i try to install via synaptic
When you compile x264 it should create the same files that libx264 and libx264-dev would create. If you add "--prefix=/usr" to the x264 configure line then these files will also install in the same location as the repo versions instead of the default /usr/local/lib. I'm unsure how to get Synaptic or apt to recognize this. I'm out of town until July 4 and can't test anything until then.
vjktm
June 29th, 2008, 04:38 AM
Thanks a bundle for this clear & concise set of instructions. Both installed perfectly. Only one question, bash can't find ffmpeg and x264, they are installed inside my home directory. What do I do to get them to run from bash with: ffmpeg?
Thanks.
TArozzelle
June 29th, 2008, 10:12 AM
./configure returns this error when I try to compile.
cc1: out of memory allocating 248 bytes after a total of 16900096 bytes
make: *** [libavcodec/motion_est.o] Error 1
Any thoughts?
Thanks!
FakeOutdoorsman
June 30th, 2008, 07:30 AM
Thanks a bundle for this clear & concise set of instructions. Both installed perfectly. Only one question, bash can't find ffmpeg and x264, they are installed inside my home directory. What do I do to get them to run from bash with: ffmpeg?
Thanks.
What version of Ubuntu are you using? Do you have a modified .bashrc file? What are the outputs of "whereis ffmpeg" and "whereis x264"?
FakeOutdoorsman
June 30th, 2008, 07:30 AM
./configure returns this error when I try to compile.
cc1: out of memory allocating 248 bytes after a total of 16900096 bytes
make: *** [libavcodec/motion_est.o] Error 1
Any thoughts?
Thanks!
I haven't encountered this error before. Are you compiling within a virtual machine? My guess is you don't have enough RAM and/or swap, or the particular version of ffmpeg you are trying to compile has a bug.
What is the output of the "free" command? Also show the output of "cat /proc/meminfo".
Leefmc
July 6th, 2008, 12:49 PM
Great tutorial!
I got it all working i believe, but i've got two questions:
1.) I've been trying many different combinations, but so far i have had no luck in creating a quicktime compatible x264. Any thoughts on how to do this? To my knowledge, the simple fact is that QuickTime doesn't support much of the features available to H264. So far i've had no real luck, but i have managed to turn a 10mb ogg into a 50mb mov.
2.) On the same note as #1, i've been making a friend suffer through testing my mov's on his windows box, since i dont have one heh. Anyone know of a good way to test QuickTime compatibility without being able to run.. quicktime?
3.) Lastly, FFMPEG from the repos will come with a "qt-faststart" command. Any idea how to build/download that functionality without replacing the FFMPEG build done via this tutorial?
Thanks!
FakeOutdoorsman
July 7th, 2008, 03:32 AM
1.) I've been trying many different combinations, but so far i have had no luck in creating a quicktime compatible x264. Any thoughts on how to do this? To my knowledge, the simple fact is that QuickTime doesn't support much of the features available to H264. So far i've had no real luck, but i have managed to turn a 10mb ogg into a 50mb mov.
I just tested my example script from this tutorial and the resulting mp4 file worked in Quicktime 7.5. What ffmpeg command are you using? Are you using the latest Quicktime? Some people use MP4Box (part of the gpac package) to help create iTunes/iPod compatible files after using ffmpeg to encode:
MP4Box -add video.mp4 video.mp4
Another option, added in March and untested by me, is "-f ipod":
ffmpeg -i inputvideo.avi -f ipod outputvideo.mp4
2.) On the same note as #1, i've been making a friend suffer through testing my mov's on his windows box, since i dont have one heh. Anyone know of a good way to test QuickTime compatibility without being able to run.. quicktime?
I do my testing in a virtualized Windows session using VirtualBox (https://help.ubuntu.com/community/VirtualBox). It works well for me. I doubt Quicktime will run under Wine.
3.) Lastly, FFMPEG from the repos will come with a "qt-faststart" command. Any idea how to build/download that functionality without replacing the FFMPEG build done via this tutorial?
Yes. qt-faststart is also included in your ffmpeg folder that you made from this tutorial. Cut and pasted from ~/ffmpeg/tools/qt-faststart.c because I'm a bad paraphraser:
* This utility rearranges a Quicktime file such that the moov atom
* is in front of the data, thus facilitating network streaming.
*
* To compile this program, start from the base directory from which you
* are building FFmpeg and type:
* make tools/qt-faststart
* The qt-faststart program will be built in the tools/ directory. If you
* do not build the program in this manner, correct results are not
* guaranteed, particularly on 64-bit platforms.
* Invoke the program with:
* qt-faststart <infile.mov> <outfile.mov>
maxbear
July 8th, 2008, 08:29 PM
Thanks a lot for this useful guide. I use my ubuntu machine for file server and encoding purpose only. And you save me a lot of time.
By the way, if ubuntu asked me to update ffmpeg and x264, should I do it? I didn't do it.
FakeOutdoorsman
July 8th, 2008, 08:54 PM
Thanks a lot for this useful guide. I use my ubuntu machine for file server and encoding purpose only. And you save me a lot of time.
By the way, if ubuntu asked me to update ffmpeg and x264, should I do it? I didn't do it.
If you didn't give ffmpeg and x264 new names in checkinstall then your package management software will try to "update" it to the outdated version from the repository. You can either uninstall and then run checkinstall again using a new name (like ffmpeg-svn), or if you use aptitude you can try:
sudo aptitude hold ffmpeg
maxbear
July 9th, 2008, 01:31 AM
Thanks a lot. You are super!
Leefmc
July 10th, 2008, 05:00 AM
Ugh, im so bummed heh. I spent forever finding the right combinations of h264 settings and finally got everything right. Now i made the mistake of updating (apt-get update) and it just trashed my compiled ffmpeg junk. It was most likely just references, but none the less i eventually ended up starting over. Note that i did aptitude hold, but that didnt stop apt-get apparently.. what does it stop? Aptitude?
With all that said, now my new compile is not working right. Im getting errors when using ffmpeg:
*** glibc detected *** ffmpeg: free(): invalid pointer: 0x08757158 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7b5fa85]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7b634f0]
ffmpeg(av_set_string2+0x8fb)[0x80eff9b]
======= Memory map: ========
08048000-08509000 r-xp 00000000 08:02 108607 /usr/local/bin/ffmpeg
08509000-08513000 rw-p 004c0000 08:02 108607 /usr/local/bin/ffmpeg
The only thing i did different this time is during checkinstall, i used custom names for ffmpeg, x264, and yasm, hoping that it would no longer be beat to death by apt-get.
Any thoughts onto whats wrong?
FakeOutdoorsman
July 10th, 2008, 06:43 AM
Note that i did aptitude hold, but that didnt stop apt-get apparently.. what does it stop? Aptitude?
I haven't used apt-get for a few years so I'm unsure if it has an equivalent of aptitude's "hold". I should have mentioned that hold probably would not stop apt-get and Synaptic.
With all that said, now my new compile is not working right. Im getting errors when using ffmpeg:
*** glibc detected *** ffmpeg: free(): invalid pointer: 0x08757158 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7b5fa85]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7b634f0]
ffmpeg(av_set_string2+0x8fb)[0x80eff9b]
======= Memory map: ========
08048000-08509000 r-xp 00000000 08:02 108607 /usr/local/bin/ffmpeg
08509000-08513000 rw-p 004c0000 08:02 108607 /usr/local/bin/ffmpeg
What is the ffmpeg command that you are using to get this error? I've never encountered this error, but I would like to try to reproduce it. My guess is that there may be a mess of several ffmpeg/x264 installs (or residual files) screwing each other up. Use you package manager to completely remove all installed yasm, x264, and ffmpeg. Now you can either:
cd ~/yasm
make distclean
./configure, make, checkinstall
cd ~/x264
make distclean
git pull
./configure, make, checkinstall
sudo ldconfig
cd ~/ffmpeg
make distclean
svn update
./configure, etc
or delete the yasm, ffmpeg and x264 directories and start the tutorial over.
Leefmc
July 10th, 2008, 10:57 PM
or delete the yasm, ffmpeg and x264 directories and start the tutorial over.
I actually have, many times. I tried custom names, same error. Note that when i used custom names, upon removal, i made sure to sudo aptitude purge the names i gave them (and even the normal names, x264 && ffmpeg)
Last night i tried compiling it 4 to 6 different ways, each time i fully purged, and deleted, all of the installs.
I am out of ideas. Thoughts?
(Note i'll post the command i tried when i get home, but also note that the command worked great on my previous compile.)
PGLGreg
July 10th, 2008, 11:52 PM
If you have an AMD 64-bit system, here is something I just stumbled on that might be useful. In compiling x264, the linker told me I should use "-fPIC" and recompile common/x86/cabac-a.o. But that .o file is assembled rather than compiled. So, hoping that the assembler (yasm) would understand, I started over and configured with:
./configure --prefix=/usr --libdir=/usr/lib64 \
--enable-gtk --enable-pthread --enable-visualize --enable-pic --enable-shared \
--enable-mp4-output \
--extra-asflags="-fPIC" \
--extra-cflags="-O4 -march=k8 -mtune=k8 -pipe -ffast-math -fomit-frame-pointer"
That seems to have worked.
FakeOutdoorsman
July 11th, 2008, 12:20 AM
I am out of ideas. Thoughts?
I suggest posting this problem to the ffmpeg-user mailing list (https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user/). They are much more knowledgeable than I am with ffmpeg, but be sure to read the posting guidelines (http://ffmpeg.mplayerhq.hu/mailinglists.html) (first paragraph) or they may ignore or flame you if you don't follow their strict protocol. Also, this is unstated in their rules, but if you subscribe to the digest mode and reply to it with a non-mime digest compatible mail client then they will flame you. Make sure to include both your full ffmpeg command and the ffmpeg output or they will flame you.
FakeOutdoorsman
July 11th, 2008, 12:31 AM
If you have an AMD 64-bit system, here is something I just stumbled on that might be useful. In compiling x264, the linker told me I should use "-fPIC" and recompile common/x86/cabac-a.o. But that .o file is assembled rather than compiled. So, hoping that the assembler (yasm) would understand, I started over and configured with:
./configure --prefix=/usr --libdir=/usr/lib64 \
--enable-gtk --enable-pthread --enable-visualize --enable-pic --enable-shared \
--enable-mp4-output \
--extra-asflags="-fPIC" \
--extra-cflags="-O4 -march=k8 -mtune=k8 -pipe -ffast-math -fomit-frame-pointer"
That seems to have worked.
Thanks, PGLGreg. I'll add a note to the tutorial.
Leefmc
July 11th, 2008, 01:56 AM
Ok, just got home. Seems this is my code:
ffmpeg -y -i $1 -pass 1 -threads 4 -s 1170x728 -vcodec libx264 -b 384k -bt 192k -f mp4 -flags +loop -cmp +chroma -partitions 0 -me_method epzs -subq 1 -trellis 0 -refs 1 -coder 0 -me_range 16 -g 300 -keyint_min 30 -sc_threshold 40 -i_qfactor 0.71 -maxrate 10M -bufsize 10M -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -an -r ntsc /dev/null
ffmpeg -y -i $1 -pass 2 -threads 4 -s 1170x728 -vcodec libx264 -b 384k -bt 192k -f mp4 -flags +loop -cmp +chroma -partitions +parti4x4+partp4x4+partp8x8+partb8x8 -me_method umh -subq 7 -trellis 2 -refs 1 -coder 0 -me_range 16 -g 300 -keyint_min 30 -sc_threshold 40 -i_qfactor 0.71 -maxrate 10M -bufsize 10M -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -acodec libfaac -ab 96k -ac 1 -r ntsc $2_temp.mp4
I forget where i got it from, but most of it is not by me. I tested a bunch, and eventually went with that one after tweaking it some to my liking. It produced good output, good filesize, and most of all it worked for QuickTime.
*edit*
Note that at the moment im taking random arguments from the commands and trying to make something work, to hopefully pinpoint the problem.
*edit2*
Best i can find, it seems this is the problem:
-rc_eq 'blurCplx^(1-qComp)'
If i remove that from the 2 commands, it runs. Im searching the ffmpeg docs to find out what rc_eq is.
*edit3*
Yea, seems it is a rate control equation. Not knowing encoding at all, how important is this? If i use the command "ffmpeg -rc_eq" i get the same error, so im guessing that specific command is corrupted or something? I compared an older videos size to the newly "no rc_eq" encoded one, and they seem to be the same size and quality, though i have not tested on quicktime yet (thats a bit of a pain when you dont have windows heh).
Thoughts?
PGLGreg
July 11th, 2008, 01:56 AM
cd ~/x264
git pull
make distclean
Generally, you should clean up before doing the pull, because the pull might change the configuration in a way that confuses make and prevents it from doing the distclean correctly.
cd ~/x264
make distclean
git pull
Nullack
July 11th, 2008, 02:45 AM
If you have an AMD 64-bit system, here is something I just stumbled on that might be useful. In compiling x264, the linker told me I should use "-fPIC" and recompile common/x86/cabac-a.o. But that .o file is assembled rather than compiled. So, hoping that the assembler (yasm) would understand, I started over and configured with:
./configure --prefix=/usr --libdir=/usr/lib64 \
--enable-gtk --enable-pthread --enable-visualize --enable-pic --enable-shared \
--enable-mp4-output \
--extra-asflags="-fPIC" \
--extra-cflags="-O4 -march=k8 -mtune=k8 -pipe -ffast-math -fomit-frame-pointer"
That seems to have worked.
My understanding is that anything over -O3 in GCC just results in the compiler using 3.
I'm using -march=native on Intrepid, which is running well. I think native is a better setting.
PGLGreg
July 11th, 2008, 03:08 AM
My understanding is that anything over -O3 in GCC just results in the compiler using 3.
I'm using -march=native on Intrepid, which is running well. I think native is a better setting.
Yes, that's my understanding, also. So, one may as well use "-O4".
I use those compiler flags not because I think they're good, but because mplayer thinks they're good. That is, when I configured mplayer, it took a look at my system and decided those are the flags I should use. Me -- I dunno.
What's good about "-march=native"? What does it even mean?
FakeOutdoorsman
July 11th, 2008, 09:09 PM
*edit3*
Yea, seems it is a rate control equation.
I can confirm this error. I'm getting the same error but haven't found a reason or solution yet.
Nullack
July 12th, 2008, 12:50 AM
mtune and march as native just means gcc uses the best available for your specific cpu - your native setup.
Leefmc
July 12th, 2008, 02:29 AM
I can confirm this error. I'm getting the same error but haven't found a reason or solution yet.
Well im not even sure what im missing out on haha. I know very little about encoding videos (actually, i know just about all i want to heh ;)).
PGLGreg
July 12th, 2008, 05:31 AM
mtune and march as native just means gcc uses the best available for your specific cpu - your native setup.
How do you think gcc knows that, or even knows what cpu I have? If I had compiled gcc and tailored it to my own system, then it would know whatever I told it about that, and if I told it correctly, then it would know my cpu. I didn't actually compile my gcc -- it came with my distribution, and it knows I have an AMD 64-bit processor, but it doesn't know which one. I have to tell it, if I want optimal results.
I don't find any documentation of "-march=native" in "info gcc".
Nullack
July 12th, 2008, 06:18 AM
Have a look on the web, native is the optimal setting when your compiled binaries dont need to be run on anything else than your machine.
PGLGreg
July 12th, 2008, 08:00 AM
Have a look on the web, native is the optimal setting when your compiled binaries dont need to be run on anything else than your machine.
I did look. I learn that "-march=native" was introduced in gcc 4.2. I have only gcc 4.1.2 here, so it's no good to me personally, until I update. Still, very interesting.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=448370
Nullack
July 12th, 2008, 09:37 PM
Im on gcc 4.3.1 and have no problems with it. Mplayer now use mtune and march as native in mplayer / mencoder builds. Its super fast, much faster than VLC, Totem etcetc
FakeOutdoorsman
July 13th, 2008, 02:05 AM
FFmpeg does not support "-threads auto" as an option anymore. If your command or script gives you the following error when using "-threads auto", then use "-threads 0" (the integer zero, not a letter) instead:
Expected number for threads but found: auto
I'm unsure when this change was introduced.
Update from S. Sabatini on ffmpeg-user mailing list:
-threads auto never worked as you expected, "auto" was previously parsed by atoi() which returned "0", now it omplains if it can't recognize the argument as a number.
FakeOutdoorsman
July 13th, 2008, 09:52 PM
*edit3*
Yea, seems it is a rate control equation. Not knowing encoding at all, how important is this? If i use the command "ffmpeg -rc_eq" i get the same error, so im guessing that specific command is corrupted or something? I compared an older videos size to the newly "no rc_eq" encoded one, and they seem to be the same size and quality, though i have not tested on quicktime yet (thats a bit of a pain when you dont have windows heh).
Thoughts?
Looks like you found a bug in ffmpeg. I submitted this to the ffmpeg-user mailing list. You can follow it here:
rc_eq causes 'invalid pointer' error (http://comments.gmane.org/gmane.comp.video.ffmpeg.user/17424)
And the resulting patch that should be applied to svn soon:
[PATCH] Fix the ffmpeg -rc_eq "foo" bug (http://thread.gmane.org/20080713163609.GB10019@geppetto)
Also, I will not have internet acces for a week, so I can't reply until then.
Update: This error has been fixed in today's SVN.
maxbear
July 17th, 2008, 02:03 AM
I got one more question about ffmpeg on ubuntu. Just to see if there is anyone have any idea about this problem.
I am using a quad core (q9450) cpu. But ffmpeg only utilize 25% cpu usage. I already add "-threads 4" or even "-threads 8" in the command line. But I don't see any increase in speed.
I used to have over 200-250 fps in windows (320x240 video encoding). But I got only 100-150 fps in ubuntu (same video, same encoder setting.....).
seagull man
July 17th, 2008, 02:10 PM
absolute gold. thanks for the howto.
FakeOutdoorsman
July 21st, 2008, 04:12 AM
I got one more question about ffmpeg on ubuntu. Just to see if there is anyone have any idea about this problem.
I am using a quad core (q9450) cpu. But ffmpeg only utilize 25% cpu usage. I already add "-threads 4" or even "-threads 8" in the command line. But I don't see any increase in speed.
I used to have over 200-250 fps in windows (320x240 video encoding). But I got only 100-150 fps in ubuntu (same video, same encoder setting.....).
What is your ffmpeg command and the full ffmpeg ouput?
nowhere@cox.net
July 23rd, 2008, 11:25 PM
Hey guys, I'm not very knowledgeable on video encoding and such. Just having a look in synaptic I see
libx264-57
x264 video coding library
is the only x264 thing I have installed. If I mark it for removal, it takes a TON of stuff with it, including ffmpeg. So, it seems to me that the repo ffmpeg should have x264 already built in, yah? Why do I need to recompile it?
I am trying to convert avi's encoded with xvid into something my iPhone will play but without luck so far. I have avidemux installed but using the ipod preset just gives an error
Encoder initialization failed
Not activated.
Is this related to this x264 thing this HowTo is addressing?
Thanks,
Eric
FakeOutdoorsman
July 24th, 2008, 08:53 PM
Hey guys, I'm not very knowledgeable on video encoding and such. Just having a look in synaptic I see
is the only x264 thing I have installed. If I mark it for removal, it takes a TON of stuff with it, including ffmpeg. So, it seems to me that the repo ffmpeg should have x264 already built in, yah?
The repo ffmpeg does not support restricted formats due to legal reasons and has not been configured to support h264 encoding. You have to use a different repo or compile ffmpeg yourself to encode to ipod compatible formats if you want to use ffmpeg.
Why do I need to recompile it?
You don't need to recompile it. I'm not familiar with avidemux, but I believe it uses a built in version of the ffmpeg libavcodec library, so you don't need to install ffmpeg to use avidemux.
I am trying to convert avi's encoded with xvid into something my iPhone will play but without luck so far. I have avidemux installed but using the ipod preset just gives an error
Is this related to this x264 thing this HowTo is addressing?
Thanks,
Eric
You are encoding to XVID so x264 is not even being called by avidemux, so the problem probably isn't with x264. I suggest running avidemux from the command-line to see additional errors that it may spit out in the terminal. You should also take a look at the Ubuntu Wiki page: Encoding Video for the iPod Video (https://help.ubuntu.com/community/iPodVideoEncoding).
mocha
July 29th, 2008, 08:48 AM
Using the compiled x264 I get
[libx264 @ 0x8466530]no ratecontrol method specified
when I try to encode something with ffmpeg. Was this a bug in x264 a few weeks ago, because that's when I built it. I went back to an ffmpeg not built with this newer version of the x264 libs.
EDIT: I had to uninstall the git x264 and ffmpeg, and then recompile ffmpeg with only the libx264 from the Ubuntu repository.
Another thing I noticed is that svn ffmpeg 14xxx won't compile with the Ubuntu libx264, only svn 13xxx will compile. I'm really confused with these x264 issues. I'm having the same problems with svn mplayer/mencoder.
I'm curious how a fresh checkout of x264 and ffmpeg are working for other folks. Do you get ratecontrol errors when you try to encode a video?
Regarding mplayer/mencoder, I cannot get it to complie with "--enable-x264".
Any comments would be appreciated. Thanks.
FakeOutdoorsman
July 29th, 2008, 07:19 PM
What FFmpeg command are you using and what s the full FFmpeg output? There was an issue with FFmpeg and the rate control option a few threads back and some people on the ffmpeg-user mailing list have the same error as you: Error: "no ratecontrol method specified" (http://comments.gmane.org/gmane.comp.video.ffmpeg.user/17574).
I compiled today's FFmpeg (r14466) and x264 (r920) and encoded a few videos without any problem using a simple command and a more complex one with "-rc_eq 'blurCplx^(1-qComp)'".
There was probably another bug with FFmpeg or the same one from earleir, and it looks like it's already been fixed, but I'd like to try your command to make sure I didn't miss anything.
I don't use libx264 from the stock Ubuntu repo, so I'm unsure why FFmpeg svn won't work with it anymore.
mocha
July 29th, 2008, 08:35 PM
When I get home later I'll post my ffmpeg command for you to try.
I found out that in additon to the 14xxx ffmpeg, the mplayer 27xxx will also not compile with libx264 support from the libx264 in the Ubuntu repository. I had to revert to an mplayer 26xxxx to get it to work.
In summary, I'm using the Ubuntu libx264, ffmpeg 13060, and mplayer 26672, both ffmpeg and mencoder have working x264 encoding with this version configuration.
If I have time later I'll pull the recent versions of x264, ffmpeg, mplayer and try everything again.
lunaz
July 30th, 2008, 02:46 AM
i'm trying to compile this and got stuck at configuring, i tried it a couple times with same error; tried google but dont know wot to search for.. 'not working' wont help ;p
luna@sux:~$ cd ffmpeg
luna@sux:~/ffmpeg$ ./configure --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264
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.
luna@sux:~/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
> vhook/watermark.d
> vhook/null.d
> vhook/fish.d
> libavutil/tree.d
> libavutil/string.d
> libavutil/sha1.d
> libavutil/rc4.d
> libavutil/rational.d
> libavutil/random.d
> libavutil/mem.d
> libavutil/md5.d
> libavutil/mathematics.d
> libavutil/lzo.d
> libavutil/log.d
> libavutil/lls.d
> libavutil/intfloat_readwrite.d
> libavutil/fifo.d
> libavutil/des.d
> libavutil/crc.d
> libavutil/base64.d
> libavutil/aes.d
> libavutil/adler32.d
make: *** No rule to make target `libavutil/../config.mak'. Stop.
luna@sux:~/ffmpeg$ ./configure --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264
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.
luna@sux:~/ffmpeg$
FakeOutdoorsman
July 30th, 2008, 03:05 AM
Did you install "libfaad-dev"? The error message is saying that FFmpeg can't find the necessary files to build itself with support for FAAD. FAAD is a decoder (like a file reader) for AAC audio. If you're not planning on decoding AAC files or transcoding videos with AAC audio then you can remove "--enable-libfaad" from the FFmpeg configure line and "libfaad-dev" will not be needed.
lunaz
July 30th, 2008, 03:57 AM
i installed libfaad2-0 stuff from synaptic
luna@sux:~/ffmpeg$ ./configure --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad2-0 --enable-libfaac --enable-pthreads --enable-libx264
Unknown option "--enable-libfaad2-0".
See ./configure --help for available options.
luna@sux:~/ffmpeg$
i tried the above line w libfaad also, and w/o the option, still not working :( --disable libfaad doesn't do any diferent either.
do i have to start all over after installing libfaad2-0 packages?
mocha
July 30th, 2008, 01:43 PM
What FFmpeg command are you using and what s the full FFmpeg output?
Here is the command that was failing with "no ratecontrol method specified"
ffmpeg -threads 2 -i INPUT_FILE -vcodec libx264 -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 1000k -maxrate 1250k -bufsize 4M -bt 256k -refs 1 -coder 0 -me umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ac 2 OUTPUT_FILE
Can you give this a try with the latest x264 and ffmpeg? Thanks!
FakeOutdoorsman
July 30th, 2008, 08:09 PM
i installed libfaad2-0 stuff from synaptic
luna@sux:~/ffmpeg$ ./configure --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad2-0 --enable-libfaac --enable-pthreads --enable-libx264
Unknown option "--enable-libfaad2-0".
See ./configure --help for available options.
luna@sux:~/ffmpeg$
i tried the above line w libfaad also, and w/o the option, still not working :( --disable libfaad doesn't do any diferent either.
do i have to start all over after installing libfaad2-0 packages?
There is no ffmpeg configuration option called "--enable-libfaad2-0". You can see what configuration options are available with "./configure --help" when you are in your ffmpeg folder. You are getting this error because you told ffmpeg to compile with FAAD support, but ffmpeg thinks that the libfaad-dev package isn't installed or it can't find it for some reason. Try this:
sudo aptitude install libfaad-dev libfaac-dev liblame-dev
cd ~/ffmpeg
make distclean
./configure --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264
If you want to disable support for FAAD, then remove "--enable-libfaad" from your ffmpeg configuration line. I made a mistake when telling you to use "--disable-libfaad" because by default it is disabled according to "./configure --help".
FakeOutdoorsman
July 30th, 2008, 08:10 PM
Can you give this a try with the latest x264 and ffmpeg? Thanks!
I didn't get any errors. Works fine for me with yesterday's ffmpeg and x264. I bet the latest ffmpeg will work for you.
mocha
July 30th, 2008, 09:24 PM
I didn't get any errors. Works fine for me with yesterday's ffmpeg and x264. I bet the latest ffmpeg will work for you.
Thanks. I'll give it a shot.
lunaz
July 31st, 2008, 05:13 AM
i tried to install the packages but it couldn't be found :(
i did check if i had muli/universe repos enabled and i do (according to synaptic)
luna@sux:~$ sudo aptitude install libfaad-dev libfaac-dev liblame-dev
[sudo] password for luna:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done
Couldn't find any package whose name or description matched "libfaad-dev"
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
FakeOutdoorsman
July 31st, 2008, 05:31 AM
i tried to install the packages but it couldn't be found :(
i did check if i had muli/universe repos enabled and i do (according to synaptic)
I should have noticed that your probably not running Hardy according to your signature. The package name for libfaad is different in Feisty. Try this:
sudo aptitude install libfaad2-dev
pedrogent
July 31st, 2008, 04:05 PM
Great HOWTO. Many thanks.
This may be a stupid question but why do we find these 'old' x264 builds in the repos? If there are constant improvements, then why aren't they added to the repos? Seems to make sense to me.
FakeOutdoorsman
July 31st, 2008, 07:04 PM
Thanks for the feedback. That's a good question. I think because Ubuntu is not a rolling release the package is only usually updated once per stable release. If there is a bad bug or someone files a backport then it may get updated. That's my guess.
lunaz
July 31st, 2008, 08:23 PM
actually, that computer is running gutsy. :) i don't update my sig enough i'll try that command when i get home :)
I should have noticed that your probably not running Hardy according to your signature. The package name for libfaad is different in Feisty. Try this:
sudo aptitude install libfaad2-dev
lunaz
August 1st, 2008, 01:41 AM
ok, i tried again & i definately have the libfaad2-dev pack installed, but i still cant do the configure thing even if i do --disable libfaad2-dev
FakeOutdoorsman
August 1st, 2008, 02:20 AM
What is the error you are getting? "--disable libfaad2-dev" is not an option since it is not listed in "./configure --help". By default ffmpeg will not compile with support for libfaad, so you don't even need to mention libfaad in your configuration options if you don't want it. You can see what configuration options are enabled or disabled by default with "./configure --help".
lunaz
August 1st, 2008, 06:06 AM
this is the step i got stuck at :)
cd ffmpeg
./configure --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264
this is the output i get
ERROR: x264 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.
wow this is a different error than i got last night... wow now i'm confused :P
FakeOutdoorsman
August 1st, 2008, 06:37 PM
This is a different error because you fixed the libfaad error. This error is telling you that you didn't install x264. Did you install x264 (step 4 from the tutorial)?
You might be better off installing ffmpeg from the Medibuntu (https://help.ubuntu.com/community/Medibuntu) repository since I haven't tested this tutorial on anything other than Hardy and because it seems to be giving you a lot of trouble.
flyakite
August 2nd, 2008, 07:24 PM
I didn't get any errors. Works fine for me with yesterday's ffmpeg and x264. I bet the latest ffmpeg will work for you.
I had the same no ratecontrol error from x264. I finally found the solution in Andrew's posting http://ubuntuforums.org/showthread.php?p=5482316: before compile x264 make sure you remove the libx264-dev ubuntu package!
sudo apt-get remove libx264-dev
Then follow this posting and it will work
Enjoy
FakeOutdoorsman
August 2nd, 2008, 08:19 PM
Thanks, flyakite. I'll update the tutorial.
mocha
August 3rd, 2008, 02:28 AM
I had the same no ratecontrol error from x264. I finally found the solution in Andrew's posting http://ubuntuforums.org/showthread.php?p=5482316: before compile x264 make sure you remove the libx264-dev ubuntu package!
sudo apt-get remove libx264-dev
Then follow this posting and it will work
Enjoy
Okay, I haven't tried it yet, but I'll keep that in mind. I have a theory that you don't need to remove the Ubuntu version cause the compiled version puts its libs in /usr/local/lib whereas the Ubuntu version has the libs in /usr/lib. And I would assume that when you complie ffmpeg and mplayer they look in /usr/local/lib first. But anyway, when I try it I'll post and let you know.
lunaz
August 3rd, 2008, 02:52 AM
ok i installed hardy on the laptop. got it running anyways, tried that script but it only successfully converted one video. the other froze up the terminal when it got back to prompt. then it said video size 48 bytes, and whatever player i have gave an error when i tried to play it.
i tried to upload the working mp4 to youtube but it looks craptastic :( http://www.youtube.com/watch?v=MjqVVQ0gq08
jcr1
August 4th, 2008, 03:43 PM
well after installing it all, when I go ffmpeg, I get file not found.
FakeOutdoorsman
August 4th, 2008, 08:47 PM
ok i installed hardy on the laptop. got it running anyways, tried that script but it only successfully converted one video. the other froze up the terminal when it got back to prompt. then it said video size 48 bytes, and whatever player i have gave an error when i tried to play it.
i tried to upload the working mp4 to youtube but it looks craptastic :( http://www.youtube.com/watch?v=MjqVVQ0gq08
What script did you use? Youtube will re-compress your video to a low bitrate, so it is best to use a high bitrate video when submitting to Youtube. If you used the example script from this tutorial, at least double the bitrate and change the audio to mono "-ac 1". Also, some screen recording software lets you zoom in or record only a certain area/window. This will make your screencast easier to read instead of recording and compressing your entire desktop.
FakeOutdoorsman
August 4th, 2008, 09:12 PM
well after installing it all, when I go ffmpeg, I get file not found.
frink@hedron:~$ whereis ffmpeg
ffmpeg: /usr/local/bin/ffmpeg
Do you get a similar output when you run "whereis ffmpeg"?
lunaz
August 7th, 2008, 02:44 AM
Ok i tried changing the -b option to 768 then 1200 on both passes.
all it does is make a 48byte file that doesnt work; and it freezes up the terminal. :( i was using that script in the tutorial first page.
the input files are both ogg files & tried using output mp4 and avi neither work.
mocha
August 7th, 2008, 05:29 AM
Ok i tried changing the -b option to 768 then 1200 on both passes.
all it does is make a 48byte file that doesnt work; and it freezes up the terminal. :( i was using that script in the tutorial first page.
the input files are both ogg files & tried using output mp4 and avi neither work.
You should take a look at WinFF. It's a frontend to ffmpeg. Don't install the one from the repository, get the deb from the author's website. It comes with tons of presets. Just make sure to point it at "/usr/local/bin/ffmpeg" in the preferences.
mocha
August 20th, 2008, 04:17 PM
Can someone give me a hand? Please do a fresh pull of x264 and ffmpeg, then try to encode any video with ffmpeg using libx264 and verify that you get a segmentation fault. It seems there is a new bug either in ffmpeg or x264. If you search google, there is 1 or 2 threads about this on the ffmpeg mailing list from August 2008. In one of the messages the ffmpeg dev says it 'probably' has something to do with x264.
Can someone also tell me the last SVN of ffmpeg that they successfully got working with x264? I temporairily went back to 13060 which was the last version I was using prior to rebuilding x264 and ffmpeg last night, but I'm sure there's probably a later version that will still work. Thanks.
FakeOutdoorsman
August 20th, 2008, 07:41 PM
What is the command that you used to get the segmentation fault? A patch has been released 6 1/2 hours ago regarding a rc_eq default value bug: [PATCH] Fix crash in libx264 when rc_eq is not set (http://thread.gmane.org/20080820120740.GA20314@geppetto). It will probably be applied to SVN, but I don't know how long that will take.
mocha
August 20th, 2008, 08:12 PM
What is the command that you used to get the segmentation fault? A patch has been released 6 1/2 hours ago regarding a rc_eq default value bug: [PATCH] Fix crash in libx264 when rc_eq is not set (http://thread.gmane.org/20080820120740.GA20314@geppetto). It will probably be applied to SVN, but I don't know how long that will take.
heheh.. Yep, the thread that patch refers to is the same one I was talking about. I don't specify a rc_eq in my command line. Well at least now I know the SVN number where this regression occurred. Thanks!
mocha
August 21st, 2008, 03:18 AM
What is the command that you used to get the segmentation fault? A patch has been released 6 1/2 hours ago regarding a rc_eq default value bug: [PATCH] Fix crash in libx264 when rc_eq is not set (http://thread.gmane.org/20080820120740.GA20314@geppetto). It will probably be applied to SVN, but I don't know how long that will take.
So I downloaded 14787 and compilied, and it doesn't have the seg fault problem. However, this version has a different issue. I use the following command line:
ffmpeg -threads 2 -i INPUT_FILE -vcodec libx264 -s 320x240 -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 800k -maxrate 1250k -bufsize 4M -bt 256k -refs 1 -coder 0 -me umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ac 2 -ab 128k OUTPUT_FILE
The 14787 version insists on only encoding at 150 kbits/s, if I remove the "-maxrate xxxx" then it encodes at the specified bitrate. Was this yet another change in ffmpeg? Version 13060 doesn't have any problems with the above command line.
FakeOutdoorsman
August 21st, 2008, 05:35 AM
I updated to 14872 and the latest x264. Your command seg faulted while converting a dv avi, but it worked when I added -rc_eq 'blurCplx^(1-qComp)' and it encoded at the proper bitrate. I don't know if that's helpful since I updated to a different revision.
mocha
August 21st, 2008, 08:44 AM
I updated to 14872 and the latest x264. Your command seg faulted while converting a dv avi, but it worked when I added -rc_eq 'blurCplx^(1-qComp)' and it encoded at the proper bitrate. I don't know if that's helpful since I updated to a different revision.
Very nice! That works for me with the latest SVN. Care to inform us *** that magic little command does and why/when it needs to be used?
FakeOutdoorsman
August 21st, 2008, 06:23 PM
This is the rate control equation for x264. I don't understand what the equation itself means, but there have been several ffmpeg bugs lately if you include it (5 weeks ago) or don't include it (this bug). The equation is the recommended default for x264, but for some reason ffmpeg doesn't use it by default so it has to be declared.
mocha
August 21st, 2008, 07:42 PM
Ok, well that all kind of makes sense now regarding my original problem with the seg fault. At least I'm up and running with a new version of ffmpeg. Thanks for the help.
jiexi
August 24th, 2008, 06:05 PM
What command would output the highest quality x264/aac mp4 possible in a single pass encode? file size isnt too a big issue to me, but if you could explain what each variable did would be nice also
jiexi
August 24th, 2008, 06:26 PM
What command would output the highest quality x264/aac mp4 possible in a single pass encode? file size isnt too a big issue to me, but if you could explain what each variable did would be nice also
FakeOutdoorsman
August 24th, 2008, 08:43 PM
I have little experience with one-pass x264 encoding, but you have two major choices to make. You can either encode using Constant Rate Factor (CRF) or by bitrate. Here's two examples that are what I think would be good for one-pass, but I didn't test them.
CRF:
ffmpeg -i input -crf 16 -threads 0 -vcodec libx264 -refs 6 -subq 6 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -flags2 +brdo+dct8x8+wpred+bpyramid+mixed_refs -me_method umh -trellis 1 -bf 16 -directpred 3 -b_strategy 1 -bidir_refine 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -vframes 200 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 output.mp4
Using the above code will make a high-quality encode but it will also be very slow.
Bitrate:
ffmpeg -i input -threads 0 -b 800k -bt 800k -vcodec libx264 -refs 6 -subq 6 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -flags2 +brdo+dct8x8+wpred+bpyramid+mixed_refs -me_method umh -trellis 1 -bf 16 -directpred 3 -b_strategy 1 -bidir_refine 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -vframes 200 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 ouput.mp4
Most important settings to mess with are crf, b, bt, refs, and subq. If you want to learn what each parameter does:
FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/) (more and probably better examples)
FFmpeg x264 mapping (http://ffmpeg.x264.googlepages.com/mapping)
x264 Settings (http://mewiki.project357.com/wiki/X264_Settings)
Encoding with the x264 codec (http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-x264.html) (for mencoder, but still useful)
jiexi
August 24th, 2008, 09:40 PM
what do u recommend, crf or bitrate?
and what is the point of 2 pass encoding?
i mean cant everthing be done in 1 pass? lol srry im new to this.
thanks :)
FakeOutdoorsman
August 24th, 2008, 10:51 PM
what do u recommend, crf or bitrate?
I would experiment with both and see which is faster and/or better quality. You can add "-vframes 300" to encode just 300 frames (or whatever number you want) to test. You can also add "-psnr" which will output the Peak Signal to Noise Ratio. Higher is better: look at the "global" value. You can time the encode by using the time command like "time ffmpeg".
and what is the point of 2 pass encoding?
"Encoding with the x264 codec" linked in my previous post will explain this better than me.
MichaelBailey
August 25th, 2008, 05:28 AM
Can someone give me a hand? Please do a fresh pull of x264 and ffmpeg, then try to encode any video with ffmpeg using libx264 and verify that you get a segmentation fault. It seems there is a new bug either in ffmpeg or x264. If you search google, there is 1 or 2 threads about this on the ffmpeg mailing list from August 2008. In one of the messages the ffmpeg dev says it 'probably' has something to do with x264.
Can someone also tell me the last SVN of ffmpeg that they successfully got working with x264? I temporairily went back to 13060 which was the last version I was using prior to rebuilding x264 and ffmpeg last night, but I'm sure there's probably a later version that will still work. Thanks.
I have the latest version of everything and I can verify the segmentation fault takes place with
-vcodec libx264
MichaelBailey
August 25th, 2008, 05:29 AM
Can someone give me a hand? Please do a fresh pull of x264 and ffmpeg, then try to encode any video with ffmpeg using libx264 and verify that you get a segmentation fault. It seems there is a new bug either in ffmpeg or x264. If you search google, there is 1 or 2 threads about this on the ffmpeg mailing list from August 2008. In one of the messages the ffmpeg dev says it 'probably' has something to do with x264.
Can someone also tell me the last SVN of ffmpeg that they successfully got working with x264? I temporairily went back to 13060 which was the last version I was using prior to rebuilding x264 and ffmpeg last night, but I'm sure there's probably a later version that will still work. Thanks.
Does 13060 work with -vcodec libx264 ?
jiexi
August 25th, 2008, 05:44 AM
since 2 pass gives higher quality even tho it takes more time
i think i figured out how to include a 2 pass with the video sharing script i am using. so if you would be so kind, please give me a 2 pass code for the crf way u showed in ur great example.
btw, for some reason i cant seek in the 8 second videos that are created with both the bitrate and crf examples u gave. nor does qt-faststart work with them. well it seems to me as if that is the issue, or maybe its because the files are only 8 seconds.
Thanks again! :D
EDIT: nvm, ur examples dont mess with qtfaststart.
FakeOutdoorsman
August 25th, 2008, 08:37 PM
please give me a 2 pass code for the crf way u showed in ur great example.
I dont think CRF is used for two-pass very often. There is a good two-pass example at FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/).
btw, for some reason i cant seek in the 8 second videos that are created with both the bitrate and crf examples u gave.
I believe seeking is related to the keyframe interval or length of the Group of Pictures (GOP), which in your case was "-g 250" frames, or 8.3 seconds which is larger than your whole video.
jiexi
August 26th, 2008, 03:13 AM
I dont think CRF is used for two-pass very often. There is a good two-pass example at FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/).
I believe seeking is related to the keyframe interval or length of the Group of Pictures (GOP), which in your case was "-g 250" frames, or 8.3 seconds which is larger than your whole video.
Thanks for your help!
eoalvarez
August 26th, 2008, 11:46 AM
Stuck on trying to code an mpg to mpg4 using the ffmpeg and x264, this is what I am getting.....
ouicho@Atalanta:~$ ffmpeg -i /home/ouicho/Desktop/56-form-chensi.mpg -crf 16 -threads 0 -vcodec libx264 -refs 6 -subq 6 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -flags2 +brdo+dct8x8+wpred+bpyramid+mixed_refs -me_method umh -trellis 1 -bf 16 -directpred 3 -b_strategy 1 -bidir_refine 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -vframes 200 -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 output.mp4
FFmpeg version SVN-r14974, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-nonfree
libavutil 49.10. 0 / 49.10. 0
libavcodec 51.69. 0 / 51.69. 0
libavformat 52.21. 0 / 52.21. 0
libavdevice 52. 1. 0 / 52. 1. 0
built on Aug 26 2008 18:18:19, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Input #0, mpeg, from '/home/ouicho/Desktop/56-form-chensi.mpg':
Duration: 00:05:40.96, start: 0.213333, bitrate: 614 kb/s
Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 320x240 [PAR 1:1 DAR 4:3], 104857 kb/s, 30.00 tb(r)
Stream #0.1[0x1c0]: Audio: mp2, 32000 Hz, mono, s16, 32 kb/s
Warning: not compiled with thread support, using thread emulation
Unknown encoder 'libx264'
FakeOutdoorsman
August 26th, 2008, 06:11 PM
Stuck on trying to code an mpg to mpg4 using the ffmpeg and x264, this is what I am getting
Did you follow this tutorial to install ffmpeg? Your version of ffmpeg has only been configured with "--enable-nonfree". You will have to remove ffmpeg, make distclean, reconfigure, and then reinstall. Refer to "Updating Your Installation" from the first post of this thread.
vector
September 4th, 2008, 08:57 AM
Man my head hurts...when is this going to "just work".. I went to a mates place who had windows. I installed winFF and he was transcoding things b4 I drunk my thankyou beer.. and yet here on my hardy heron, the home of linux box, I still cant do that because of the building and making and what ifs and stuff that have to be done and which I dont understand... Why is this not part of the standard ubuntu build? Is it in the works to be done? or is there some techno reason.
FakeOutdoorsman
September 4th, 2008, 06:31 PM
Sometimes familirity of Windows can be viewed instead as being better or easier. Your friend was most likely using an older, precompiled, third-party version of ffmpeg that can come with the Windows version of WinFF.
The goal of this tutorial is creating a fully customized, bleeding-edge ffmpeg and x264 installation. As with all bleeding-edge applications, things may not always go smoothly without some extra work and would be at least as work intensive to do the same in Windows. The Ubuntu License Policy (http://www.ubuntu.com/community/ubuntustory/licensing) keeps Ubuntu from releasing software that might be restricted by copyrights and patents, so proprietary formats, such as mp3, will not always work without the user enabling it themselves (see Restricted Formats (https://help.ubuntu.com/community/RestrictedFormats)).
Getting WinFF and ffmpeg installed in Ubuntu is as easy as downloading the WinFF deb and using Synaptic, aptitude, or apt-get to install ffmpeg. Ubuntu's version of ffmpeg doesn't support restricted formats, so if you want to use those you need to either use a precompiled third-party version, such as the one from Medibuntu, or compile ffmpeg yourself.
mocha
September 5th, 2008, 08:36 PM
I think one of the nice things about Debian based distros is that it's fairly easy to get dependancies installed even when you are compiling a more bleeding edge version of something, like ffmpeg or mplayer/mencoder for example.
"sudo apt-get build-dep ffmpeg"
That should take care of the dependancies for core ffmpeg. When you do the ./configure xxxxx on it you will see which libraries you have and which you don't. For reference, I use the following config line.
./configure --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-liba52 --enable-libdc1394 --enable-libgsm --enable-libxvid
You have to have installed the dev packages for these libs of course.
The Winblows version of WinFF is using a pre-compiled ffmpeg. A very old version as far as I know. SVN 9xxx I think.
Roderik
September 11th, 2008, 03:18 PM
I've created some hardy debs af x264, yasm and ffmpeg based on this thread, you can get them here: https://launchpad.net/~roderik/+archive
comradburk
September 15th, 2008, 07:38 AM
I've followed this tutorial up to the point of making ffmpeg, but I then proceed to get this error:
gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/home/aburk/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm -std=c99 -fomit-frame-pointer -pthread -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -O3 -fno-math-errno -c -o libavcodec/libx264.o libavcodec/libx264.c
libavcodec/libx264.c: In function ‘X264_init’:
libavcodec/libx264.c:165: error: ‘x264_param_t’ has no member named ‘b_bframe_adaptive’
make: *** [libavcodec/libx264.o] Error 1
The checkinstall installation results displays the same error message. I searched around but haven't come to any conclusions regarding what might be wrong and I have no idea where to start looking with this...I tried to remove and reinstall the x264 package but that didn't seem to make a difference. Any ideas?
davidw89
September 15th, 2008, 04:03 PM
4. Get the most current source files from the official x264 git repository, compile, and install. You can run "./configure --help" to see what features you can enable/disable. If you are behind a firewall or unable to use git, then daily source tarballs are also available.
Code:
cd ~/
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-pthread --enable-mp4-output --enable-shared
make
sudo checkinstall
please help me i am stuck!!
david@david-desktop:~$ git clone git://git.videolan.org/x264.git
Initialized empty Git repository in /home/david/x264/.git/
git.videolan.org[0: 91.121.111.144]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
fetch-pack from 'git://git.videolan.org/x264.git' failed.
hugmenot
September 15th, 2008, 04:30 PM
please help me i am stuck!!
david@david-desktop:~$ git clone git://git.videolan.org/x264.git
Initialized empty Git repository in /home/david/x264/.git/
git.videolan.org[0: 91.121.111.144]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
fetch-pack from 'git://git.videolan.org/x264.git' failed.
Server possibly down. They made a release today and get hammered.
FakeOutdoorsman
September 15th, 2008, 07:35 PM
I've followed this tutorial up to the point of making ffmpeg, but I then proceed to get this error:
gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/home/aburk/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm -std=c99 -fomit-frame-pointer -pthread -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -O3 -fno-math-errno -c -o libavcodec/libx264.o libavcodec/libx264.c
libavcodec/libx264.c: In function ‘X264_init’:
libavcodec/libx264.c:165: error: ‘x264_param_t’ has no member named ‘b_bframe_adaptive’
make: *** [libavcodec/libx264.o] Error 1
The checkinstall installation results displays the same error message. I searched around but haven't come to any conclusions regarding what might be wrong and I have no idea where to start looking with this...I tried to remove and reinstall the x264 package but that didn't seem to make a difference. Any ideas?
You're not doing anything wrong. Since this is the bleeding-edge of ffmpeg and x264 there will be issues like this once in a while. The developers made a change which causes this error. I'm guessing there should be a fix within a day or two. You would just have to follow the "Updating Your Installation" section of this howto.
More info: [FFmpeg-devel] [PATCH] libx264: support for BUILD >= 63 (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-September/053527.html)
FakeOutdoorsman
September 15th, 2008, 07:39 PM
please help me i am stuck!!
david@david-desktop:~$ git clone git://git.videolan.org/x264.git
Initialized empty Git repository in /home/david/x264/.git/
git.videolan.org[0: 91.121.111.144]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
fetch-pack from 'git://git.videolan.org/x264.git' failed.
I was able to connect and download the source with git with no problems. Perhaps there was a temporary network problem on their end or maybe your firewall is causing problems. You can always try to download a daily x264 source tarball (ftp://ftp.videolan.org/pub/videolan/x264/snapshots/) instead if git isn't working.
comradburk
September 15th, 2008, 07:47 PM
Alright, I got it working. I ended up just downloading a slightly older one from the daily source tarballs and it worked just fine :) Now I'm stoked...I can get this working :p Thanks!
davidw89
September 16th, 2008, 01:31 AM
I was able to connect and download the source with git with no problems. Perhaps there was a temporary network problem on their end or maybe your firewall is causing problems. You can always try to download a daily x264 source tarball (ftp://ftp.videolan.org/pub/videolan/x264/snapshots/) instead if git isn't working.
You're right, the network was down. It's working now.
Btw how do i optimize everything for quad core?(q6600) and auto upsize to 1680x1050 and enable all the features that makes the videos looks a lot better like sharpen, post processing etc?]
1 error:
make: *** [libavcodec/libx264.o] Error 1
FakeOutdoorsman
September 16th, 2008, 01:56 AM
You're right, the network was down. It's working now.
Btw how do i optimize everything for quad core?(q6600) and auto upsize to 1680x1050 and enable all the features that makes the videos looks a lot better like sharpen, post processing etc?]
If you're using x264 you can use the "-threads 0" option in your command to encode in parallel. Take a look at the "Additional Resources" section of the howto for examples and explanations.
1 error:
make: *** [libavcodec/libx264.o] Error 1
For this error, refer to post #99 (http://ubuntuforums.org/showpost.php?p=5794225&postcount=99) of this thread.
HolyRoses
September 18th, 2008, 05:11 PM
If you are updating to the newest ffmpeg you currently need to update your x264 also.
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-September/053527.html
If you don't you will get this:
libavcodec/libx264.c: In function `X264_init':
libavcodec/libx264.c:165: error: structure has no member named `i_bframe_adaptive'
make: *** [libavcodec/libx264.o] Error 1
-HR
HolyRoses
September 18th, 2008, 05:13 PM
The developers have also checked in some x264 presets you might want to check out in the newest source code.
ls -l ffmpeg/ffpresets/
total 20
-rw-r--r-- 1 root root 235 Sep 18 11:53 libx264-default.ffpreset
-rw-r--r-- 1 root root 314 Sep 18 11:53 libx264-fastfirstpass.ffpreset
-rw-r--r-- 1 root root 311 Sep 18 11:53 libx264-hq.ffpreset
-rw-r--r-- 1 root root 322 Sep 18 11:53 libx264-max.ffpreset
-rw-r--r-- 1 root root 295 Sep 18 11:53 libx264-normal.ffpreset
-HR
FakeOutdoorsman
September 18th, 2008, 07:03 PM
Thanks for pointing out the presets, HolyRoses.
If you dump them into ~/.ffmpeg/ then you can use them as follows:
ffmpeg -i infile -vcodec libx264 -vpre hq -b 1M -bt 1M -threads 0 outfile.mp4
From FFmpeg libx264 presets (http://rob.opendot.cl/index.php/2008/09/17/ffmpeg-libx264-presets/) by Robert Swain. The link has more info and preset descriptions. You can edit the -b (bitrate) and -bt (bitrate tolerance) values from the example above to suit your needs.
HolyRoses
September 19th, 2008, 06:11 PM
I think they are the exact same preset files actually.
Looks like he just copied superdumps checkin's.
Oh, I see now, he just shows you how to use them. The defaults file dont set any bitrates, they just set encoding parameters. I wasn't aware how to actually use them.
-HR
HolyRoses
September 19th, 2008, 06:31 PM
I also think that -rc_eq 'blurCplx(1-qComp)' is hard coded into x264 now.
-HR
mikko.ohtamaa
September 22nd, 2008, 08:53 PM
FFMPEG trunk is not stable, please use revision 15261.
http://ffmpeg.mplayerhq.hu/
mikko.ohtamaa
September 22nd, 2008, 09:05 PM
If you are updating to the newest ffmpeg you currently need to update your x264 also.
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-September/053527.html
If you don't you will get this:
libavcodec/libx264.c: In function `X264_init':
libavcodec/libx264.c:165: error: structure has no member named `i_bframe_adaptive'
make: *** [libavcodec/libx264.o] Error 1
-HR
To apply patch:
~/ffmpeg$ wget http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080915/f69a09a0/attachment.patch
~/ffmpeg$ patch -p0 attachment.patch
mikko.ohtamaa
September 22nd, 2008, 09:23 PM
After compiling and installing ffmpeg, it tries to use wrong libavcodec
moo@rousku:~/ffmpeg$ ./ffmpeg
./ffmpeg: symbol lookup error: ./ffmpeg: undefined symbol: av_tree_node_size
moo@rousku:~/ffmpeg$ sudo ldconfig
moo@rousku:~/ffmpeg$ ldd ffmpeg
linux-gate.so.1 => (0xb7f70000)
libpostproc.so.51 => /usr/lib/libpostproc.so.51 (0xb7f52000)
libavutil.so.49 => /usr/lib/libavutil.so.49 (0xb7f48000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7f32000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f0d000)
libfaac.so.0 => /usr/lib/libfaac.so.0 (0xb7efc000)
libfaad.so.0 => /usr/lib/libfaad.so.0 (0xb7ebe000)
libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0xb7e29000)
libtheora.so.0 => /usr/lib/libtheora.so.0 (0xb7de2000)
libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0xb7ce8000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7cc0000)
libx264.so.57 => /usr/lib/libx264.so.57 (0xb7c35000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7c31000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7c19000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7aca000)
/lib/ld-linux.so.2 (0xb7f71000)
libogg.so.0 => /usr/lib/libogg.so.0 (0xb7ac4000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb79dd000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb79db000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb79c3000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb79c0000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb79ba000)
mikko.ohtamaa
September 22nd, 2008, 11:10 PM
After compiling and installing ffmpeg, it tries to use wrong libavcodec
moo@rousku:~/ffmpeg$ ./ffmpeg
./ffmpeg: symbol lookup error: ./ffmpeg: undefined symbol: av_tree_node_size
I am also getting
Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
Input #0, asf, from 'WiredPussy - 2008-02-07 - Isis Love , Annie Cruz , Amber Rayne (5057).wmv':
Duration: 01:00:32.34, start: 3.000000, bitrate: 943 kb/s
Stream #0.0: Audio: wmav2, 48000 Hz, stereo, s16, 64 kb/s
Stream #0.1: Video: wmv3, yuv420p, 960x540, 856 kb/s, 29.97 tb(r)
Output #0, mp4, to 'test.mp4':
Stream #0.0: Video: libx264, yuv420p, 256x144, q=16-51, 300 kb/s, 29.97 tb(c)
Stream #0.1: Audio: libfaac, 48000 Hz, stereo, s16, 96 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.0 -> #0.1
[libx264 @ 0x889da40]no ratecontrol method specified
Let's see if this helps
sudo apt-get remove libx264-dev # Make sure we don't have old x264 lying around
make clean
make
sudo checkinstall
Yay... it's encoding!
mikko.ohtamaa
September 23rd, 2008, 12:27 AM
Ok, got it working finally.
I created this little script to mass convert video files suitable for mobile viewing (Nokia N-Series):
http://blog.redinnovation.com/2008/09/23/how-to-encode-h264-video-files-for-nokia-series-60-standalone-playback/
piratec
September 25th, 2008, 05:24 AM
Hello! This is my adventure on Ubuntu 8.04:
1.- I uninstalled ffmpeg and x264 from synaptic. It also removed many programs that were dependencies (SMPlayer, mplayer, vlc, some gstreamer stuff etc) I took note of it and I did remove all.
2.- I followed this guide to update yasm, x264 and ffmpeg. Then I downloaded Avidemux from the autor's website http://fixounet.free.fr/avidemux/ and installed it.
3.- I did various encodings from AVI files to mp4 for a PSP, for IPOD and a Blackberry and they all work great! Even with subtitles, I just needed to search for a proper TTF font on the subtitles settings. (/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/FreeSans.ttf works at 14 pts.
I later installed some stuff I wanted like SMPlayer and I'll wait more for vlc, SMPlayer is lighter and works great too (is a nicer gui to mplayer) Something I like of it it resumes the movie were you left after closing it.
But still, on the automatic updates keeps asking me to "downgrade" to the crippled versions of fmpeg and x264, the ones that CANNOT encode to PSP or IPOD because legal stuff I believe. I did try the "sudo aptitude hold ffmpeg x264" but it didn't work. So is just annoying to have it on red telling me all the time I need to "downgrade".
Has anyone else found a fix for this? I gloogled about it without any luck so far.
Anyway I just registered today to tell you thank you! My Avidemux works now :)
EDIT: I got it working, read my next post.
FakeOutdoorsman
September 25th, 2008, 06:33 PM
SMPlayer sounds interesting. Do you usually use aptitude, apt, or Synaptic? Each has it's own way of "locking" a program version and they don't always listen to each other, so if you lock something in aptitude it still might want to upgrade in apt and Synaptic. Although Synaptic and apt should work well together I think.
I can't test my Ubuntu install on locking packages because the VirtualBox package on Arch Linux is broken right now. Curses! I believe in Synaptic you choose the package, then "Package -> Lock Package". For apt, I suppose you could use apt pin (http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html), but shouldn't there be an easier way?
cbl016
September 26th, 2008, 07:58 PM
This is a great tutorial! I was wondering after installing yasm, x264 and ffmpeg, what is the preferred method of re-installing mplayer? When I try to compile and install from source I get the error found on post #96 (I haven't tried the patch yet, I'll have to try it when I get home). Is there any way to tell mplayer to use the libraries that ffmpeg installed instead of installing them again?
mocha
September 28th, 2008, 08:17 PM
This is a great tutorial! I was wondering after installing yasm, x264 and ffmpeg, what is the preferred method of re-installing mplayer? When I try to compile and install from source I get the error found on post #96 (I haven't tried the patch yet, I'll have to try it when I get home). Is there any way to tell mplayer to use the libraries that ffmpeg installed instead of installing them again?
I understand what you are talking about, I ran into a similar problem. I believe the issue is that x264 needs to be installed in /usr rather than /usr/local. Do a "make uninstall" on x264, ffmpeg, and mplayer/mencoder. Then try compiling/installing with the following config lines (assmuing you have all the correct dev libs for the codecs):
x264 config line
./configure --prefix=/usr --enable-pthread --enable-mp4-output --enable-shared --enable-gtk
ffmpeg config line
./configure --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-liba52 --enable-libdc1394 --enable-libgsm --enable-libxvid
mplayer/mencoder config line
./configure --enable-gui --enable-menu --enable-xvmc
s_bahmani
September 28th, 2008, 08:29 PM
Hello! This is my adventure on Ubuntu 8.04:
1.- I uninstalled ffmpeg and x264 from synaptic. It also removed many programs that were dependencies (SMPlayer, mplayer, vlc, some gstreamer stuff etc) I took note of it and I did remove all.
2.- I followed this guide to update yasm, x264 and ffmpeg. Then I downloaded Avidemux from the autor's website http://fixounet.free.fr/avidemux/ and installed it.
3.- I did various encodings from AVI files to mp4 for a PSP, for IPOD and a Blackberry and they all work great! Even with subtitles, I just needed to search for a proper TTF font on the subtitles settings. (/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/FreeSans.ttf works at 14 pts.
I later installed some stuff I wanted like SMPlayer and I'll wait more for vlc, SMPlayer is lighter and works great too (is a nicer gui to mplayer) Something I like of it it resumes the movie were you left after closing it.
But still, on the automatic updates keeps asking me to "downgrade" to the crippled versions of fmpeg and x264, the ones that CANNOT encode to PSP or IPOD because legal stuff I believe. I did try the "sudo aptitude hold ffmpeg x264" but it didn't work. So is just annoying to have it on red telling me all the time I need to "downgrade".
Has anyone else found a fix for this? I gloogled about it without any luck so far.
Anyway I just registered today to tell you thank you! My Avidemux works now
i do this but not work
FakeOutdoorsman
September 28th, 2008, 09:58 PM
This is a great tutorial! I was wondering after installing yasm, x264 and ffmpeg, what is the preferred method of re-installing mplayer? When I try to compile and install from source I get the error found on post #96 (I haven't tried the patch yet, I'll have to try it when I get home). Is there any way to tell mplayer to use the libraries that ffmpeg installed instead of installing them again?
I was able to install today's most recent x264 and ffmpeg 15451 without that error, but this is on a clean, up-to-date, standard installation of Ubuntu with the only additional packages being the ones needed for the tutorial. I think the patch has already been applied in ffmpeg SVN.
I was also able to install mplayer from the repo without it wanting to reinstall any ffmpeg libraries, but I only looked at the dependencies and didn't look into detail.
So, basically I'm no help. Have you tried again with the most recent x264 and ffmpeg? Make sure to refer to the "Updating Your Installation" section of the tutorial.
FakeOutdoorsman
September 28th, 2008, 09:59 PM
i do this but not work
What are you trying to do? What errors do you have?
mocha
September 29th, 2008, 01:04 AM
So, basically I'm no help. Have you tried again with the most recent x264 and ffmpeg? Make sure to refer to the "Updating Your Installation" section of the tutorial.
See my post a few posts up. I just compiled and installed x264, ffmpeg, and mplayer this morning using the config lines I posted. Everything is working fine here.
FYI. In the latest ffmpeg version the "-me" command line parameter has changed to "-me_method".
piratec
September 29th, 2008, 11:24 PM
SMPlayer sounds interesting. Do you usually use aptitude, apt, or Synaptic? Each has it's own way of "locking" a program version and they don't always listen to each other, so if you lock something in aptitude it still might want to upgrade in apt and Synaptic. Although Synaptic and apt should work well together I think.
Hey I got it working :) I was doing it wrong, what I did I put on hold all my updates, so my system was not upgrading properly.
I was a Gentoo freak, so I'm used to doing manual stuff. I used to "fine tune" my laptop to the point that all the system was running with the bleeding edge and all compiled for my processor and stuff. Well, I left Gentoo for server setups and changed to Ubuntu on my laptop after 5 years, because "it just works" is what I need. Well I see that some stuff you still need to do manually on Ubuntu. Well even on Mac OS X right? :)
Ok, I did the "Reverting Changes Made by This Tutorial" steps and deinstalled Avidemux again. My system was clean, and started this howto all over. When the Synaptic updates daemon told me there were "downgrades" for x264, ffmpeg and Avidemux, I opened synaptic (im using that) and I searched for each one of them, and blocked their versions. That did it.
I would advice you specify this "package blocking" as step #7 if you like, for Ubuntu newbies like me. For fixing the mess I did I had to "learn" to use Aptitude, because Synaptic stopped responding. It seems Aptitude is more powerful than Synaptic for some tasks. For not going into many details, just after doing this howto, go immediately to Synaptic, search for ffmpeg, x264, avidemux and avidemux-common, and block their versions.
Also, a good way to start this HOWTO is by removing first ffmpeg and x264 with all dependencies, any programs that might use them with Synaptic. If you are planning on using Avidemux, make sure you FIRST install mplayer or SMPlayer, which installs Mencoder and all utilities for Avidemux to use. If you want to "clean" it more, execute also the "Reverting Changes Made by This Tutorial" commands, and then start it for the beginning.
My laptop is working great now. This should just work on a Ubuntu 8.04 LTS by following the steps.
Thanks for sharing this howto.
FakeOutdoorsman
September 30th, 2008, 08:04 PM
Thanks for the suggestions. I'll update the tutorial this weekend.
vector
October 2nd, 2008, 01:49 PM
Many thanks for this I finally found the time and the "balls" to give this a go.
findings of a newbie scaredycat
step 1 'uninstall x264 and ffmpeg'.. ok Im assuming apt-get remove x264 etc is the same thing?
step 3 Yasm
"sudo checkinstall"
ok its asking me
sudo checkinstall
checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
Please write a description for the package.
End your description with an empty line or EOF.
ummm Im lost? for the record I typed in yasmhelp
it created a deb file
Done. The new package has been installed and saved to
/home/mark/yasm-0.7.1/yasm_0.7.1-1_i386.deb
You can remove it from your system anytime using:
dpkg -r yasm
so what do I do now? i understand it as saying its installed so I guess I just go on to step 4
Step4- similar understanding
Step 6-the wheel falls off?
svn ffmpeg works untill...
Fetching external item into 'ffmpeg/libswscale'
svn: Unknown hostname 'svn.mplayerhq.hu'
and thuis the ./configure fails because libswscale is missing
at this point I go to bed
what to do next?
ahh but b4 i do i tried
git clone git://git.mplayerhq.hu/libswscale/
then ./configure.......etc
which worked up untill
libavcodec/libx264.c: In function ‘X264_init’:
libavcodec/libx264.c:230: error: ‘struct <anonymous>’ has no member named ‘b_bidir_me’
libavcodec/libx264.c:231: error: ‘struct <anonymous>’ has no member named ‘b_bframe_rdo’
make: *** [libavcodec/libx264.o] Error 1
now I am lost :(
zcold
October 2nd, 2008, 05:47 PM
Don't worry, I have come to the same thing. Its the latest svn so I think its just broken.
libx264.c
libavcodec/libx264.c: In function ‘X264_init’:
libavcodec/libx264.c:230: error: ‘struct <anonymous>’ has no member named ‘b_bidir_me’
libavcodec/libx264.c:231: error: ‘struct <anonymous>’ has no member named ‘b_bframe_rdo’
make: *** [libavcodec/libx264.o] Error 1
zcold
October 2nd, 2008, 06:25 PM
either ffmpeg libx264.c is borked or its the x264 thats broken, im going to try and use an earlier snapshot of x264 and try compiling ffmpeg again.
Dark Shikari
October 2nd, 2008, 06:52 PM
x264 updated its API (http://git.videolan.org/?p=x264.git;a=commitdiff;h=c89bc900a3bf0d4c4c728ad 378703970b4f14e18), ffmpeg hasn't updated its libx264.c to compensate. Either fix ffmpeg's libx264.c (patch is available on the ffmpeg-devel ML as "[FFmpeg-devel] [PATCH] Update ffmpeg for libx264 core 65"), bug Michael or mru repeatedly until he fixes it, just go there and drop the two problematic lines of C code yourself, or use a version of x264 before r996.
The way the API change affects the commandline options you should use is detailed here (http://forum.doom9.org/showthread.php?t=141569).
reikoshea
October 2nd, 2008, 07:07 PM
Link to the ML Thread.
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-October/054199.html
zcold
October 2nd, 2008, 07:10 PM
Update...
removed my x254 install and grabbed the latest snapshot (as opposed to an earlier one, was updated last night) x264-snapshot-20081001. Compiled and installed x264 and then compiled latest svn ffmpeg... compiled fine and im encoding something as we speak. See how it goes.
ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
Dark Shikari
October 2nd, 2008, 07:12 PM
FFMPEG trunk is not stable, please use revision 15261.
http://ffmpeg.mplayerhq.hu/ffmpeg won't work with x264 then, since I have frequently updated the x264 API recently, so I doubt older ffmpegs will work.
Also, the trunk of ffmpeg is perpetually stable; there is no separate "stable version", contrary to what Debian, Ubuntu, and most Linux distros seem to think sometimes ;)
(of course, this doesn't mean things don't break, it just means that there is nothing more stable than the main branch)
FakeOutdoorsman
October 2nd, 2008, 08:11 PM
step 1 'uninstall x264 and ffmpeg'.. ok Im assuming apt-get remove x264 etc is the same thing?
Yes. You may not have these installed, but if you do they should be uninstalled. You can use apt-get, Synaptic, or aptitude.
step 3 Yasm
"sudo checkinstall"
ok its asking me
sudo checkinstall
checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
Please write a description for the package.
End your description with an empty line or EOF.
ummm Im lost? for the record I typed in yasmhelp
it created a deb file
You can make the description anything you want. It's just for your future reference.
Done. The new package has been installed and saved to
/home/mark/yasm-0.7.1/yasm_0.7.1-1_i386.deb
You can remove it from your system anytime using:
dpkg -r yasm
so what do I do now? i understand it as saying its installed so I guess I just go on to step 4
Checkinstall is telling you that it installed yasm and you now have the option to remove it later by using dpkg. Since you used checkinstall, you can also later remove yasm with apt-get/Synaptic, or aptitude--whichever you're comfortable with.
Step 6-the wheel falls off?
svn ffmpeg works untill...
Fetching external item into 'ffmpeg/libswscale'
svn: Unknown hostname 'svn.mplayerhq.hu'
and thuis the ./configure fails because libswscale is missing
at this point I go to bed
what to do next?
Looks like network problems.
ahh but b4 i do i tried
git clone git://git.mplayerhq.hu/libswscale/
then ./configure.......etc
Good thinking and it probably worked, but I would delete the ~/ffmpeg folder and try again due to the network issues from before. Once you delefe the ffmpeg folder start at:
cd ~/
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
It should attempt to download what it couldn't get earlier.
which worked up untill
libavcodec/libx264.c: In function ‘X264_init’:
libavcodec/libx264.c:230: error: ‘struct <anonymous>’ has no member named ‘b_bidir_me’
libavcodec/libx264.c:231: error: ‘struct <anonymous>’ has no member named ‘b_bframe_rdo’
make: *** [libavcodec/libx264.o] Error 1
now I am lost :(
Not your fault. Look at Dark Shikari's response above. Since this is the bleeding-edge, there will be problems once in awhile, but the x264 and ffmpeg developers are usually quick and get things fixed within a few days.
If you don't feel comfortable doing this you can use ffmpeg from the Medibuntu repository, but it's an older version and you can't customize it they way you want...and you won't learn as much/get as frustrated as doing it this way.
Dark Shikari
October 2nd, 2008, 08:37 PM
And ffmpeg's libx264.c has been updated with my patch, so no more issues.
vector
October 3rd, 2008, 09:15 AM
Many many thanks guys , that seems to have compiled this time.. now I just got get a handle on how ffmpeg works and try a few things out.
cheers
FakeOutdoorsman
October 3rd, 2008, 09:18 PM
Revised the howto:
Removed some extra packages
Removed unnecessary x264 compilation options
Revised the example script to use recommended settings (instead of being iPood-centric)
Added preset usage instructions
See the "Tutorial Updates" section for a few more details.
NeonRush
October 4th, 2008, 07:23 AM
Just compiled, but there's no ffplay. Where'd it go?
FakeOutdoorsman
October 4th, 2008, 07:38 PM
Just compiled, but there's no ffplay. Where'd it go?
You're missing libsdl1.2-dev. Install it, remove ffmpeg, "make distclean" in the ffmpeg folder, and then recompile.
sojyujai
October 6th, 2008, 02:17 PM
I'm trying to compile ffmpeg on intrepid beta.
I checked out yesterdays svn (revision 15572 I think) and tried the following .configure line:
./configure --prefix=/usr/local --disable-debug --enable-shared --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-liba52 --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
But I get the error:
Unknown option "--enable-liba52".
Any ideas why this might happen & how to fix it?
I do have liba52-0.7.4-dev installed.
I'm pretty sure I want liba52 enabled to give support for ac3 audio - is that correct?
Edit: there seems to be no mention of --enable-liba52 in the ./configure --help
Has it been removed from ffmpeg?
FakeOutdoorsman
October 6th, 2008, 06:13 PM
The "--enable-liba52" option has been removed because ffmpeg now has a native ac3 encoder. It's built in.
HolyRoses
October 8th, 2008, 04:12 AM
ffmpeg presets have been updated in SVN to reflect new x264 changes regarding subq modifications and removal of -flags2 +brdo and bidir_refine.
-HR
chriscross83
October 10th, 2008, 10:04 PM
Hi guys,
i just read the thread but i am so much desperate. My ffmpeg is not running with x264. It was running before but i liked to update the two packets but now i am suffering from a segmentation fault every time i am using -vcodec libx264.
I compiled at least 15 possible combinations of ffmpeg and x264. I am running debian 64 bit. Furthermore i checked several combinations of ffmpeg and x264 incl patching libx264.c with no result. Everytime i get a segmentation fault:
31736 segmentation fault. ffmpeg is working fine except libx264. Can somebody help me and give me the right revision combination of x264 and ffmpeg? That would be very nice!! It is so desperating because it worked before updating.
Greetings, Chris
FakeOutdoorsman
October 10th, 2008, 10:20 PM
I haven't tested the tutorial on Debian or anything 64-bit. I recommend asking for support through #ffmpeg IRC or the ffmpeg-user (http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user/) mailing list. You should always use the latest git x264 and svn ffmpeg, otherwise you will either be ignored or told to use the latest version. If you ask on the mailing list then include your full ffmpeg command, the full ffmpeg output, and make sure to read the posting rules (the first paragraph on the mailing list site). If you use IRC, use ffmpeg.pastebin.com (http://ffmpeg.pastebin.com/) to show the command and output.
I can try to help you debug, but you will have to remove all x264, libx264-dev, and ffmpeg installations and reinstall using the latest versions by following the tutorial. If that doesn't work then give me your full ffmpeg command and the full ffmpeg output.
davidlm
October 11th, 2008, 07:41 PM
I had the same problem to encode x264... with fatal segmentation..
With the post before a resolve the problem, i remove x264, ffmpeg and libx264-dev (i guess this is the problem) and i do the update steps on the first post...and i can encode in x264.
synthaxx
October 18th, 2008, 01:12 AM
While installing on intrepid, i ran into some problems.
First i had to make the /usr/local/lib/pkgconfig to get x264 installed.
Secondly I got an "ERROR: LAME not found" while configuring ffmpeg. The reason is that the lame dev package name has been changed, so make sure you do an "sudo apt-get install libmp3lame-dev"
Third problem i ran into was the checkinstall for ffmpeg. I don't know why but for some reason i had to make the direcories:
/usr/local/include/libpostproc
/usr/local/include/libavdevice
/usr/local/include/libavformat
/usr/local/include/libavcodec
/usr/local/include/libavutil
/usr/local/lib/vhook
(make sure you do a "sudo mkdir" for each of these)
After that it installed. So if you see the same problems maybe the above can help.
I'm going to test it out now, see if all my hacking worked.
FakeOutdoorsman
October 18th, 2008, 01:24 AM
Thanks for the update on Intrepid. I have not tested this howto on Intrepid yet, so any reports are useful.
synthaxx
October 19th, 2008, 04:33 PM
After battling some features that made my processor lock at 1 ghz, i was finally able to test it out, and it seems to have worked like a charm!
1080p h264 streams now play silky smooth on my X2 4600+. Thanks FakeOutdoorsman!
I watched Iron Man yesterday on my Sony 1271 CRT beamer with a couple of friends and we were blown away!
piratec
October 20th, 2008, 04:27 PM
Hey, I'm back again :)
Well after some weeks of nice encoding, I satisfied my thirst for knoledge. I have found that, in order to properly upgrade your system from time to time, you will need to revert all of this, because blocking this packages eventually will block also some new upgrades on other programs too.
this is not so bad, because when you do this howto again you will have the latest ffmpeg and x264, and of course your whole system will be up-to-date.
My Ubuntu 8.04 LTS has this nice feature for automatic updates a-la "ms-update", a nice thing that keeps my mom out of troubles on her new Dell Laptop, I actually moved myself from Gentoo because of it, it helps me focus on other things rather than having my system updated. I know it is a "newbie" feature, but any Gentoo lover would agree with me when I say that doing an emerge world is a real pain.
What I'm trying to say is IF you want to go through all of this howto also means you are not a newbie anymore. You are becoming 1337 at encoding. Don't expect things to be supereasy. Your automatic updates won't work so automatic anymore, unless you revert this. I ended up using aptitude instead of synaptic, because it is more powerful, but also a little bit more difficult to use. Even being a text-mode program you can still use the mouse with it, so its ok. aptitude could be as easy as pressing "u" (upgrade) and then "g" (go!) to upgrade all, but sometimes you will need to do more than that.
Anyways, I only wanted to share my experience after some weeks, and thank you again
FakeOutdoorsman. great job!
andrew.46
October 21st, 2008, 07:36 AM
Hi FakeOutdoorsman!
Just a quick question about a change to your configure line when compiling x264:
--enable-shared is not recommended by x264 devs
I was a little curious about the reason for this change? And BTW thanks for all the work you have obviously put into this guide :-).
Andrew
FakeOutdoorsman
October 21st, 2008, 08:18 AM
Good question. I asked this question too. Before I made the change I asked one of the x264 developers what they thought about the guide and that was one of the changes suggested. To paraphrase:
Enabling shared requires PIC on many systems and PIC is slower, especially for 64-bit. PIC used to be allowed on 32-bit also, but was removed because it was annoying and too many people were enabling it accidentally. There's no good reason to have it and the speed penalty is about 3-4 times as large. PIC is about 1% slower and 3-4% slower on 32-bit. In ffmpeg, the penalty is considerably higher than in x264. FFmpeg and others like mplayer can link statically, so shared isn't needed.
mrkofee
October 22nd, 2008, 02:19 PM
I just installed ffmpeg and x264 according to the first post, but ffmpeg always core-dumps:
$ ffmpeg -y -i infile.avi -f mp4 -title boston.legal.s04e05.hdtv.xvid -vcodec libx264 -level 21 -s 480x270 -r 24000/1001 -b 768k -bt 768k -bufsize 2000k -maxrate 768k -g 250 -coder 0 -threads 0 -acodec libfaac -ac 2 -ab 128k outfile.avi
FFmpeg version SVN-r15665, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 0. 0 / 52. 0. 0
libavformat 52.22. 1 / 52.22. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 22 2008 15:10:26, gcc: 4.3.2
[NULL @ 0x197c830]Invalid and inefficient vfw-avi packed B frames detected
Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997003/125000)
Input #0, avi, from 'Videos/001tvshows/Boston Legal/boston.legal.s04e05.hdtv.xvid-xor.avi':
Duration: 00:42:07.08, start: 0.000000, bitrate: 1164 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tb(r)
Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
Output #0, mp4, to 'Videos/001iPod/boston.legal.s04e05.hdtv.xvid-xor.avi':
Stream #0.0: Video: libx264, yuv420p, 480x270 [PAR 254:255 DAR 4064:2295], q=2-31, 768 kb/s, 23.98 tb(c)
Stream #0.1: Audio: libfaac, 48000 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[libx264 @ 0x197ea40]width or height not divisible by 16 (480x270), compression will suffer.
Segmentation fault (core dumped)
I found
[ 3726.365486] ffmpeg[15704]: segfault at 72c77775 ip 00007f94724f4690 sp 00007fff7c457ce8 error 4 in libc-2.8.90.so[7f9472472000+169000]
in dmesg. How can I fix this?
Thanks
FakeOutdoorsman
October 23rd, 2008, 08:59 PM
I just installed ffmpeg and x264 according to the first post, but ffmpeg always core-dumps:
...
I found
[ 3726.365486] ffmpeg[15704]: segfault at 72c77775 ip 00007f94724f4690 sp 00007fff7c457ce8 error 4 in libc-2.8.90.so[7f9472472000+169000]
in dmesg. How can I fix this?
Thanks
I tried to duplicate this using the same ffmpeg revision and your command, but I didn't get any error. I'm unsure what is causing it. You can ask the ffmpeg-user (http://ffmpeg.mplayerhq.hu/mailinglists.html) mailing list. Make sure to include the whole ffmpeg command and the full response. The dmesg message will help too. Make sure to use the latest ffmpeg revision, don't hijack threads, and don't top-post when replying or they might ignore your question.
calraith
October 24th, 2008, 02:55 AM
My own notes (mostly to myself, but here if anyone else can use them):
To get x264 to build as a shared library on 32-bit Hardy, I had to do the following in addition to the tutorial:
sudo aptitude install libgpac-dev
sudo ranlib /usr/lib/libgpac_static.a
sudo ldconfigThe configure arguments I used for x264 were as follows:
./configure --prefix=/usr \
--enable-pthread --enable-visualize --enable-shared --enable-mp4-output \
--extra-asflags="-fPIC" \
--extra-cflags="-O3 -march=k8 -mtune=k8 -pipe -ffast-math -fomit-frame-pointer"The --enable-avis-input option enables avisynth input on win32 only.
I also wanted xvid support in ffmpeg, so I installed libxvidcore4-dev:
sudo aptitude install libxvidcore4-dev
sudo ldconfigThe configure arguments I used for ffmpeg were as follows:
./configure --prefix=/usr \
--enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug \
--enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads \
--enable-libx264 --enable-libxvid \
--extra-cflags="-O3 -march=k8 -mtune=k8 -pipe -ffast-math -fomit-frame-pointer"
DocTauri
October 29th, 2008, 05:57 PM
Hopefully someone can help me here.
First off, thanks for the great tutorial, I got it compiled and working great (under Fedora 9). The problem I'm having now is this:
I have used Handbrake to convert my DVD library to .mp4 files. I want to use ffmpeg to convert some of these for use on my iPod. Some work just great, some though come back with this
[libxvid @ 0x8b417b0]Invalid pixel aspect ratio 0/1
Video encoding failed
Can anyone give me some more insight into what the cause of this is, and how I can work around it?
Thanks!
Doc
FakeOutdoorsman
October 29th, 2008, 06:14 PM
What is your ffmpeg command and the complete ffmpeg output?
DocTauri
October 29th, 2008, 07:14 PM
The command is:
ffmpeg -i 'age2.mp4' -f mp4 -vcodec libxvid -maxrate 1000 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec libfaac -s 320x176 -padtop 32 -padbottom 32 -ab 128000 -b 40000 'age2.ipod.mp4'
and the output is:
FFmpeg version SVN-r15735, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-libxvid
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 1. 0 / 52. 1. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 28 2008 15:57:13, gcc: 4.3.0 20080428 (Red Hat 4.3.0-8)
Seems stream 0 codec frame rate differs from container frame rate: 44100.00 (44100/1) -> 23.98 (24000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'age2.mp4':
Duration: 01:30:31.00, start: 0.000000, bitrate: 3618 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 720x400, 23.98 tb(r)
Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16
Output #0, mp4, to 'age2.ipod.mp4':
Stream #0.0(eng): Video: libxvid, yuv420p, 320x240, q=3-5, 40 kb/s, 23.98 tb(c)
Stream #0.1(eng): Audio: libfaac, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[libxvid @ 0x97fb7b0]Invalid pixel aspect ratio 0/1
Video encoding failed
Not knowing anything about ffmpeg, I used mp4ize -v mymovie.mp4 to generate the ffmpeg command. This is how the parameters were determined.
Thanks,
Doc
mocha
October 29th, 2008, 07:31 PM
What happens if you pass "-aspect 4:3" or whatever aspect you want in the ffmpeg command?
FakeOutdoorsman
October 29th, 2008, 07:36 PM
Those parameters may have worked with an older version of ffmpeg. I've never seen this error before (I never use xvid), but you can fix it by adding the aspect option, "-aspect 16:9" for example. Other options include 4:3, 1.3333, or 1.7777. Other changes you can make:
copy the audio stream instead of re-encoding it: -acodec copy
use a higher video bitrate, you're currently using 40k
use libx264 instead of libxvid
use two-pass encoding
Take a look at Robert Swain's iPod video guide (http://rob.opendot.cl/index.php/useful-stuff/ipod-video-guide/) for 768kbit/s 320×240 H.264 videos. The only difference I would make from Robert's settings is replacing the second pass with:
ffmpeg -i INPUT -acodec copy -pass 2 -s WIDTHxHEIGHT -vcodec libx264 -b BIT_RATE -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +mixed_refs -me_method umh -subq 6 -trellis 1 -refs 5 -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt BIT_RATE -maxrate 768k -bufsize 2M -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 13 -title SOME_TITLE -threads 0 OUTPUT.mp4
This way you're not re-encoding the audio because your source audio is probably already compatible. You'll also want to add "-threads 0" to both passes if you have a multicore or multithreaded CPU.
Looks like I'm the slow typer.
DocTauri
October 29th, 2008, 07:54 PM
snip
DocTauri
October 29th, 2008, 07:54 PM
The -aspect setting did it! Funny thing is, the original video is 720x400, which equates to an aspect ratio of 1.8, and if I do -aspect 1.8, it works without erroring!
I'll look at Robert Swain's iPod video guide this evening.
One other question... Why would I use 2 pass instead of 1 pass?
Thanks again!
Doc
FakeOutdoorsman
October 29th, 2008, 07:57 PM
One other question... Why would I use do 2 pass instead of 1 pass?
To generalize, use two-pass if you want your output to be a certain filesize. The encoder will adjust the quality to achieve this file size. Use single pass CRF (assuming you're using x264) if you care more about quality. The encoder will use a constant quality and the file size will be unknown.
I hardly ever use two-pass.
DocTauri
October 29th, 2008, 08:08 PM
Got it. I think if I were going to watch this on TV, I'd look towards the 2 pass, but on a iPod, single's probably great.
Thanks again.
Doc
billhung
October 30th, 2008, 06:26 AM
Hi,
I did what the #1 post said and got the latest x264 codec, but at the step where I need to configure ffmpeg (I got ffmpeg from svn like the post said). And I used x264 as the name instead of x265-git. I accepted all the default names.
I got this error:
billh@billaspire:~/temp/ffmpeg/x264/ffmpeg$ sudo ./configure --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-nonfree
ERROR: libx264 version must be >= 0.65.
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.
billh@billaspire:~/temp/ffmpeg/x264/ffmpeg$
By going to System -> Administration -> Synaptic Package Manager, I see x264 have "1:0.svn20080408-0.0ubuntu1" for both "Installed Version" and "Latest Version".
Any idea which step went wrong?
billhung
October 30th, 2008, 06:49 AM
ok, instead of sudo checkinstall suggested by the post, I did a simple sudo make install. That got me through.
However, I still couldn't encode in h264. This is my ffmpeg command that works on another computer, but not this computer with a fresh new install
billh@billaspire:~/temp/ffmpeg/ffmpeg$ nice -n 18 ./ffmpeg -y -i "/home/billh/Videos/input.avi" -r 29.97 -vcodec h264 -s 640x480 -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 400kb -maxrate 1250k -bufsize 4M -bt 256k -refs 1 -coder 0 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec aac -ab 64k -ar 48000 -ac 1 "/home/billh/Videos/output.mp4"
FFmpeg version SVN-r15746, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-nonfree
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 1. 0 / 52. 1. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 30 2008 13:37:51, gcc: 4.3.2
Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997003/125000)
Input #0, avi, from '/home/billh/Videos/input.avi':
Duration: 00:42:58.00, start: 0.000000, bitrate: 1141 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 624x352 [PAR 1:1 DAR 39:22], 23.98 tb(r)
Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
Unknown encoder 'h264'
On the other hand, I installed mencoder on Ubuntu 8.10 Intrepid, and h264 encoding was working fine with mencoder. However, mencoder has problem with the audio codec aac. So I want to make ffmpeg works.
Any idea how to solve this?
billhung
October 30th, 2008, 11:31 AM
ok, now I see the example used libx264, instead of h264.
I use h264 on another machine and it was working.
Anyhow, after changing ot libx264 and libfaac, ffmpeg complains about the bitrate and I eventually couldn't get it to work....
FakeOutdoorsman
October 30th, 2008, 08:27 PM
...
By going to System -> Administration -> Synaptic Package Manager, I see x264 have "1:0.svn20080408-0.0ubuntu1" for both "Installed Version" and "Latest Version".
Any idea which step went wrong?
I'm guessing you already had x264 and/or libx264-dev installed. When ffmpeg looked for libx264, it found your already installed version (not your compiled one) and complained that your x264 is too old.
ok, now I see the example used libx264, instead of h264.
I use h264 on another machine and it was working.
The other machine was using an older version of ffmpeg. Option and codec names can change between ffmpeg revisions, and in this case it used to be called h264 and is now called libx264.
Anyhow, after changing ot libx264 and libfaac, ffmpeg complains about the bitrate and I eventually couldn't get it to work....
I was able to get it to work fine with the following:
ffmpeg -y -i "/home/billh/Videos/input.avi" -r 29.97 -vcodec libx264 -s 640x480 -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 400k -maxrate 1250k -bufsize 4M -bt 256k -refs 1 -coder 0 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 64k -ar 48000 -ac 1 "/home/billh/Videos/output.mp4"
What is the complete output ffmpeg gives you when it complains about the bitrate?
What is the output of "ldd /usr/bin/ffmpeg"?
ercdvs
October 31st, 2008, 06:55 PM
Worked fairly well on Intrepid server ..
The only issue was x264 / ffmpeg failed on checkinstall with permission issues (i used sudo)
sudo make install was fine though
FakeOutdoorsman
October 31st, 2008, 07:38 PM
Worked fairly well on Intrepid server ..
The only issue was x264 / ffmpeg failed on checkinstall with permission issues (i used sudo)
sudo make install was fine though
For x264 on Intrepid I've found that using
./configure --prefix=/usr
will allow checkinstall to install x264 without any errors. I'm still working on ffmpeg. synthaxx mentioned that he had to create a bunch of folders (http://ubuntuforums.org/showpost.php?p=5985479&postcount=143) to get checkinstall to work with ffmpeg, but I haven't found an alternative solution yet.
Checkinstall ffmpeg errors for reference:
========================= Installation results ===========================
install -d "/usr/lib"
install -m 644 libpostproc/libpostproc.a "/usr/lib"
ranlib "/usr/lib/libpostproc.a"
install -d "/usr/lib"
install -m 644 libavdevice/libavdevice.a "/usr/lib"
ranlib "/usr/lib/libavdevice.a"
install -d "/usr/lib"
install -m 644 libavformat/libavformat.a "/usr/lib"
ranlib "/usr/lib/libavformat.a"
install -d "/usr/lib"
install -m 644 libavcodec/libavcodec.a "/usr/lib"
ranlib "/usr/lib/libavcodec.a"
install -d "/usr/lib"
install -m 644 libavutil/libavutil.a "/usr/lib"
ranlib "/usr/lib/libavutil.a"
install -d "/usr/include/libpostproc"
install: cannot change permissions of `/usr/include/libpostproc': No such file or directory
make: *** [install-headers] Error 1
**** Installation failed. Aborting package creation.
Using:
./configure --prefix=/usr --enable-gpl --enable-postproc --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264
flynch
October 31st, 2008, 09:40 PM
For x264 on Intrepid I've found that using
./configure --prefix=/usr
will allow checkinstall to install x264 without any errors. I'm still working on ffmpeg. synthaxx mentioned that he had to create a bunch of folders (http://ubuntuforums.org/showpost.php?p=5985479&postcount=143) to get checkinstall to work with ffmpeg, but I haven't found an alternative solution yet.
Checkinstall ffmpeg errors for reference:
========================= Installation results ===========================
install -d "/usr/lib"
install -m 644 libpostproc/libpostproc.a "/usr/lib"
ranlib "/usr/lib/libpostproc.a"
install -d "/usr/lib"
install -m 644 libavdevice/libavdevice.a "/usr/lib"
ranlib "/usr/lib/libavdevice.a"
install -d "/usr/lib"
install -m 644 libavformat/libavformat.a "/usr/lib"
ranlib "/usr/lib/libavformat.a"
install -d "/usr/lib"
install -m 644 libavcodec/libavcodec.a "/usr/lib"
ranlib "/usr/lib/libavcodec.a"
install -d "/usr/lib"
install -m 644 libavutil/libavutil.a "/usr/lib"
ranlib "/usr/lib/libavutil.a"
install -d "/usr/include/libpostproc"
install: cannot change permissions of `/usr/include/libpostproc': No such file or directory
make: *** [install-headers] Error 1
**** Installation failed. Aborting package creation.
Using:
./configure --prefix=/usr --enable-gpl --enable-postproc --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264
I worked around this by creating the following dirs and running checkinstall again:
sudo mkdir /usr/local/lib/pkgconfig
sudo mkdir /usr/include/libavdevice
sudo mkdir /usr/include/libavformat
sudo mkdir /usr/include/libavcodec
sudo mkdir /usr/include/libavutil
sudo mkdir /usr/lib/vhook
now its all installed nicely on intrepid :)
@H.264
November 1st, 2008, 02:03 AM
What i'm doing wrong?
http://i34.tinypic.com/eq48ww.png
FakeOutdoorsman
November 1st, 2008, 03:04 AM
What i'm doing wrong?
I'm assuming you're using Ubuntu 8.10. Try this:
cd ~/x264
make distclean
./configure --prefix=/usr
make
sudo checkinstall
I've updated the tutorial for Intrepid since you posted, but it could use some improvements with the checkinstall issues.
@H.264
November 1st, 2008, 03:58 AM
That is fine :), but now same with ffmpeg...:(
http://i36.tinypic.com/1zmhxso.png
What is the catch...what do i need to do also for ac3 support?
p.s. any guide for ffmpeg+x264+ac3?
FakeOutdoorsman
November 1st, 2008, 04:06 AM
That is fine :), but now same with ffmpeg...:(
What is the catch...what do i need to do also for ac3 support?
p.s. any guide for ffmpeg+x264+ac3?
cd ~/ffmpeg
make distclean
./configure --prefix=/usr --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264
make
sudo mkdir /usr/lib/pkgconfig
sudo mkdir /usr/include/libpostproc
sudo mkdir /usr/include/libavdevice
sudo mkdir /usr/include/libavformat
sudo mkdir /usr/include/libavcodec
sudo mkdir /usr/include/libavutil
sudo mkdir /usr/lib/vhook
sudo checkinstall
FFmpeg supports ac3 natively, so you won't need to do anything extra.
ercdvs
November 3rd, 2008, 02:20 AM
2 points :
Why not include support for xvid (--enable-libxvid) ? I end up using mencoder a number of times to fix audio channel mapping, and xvids come out nice and clean for ps3 output. In my understanding, mencoder uses ffmeg in the background.
why specifically disable debug? I thought its not outputting any debug info unless specifically called. is there some performance boost without it ?
FakeOutdoorsman
November 3rd, 2008, 04:41 AM
2 points :
Why not include support for xvid (--enable-libxvid) ? I end up using mencoder a number of times to fix audio channel mapping, and xvids come out nice and clean for ps3 output. In my understanding, mencoder uses ffmeg in the background.
I had it listed a while back but I removed it because a "native MPEG-4/Xvid encoder exists" according to "./configure --help". I'll add it to the list of optional codecs.
why specifically disable debug? I thought its not outputting any debug info unless specifically called. is there some performance boost without it ?
It probably doesn't do much because I believe debugging is off by default. I'm guessing it is specific to ffmpeg_g (the debug build). I did some non-scientific tests and encoding times were around 2/10th of a second faster with debug disabled for mpeg4 and libx264 encodes.
Fisslefink
November 3rd, 2008, 08:24 AM
Thank you for the excellent tutorial, FakeOutdoorsman. I was pleasantly surprised to find such clean instructions for Intrepid Ibex, so soon after the release!
I have two small corrections for you:
At Step 2, my install of Intrepid Ibex did not have libvorbis-dev by default, so I'd suggest adding it to your list of packages. Save someone the little bit of grief looking for the right package :-)
So for Intrepid users, the code at Step 2 should read:
sudo aptitude install build-essential subversion git-core checkinstall yasm libfaad-dev libfaac-dev libmp3lame-dev libtheora-dev libvorbis-dev
At Step 5, my install of Intrepid Ibex did not have the directory "/usr/include/libpostproc", so I'd suggest adding it to your list of directories to make.
So for Intrepid users, the code at Step 5 should read:
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264
make
sudo mkdir /usr/local/lib/pkgconfig
sudo mkdir /usr/include/libavdevice
sudo mkdir /usr/include/libavformat
sudo mkdir /usr/include/libavcodec
sudo mkdir /usr/include/libavutil
sudo mkdir /usr/lib/vhook
sudo mkdir /usr/include/libpostproc
sudo checkinstall
And if I may make two small suggestions as well:
Because of your excellent color scheme in Step 3 (marking it Hardy only), I skipped right to Step 5, which was marked "Intrepid". Missing Step 4 turned out to be a major error. Perhaps you could add colored text that says "Both Hardy Heron and Intrepid Ibex" to Steps 1, 4, and 6.
Finally, why not include xvid support? This is a pretty common codec used by nuvexport (for MythTV), Handbrake, and others. This could be accomplished by simply adding "libxvidcore4-dev" to the list of packages to download at Step 2, and adding "--enable-xvid" to the ffmpeg "./configure" command at Step 5. After following your tutorial once as written, I went back and made only these changes, and it worked fine.
Anyway, excellent job, and thanks again.
Cheers.
PS: For those who don't know, you can check which codecs are supported by your ffmpeg installation using this command:
ffmpeg -formats|less
...scroll down to the "Codecs:" section, and note that many critical ones begin with 'lib', i.e. "libfaac" and "libx264"
Utopic
November 3rd, 2008, 03:55 PM
@Fisslefink:
It's --enable-libxvid ...And it's works fine !
Thanks for this how to !
FakeOutdoorsman
November 3rd, 2008, 08:13 PM
At Step 2, my install of Intrepid Ibex did not have libvorbis-dev by default, so I'd suggest adding it to your list of packages. Save someone the little bit of grief looking for the right package :-)
I removed libvorbis-dev from the dependency list, but forgot to remove --enable-libvorbis from the ffmpeg configuration. I removed it because a native vorbis encoder exists and I wanted to reduce the number of dependencies. Unfortunately, ffmpeg defaults to flac when encoding to ogg instead of vorbis which can be unexpected. You have to add "-acodec vorbis". Might be bug report worthy.
At Step 5, my install of Intrepid Ibex did not have the directory "/usr/include/libpostproc", so I'd suggest adding it to your list of directories to make.
Another omission on my part. I even mentioned this in an earlier thread. Thanks for pointing that out.
Because of your excellent color scheme in Step 3 (marking it Hardy only), I skipped right to Step 5, which was marked "Intrepid". Missing Step 4 turned out to be a major error. Perhaps you could add colored text that says "Both Hardy Heron and Intrepid Ibex" to Steps 1, 4, and 6.
I separated the howto a little more and embiggened the step numbers to help delineate things.
Finally, why not include xvid support? This is a pretty common codec used by nuvexport (for MythTV), Handbrake, and others. This could be accomplished by simply adding "libxvidcore4-dev" to the list of packages to download at Step 2, and adding "--enable-xvid" to the ffmpeg "./configure" command at Step 5. After following your tutorial once as written, I went back and made only these changes, and it worked fine.
This howto focuses on x264, and ffmpeg has a native xvid/mpeg4 encoder so I removed it to reduce the number of dependencies. From the FFmpeg FAQ:
3.12 How do I encode Xvid or DivX video with ffmpeg?
Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4 standard (note that there are many other coding formats that use this same standard). Thus, use '-vcodec mpeg4' to encode in these formats. The default fourcc stored in an MPEG-4-coded file will be 'FMP4'. If you want a different fourcc, use the '-vtag' option. E.g., '-vtag xvid' will force the fourcc 'xvid' to be stored as the video fourcc rather than the default.
Thanks for the suggestions. Work has been busy and I haven't been as comprehensive with my testing lately, so it's good to get feedback.
djcrash1981
November 4th, 2008, 01:37 AM
Hi, thanks for the HOW-TO, I've tried to follow it, but I'm getting a error when i try to compile ffmpeg:
m827078@yavin4:~/ffmpeg/ffmpeg-export-2008-11-03$ ./configure --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
ERROR: libx264 version must be >= 0.65.
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.
I've done what you said but i don't know what I'm missing.
Can you help me???
Thanks.
FakeOutdoorsman
November 4th, 2008, 02:59 AM
Did you install x264? Do you have other x264 packages installed, such as libx264-dev? Are you using Ubuntu 8.10 or 8.04? Paste the output of:
dpkg --get-selections | grep x264
@H.264
November 4th, 2008, 05:25 AM
I'm getting the same error when i just paste comand with "enables" whole line...using 8.10 :)
andrew.46
November 4th, 2008, 08:54 AM
Hi,
Thanks for the guide Fakeoutdoorsman :-). I did not use the checkinstall option as I am not a fan, and I will admit to using a few different options, but I would just like to mention that unlike a few people using Intrepid Ibex I can report that I did not have any x264 trouble with ffmpeg using the git x264. The version I have is:
andrew@skamandros:~$ ls /usr/lib/libx264.so.*
/usr/lib/libx264.so.65
and shows as successfully available to ffmpeg as:
andrew@skamandros:~$ ffmpeg -formats | grep x264
FFmpeg version SVN-r15772, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-nonfree --enable-postproc
--enable-pthreads --enable-libamr-nb --enable-libamr-wb
--enable-libmp3lame --enable-libschroedinger --enable-libx264
--enable-libxvid
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 2. 0 / 52. 2. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 4 2008 18:37:29, gcc: 4.3.2
EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
This is from a fresh git pull on November 4th. Now to work out how to use ffmpeg :-).
Andrew
@H.264
November 4th, 2008, 05:18 PM
:~/ffmpeg$ ./configure --prefix=/usr --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264
ERROR: LAME 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.
Any idea what's wrong?
synthaxx
November 4th, 2008, 05:43 PM
Any idea what's wrong?
Your probably trying to compile on Intrepid, in that case you need to do a:
sudo apt-get install libmp3lame-dev
That should fix it.
FakeOutdoorsman
November 5th, 2008, 12:04 AM
Hi,
Thanks for the guide Fakeoutdoorsman :-). I did not use the checkinstall option as I am not a fan, and I will admit to using a few different options, but I would just like to mention that unlike a few people using Intrepid Ibex I can report that I did not have any x264 trouble with ffmpeg using the git x264.
Thanks for the update, Andrew. Good to hear it's working for you.
HIGHLIFE
November 5th, 2008, 12:26 AM
Installation x264 in step 4 failed for me. Here is my log:
Selecting previously deselected package x264.
(Reading database ... 200661 files and directories currently installed.)
Unpacking x264 (from .../x264/x264_20081104-1_i386.deb) ...
dpkg: error processing /home/dcesiel/x264/x264_20081104-1_i386.deb (--install):
trying to overwrite `/usr/lib/libx264.a', which is also in package libx264-dev
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/home/dcesiel/x264/x264_20081104-1_i386.deb
How could I fix this?
FakeOutdoorsman
November 5th, 2008, 01:00 AM
Installation x264 in step 4 failed for me. Here is my log:
Selecting previously deselected package x264.
(Reading database ... 200661 files and directories currently installed.)
Unpacking x264 (from .../x264/x264_20081104-1_i386.deb) ...
dpkg: error processing /home/dcesiel/x264/x264_20081104-1_i386.deb (--install):
trying to overwrite `/usr/lib/libx264.a', which is also in package libx264-dev
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/home/dcesiel/x264/x264_20081104-1_i386.deb
How could I fix this?
Looks like you have libx264-dev installed. Remove it first before installing x264.
@H.264
November 8th, 2008, 11:18 PM
How can i setup live update on ffmpeg+x264 only from official sites?
After installation always i'm getting update from Ubuntu nad always i have old configuration...:(
nowhere@cox.net
November 9th, 2008, 07:31 PM
I also have a question about this process and updates. I just did a fresh install of Intrepid. I previously had Hardy and was encoding ipod videos all the time. I looked back in my bookmarks to see how I got it working and my bookmark pointed to this thread. I must have followed it before but updates never bothered me about updating ffmpeg or x264.
Now when I follow the intrepid howto here, I am constantly pestered to update these two. However, if I name them something else, dependencies to play videos are broken. I thought I could install both the svn and the repo versions but filenames are going to conflict since the howto instructs on how to install them in the repo locations.
Can someone give me concise advice on how to best install these two packages so they are available to other packages and I won't be bothered to update them all the time? I KNOW this has to be possible. We used to have to build all our own software before repos were around.
PS when I do sudo aptitude hold ffmpeg x264 it still bothers me to update. Do I need to reboot or something?
Thanks a ton!
Lampi
November 9th, 2008, 07:49 PM
great howto, works just fine - now I'm curious:
does anyone make a next step towards building whole xine-lib 1.2 from scratch afterwards? I checked a dozen of howtos on this one, but none would cover the problems I encounter.
nowhere@cox.net
November 9th, 2008, 08:30 PM
I see from this post
http://ubuntuforums.org/showthread.php?t=948399&highlight=ffmpeg+ipod&page=2
that Medibuntu does not have an updated ffmpeg yet. I believe you used to be able to get an x264 enabled package there, mitigating the requirement to compile yourself and thus avoid the issues with the update bothering you.
I guess I will keep checking Medibuntu...
FakeOutdoorsman
November 10th, 2008, 04:16 AM
Now when I follow the intrepid howto here, I am constantly pestered to update these two. However, if I name them something else, dependencies to play videos are broken.
I re-added a compile option to x264 (--enable-shared) so other programs, such as mplayer from the repository, can use the x264 library files.
PS when I do sudo aptitude hold ffmpeg x264 it still bothers me to update. Do I need to reboot or something?
Is aptitude still asking you to upgrade? Telling aptitude to hold the packages won't apply to apt-get, Synaptic, or the update manager thing in the toolbar. You can tell them to "hold" the package in Synaptic with "Package -> Lock Version".
FakeOutdoorsman
November 10th, 2008, 04:19 AM
I see from this post
http://ubuntuforums.org/showthread.php?t=948399&highlight=ffmpeg+ipod&page=2
that Medibuntu does not have an updated ffmpeg yet. I believe you used to be able to get an x264 enabled package there, mitigating the requirement to compile yourself and thus avoid the issues with the update bothering you.
I guess I will keep checking Medibuntu...
I read somewhere that Medibuntu won't be supplying ffmpeg for Intrepid, but I'm not sure if that is correct or not. In the link you provided, mr_pouit explains that you can get the same functionality as the Medibuntu's ffmpeg by installing the unstripped packages. I haven't tried this myself.
Re: Medibuntu ffmpeg for Intrepid Help? (http://ubuntuforums.org/showpost.php?p=6063438&postcount=19)
billhung
November 12th, 2008, 07:54 AM
I read somewhere that Medibuntu won't be supplying ffmpeg for Intrepid, but I'm not sure if that is correct or not. In the link you provided, mr_pouit explains that you can get the same functionality as the Medibuntu's ffmpeg by installing the unstripped packages. I haven't tried this myself.
Re: Medibuntu ffmpeg for Intrepid Help? (http://ubuntuforums.org/showpost.php?p=6063438&postcount=19)
From my first hand experience. I confirm that Medibuntu is not having ffmpeg for 8.10 Intrepid (at least not now), while ffmpeg was working well with x264 in 8.04 hardy.
For more detail, look here:
https://bugs.launchpad.net/bugs/291011
FakeOutdoorsman
November 12th, 2008, 08:26 PM
The subversion server for ffmpeg has been updated to the ffmpeg.org domain. If you keep your ffmpeg folder and use it to update ffmpeg, then you can tell subversion to use the new server with:
cd ~/ffmpeg
svn switch --relocate svn://svn.mplayerhq.hu/ svn://svn.ffmpeg.org/
The old address will continue to work for awhile, but it is advised to start using the new one.
More info: [FFmpeg-devel] Subversion services now available from ffmpeg.org (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-November/055868.html)
Ng Oon-Ee
November 13th, 2008, 02:10 AM
Hi, just followed this guide since the ffmpeg in intrepid is borked. However, I noticed that once I've completed it the command "man ffmpeg" gives the undocumented error. Is there a reason for this/anyway to get the man page besides loading it up online? Reason being I often rely on the man page to remember what options exist and their formatting.
andrew.46
November 13th, 2008, 03:53 AM
Hi Ng:
Hi, just followed this guide since the ffmpeg in intrepid is borked. However, I noticed that once I've completed it the command "man ffmpeg" gives the undocumented error.
Hmmm.... actually I bumped into this problem myself in a different distro. I suspect that under Ubuntu you are missing the texi2html package. Try adding that with apt-get and recompiling.
If this works (he says crossing his fingers) this might be worth adding to the guide Fakeoutdoorsman?
Andrew
Ng Oon-Ee
November 13th, 2008, 06:48 AM
Hmmm.... actually I bumped into this problem myself in a different distro. I suspect that under Ubuntu you are missing the texi2html package. Try adding that with apt-get and recompiling.
If this works (he says crossing his fingers) this might be worth adding to the guide Fakeoutdoorsman?
Andrew
Thanks, that was EXACTLY the solution =). +1 for adding it to the guide. Would never have been able to figure this out, I don't think.
andrew.46
November 13th, 2008, 09:17 AM
Hi Ng:
Thanks, that was EXACTLY the solution =). +1 for adding it to the guide. Would never have been able to figure this out, I don't think.
Wooo hooooo! I know almost nothing about ffmpeg so it feels very good to successfully troubleshoot it :-). I came across this problem a few months ago with a slightly different solution in the LQ Forums (http://www.linuxquestions.org/questions/slackware-14/svn-ffmpeg-no-man-file-623007/). In that case Slackware had texi2html but it was not available to the installation script I was using.
Andrew
FakeOutdoorsman
November 15th, 2008, 02:10 AM
Hi Ng:
Hmmm.... actually I bumped into this problem myself in a different distro. I suspect that under Ubuntu you are missing the texi2html package. Try adding that with apt-get and recompiling.
If this works (he says crossing his fingers) this might be worth adding to the guide Fakeoutdoorsman?
Andrew
Thanks, Andrew. Confirmed to work with Ibex. I didn't test Hardy, but added to the guide anyway. What was once a derelict, unemployed man is now a working man.
Ng Oon-Ee
November 15th, 2008, 03:50 AM
Thanks, Andrew. Confirmed to work with Ibex. I didn't test Hardy, but added to the guide anyway. What was once a derelict, unemployed man is now a working man.
Ah... work, that scourge of enjoyment :lolflag:. Just a question for you, for times when you're NOT working (no rush). When I follow your guide, somehow ffplay isn't properly installed, shows as not installed when I try to run it, no man page (ffmpeg does), and I can see ffplay.c in the ~/ffmpeg directory but no ffplay.d or ffplay.o, which leads me to believe its a compiler problem. Except that no errors were raised. Any info you need/suggestions?
Thanks for the guide, again.
EDIT: There's a file called config.err in ~/ffmpeg, when I search for occurrences of ffplay it says that ffplay depends on SDL, could the problem be that I don't have some SDL dev files? Do you have ffplay on your install? And do you have any SDL packages installed? I have a few, but those are binaries only.
kevdog
November 15th, 2008, 04:41 AM
I think I installed this package correctly, but how do I check? -- I'm on Ibex. Any test script?
billhung
November 15th, 2008, 05:16 AM
I just did the tutorial according to the first post with 8.10 Intrepid. And when I use the ffmpeg suggested by the post, I got the following error:
billh@billaspire:~/temp/ffmpeg/ffmpeg$ ffmpeg -y -i "/media/disk/DVD/cancer/avi/001/cancer-001.avi" -pass 1 -b 512k -bt 512k -s 640x480 -vcodec libx264 -an -threads 0 -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method dia -subq 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 1 -directpred 1 -bidir_refine 0 -trellis 0 -flags2 -bpyramid-wpred-mixed_refs-dct8x8+fastpskip -f mp4 /dev/null
FFmpeg version SVN-r15746, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-nonfree
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 1. 0 / 52. 1. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 30 2008 13:37:51, gcc: 4.3.2
Input #0, avi, from '/media/disk/DVD/cancer/avi/001/cancer-001.avi':
Duration: 01:21:32.38, start: 0.000000, bitrate: 1640 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 720x480 [PAR 1:1 DAR 3:2], 29.97 tb(r)
Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
Output #0, mp4, to '/dev/null':
Stream #0.0: Video: libx264, yuv420p, 640x480 [PAR 9:8 DAR 3:2], q=10-51, pass 1, 512 kb/s, 29.97 tb(c)
Stream mapping:
Stream #0.0 -> #0.0
[libx264 @ 0x9d515e0]no ratecontrol method specified
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
billh@billaspire:~/temp/ffmpeg/ffmpeg$
Notice my ffmpeg install was working fine with 8.10 + x264 + ffmpeg. The following command was working fine for me:
nice -n 18 /usr/bin/ffmpeg -y -i "/media/disk/DVD/cancer/avi/001/cancer-001.avi" -threads 2 -r 29.97 -b 400kb -vcodec libx264 -s 640x480 -acodec libfaac -ab 64k -ar 48000 -ac 1 "/media/disk/DVD/cancer/avi/001/cancer.mp4"
I was just wondering why the command suggested by the post didn't work.
FakeOutdoorsman
November 15th, 2008, 06:36 AM
Ah... work, that scourge of enjoyment :lolflag:. Just a question for you, for times when you're NOT working (no rush). When I follow your guide, somehow ffplay isn't properly installed, shows as not installed when I try to run it, no man page (ffmpeg does), and I can see ffplay.c in the ~/ffmpeg directory but no ffplay.d or ffplay.o, which leads me to believe its a compiler problem. Except that no errors were raised. Any info you need/suggestions?
Thanks for the guide, again.
EDIT: There's a file called config.err in ~/ffmpeg, when I search for occurrences of ffplay it says that ffplay depends on SDL, could the problem be that I don't have some SDL dev files? Do you have ffplay on your install? And do you have any SDL packages installed? I have a few, but those are binaries only.
I've never used ffplay before, buy I believe you'll need to install libsdl1.2-dev and then recompile ffmpeg. This will bring in a good number of other packages as well, but most are small in size. You may need some other packages, but I didn't test it much. I should add this info to the guide.
The unemployed statement was referring to the man pages, not me since I'm mostly employed. That's what I get for such a lame joke.
Ng Oon-Ee
November 15th, 2008, 06:50 AM
I think I installed this package correctly, but how do I check? -- I'm on Ibex. Any test script?
Just try converting any video file you have, the easiest way is to do this:-
ffmpeg -i [type in the path to your input video here] [output name]
This should produce a video in your current directory. The type of the video will automatically be deduced from the output name (I suggest test.mpg for starters). After you know that's worked, then start playing around with the options. Bitrate, Audio sync, stuff like that.
I've never used ffplay before, buy I believe you'll need to install libsdl1.2-dev and then recompile ffmpeg. This will bring in a good number of other packages as well, but most are small in size. You may need some other packages, but I didn't test it much. I should add this info to the guide.
The unemployed statement was referring to the man pages, not me since I'm mostly employed. That's what I get for such a lame joke.
Ah, online humour not translating :), common enough thing.
I'll try it out now and post if it works, so you can add it to your guide.
FakeOutdoorsman
November 15th, 2008, 06:51 AM
I think I installed this package correctly, but how do I check? -- I'm on Ibex. Any test script?
You can just try running ffmpeg to see if it installed correctly:
ffmpeg -version
Should give you a response similar to:
FFmpeg version SVN-r15824, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
You could also ask aptitude. I named my ffmpeg package "ffmpeg-svn":
aptitude show ffmpeg-svn
Should give you:
Package: ffmpeg-svn
New: yes
State: installed
Automatically installed: no
Version: 20081114-1
Priority: extra
Section: checkinstall
Maintainer: root@ubuntu
Uncompressed Size: 45.8M
Provides: ffmpeg
Description: ffmpeg
To test ffmpeg, just find a video and:
ffmpeg -i yourinputvideo.flv output.mpg
To test ffmpeg and x264:
ffmpeg -i yourinputvideo.ogv -vcodec libx264 output.mp4
The -vcodec option allows you to choose what video codec to use, but often ffmpeg can guess depending on the output extension, such as in the first example. Refer to "Using ffmpeg and x264" in the first post of guide for more usage examples.
FakeOutdoorsman
November 15th, 2008, 07:00 AM
I just did the tutorial according to the first post with 8.10 Intrepid. And when I use the ffmpeg suggested by the post, I got the following error:
billh@billaspire:~/temp/ffmpeg/ffmpeg$ ffmpeg -y -i "/media/disk/DVD/cancer/avi/001/cancer-001.avi" -pass 1 -b 512k -bt 512k -s 640x480 -vcodec libx264 -an -threads 0 -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method dia -subq 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 1 -directpred 1 -bidir_refine 0 -trellis 0 -flags2 -bpyramid-wpred-mixed_refs-dct8x8+fastpskip -f mp4 /dev/null
FFmpeg version SVN-r15746, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-nonfree
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 1. 0 / 52. 1. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 30 2008 13:37:51, gcc: 4.3.2
Input #0, avi, from '/media/disk/DVD/cancer/avi/001/cancer-001.avi':
Duration: 01:21:32.38, start: 0.000000, bitrate: 1640 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 720x480 [PAR 1:1 DAR 3:2], 29.97 tb(r)
Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
Output #0, mp4, to '/dev/null':
Stream #0.0: Video: libx264, yuv420p, 640x480 [PAR 9:8 DAR 3:2], q=10-51, pass 1, 512 kb/s, 29.97 tb(c)
Stream mapping:
Stream #0.0 -> #0.0
[libx264 @ 0x9d515e0]no ratecontrol method specified
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
billh@billaspire:~/temp/ffmpeg/ffmpeg$
Notice my ffmpeg install was working fine with 8.10 + x264 + ffmpeg. The following command was working fine for me:
nice -n 18 /usr/bin/ffmpeg -y -i "/media/disk/DVD/cancer/avi/001/cancer-001.avi" -threads 2 -r 29.97 -b 400kb -vcodec libx264 -s 640x480 -acodec libfaac -ab 64k -ar 48000 -ac 1 "/media/disk/DVD/cancer/avi/001/cancer.mp4"
I was just wondering why the command suggested by the post didn't work.
I just tested the example and it worked fine for me. Some people have been getting the rate control error when libx264-dev is installed. Also, libx264 had some major API changes not too long ago that breaks older revisions of ffmpeg. Make sure you are using the latest ffmpeg and x264 (how old is r15746?). Show the output of:
x264 --version
peerLAN
November 15th, 2008, 07:06 PM
Mates... I'm tired and I thank you for any help you could give me. I did everything as it should be but it doesn't work.
I got the latest x264 source code, compiled, got the latest ffmpeg code configured it with --enable-libx264 --enable-gpl, compiled it, but when I use:
ffmpeg -i test.mov -vcodec libx264 out.mp4
i get
FFmpeg version SVN-r15828, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-libx264 --enable-gpl
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
built on Nov 15 2008 19:49:37, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'madagascar2-tlr3_h1080p.mov':
Duration: 00:02:02.64, start: 0.000000, bitrate: 9183 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 1920x1080, 24.00 tb(r)
Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16
Stream #0.2(eng): Data: tmcd / 0x64636D74
Output #0, mp4, to 'out.mp4':
Stream #0.0(eng): Video: libx264, yuv420p, 1920x1080, q=2-31, 200 kb/s, 24.00 tb(c)
Stream #0.1(eng): Audio: 0x0000, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[libx264 @ 0x88717b0]no ratecontrol method specified
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
It's the same no matter what arguments I try. :(
Any idea what I should do next...?
x264 --version
x264 0.65.1028 83baa7f
ffmpeg -version
FFmpeg version SVN-r15828, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-libx264 --enable-gpl
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
built on Nov 15 2008 19:49:37, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
FFmpeg SVN-r15828
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
jjaromin
November 15th, 2008, 10:46 PM
I've followed the directions in the first post. x264 compiled with no issues. ffmpeg is giving me an error during checkinstall. Here is the error.
(Reading database ... 31162 files and directories currently installed.)
Unpacking ffmpeg (from .../ffmpeg_20081115-1_i386.deb) ...
dpkg: error processing /root/ffmpeg/ffmpeg_20081115-1_i386.deb (--install):
trying to overwrite `/usr/lib/libavcodec.a', which is also in package libavcodec-dev
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Processing triggers for man-db ...
Errors were encountered while processing:
/root/ffmpeg/ffmpeg_20081115-1_i386.deb
Can anyone here help me get past this?
I'm new to linux (ubuntu 8.10) so please be gentle!
FakeOutdoorsman
November 15th, 2008, 11:02 PM
Mates... I'm tired and I thank you for any help you could give me. I did everything as it should be but it doesn't work.
I got the latest x264 source code, compiled, got the latest ffmpeg code configured it with --enable-libx264 --enable-gpl, compiled it, but when I use:
ffmpeg -i test.mov -vcodec libx264 out.mp4
...
Why did you compile ffmpeg with just --enable-libx264 and --enable-gpl? You would probably be better off with ffmpeg from the repository if you're going to use so few options. Try using the configure options from the guide, otherwise you'll also get the "Unsupported codec for output stream #0.1" error since you didn't enable libfaad and libfaac.
FakeOutdoorsman
November 15th, 2008, 11:05 PM
I've followed the directions in the first post. x264 compiled with no issues. ffmpeg is giving me an error during checkinstall. Here is the error.
(Reading database ... 31162 files and directories currently installed.)
Unpacking ffmpeg (from .../ffmpeg_20081115-1_i386.deb) ...
dpkg: error processing /root/ffmpeg/ffmpeg_20081115-1_i386.deb (--install):
trying to overwrite `/usr/lib/libavcodec.a', which is also in package libavcodec-dev
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Processing triggers for man-db ...
Errors were encountered while processing:
/root/ffmpeg/ffmpeg_20081115-1_i386.deb
Can anyone here help me get past this?
I'm new to linux (ubuntu 8.10) so please be gentle!
You have libavcodec-dev installed and checkinstall doesn't want to overwrite files from libavcodec-dev with the ffmpeg files. Try removing libavcodec-dev and running checkinstall again.
macsmith
November 15th, 2008, 11:11 PM
Help. I've installed and re-installed but still get a blank configuration, see below.
I'm running ubuntu 8.04.1, downloaded today's version of ffmpeg, yasm and x264. I updated the installation using the instructions on page 1 of this thread. There were no build errors. I've also read all 21 pages of this thread!
What can I try next?
Thanks
FFmpeg version SVN-r15821, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration:
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
built on Nov 14 2008 16:34:59, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Input #0, mpeg, from '/public/temp/guitarHero.mpg':
Duration: 00:02:03.69, start: 0.224367, bitrate: 30119 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 40000 kb/s, 25.00 tb(r)
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 224 kb/s
Warning: not compiled with thread support, using thread emulation
Unknown encoder 'libx264'
macsmith
November 15th, 2008, 11:17 PM
aha!
funny, when you express a problem for others to understand, the answer pops out all by itself.
I did all this today but looking at the output, it's dated yesterday's build. Yesterday I installed an older version and today I installed the latest version.
When I did ./ffmpeg instead of ffmpeg, I get today's version and it works!
So, new question: why hasn't the installation utility copied the latest build into my path directory? Is there a missing step in the installation?
Thanks
peerLAN
November 15th, 2008, 11:20 PM
I managed to fix my "no ratecontrol method specified". The problem was with a x264 lib that I installed using the ubuntu repository and it didn't updated (?) when I installed the new one from git. So I removed everything x264 and installed it just using the latest version from git on clean and it works now.
FakeOutdoorsman
November 15th, 2008, 11:29 PM
Help. I've installed and re-installed but still get a blank configuration, see below.
I'm running ubuntu 8.04.1, downloaded today's version of ffmpeg, yasm and x264. I updated the installation using the instructions on page 1 of this thread. There were no build errors. I've also read all 21 pages of this thread!
What can I try next?
Thanks
FFmpeg version SVN-r15821, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration:
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
built on Nov 14 2008 16:34:59, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Input #0, mpeg, from '/public/temp/guitarHero.mpg':
Duration: 00:02:03.69, start: 0.224367, bitrate: 30119 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 40000 kb/s, 25.00 tb(r)
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 224 kb/s
Warning: not compiled with thread support, using thread emulation
Unknown encoder 'libx264'
What do you mean by, "get a blank configuration"? Show your complete ffmpeg command and the full ffmpeg response.
Edit: Ok, ignore that. I came here straight from the email notification and failed to see your following message. Did you uninstall your old ffmpeg before updating?
FakeOutdoorsman
November 15th, 2008, 11:39 PM
I managed to fix my "no ratecontrol method specified". The problem was with a x264 lib that I installed using the ubuntu repository and it didn't updated (?) when I installed the new one from git. So I removed everything x264 and installed it just using the latest version from git on clean and it works now.
Which x264 lib from the repository was it (libx264-59, libx264-dev)? If you have those installed already before starting this guide they will conflict with your compiled x264 from git, not update.
Ng Oon-Ee
November 15th, 2008, 11:55 PM
aha!
funny, when you express a problem for others to understand, the answer pops out all by itself.
I did all this today but looking at the output, it's dated yesterday's build. Yesterday I installed an older version and today I installed the latest version.
When I did ./ffmpeg instead of ffmpeg, I get today's version and it works!
So, new question: why hasn't the installation utility copied the latest build into my path directory? Is there a missing step in the installation?
Thanks
I think you have to purge ffmpeg prior to installing :)
I've never used ffplay before, buy I believe you'll need to install libsdl1.2-dev and then recompile ffmpeg. This will bring in a good number of other packages as well, but most are small in size. You may need some other packages, but I didn't test it much. I should add this info to the guide.
Your advise was exactly correct. Simply installing libsdl1.2-dev before the ./configure and make gave me ffplay as well. Thank you very much, suggest you add that to your guide, maybe a subsection with (add this if you want/use ffplay).
macsmith
November 15th, 2008, 11:58 PM
Hi,
I thought I had uninstalled the old version but it doesn't look like it.
Should the new install process have copied ffmpeg to my bin directory? Obviously I can easily do the copy manually. Are there any other files that need to be copied?
Thanks
Ng Oon-Ee
November 16th, 2008, 12:19 AM
Hi,
I thought I had uninstalled the old version but it doesn't look like it.
Should the new install process have copied ffmpeg to my bin directory? Obviously I can easily do the copy manually. Are there any other files that need to be copied?
Thanks
The installation should obviously have copied ffmpeg to your bin directory (it did on mine). Maybe just purge ffmpeg and see if anything is left in your bin.
sudo apt-get purge ffmpeg
ls /usr/bin | grep ff
Check for ffmpeg, ffmpeg2theora, ffplay, ffserver. I have all of those from installing according to this guide. If you still have them after you run the purge, just delete them and run the guide again (or, to save time, just install the .deb the guide created for you :)).
@H.264
November 17th, 2008, 03:54 AM
Uff, i get frustrated with those updates for ffmpeg/x264 which are after install latest packages.
Someone has an idea what do i need to do to avoid those updates from Ubuntu package?:confused:
Ng Oon-Ee
November 17th, 2008, 04:01 AM
Uff, i get frustrated with those updates for ffmpeg/x264 which are after install latest packages.
Someone has an idea what do i need to do to avoid those updates from Ubuntu package?:confused:
As the guide states, you can just 'lock' your packages.
Alternatively, the way I do it is to follow Ubuntu's naming standard, so in the case that a newer ffmpeg is updated to the repos, I'll get notified of it. Anyway, currently (in Intrepid) there's only one version of ffmpeg, as Medibuntu doesn't have it yet, and may not add it. The important number is the Version Number, which is simply a string which is compared with what you have to see which is numerically/alphabetically higher. The problem is that the defaults for installing ffmpeg from source provide a version number which is totally numerical, and that is trumped by the repo's version.
So, anyway, the current version number I have is 3:0.svn20080206-12ubuntu3. I downloaded my source copy from SVN on 11th November 2008, so when I run sudo checkinstall, I select option 3 (the 4th option) and change the installed version number to 3:0.svn20081115-12ubuntu3, just replacing the date with the date of my download.
If somehow Ubuntu decides to update ffmpeg, the version number they use will be higher than this, and I'll get that version. Of course, I may not want the Intrepid version if its not from medibuntu, but at least I know somethings been updated.
For reference, the corresponding current repo versions of x264 is 1:0.svn20080408-0.0ubuntu1 and my updated version is 1:0.svn20081115-0.0ubuntu1.
@H.264
November 17th, 2008, 04:23 AM
I'll try now...
p.s. same thing for both packages ( ffmpeg+x264 )?
//Edit:
http://i33.tinypic.com/zt7yx3.png
So, what do i need to write on option 3?
@H.264
November 17th, 2008, 05:20 AM
Ok..finaly done, but after i locked App...
"6. Lock your packages. If you named your packages "x264" and "ffmpeg" then aptitude and apt/Synaptic will attempt to "upgrade" your new x264 and ffmpeg installations with the ancient official versions in the repository. If you use aptitude:
Code:
sudo aptitude hold x264 ffmpeg
or apt-get/Synaptic:
Open System -> Administration -> Synaptic Package Manager -> Choose the x264 package -> Package -> Lock Version
I'll sugest instead "sudo aptitude hold x264 ffmpeg" in guide to be only "Lock Version" for both ffmpeg and x264 before they start to install them even at the begining, so people will not be confused anymore :)
Ng Oon-Ee
November 17th, 2008, 07:21 AM
I'll try now...
p.s. same thing for both packages ( ffmpeg+x264 )?
//Edit:
http://i33.tinypic.com/zt7yx3.png
So, what do i need to write on option 3?
I see you've decided on holding :). It works, of course. In answer to the above, if you read the instructions given there, you have to type '3' to
select the option you want to change, then there would be an input prompt
>>
Then just input the appropriate version number.
billhung
November 18th, 2008, 02:21 AM
I just tested the example and it worked fine for me. Some people have been getting the rate control error when libx264-dev is installed. Also, libx264 had some major API changes not too long ago that breaks older revisions of ffmpeg. Make sure you are using the latest ffmpeg and x264 (how old is r15746?). Show the output of:
x264 --version
Here's the output of x264.
billh@billaspire:~$ x264 --version
x264 0.65.999 cc51047
I re-installed both x264 and ffmpeg that day of the post (that's nov 16, 2008 )
Here's my ffmpeg just in case you want to see
billh@billaspire:~$ ffmpeg --version
FFmpeg version SVN-r15746, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-libvorbis --enable-libtheora --disable-debug --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-pthreads --enable-libx264 --enable-nonfree
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 1. 0 / 52. 1. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 30 2008 13:37:51, gcc: 4.3.2
ffmpeg: missing argument for option '--version'
billh@billaspire:~$
billhung
November 18th, 2008, 02:27 AM
Ok..finaly done, but after i locked App...
"6. Lock your packages. If you named your packages "x264" and "ffmpeg" then aptitude and apt/Synaptic will attempt to "upgrade" your new x264 and ffmpeg installations with the ancient official versions in the repository. If you use aptitude:
Code:
sudo aptitude hold x264 ffmpeg
or apt-get/Synaptic:
Open System -> Administration -> Synaptic Package Manager -> Choose the x264 package -> Package -> Lock Version
I'll sugest instead "sudo aptitude hold x264 ffmpeg" in guide to be only "Lock Version" for both ffmpeg and x264 before they start to install them even at the begining, so people will not be confused anymore :)
I experienced the same thing. And after doing what @H.264 suggested, the synaptic package manager no long ask me for update. And I didn't even need a reboot.
xeddog
November 21st, 2008, 01:10 AM
Thanks for tutorial, but I am still having problems with xvid support. Whenever I specify "-vcodec xvid" when using ffmpeg I get an encoder not found msg.
To install the support, I started by using Synaptic to install libxvidcore4-dev. Then I started at the point in the instructions for updating the installation. I ran
sudo apt-get purge ffmpegx x264-git which ran ok. (these are the names I assigned when doing the initial checkinstall)
make distclean - also seemed to run ok.
git pull - already updated
then the configure, make, checkinstall, and ldconfig for x264 which ran ok too.
Did cd to ffmpeg directory and ran "make distclean" and "svn update" commands which looked ok.
Then I ran the configure command shown in the instructions but added --enable-libxvid onto the end. That also seemed to go ok as did the make and checkinstall.
But when I use ffmpeg to encode a video, if I have "-vcodec xvid" it just doesn't work due to the encoder xvid not found. output from "ffmpeg -formats" doesn't list anything with the characters "xvid" in it.
Everything looks ok to me but it still doesn't work. Sorry, but I am way too new at this to figure it out myself.
Oh, btw, this is on an Ubuntu Intrepid 32-bit installation.
TIA,
xeddog
FakeOutdoorsman
November 21st, 2008, 01:16 AM
You did the right steps, except you need to use "-vcodec libxvid". Alternatively, and for those who did not --enable-libxvid and install libxvidcore4-dev, ffmpeg can still encode to xvid with:
-vcodec mpeg4 -vtag xvid
More info: How do I encode Xvid or DivX video with ffmpeg? (http://ffmpeg.mplayerhq.hu/faq.html#SEC24)
xeddog
November 21st, 2008, 02:02 AM
Aw CRAP! I knew this was gonna happen. I spend the better part of a day trying to figure this out and it just escapes me. So I put up a post for help. THEN I decide to do some elementary diagnosis. I found an older version of ffmpeg in the my %PATH that did not have xvid enabled. When I used the full path name to execute ffmpeg that I want, it works.
xeddog
xeddog
November 21st, 2008, 02:10 AM
Sorry I neglected to mention this in my original post, but I tried using "-vcodec libxvid" too. Neither worked because of the path problem.
Regarding the -vtag option, I tried that and still had a problem playing the video. I am trying to use a D-Link DSM-520 media server for the player and it is VERY particular about the codec and options used for encoding.
When I used "-vcodec mpeg4", ffmpeg runs just fine. When I try to play the video on the D-link, it will play about 5-6 seconds of the video just fine, and then it will stop and just show about 1 frame a second or two. Also, the audio is hosed from the start and just "chirps" about once every second. This has happened using several different applications on both Linux and XP. But when I use the xvid encoder, they play just fine on the D-link, and that is why I specifically wanted the xvid encoder.
Thanks,
xeddog
andrew.46
November 21st, 2008, 07:11 AM
Hi Fakeoutdoorsman,
You may know that I work on the little brother to this guide, the svn Mplayer guide (http://ubuntuforums.org/showthread.php?t=558538). I am working on adding a checkinstall option to this thread although I am not a big fan of checkinstall :(.
In doing so I may have found the solution to the problem of having to manually create directories before using checkinstall to install ffmpeg for Intrepid Ibex. Can I suggest the following syntax:
sudo checkinstall -D --fstrans=no --install=yes \
--pkgname ffmpeg \
--pkgversion "svn-`date +%d%m%Y`" \
--backup=no --deldoc=yes \
--deldesc=yes --delspec=yes
which works on my system. All the extra options are merely useful but the solution to the missing directories seems to be the '--fstrans=no --install=yes' one.
I would love to know if this worked on your system and more than flattered if part of this appeared in your guide :-). Similar work will be appearing in my own guide soon along with a few more checkinstall options that I am working through.
All the best,
Andrew
Edit: It works so well that I have added a similar commandline for the MPlayer guide :-)
FakeOutdoorsman
November 21st, 2008, 11:48 PM
I would love to know if this worked on your system and more than flattered if part of this appeared in your guide :-). Similar work will be appearing in my own guide soon along with a few more checkinstall options that I am working through.
Hi Andrew,
How did you figure this out? This is good news because the directory making seemed that it should have been unnecessary. I tested it out on both Hardy and Intrepid and all seemed just fine.
I somewhat followed the Ubuntu versioning convention to prevent annoying updates as mentioned earlier by Ng Oon-Ee. Not sure if there is any downside to that or not, but it seems to work.
Thanks for the help and nice guide (I've subscribed to it).
andrew.46
November 22nd, 2008, 12:57 AM
Hi FakeOutdoorsman,
How did you figure this out? This is good news because the directory making seemed that it should have been unnecessary. I tested it out on both Hardy and Intrepid and all seemed just fine.
Good news :-). The problem with checkinstall was a fairly big thing with my 'other' distro (slackware) where because of this problem checkinstall was actually removed from the distro completely (ftp://ftp.slackware.com/pub/slackware/slackware-current/extra/checkinstall/README). Because I have not used checkinstall extensively on either distro it took me a little while to make the connection. I am getting a little slow in my old age :-).
I somewhat followed the Ubuntu versioning convention to prevent annoying updates as mentioned earlier by Ng Oon-Ee. Not sure if there is any downside to that or not, but it seems to work.
Actually Ng Oon-Ee's versioning info looks like better idea than the way I proposed anyway. I shall investigate the naming conventions for the repository MPlayer and make a similar change. From memory MPlayer comes as Release Candidate only so it will be a little different perhaps; great idea though!
When I read through the man page for checkinstall I saw the possibility to 'pre-fill' the checkinstall fields which I thought would be perfect for guides such as MPlayer and ffmpeg which are both complex enough.
All the best,
Andrew
seuzy13
November 22nd, 2008, 05:10 PM
I have a problem on the first step. When I try to purge all those packages, apt wants to also remove mplayer, vlc, avidemux, mencoder, ogmrip, mythtv, and a bunch of other important things. How can I remove just those several things that I wanted to?
kevdog
November 22nd, 2008, 05:49 PM
I may have said this once, but this is a really nice and well written guide. The edits are tremendous! Please keep maintaining this guide and write other guides if you get a chance
cloggie
November 22nd, 2008, 06:03 PM
Hi,
I must be the dummest fool around. I did follow your tutorial to the letter, went over my Synaptic to see if it was all deleted, and it was, so I did not have any ffmpeg or x264 stuff left, as far as I could see.
But upon installing the newly made x264 it gives me an error, saying "Failed".
The logfile tells me this:
(Reading database ... 124549 files and directories currently installed.)
Preparing to replace x264 1:0.svn20071224-0.0ubuntu1 (using .../x264_1:0.svn20081122-0.0ubuntu1-1_i386.deb) ...
Unpacking replacement x264 ...
dpkg: error processing /home/will/x264/x264_1:0.svn20081122-0.0ubuntu1-1_i386.deb (--install):
trying to overwrite `/usr/lib/pkgconfig/x264.pc', which is also in package libx264-dev
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/home/will/x264/x264_1:0.svn20081122-0.0ubuntu1-1_i386.deb
On another note, I found that libx264 for instance was still installed, but when I wanted to uninstal it through Synaptic, I also saw that al the other stuff as mentioned by Seauzy13 was going to get deleted. So I halted this . But how further?
So, what is going wrong here, what am I missing?
Could you please help me?
Thanks, Will.
FakeOutdoorsman
November 22nd, 2008, 11:06 PM
I have a problem on the first step. When I try to purge all those packages, apt wants to also remove mplayer, vlc, avidemux, mencoder, ogmrip, mythtv, and a bunch of other important things. How can I remove just those several things that I wanted to?
This is the result of me making assumptions and not testing well enough. I thought libx264-59 (or libx264-57 in Hardy) would cause issues with the compiled x264, but it doesn't seem to as far as I can tell. It used to conflict because the shared libraries used to have the same name at one time (I think), but not anymore.
So, to summarize, you can keep libx264-59, which is what all those other programs require. Unfortunately, those other programs are probably not going to use your compiled x264 to encode with (another assumption) unless you compile them too. Alternatively, you could make a symlink to the new x264 libraries, but that's a messy way of doing things and not generally recommended and may not actually work (although I admit to doing it sometimes).
I may have said this once, but this is a really nice and well written guide. The edits are tremendous! Please keep maintaining this guide and write other guides if you get a chance
Thanks, kevdog. I have some others planned, but this one is the most interesting so far.
...
On another note, I found that libx264 for instance was still installed, but when I wanted to uninstal it through Synaptic, I also saw that al the other stuff as mentioned by Seauzy13 was going to get deleted. So I halted this . But how further?
So, what is going wrong here, what am I missing?
Could you please help me?
You did everything right, but the guide was flawed. It's updated now. It seems as if libx264-dev is installed on your machine. You could probably remove it without any issues because I don't think it has any dependent packages:
sudo apt-get remove libx264-dev
Then try x264 to install x264 again. Starting with this line:
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1"
DilfATX
November 23rd, 2008, 06:12 AM
Excellent guide and I felt confident everything was going to go well..
but I got this error
libfaac doesn't support this output format!
and am not sure how to change that? when I clicked on the mp4 file it was 0 bytes after all that time going through its process.
here is the whole break down
rey@dilfATX:~$ ./264encode.sh 00060.MTS output.mp4
FFmpeg version SVN-r15908, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 12:41:12, gcc: 4.3.2
Input #0, mpegts, from '00060.MTS':
Duration: 00:02:43.64, start: 1.033367, bitrate: 17333 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, mp4, to '/dev/null':
Stream #0.0: Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=10-51, pass 1, 512 kb/s, 29.97 tb(c)
Stream mapping:
Stream #0.0 -> #0.0
[libx264 @ 0xa169990]using SAR=1/1
[libx264 @ 0xa169990]using cpu capabilities: MMX2 SSE2Slow
[libx264 @ 0xa169990]profile Main, level 4.0
Press [q] to stop encoding
frame= 9808 fps= 7 q=-1.0 Lsize= 0kB time=327.23 bitrate= 0.0kbits/s .0kbits/s
video:20584kB audio:0kB global headers:1kB muxing overhead -99.999995%
[libx264 @ 0xa169990]slice I:40 Avg QP:35.23 size: 27162
[libx264 @ 0xa169990]slice P:4151 Avg QP:37.79 size: 3983
[libx264 @ 0xa169990]slice B:5617 Avg QP:39.90 size: 613
[libx264 @ 0xa169990]consecutive B-frames: 16.9% 23.6% 4.9% 25.7% 28.7% 0.2% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0%
[libx264 @ 0xa169990]mb I I16..4: 82.7% 0.0% 17.3%
[libx264 @ 0xa169990]mb P I16..4: 8.6% 0.0% 0.0% P16..4: 10.3% 0.0% 0.0% 0.0% 0.0% skip:81.1%
[libx264 @ 0xa169990]mb B I16..4: 0.3% 0.0% 0.0% B16..8: 4.1% 0.0% 0.0% direct: 0.3% skip:95.4% L0:32.6% L1:66.6% BI: 0.8%
[libx264 @ 0xa169990]final ratefactor: 38.76
[libx264 @ 0xa169990]SSIM Mean Y:0.8341146
[libx264 @ 0xa169990]kb/s:514.8
FFmpeg version SVN-r15908, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 12:41:12, gcc: 4.3.2
Input #0, mpegts, from '00060.MTS':
Duration: 00:02:43.64, start: 1.033367, bitrate: 17333 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, mp4, to 'output.mp4':
Stream #0.0: Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=10-51, pass 2, 512 kb/s, 29.97 tb(c)
Stream #0.1: Audio: libfaac, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[libx264 @ 0xa40a990]using SAR=1/1
[libx264 @ 0xa40a990]using cpu capabilities: MMX2 SSE2Slow
[libx264 @ 0xa40a990]profile High, level 4.0
[libfaac @ 0xa40c6c0]libfaac doesn't support this output format!
Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
rey@dilfATX:~$
I would gladly take any suggestions :-)
FakeOutdoorsman
November 23rd, 2008, 07:34 AM
Excellent guide and I felt confident everything was going to go well..
but I got this error
libfaac doesn't support this output format!
This is a new error for me. I tried converting a 5.1 channel ac3 file and got no errors. I don't know why, but it looks like libfaac isn't getting the audio rate. Let's cut out the video and use the same audio settings as the script to see if the error can be replicated:
ffmpeg -i 00060.MTS -vn -acodec libfaac -ab 128k -ac 2 -f mp4 output.mp4
cloggie
November 23rd, 2008, 05:56 PM
I got basically the same error as DilFATX.
I used your line, but then got this:
will@will-laptop:~/Documents$ ffmpeg -i 100_2943.MOV -vn -acodec libfaac -ab 128k -ac 2 -f mp4 output.mp4
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Jul 29 2008 18:21:25, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Seems stream 0 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 15.00 (3468000/231150)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '100_2943.MOV':
Duration: 00:00:57.7, start: 0.000000, bitrate: 1874 kb/s
Stream #0.0(eng): Video: h263, yuv420p, 352x288, 15.00 fps(r)
Stream #0.1(eng): Audio: pcm_mulaw, 8000 Hz, mono, 64 kb/s
Unknown codec 'libfaac'
I thought, ***, I know libfaac is installed. Because when I do this:
will@will-laptop:~/Documents$ whereis libfaac
libfaac: /usr/lib/libfaac.la /usr/lib/libfaac.so /usr/lib/libfaac.a /usr/local/lib/libfaac.la /usr/local/lib/libfaac.so /usr/local/lib/libfaac.a
I get to see the whole thing, isn't it?
So why am I getting the same problem then? I mean, it should be possible to convert .mov into mp4 right? When I go from a mpg file to mp4 I don't get this problem, even when I do a straight conversion with ffmpeg, like this:
will@will-laptop:~/Documents$ ffmpeg -i rooftoporg.mpg rooftprogsunday.mp4
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Jul 29 2008 18:21:25, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Input #0, mpeg, from 'rooftoporg.mpg':
Duration: 00:03:21.5, start: 0.726700, bitrate: 1401 kb/s
Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 352x240, 1150 kb/s, 29.97 fps(r)
Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, stereo, 192 kb/s
Output #0, mp4, to 'rooftprogsunday.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 352x240, q=2-31, 200 kb/s, 29.97 fps(c)
Stream #0.1: Audio: aac, 44100 Hz, stereo, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 6075 q=18.2 Lsize= 6860kB time=202.6 bitrate= 277.4kbits/s
video:5161kB audio:1580kB global headers:0kB muxing overhead 1.760572%
will@will-laptop:~/Documents$
So could it have something to do with the type of input file maybe?
DilfATX
November 23rd, 2008, 08:01 PM
This is a new error for me. I tried converting a 5.1 channel ac3 file and got no errors. I don't know why, but it looks like libfaac isn't getting the audio rate. Let's cut out the video and use the same audio settings as the script to see if the error can be replicated:
ffmpeg -i 00060.MTS -vn -acodec libfaac -ab 128k -ac 2 -f mp4 output.mp4
I tried that in terminal and got this
rey@dilfATX:~$ ffmpeg -i 00060.MTS -vn -acodec libfaac -ab 128k -ac 2 -f mp4 output.mp4
FFmpeg version SVN-r15908, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 12:41:12, gcc: 4.3.2
Input #0, mpegts, from '00060.MTS':
Duration: 00:02:43.64, start: 1.033367, bitrate: 17333 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, mp4, to 'output.mp4':
Stream #0.0: Audio: libfaac, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
[libfaac @ 0x8b56990]libfaac doesn't support this output format!
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
rey@dilfATX:~$
Can I change the output format for "libfaac"? if so to what? and how? Thanks greatly for your help on this I didn't expect such a quick reply to my question :popcorn:
andrew.46
November 23rd, 2008, 09:08 PM
Hi:
Can I change the output format for "libfaac"? if so to what? and how? Thanks greatly for your help on this I didn't expect such a quick reply to my question :popcorn:
I am at the wrong computer at the moment but instead of mp4 have you tried m4a? It would be a bit fussy of ffmpeg to insist on this but worth a try.
Andrew
Edit: Not for the first time I am talking rubbish :-). I fired up my Ubuntu partition and the commandline worked fine:
andrew@skamandros:~/Desktop$ ffmpeg -i rappin.wav -vn -acodec libfaac \
-ab 128k -ac 2 -f mp4 output.mp4
FFmpeg version SVN-r15918, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-nonfree --enable-postproc
--enable-pthreads --enable-libamr-nb --enable-libamr-wb --enable-libmp3lame
--enable-libschroedinger --enable-libx264 --enable-libxvid --enable-libfaac
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 24 2008 07:32:33, gcc: 4.3.2
Input #0, wav, from 'rappin.wav':
Duration: 00:00:19.95, bitrate: 31 kb/s
Stream #0.0: Audio: mp3, 22050 Hz, mono, s16, 32 kb/s
Output #0, mp4, to 'output.mp4':
Stream #0.0: Audio: libfaac, 22050 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
size= 153kB time=19.88 bitrate= 62.9kbits/s
video:0kB audio:149kB global headers:0kB muxing overhead 2.636834%
FakeOutdoorsman
November 23rd, 2008, 11:20 PM
I got basically the same error as DilFATX.
I used your line, but then got this:
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Jul 29 2008 18:21:25, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
...
This looks like ffmpeg from Medibuntu on Ubuntu Hardy. That version uses different codec names, so "-acodec libfaac" should be "-acodec aac".
I tried that in terminal and got this
...
Can I change the output format for "libfaac"? if so to what? and how? Thanks greatly for your help on this I didn't expect such a quick reply to my question :popcorn:
This is odd. Are you on Hardy or Intrepid? I can't replicate this error. Four more test commands:
ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 48000 -ab 128k -ac 2 -f mp4 output.mp4
ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 48000 -ab 128k -f mp4 output.mp4
ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 44100 -ab 128k -ac 2 -f mp4 output.mp4
ffmpeg -i 00060.MTS output.aac
cloggie
November 24th, 2008, 06:15 AM
This looks like ffmpeg from Medibuntu on Ubuntu Hardy. That version uses different codec names, so "-acodec libfaac" should be "-acodec aac".
Fakeoutdoorsman, thanks for your quick reply every time.
I went over the install again, with a finetoothed comb, and reinstalled the whole ffmpeg again. Now the version reads :
FFmpeg version SVN-r15920, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
And according to what I think, this should be really the latest version of ffmpeg, right?
I did a straight conversion from MOV to mp4 again, the second try I used the 2 pass method, described by you on page one, and, again, I get that same error.
[libfaac @ 0x885bb00]libfaac doesn't support this output format!
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Again, from mpg to mp4 it works without a hitch, but when I try a .mov, it fails on me.
So that's what got me thinking, could it have something todo with the starting format? Am I missing a de- or en-coder or something like that?
(I know, probably a dumb question, but then again, I know nothing about this stuff)
cloggie
November 24th, 2008, 06:28 AM
Right after my reply, I used the suggestions you made to DilfATX.
The first suggestion gave me this:
will@will-laptop:~/Documents$ ffmpeg -i harvest.mov -vn -acodec libfaac -ar 48000 -ab 128k -ac 2 -f mp4 outputharvest.mp4
FFmpeg version SVN-r15920, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 23 2008 20:30:18, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Seems stream 0 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 15.00 (23120/1541)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'harvest.mov':
Duration: 00:00:57.78, start: 0.000000, bitrate: 1874 kb/s
Stream #0.0(eng): Video: h263, yuv420p, 352x288 [PAR 12:11 DAR 4:3], 15.00 tb(r)
Stream #0.1(eng): Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Output #0, mp4, to 'outputharvest.mp4':
Stream #0.0(eng): Audio: libfaac, 48000 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 546kB time=57.71 bitrate= 77.6kbits/s
video:0kB audio:525kB global headers:0kB muxing overhead 4.137723%
So that seemed to work.
The second suggestion gave this:
will@will-laptop:~/Documents$ ffmpeg -i harvest.mov -vn -acodec libfaac -ar 48000 -ab 128k -f mp4 outputharvest2.mp4
FFmpeg version SVN-r15920, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 23 2008 20:30:18, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Seems stream 0 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 15.00 (23120/1541)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'harvest.mov':
Duration: 00:00:57.78, start: 0.000000, bitrate: 1874 kb/s
Stream #0.0(eng): Video: h263, yuv420p, 352x288 [PAR 12:11 DAR 4:3], 15.00 tb(r)
Stream #0.1(eng): Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Output #0, mp4, to 'outputharvest2.mp4':
Stream #0.0(eng): Audio: libfaac, 48000 Hz, mono, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 540kB time=57.71 bitrate= 76.7kbits/s
video:0kB audio:518kB global headers:0kB muxing overhead 4.187221%
So that seems to work as well.
The third suggestion:
will@will-laptop:~/Documents$ ffmpeg -i harvest.mov -vn -acodec libfaac -ar 44100 -ab 128k -ac 2 -f mp4 outputharvest3.mp4
FFmpeg version SVN-r15920, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 23 2008 20:30:18, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Seems stream 0 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 15.00 (23120/1541)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'harvest.mov':
Duration: 00:00:57.78, start: 0.000000, bitrate: 1874 kb/s
Stream #0.0(eng): Video: h263, yuv420p, 352x288 [PAR 12:11 DAR 4:3], 15.00 tb(r)
Stream #0.1(eng): Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Output #0, mp4, to 'outputharvest3.mp4':
Stream #0.0(eng): Audio: libfaac, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 545kB time=57.70 bitrate= 77.3kbits/s
video:0kB audio:525kB global headers:0kB muxing overhead 3.810981%
Again, that worked for me, so now the last one:
will@will-laptop:~/Documents$ ffmpeg -i harvest.mov outputharvest4.aac
FFmpeg version SVN-r15920, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 23 2008 20:30:18, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Seems stream 0 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 15.00 (23120/1541)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'harvest.mov':
Duration: 00:00:57.78, start: 0.000000, bitrate: 1874 kb/s
Stream #0.0(eng): Video: h263, yuv420p, 352x288 [PAR 12:11 DAR 4:3], 15.00 tb(r)
Stream #0.1(eng): Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
Output #0, adts, to 'outputharvest4.aac':
Stream #0.0(eng): Audio: libfaac, 8000 Hz, mono, s16, 64 kb/s
Stream mapping:
Stream #0.1 -> #0.0
[libfaac @ 0x885bb20]libfaac doesn't support this output format!
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
.....and as you can see, that's where the train stopped!
So does this tell you enough? If not, I would like to try more suggestions.
Again, thanks for the quick reply everytime.
DilfATX
November 24th, 2008, 06:30 AM
This looks like ffmpeg from Medibuntu on Ubuntu Hardy. That version uses different codec names, so "-acodec libfaac" should be "-acodec aac".
This is odd. Are you on Hardy or Intrepid? I can't replicate this error. Four more test commands:
ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 48000 -ab 128k -ac 2 -f mp4 output.mp4
ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 48000 -ab 128k -f mp4 output.mp4
ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 44100 -ab 128k -ac 2 -f mp4 output.mp4
ffmpeg -i 00060.MTS output.aac
First like to say I sincerely appreciate the quick responses..and im going to go down this list and try them out see if one works..
BTW Im using Intrepid ubuntu 8.10
DilfATX
November 24th, 2008, 06:31 AM
Here is the output of the first command btw
rey@dilfATX:~$ ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 48000 -ab 128k -ac 2 -f mp4 output.mp4
FFmpeg version SVN-r15908, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 12:41:12, gcc: 4.3.2
Input #0, mpegts, from '00060.MTS':
Duration: 00:02:43.64, start: 1.033367, bitrate: 17333 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, mp4, to 'output.mp4':
Stream #0.0: Audio: libfaac, 48000 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 2616kB time=163.61 bitrate= 131.0kbits/s
video:0kB audio:2556kB global headers:0kB muxing overhead 2.366823%
rey@dilfATX:~$
I got a 2mb file (the original .mts file is 338.2mb) and it was all audio but sounded great..
DilfATX
November 24th, 2008, 06:34 AM
This is the output of the second command
rey@dilfATX:~$ ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 48000 -ab 128k -f mp4 output.mp4
FFmpeg version SVN-r15908, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 12:41:12, gcc: 4.3.2
Input #0, mpegts, from '00060.MTS':
Duration: 00:02:43.64, start: 1.033367, bitrate: 17333 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, mp4, to 'output.mp4':
Stream #0.0: Audio: libfaac, 48000 Hz, 0 channels, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
[libfaac @ 0x8d09990]encoding 0 channel(s) is not allowed
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
rey@dilfATX:~$
DilfATX
November 24th, 2008, 06:39 AM
this is the output of the third command
rey@dilfATX:~$ ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 44100 -ab 128k -ac 2 -f mp4 output.mp4
FFmpeg version SVN-r15908, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 12:41:12, gcc: 4.3.2
Input #0, mpegts, from '00060.MTS':
Duration: 00:02:43.64, start: 1.033367, bitrate: 17333 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
File 'output.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'output.mp4':
Stream #0.0: Audio: libfaac, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 2612kB time=163.61 bitrate= 130.8kbits/s
video:0kB audio:2556kB global headers:0kB muxing overhead 2.175919%
rey@dilfATX:~$
this one also gave me a 2 mb audio file and also sounded good. like the other audio file there was no video.
DilfATX
November 24th, 2008, 06:39 AM
this is the output of the third command
rey@dilfATX:~$ ffmpeg -i 00060.MTS -vn -acodec libfaac -ar 44100 -ab 128k -ac 2 -f mp4 output.mp4
FFmpeg version SVN-r15908, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 12:41:12, gcc: 4.3.2
Input #0, mpegts, from '00060.MTS':
Duration: 00:02:43.64, start: 1.033367, bitrate: 17333 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
File 'output.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'output.mp4':
Stream #0.0: Audio: libfaac, 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
size= 2612kB time=163.61 bitrate= 130.8kbits/s
video:0kB audio:2556kB global headers:0kB muxing overhead 2.175919%
rey@dilfATX:~$
this one also gave me a 2 mb audio file and also sounded good. like the other audio file there was no video.
DilfATX
November 24th, 2008, 06:41 AM
This is the output of the fourth command
rey@dilfATX:~$ ffmpeg -i 00060.MTS output.aac
FFmpeg version SVN-r15908, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 12:41:12, gcc: 4.3.2
Input #0, mpegts, from '00060.MTS':
Duration: 00:02:43.64, start: 1.033367, bitrate: 17333 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, adts, to 'output.aac':
Stream #0.0: Audio: libfaac, 0 channels, s16, 64 kb/s
Stream mapping:
Stream #0.1 -> #0.0
[libfaac @ 0xa0ea990]encoding 0 channel(s) is not allowed
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
rey@dilfATX:~$
It gave me an aac file with no audio and was at 0kb
DilfATX
November 24th, 2008, 06:42 AM
This is the output of the fourth command
rey@dilfATX:~$ ffmpeg -i 00060.MTS output.aac
FFmpeg version SVN-r15908, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 12:41:12, gcc: 4.3.2
Input #0, mpegts, from '00060.MTS':
Duration: 00:02:43.64, start: 1.033367, bitrate: 17333 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 tb(r)
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Output #0, adts, to 'output.aac':
Stream #0.0: Audio: libfaac, 0 channels, s16, 64 kb/s
Stream mapping:
Stream #0.1 -> #0.0
[libfaac @ 0xa0ea990]encoding 0 channel(s) is not allowed
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
rey@dilfATX:~$
It gave me an aac file with no audio and was at 0kb
cloggie
November 24th, 2008, 06:51 AM
YEEEEEEEEEEEEEEEEEEEEEEEEES.
I found my problem!!!!!!!!!!!!!!!!1
What I tried to do was converting a mov file to a mp4 file, as you can see.
The reason for this was that my Sony Walkman could only play mp4 files.
Because of the suggestions you gave me, I found out that it of course had nothing todo with the input file format.
I just fussed around and around with your first suggestion, saw what the "-vn" stood for (stripping the video part of the movie) and went from there. Then my player wouldn't play it still but then I thought, maybe this has something todo with the size of the frame. The output was always 352x288 and my player could only handle 320x240. So I forced this by adding "-s 320x240" to your line and voila, it worked!. My player is happy now, and I am happy.
Thanks for your support again, hope to be able to return the favor one day.
Will.
cloggie
November 24th, 2008, 07:09 AM
Damn, I was too quick. Tried the whole thing with a new .mov file, and again get into trouble.
Ah well, it's time to hit the sack, my cows are waiting for me tomorrow again, hahaha.
Will try later this week.
FakeOutdoorsman
November 24th, 2008, 07:55 AM
...
Again, from mpg to mp4 it works without a hitch, but when I try a .mov, it fails on me.
Are you using the 264encode.sh script from the first page of this guide? It doesn't specify an audio rate because I assumed libfaac (the aac audio encoder) could figure most things out on it's own, but apparently it can't always. Your mov file has an audio rate that isn't compatible with libfaac, so you have to specify it. So, the second line (Pass 2) needs "-ar 44100", which should be a safe number for playback on most portable players:
# Pass 2
ffmpeg -y -i $1 -pass 2 -b 512k -bt 512k -vcodec libx264 -acodec libfaac -ar 44100 etc...
First like to say I sincerely appreciate the quick responses..and im going to go down this list and try them out see if one works..
BTW Im using Intrepid ubuntu 8.10
Are you also trying 264encode.sh? libfaac should be able to work with no issues for your input file, but I'm not sure what the deal is. Looks like you will have to tell it the audio rate and the number of channels for it to work. One the "# Pass 2" line, I recommend adding "-ar 48000" (or 44100), and "-ac 2" for stereo or "-ac 5.1" for surround sound like the original file. What are you converting this file for? If you use 264encode.sh then it will take a while to convert the video, but you may not need to convert it at all since it is already h264 video. It all depends on what it is being converted for.
DilfATX
November 24th, 2008, 08:05 AM
Are you using the 264encode.sh script from the first page of this guide? It doesn't specify an audio rate because I assumed libfaac (the aac audio encoder) could figure most things out on it's own, but apparently it can't always. Your mov file has an audio rate that isn't compatible with libfaac, so you have to specify it. So, the second line (Pass 2) needs "-ar 44100", which should be a safe number for playback on most portable players:
# Pass 2
ffmpeg -y -i $1 -pass 2 -b 512k -bt 512k -vcodec libx264 -acodec libfaac -ar 44100 etc...
Are you also trying 264encode.sh? libfaac should be able to work with no issues for your input file, but I'm not sure what the deal is. Looks like you will have to tell it the audio rate and the number of channels for it to work. One the "# Pass 2" line, I recommend adding "-ar 48000" (or 44100), and "-ac 2" for stereo or "-ac 5.1" for surround sound like the original file. What are you converting this file for? If you use 264encode.sh then it will take a while to convert the video, but you may not need to convert it at all since it is already h264 video. It all depends on what it is being converted for.
I am converting this for home videos on DVD.. and yes i followed your commands all the way.. i am trying the 254encode.sh ... would it be much trouble if somebody can make a quick youtube type video on how to on your guide..i did a search on youtube and somebody did it with another guide for mts files.. this one though seems like a better bet..
FakeOutdoorsman
November 24th, 2008, 11:13 PM
I am converting this for home videos on DVD.. and yes i followed your commands all the way.. i am trying the 254encode.sh ... would it be much trouble if somebody can make a quick youtube type video on how to on your guide..i did a search on youtube and somebody did it with another guide for mts files.. this one though seems like a better bet..
Are you trying to make archive quality videos to put in a DVD as data files, or are you trying to make a video DVD that would work in a standard DVD player?
dude1981
November 25th, 2008, 10:13 PM
Hello,
first of all thanks to this great tutorial.
Unfortunately I receive an error when I try to convert a mkv-Movie:
ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init
I try to convert with the following command:
ffmpeg -i $1 -threads 1 -vcodec libx264 -sameq -b 5000k -acodec copy -r 24 output.avi
Does anybody have an idea how I can fix that error?
FakeOutdoorsman
November 26th, 2008, 08:46 AM
Does anybody have an idea how I can fix that error?
I'm going to be out of town until Saturday, but I can take a look at this when I get back. Do you get this same error when you use the example script from the first page of the guide? It could also be a problem with the particular ffmpeg revision since this is bleeding-edge and problems do show up once in a while.
dude1981
November 27th, 2008, 09:34 PM
I made an update of my installation like described at the first page and receive still the same error. When I run it like the example on the first page, I receive the same error...
Would be great if you can have a look on it. I'll be back on Sunday or Tuesday night...
FakeOutdoorsman
November 30th, 2008, 02:45 AM
I made an update of my installation like described at the first page and receive still the same error. When I run it like the example on the first page, I receive the same error...
Would be great if you can have a look on it. I'll be back on Sunday or Tuesday night...
Show your command and the full output of ffmpeg. Also show the output of:
dpkg -S $(readlink -f /usr/local/lib/libavcodec.so.52)
andrew.46
December 1st, 2008, 08:57 AM
Hi,
Hope you don't mind but I have duplicated your naming scheme for x264 on my svn MPlayer guide (http://ubuntuforums.org/showthread.php?t=558538). Works nicely and escapes all the repository overwriting problems. I have printed an acknowledgement and a link to your ffmpeg page.
All the very best,
Andrew
FakeOutdoorsman
December 1st, 2008, 08:44 PM
Thanks, Andrew, although I borrowed the date structure from your guide and the idea came from Ng some posts ago.
dude1981
December 2nd, 2008, 08:54 AM
Show your command and the full output of ffmpeg. Also show the output of:
dpkg -S $(readlink -f /usr/local/lib/libavcodec.so.52)
dpkg -S $(readlink -f /usr/local/lib/libavcodec.so.52)
dpkg: /usr/local/lib/libavcodec.so.52.3.0 not found.
ffmpeg -y -i input.mkv -pass 1 -b 512k -bt 512k -vcodec libx264 -an -threads 0 -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method dia -subq 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 1 -directpred 1 -bidir_refine 0 -trellis 0 -flags2 -bpyramid-wpred-mixed_refs-dct8x8+fastpskip -f mp4 /dev/null
ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init
Thanks
ercdvs
December 3rd, 2008, 07:57 PM
dpkg -S $(readlink -f /usr/local/lib/libavcodec.so.52)
dpkg: /usr/local/lib/libavcodec.so.52.3.0 not found.
ffmpeg -y -i input.mkv -pass 1 -b 512k -bt 512k -vcodec libx264 -an -threads 0 -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method dia -subq 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 1 -directpred 1 -bidir_refine 0 -trellis 0 -flags2 -bpyramid-wpred-mixed_refs-dct8x8+fastpskip -f mp4 /dev/null
ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init
Thanks
Call me stupid, but why are you recoding the h264 video again? mp4 containers should be able to take that video as is. I tried your command line and it seemed to work fine on my build:
FFmpeg version SVN-r15970, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-swscale --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libxvid --enable-zlib --enable-libx264 --enable-libvorbis --enable-libtheora --enable-pthreads
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 5. 0 / 52. 5. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Dec 1 2008 10:08:55, gcc: 4.3.2
looking back, if you are running it with this command :
ffmpeg -i $1 -threads 1 -vcodec libx264 -sameq -b 5000k -acodec copy -r 24 output.avi
you might be crashing out for a few reasons.
What is the audio and video in the MKV? .avi might not support the audio you are trying to put in there. Especially since this command shows an .avi file output, and a format of mp4 in the last you posted.
The 2 most common audio formats in MKV are DTS and AC3 .. ac3 is not supported in an MP4 container (but it is in avi) .. FFMpeg is currently unable to transcode ac3 (or dts) to the proper AAC needed for mp4. Also the presence of b frames *really* screw up ffmpeg encoding. This, plus the fact that the channel mapping is usually wrong, caused me to 100% give up on FFMPEG for any mkv transcoding whatsoever.
akm3
December 7th, 2008, 12:29 AM
Hello,
Thanks for the great tutorial.
I have a very trivial question.
I hope that somebody can help me.
I want to compile, output_example.c in ffmpeg folder to test it and create a .mpg file.
How can I do it?
I've tried using "make" or "gcc", here is my results:
alireza@ubuntu:~/ffmpeg$ make output_example.c
make: Nothing to be done for `output_example.c'.
alireza@ubuntu:~/ffmpeg$ gcc -o output output_example.c
/tmp/ccqaXNi3.o: In function `add_audio_stream':
output_example.c:(.text+0x15): undefined reference to `av_new_stream'
/tmp/ccqaXNi3.o: In function `open_audio':
output_example.c:(.text+0xb4): undefined reference to `avcodec_find_encoder'
output_example.c:(.text+0x100): undefined reference to `avcodec_open'
output_example.c:(.text+0x1aa): undefined reference to `av_malloc'
output_example.c:(.text+0x221): undefined reference to `av_malloc'
/tmp/ccqaXNi3.o: In function `get_audio_frame':
output_example.c:(.text+0x24b): undefined reference to `sin'
/tmp/ccqaXNi3.o: In function `write_audio_frame':
output_example.c:(.text+0x2d9): undefined reference to `av_init_packet'
output_example.c:(.text+0x32c): undefined reference to `avcodec_encode_audio'
output_example.c:(.text+0x389): undefined reference to `av_rescale_q'
output_example.c:(.text+0x3ba): undefined reference to `av_write_frame'
/tmp/ccqaXNi3.o: In function `close_audio':
output_example.c:(.text+0x409): undefined reference to `avcodec_close'
output_example.c:(.text+0x416): undefined reference to `av_free'
output_example.c:(.text+0x423): undefined reference to `av_free'
/tmp/ccqaXNi3.o: In function `add_video_stream':
output_example.c:(.text+0x43e): undefined reference to `av_new_stream'
/tmp/ccqaXNi3.o: In function `alloc_picture':
output_example.c:(.text+0x58b): undefined reference to `avcodec_alloc_frame'
output_example.c:(.text+0x5b6): undefined reference to `avpicture_get_size'
output_example.c:(.text+0x5c4): undefined reference to `av_malloc'
output_example.c:(.text+0x5d8): undefined reference to `av_free'
output_example.c:(.text+0x608): undefined reference to `avpicture_fill'
/tmp/ccqaXNi3.o: In function `open_video':
output_example.c:(.text+0x633): undefined reference to `avcodec_find_encoder'
output_example.c:(.text+0x67f): undefined reference to `avcodec_open'
output_example.c:(.text+0x6e5): undefined reference to `av_malloc'
/tmp/ccqaXNi3.o: In function `write_video_frame':
output_example.c:(.text+0x95b): undefined reference to `sws_getContext'
output_example.c:(.text+0xa12): undefined reference to `sws_scale'
output_example.c:(.text+0xa5b): undefined reference to `av_init_packet'
output_example.c:(.text+0xa8d): undefined reference to `av_write_frame'
output_example.c:(.text+0xabd): undefined reference to `avcodec_encode_video'
output_example.c:(.text+0xad5): undefined reference to `av_init_packet'
output_example.c:(.text+0xb2f): undefined reference to `av_rescale_q'
output_example.c:(.text+0xb76): undefined reference to `av_write_frame'
/tmp/ccqaXNi3.o: In function `close_video':
output_example.c:(.text+0xbe2): undefined reference to `avcodec_close'
output_example.c:(.text+0xbf1): undefined reference to `av_free'
output_example.c:(.text+0xbfe): undefined reference to `av_free'
output_example.c:(.text+0xc16): undefined reference to `av_free'
output_example.c:(.text+0xc23): undefined reference to `av_free'
output_example.c:(.text+0xc30): undefined reference to `av_free'
/tmp/ccqaXNi3.o: In function `main':
output_example.c:(.text+0xc4b): undefined reference to `av_register_all'
output_example.c:(.text+0xca0): undefined reference to `guess_format'
output_example.c:(.text+0xcd1): undefined reference to `guess_format'
output_example.c:(.text+0xd10): undefined reference to `av_alloc_format_context'
output_example.c:(.text+0xddd): undefined reference to `av_set_parameters'
output_example.c:(.text+0xe34): undefined reference to `dump_format'
output_example.c:(.text+0xe8e): undefined reference to `url_fopen'
output_example.c:(.text+0xec6): undefined reference to `av_write_header'
output_example.c:(.text+0x1002): undefined reference to `av_write_trailer'
output_example.c:(.text+0x1023): undefined reference to `av_freep'
output_example.c:(.text+0x103a): undefined reference to `av_freep'
output_example.c:(.text+0x1066): undefined reference to `url_fclose'
output_example.c:(.text+0x1071): undefined reference to `av_free'
collect2: ld returned 1 exit status
Can anybody help me compile this in linux?
(I am using Ubuntu 8.1)
Thanks.
PS: I have installed all of the ffmpeg material according to the instructions in page 1 successfully
FakeOutdoorsman
December 7th, 2008, 02:25 AM
Hello,
Thanks for the great tutorial.
I have a very trivial question.
I hope that somebody can help me.
I want to compile, output_example.c in ffmpeg folder to test it and create a .mpg file.
How can I do it?
I got it to compile with:
cd ~/ffmpeg
make output_example
It then created "output_example" in the ffmpeg directory. I don't know how to actually use output_example though.
akm3
December 7th, 2008, 02:32 AM
I got it to compile with:
cd ~/ffmpeg
make output_example
It then created "output_example" in the ffmpeg directory. I don't know how to actually use output_example though.
Thanks,
It got compiled.
I think you should use it like this:
alireza@ubuntu:~/ffmpeg$ ./output_example test.mpg
it simply creates a file called "test.mpg"(or Whatever name and format you specify).I don't know if any other capabilities it has.
psychok9
December 11th, 2008, 06:07 AM
Thank you for your guide! Very nice!
ymark
December 14th, 2008, 06:40 PM
Hi all,
Please help me..i have an error after installing ffmpeg.
When i run ffmpeg i got ehis error :
"ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init"
and with : readlink -f /usr/local/lib/libavcodec.so.52
i got : /usr/local/lib/libavcodec.so.52.6.1
i checked and the "libavcodec.so.52.6.1" and "libavcodec.so.52" are there.
:-?
Thanks,
ymark
FakeOutdoorsman
December 15th, 2008, 06:12 AM
Hi all,
Please help me..i have an error after installing ffmpeg.
When i run ffmpeg i got ehis error :
"ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init"
and with : readlink -f /usr/local/lib/libavcodec.so.52
i got : /usr/local/lib/libavcodec.so.52.6.1
i checked and the "libavcodec.so.52.6.1" and "libavcodec.so.52" are there.
:-?
Thanks,
ymark
There is a conflict with a package, but I'm not totally sure which one it is (probably one of the libavcodecs). Give the output of:
dpkg --get-selections | grep libav
ymark
December 15th, 2008, 07:54 PM
I found the problem. Before compiling ffmpeg i installed mencoder.
i've compiled the latest mencoder.
I've installed a new virtual machine with ubuntu and installed first ffmpeg and after mencoder and both work! with h264 and win32dll enabled.
step 0: change repositoris to main server
step 1: sudo apt-get install subversion
---------------------instaling x264 for ffmpeg
step 2: sudo apt-get install git
step 3: sudo apt-get install git-core
step 4: git clone git://git.videolan.org/x264.git
step 5: sudo sh configure --enable-shared --disable-asm
step 6: sudo make install
---------------------installing FFMPEG from subversion
step 7: svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
step 8: sudo sh configure --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-shared --enable-libfaac --enable-libfaad --enable-gpl --enable-libtheora --enable-libx264
step 9: cd /etc/ld.so.conf.d
step 10: sudo pico custom-libs.conf
step 11: write "/usr/local/lib" in the file
step 12: sudo ldconfig
---------------------Instaling MENCODER from subversion
step 13: svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
step 14: sudo apt-get install libpng12-dev libjpeg62-dev
step 15: sudo sh configure --enable-win32dll
step 16: sudo make install
step 17: wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20061022.tar.bz2
step 18: tar xjvf all-20061022.tar.bz2
step 19: sudo mkdir /usr/local/lib/codecs/
step 20: sudo cp /home/linux/mplayer/all-20061022/*.* /usr/local/lib/codecs/
and it works :D
andrew.46
December 15th, 2008, 08:28 PM
Hi ymark,
step 17: wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20061022.tar.bz2
There is a newer codec pack available here:
http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2
Andrew
seenxu
December 18th, 2008, 01:11 PM
thx for the detailed tutorial.
andrew.46
December 21st, 2008, 12:21 PM
Hi fakeoutdoorsman,
A quick note to say thanks again for this great guide which I have used again in my re-installation o Intrepid Ibex!
As well a small suggestion that may or not have a place in your guide, but probably a more definite use in your own compiling and recompiling of ffmpeg. When I compile ffmpeg or MPlayer I make use of the -jobs feature of make to speed up the compiling process substantially. So instead of running:
./configure
make
sudo checkinstall
I run:
./configure
make --jobs=5
sudo checkinstall
This works well with ffmpeg and saves a huge amount of compiling time, although I have not set a stopwatch to it. I note that Patrick Volkerding of Slackware (my other distro) sets his compile scripts a little like this:
./configure
make --jobs=5 || make
sudo checkinstall
which is very safe as obviously if the --jobs=5 syntax fails for any reason a standard 'make' will occur. (a Boolean OR that executes the command on the right if the command on the left fails.)
Just a thought, feel free to ignore it :-).
Andrew
psychok9
December 21st, 2008, 05:18 PM
Can I improve ffmpeg/x264 efficiency for using my quadcore processor? On the 2nd pass I see 54% usage of cpu.
FakeOutdoorsman
December 21st, 2008, 10:08 PM
Hi fakeoutdoorsman,
A quick note to say thanks again for this great guide which I have used again in my re-installation o Intrepid Ibex!
As well a small suggestion that may or not have a place in your guide, but probably a more definite use in your own compiling and recompiling of ffmpeg. When I compile ffmpeg or MPlayer I make use of the -jobs feature of make to speed up the compiling process substantially. So instead of running:
./configure
make
sudo checkinstall
I run:
./configure
make --jobs=5
sudo checkinstall
This works well with ffmpeg and saves a huge amount of compiling time, although I have not set a stopwatch to it. I note that Patrick Volkerding of Slackware (my other distro) sets his compile scripts a little like this:
./configure
make --jobs=5 || make
sudo checkinstall
which is very safe as obviously if the --jobs=5 syntax fails for any reason a standard 'make' will occur. (a Boolean OR that executes the command on the right if the command on the left fails.)
Just a thought, feel free to ignore it :-).
Andrew
Thanks for the input, Andrew, and I'm glad you like the guide. I personally use "make -j2" for my P4 3GHz, but I never added it to the guide for the sake of simplicity, but it may be worth adding it to the guide especially for multi-core machines that can benefit better than my jalopy. It's just hard to choose a proper jobs=n for general use: for example j5 on my machine is slower than j2. Here are some unscientific tests I ran using the configuration options from the guide (with make distclean before each):
x264
time make
real 0m47.933s
user 0m46.304s
sys 0m1.340s
time make -j
real 0m43.182s
user 1m20.598s
sys 0m1.873s
time make -j2
real 0m43.113s
user 1m20.078s
sys 0m1.677s
time make -j4
real 0m43.868s
user 1m21.185s
sys 0m1.640s
ffmpeg
time make
real 6m32.515s
user 6m9.733s
sys 0m20.419s
time make -j 2
real 5m45.750s
user 10m16.073s
sys 0m25.642s
time make --jobs=5
real 6m6.996s
user 10m26.462s
sys 0m25.365s
Can I improve ffmpeg/x264 efficiency for using my quadcore processor? On the 2nd pass I see 54% usage of cpu.
Are you using "-threads 0" in your ffmpeg command? This tells ffmpeg to automatically choose the proper number of threads.
psychok9
December 22nd, 2008, 04:11 AM
Are you using "-threads 0" in your ffmpeg command? This tells ffmpeg to automatically choose the proper number of threads.
Yes.
I've tried -threads 0 and -threads 8.
FakeOutdoorsman
December 22nd, 2008, 05:16 AM
Yes.
I've tried -threads 0 and -threads 8.
My job here is done. Actually, this is beyond my experience because I have never used a quadcore CPU. You may want to join #ffmpeg or #x264 on IRC or ask this on the ffmpeg-user (http://ffmpeg.mplayerhq.hu/mailinglists.html) mailing list.
Dark Shikari
December 22nd, 2008, 07:37 AM
Can I improve ffmpeg/x264 efficiency for using my quadcore processor? On the 2nd pass I see 54% usage of cpu.What settings are you using?
It's possible to be bottlenecked by your decode speed if you're using very fast x264 settings. Also note that extremely fast x264 settings do limit the number of threads you can get away with, though probably not enough to justify your problem.
psychok9
December 22nd, 2008, 11:57 PM
What settings are you using?
It's possible to be bottlenecked by your decode speed if you're using very fast x264 settings. Also note that extremely fast x264 settings do limit the number of threads you can get away with, though probably not enough to justify your problem.
1st page settings:
#!/bin/bash
# Two-Pass x264 Encoding Script
# Usage: ./264encode.sh input output.mp4
# Pass 1
ffmpeg -y -i $1 -pass 1 -b 400k -bt 552k -vcodec libx264 -an -threads 0 -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method dia -subq 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 1 -directpred 1 -bidir_refine 0 -trellis 0 -flags2 -bpyramid-wpred-mixed_refs-dct8x8+fastpskip -f mp4 /dev/null
# Pass 2
ffmpeg -y -i $1 -pass 2 -b 400k -bt 552k -vcodec libx264 -acodec libfaac -ab 128k -ac 2 -threads 0 -coder 1 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method umh -subq 8 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 4 -directpred 3 -trellis 1 -flags2 +bpyramid+wpred+mixed_refs+dct8x8+fastpskip -f mp4 $2
Ng Oon-Ee
December 26th, 2008, 06:48 AM
Hey, I recently tried to install OpenCV, specifically libcv-dev, libcvaux-dev, and libhighgui-dev. They depend on libavcodec-dev, libavformat-dev, libavutil-dev, which clashes with ffmpeg as I've compiled following this guide.
So, I get these errors:-
E: /var/cache/apt/archives/libavutil-dev_3%3a0.svn20080206-12ubuntu3_amd64.deb: trying to overwrite `/usr/lib/pkgconfig/libavutil.pc', which is also in package ffmpeg
E: /var/cache/apt/archives/libavcodec-dev_3%3a0.svn20080206-12ubuntu3_amd64.deb: trying to overwrite `/usr/lib/pkgconfig/libavcodec.pc', which is also in package ffmpeg
E: /var/cache/apt/archives/libavformat-dev_3%3a0.svn20080206-12ubuntu3_amd64.deb: trying to overwrite `/usr/lib/pkgconfig/libavformat.pc', which is also in package ffmpeg
Any way I can tell the package to simply reuse what's available? Or do I need to recompile OpenCV itself from source?
Ng Oon-Ee
December 27th, 2008, 02:01 AM
Hey, I recently tried to install OpenCV, specifically libcv-dev, libcvaux-dev, and libhighgui-dev. They depend on libavcodec-dev, libavformat-dev, libavutil-dev, which clashes with ffmpeg as I've compiled following this guide.
So, I get these errors:-
E: /var/cache/apt/archives/libavutil-dev_3%3a0.svn20080206-12ubuntu3_amd64.deb: trying to overwrite `/usr/lib/pkgconfig/libavutil.pc', which is also in package ffmpeg
E: /var/cache/apt/archives/libavcodec-dev_3%3a0.svn20080206-12ubuntu3_amd64.deb: trying to overwrite `/usr/lib/pkgconfig/libavcodec.pc', which is also in package ffmpeg
E: /var/cache/apt/archives/libavformat-dev_3%3a0.svn20080206-12ubuntu3_amd64.deb: trying to overwrite `/usr/lib/pkgconfig/libavformat.pc', which is also in package ffmpeg
Any way I can tell the package to simply reuse what's available? Or do I need to recompile OpenCV itself from source?
In answer to my own question, I discovered that the ffmpeg executable that's built within ~/ffmpeg in this guide is fully useable even without being installed. That saves me a lot of headache dealing with the packaging system and all, only difference being I have to call the ffmpeg executable directly (I could also symlink into /usr/bin I guess).
philc
January 10th, 2009, 02:54 PM
Using ffmpeg and x264
The easiest method for high quality video encoding is by using the ffmpeg presets that are included with the source code. First copy the presets to your home folder. This will create a folder that may be hidden in your file manager because it is preceded with a period. Use "ls -al" in the terminal or "ctrl + h" in Nautilus to view the folder if it is hidden.
mkdir ~/.ffmpeg
Now copy the presets to the folder you just created:
cp ~/ffmpeg/ffpresets/* ~/.ffmpeg
Now you can use the presets. This example uses the fastfirstpass and hq presets for a two-pass encode:
ffmpeg -y -i input.avi -pass 1 -vcodec libx264 -vpre fastfirstpass -s 640x480 -b 512k -bt 512k -threads 0 -bf 16 -f mp4 -an /dev/null && ffmpeg -i input.avi -pass 2 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -s 640x480 -b 512k -bt 512k -threads 0 -f mp4 output.mp4
You will have to add -bf 16 to your first-pass command or bf=16 to ~/.ffmpeg/libx264-fastfirstpass.ffpreset when used with the normal, max, and hq presets.
I also had to add -bf 16 to my second pass command when using the presets, or FFMpeg exists with an error that the second pass is using a different number of B Frames - 4 vs 16 in the the first pass.
FakeOutdoorsman
January 10th, 2009, 09:38 PM
I also had to add -bf 16 to my second pass command when using the presets, or FFMpeg exists with an error that the second pass is using a different number of B Frames - 4 vs 16 in the the first pass.
Thanks for the update. The presets were modified (http://svn.mplayerhq.hu/ffmpeg/trunk/ffpresets/libx264-hq.ffpreset?view=log) three days ago to:
Be consistent and use b-frames throughout the presets to avoid confusion about whether they have to be specified in the first pass as well.
All of the non-lossless presets, including fastfirstpass, now use -bf 4. I have updated the guide. In addition, new lossless presets have been added, but I haven't used these yet. Has anyone tried lossless x264 encoding yet?
Kinetic^
January 11th, 2009, 11:35 AM
"ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.52: undefined symbol: av_lfg_init"
I'm also getting this error. :confused:
The output of
dpkg --get-selections | grep libavis
libavahi-client3 install
libavahi-common-data install
libavahi-common3 install
libavahi-compat-libdnssd1 install
libavahi-core5 install
libavahi-glib1 install
libavahi-gobject0 install
libavahi-ui0 install
libavc1394-0 install
libavcodec-unstripped-51 install
libavcodec51 deinstall
libavdevice-unstripped-52 install
libavformat-unstripped-52 install
libavformat52 deinstall
libavutil-unstripped-49 install
libavutil49 deinstall
Any help would be appreciated. Thanks.
tsh
January 11th, 2009, 02:24 PM
Following this guide on 8.10, I don't seem to get a .so file for libx264. I have /usr/lib/libx264.a but that's all.
FakeOutdoorsman
January 12th, 2009, 03:30 AM
I'm also getting this error. :confused:
...
Any help would be appreciated. Thanks.
You have one or several packages that are conflicting with the compiled ffmpeg. Try removing them:
sudo apt-get purge libavcodec-unstripped-51 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49
Following this guide on 8.10, I don't seem to get a .so file for libx264. I have /usr/lib/libx264.a but that's all.
Did you use ./configure --enable-shared for x264? It should install as:
/usr/local/lib/libx264.so.65
FakeOutdoorsman
January 17th, 2009, 09:15 PM
Install FFmpeg and x264 on Ubuntu Dapper Drake 6.06 LTS.
Dapper is unsupported and this guide will not be updated.
1. Make sure the Ubuntu universe and multiverse repositories are enabled. For help doing this, refer to Adding the Universe and Multiverse Repositories (https://help.ubuntu.com/community/Repositories/Ubuntu#head-5bbef89639d9a7d93fe38f6356dc17847d373096) on the Ubuntu Wiki.
2. Uninstall x264-bin, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:
sudo apt-get remove ffmpeg x264-bin libx264-dev
3. Next, get all of the packages you will need to install ffmpeg and x264:
sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall texi2html libfaac-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
4. Install yasm:
cd
wget http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz
tar xzvf yasm-1.1.0.tar.gz
cd yasm-1.1.0
./configure
make
sudo checkinstall --pkgname=yasm --pkgversion "1.1.0" --backup=no --default
5. Install x264:
cd
git clone git://git.videolan.org/x264.git
cd ~/x264
./configure
make
sudo checkinstall --pkgversion "1:0.cvs`date +%Y%m%d`-0.0ubuntu1" --default
6. Install libopencore-amr. This will allow you to decode and encode AMR audio:
cd
wget http://transact.dl.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz
tar xvf opencore-amr-0.1.2.tar.gz
cd opencore-amr-0.1.2
./configure -disable-shared
make
sudo checkinstall --pkgname="libopencore-amr" --pkgversion="0.1.2" --backup=no --default
7. Install libtheora to encode to Theora, the video type usually found in OGG files. The repository libtheora is too old, so it must be compiled. Alternatively, you could skip this step and omit --enable-libtheora in step 8 if you don't plan on encoding to Theora video:
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 --default
8. Install ffmpeg:
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ~/ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgversion "3:0.cvs`date +%Y%m%d`-5ubuntu1.2" --default
hash x264 ffmpeg
That's it! Now head back to the FFmpeg guide (http://ubuntuforums.org/showthread.php?t=786095) for usage instructions and more.
To Revert Changes Made by This Guide
sudo apt-get remove build-essential subversion git-core checkinstall texi2html libfaac-dev libopencore-amr libsdl1.2-dev libtheora libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev x264 ffmpeg
WinterWeaver
January 18th, 2009, 11:30 PM
I followed your guide to get ffmpeg. Everything is working as it should, except that I dont have PNG codec anymore. I used to use ffmpeg to create a thumbnail of a movie, and save it as mpeg, but now I get a error.
ffmpeg -y -i /home/andre/Projects/ask/ask/ask.media/videos/IT_Pro.wmv -vframes 1 -ss 00:00:02 -an -vcodec png -f rawvideo -s 320x240 /home/andre/Projects/ask/ask/ask.media/videos/flv/test.pngFfmpeg resulting output:
FFmpeg version SVN-r16661, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid
libavutil 49.13. 0 / 49.13. 0
libavcodec 52.11. 0 / 52.11. 0
libavformat 52.24. 1 / 52.24. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Jan 17 2009 23:46:11, gcc: 4.3.2
[wmv3 @ 0xa476130]Extra data: 8 bits left, value: 0
Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 15.00 (15/1)
Input #0, asf, from '/home/andre/Projects/ask/ask/ask.media/videos/IT_Pro.wmv':
Duration: 00:02:35.84, start: 5.000000, bitrate: 154 kb/s
Stream #0.0: Audio: wmav2, 16000 Hz, mono, s16, 16 kb/s
Stream #0.1: Video: wmv3, yuv420p, 320x240, 134 kb/s, 15.00 tb(r)
Unknown encoder 'png'I tried to see if maybe the name chaned with the new version and did:
$ ffmpeg -formats | grep png
FFmpeg version SVN-r16661, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid
libavutil 49.13. 0 / 49.13. 0
libavcodec 52.11. 0 / 52.11. 0
libavformat 52.24. 1 / 52.24. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Jan 17 2009 23:46:11, gcc: 4.3.2.... as you can see with no result
Manually digging through the -formats output, and I didn't find anything related to png.
Do you perhaps know what the issue is here?
EDIT: sorry forgot to say, I'm running 8.10 32-bit on Macbook 4,1
Thanks,
WW
FakeOutdoorsman
January 20th, 2009, 02:13 AM
Do you perhaps know what the issue is here?
You need to install the zlib1g-dev package then reinstall ffmpeg:
sudo apt-get purge ffmpeg
cd ~/ffmpeg
make distclean
svn up
./configure --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid
make
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3"
This will enable the following encoders/decoders: camtasia, dxa, flashsv, png, zlib, zmbv. I will add this to the guide.
WinterWeaver
January 20th, 2009, 04:16 AM
GREAT! That works :)
Thank a million!
Too bad the thanks feature is not working on the forum atm :(
andrew.46
January 21st, 2009, 12:11 AM
Hi,
Just a quick question out of my own ignorance concerning aac playback with the ffmpeg / ffplay. I don't compile ffmpeg against libfaad-dev, as suggested in your guide, simply because MPLayer uses its own internal faad and it complicates things by having libfaad-dev on my system. (MPlayer has an 'opt-out' system rather than ffmpeg's 'opt-in'.) I do compile against libfaac-dev however and I have no trouble with either playback from or encoding to aac. Formats shows:
andrew@skamandros:~$ ffmpeg -formats | grep -i aac
FFmpeg version SVN-r16683, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --disable-debug --enable-shared --disable-static
--enable-postproc --enable-avfilter --enable-pthreads --enable-libtheora
--enable-libvorbis --enable-swscale --enable-x11grab --enable-libmp3lame
--enable-libxvid --enable-libx264 --enable-libschroedinger
--enable-libfaac --enable-libamr-wb --enable-libamr-nb --enable-libspeex
--enable-libgsm --enable-nonfree --enable-gpl
libavutil 49.14. 0 / 49.14. 0
libavcodec 52.11. 0 / 52.11. 0
libavformat 52.24. 1 / 52.24. 1
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 2. 0 / 0. 2. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jan 19 2009 12:03:54, gcc: 4.3.2
D aac ADTS AAC
E adts ADTS AAC
D A aac Advanced Audio Coding
EA libfaac libfaac AAC (Advanced Audio Codec)
I assume that these represent the aac decoder of ffmpeg which I believe was added in August 2008? So I guess my question, which may not have an easy answer, is 'am I short-changing myself by not compiling against libfaad-dev, or is it actually not necessary now with ffmpeg's implementation?'. Every compiling guide for ffmpeg around still shows compilation against faad... I could very well be missing something basic here, if so my apologies.
Andrew
FakeOutdoorsman
January 21st, 2009, 01:49 AM
I assume that these represent the aac decoder of ffmpeg which I believe was added in August 2008? So I guess my question, which may not have an easy answer, is 'am I short-changing myself by not compiling against libfaad-dev, or is it actually not necessary now with ffmpeg's implementation?'. Every compiling guide for ffmpeg around still shows compilation against faad... I could very well be missing something basic here, if so my apologies.
Andrew
You are correct that ffmpeg now has an internal aac decoder, and for most purposes this makes libfaad unnecessary. So you're not missing much unless you need to decode AAC-HE. You'll need libfaad for that. When or if ffmpeg can decode AAC-HE natively, support for libfaad will probably be dropped.
andrew.46
January 21st, 2009, 07:15 AM
Hi FakeOutdoorsman,
You are correct that ffmpeg now has an internal aac decoder, and for most purposes this makes libfaad unnecessary. So you're not missing much unless you need to decode AAC-HE. You'll need libfaad for that. When or if ffmpeg can decode AAC-HE natively, support for libfaad will probably be dropped.
Thank you very much for clarifying that.
Andrew
andrew.46
January 21st, 2009, 10:12 PM
Hi FakeOutdoorsman,
I owe you a special thanks! Your guide here on the Ubuntu forums woke me to the value of ffmpeg and the x264 presets in particular. I have subsequently successfully submitted an update to the Slackbuilds.org ffmpeg installation script (http://slackbuilds.org/repository/12.2/multimedia/ffmpeg/) so the presets will now be incorporated in a Slackware install:
http://slackbuilds.org/slackbuilds/12.2/multimedia/ffmpeg/ffmpeg.SlackBuild
Very nice to have my name under 2 of Slackware's heavyweights :-). Thanks for the steer towards ffmpeg and the amazing presets!
Andrew (Strong)
FakeOutdoorsman
January 22nd, 2009, 02:52 AM
Glad to hear that this has helped other distros too. I actually do most of my work in Arch Linux and use something similar to the SlackBuilds. I use VirtualBox for Ubuntu testing.
HalNineThousand
January 22nd, 2009, 05:07 PM
In the past few days I've read through all 30 pages of this thread, hoping that I would not be duplicating any questions. It hasn't been easy! Actually, after going through all that, I'm confused on a few points so I need clarification on a lot of questions. I hope everyone will bear with me and help me follow all this.
1) Missing codecs: There's been discussion about Medibuntu and the possibilities of an uncrippled FFmpeg in there, but that there is not one available for Intrepid (although there is one for Hardy). From what I gather from the bug in launchpad (https://bugs.launchpad.net/medibuntu/+bug/291011), supposedly once you install the unstripped libraries, all the codecs are there, just with different names (what this accomplishes, other than to fsck up a lot of programs and settings, I have yet to find out). I partially verified this when I created an MP2 mpg file with MP3 audio using the libmp3lame codec. (This was the first time I created an MP2 file with any sound at all!) So it appears the codecs are there, but renamed or replaced with (supposedly) compatible ones in some cases. Is this correct? (I left a comment on that bug report that replacing the codecs with others breaks many programs that use FFmpeg and even some parts of FFmpeg itself, such as the "-target DVD" option that seems to need the mp3 codec that's been replaced with libmp3lame.)
2) I'm using a quad-core 64 bit system. From comments earlier, if I try to follow the instructions here to compile FFmpeg and x264, I'm wondering if I might run into problems due to the 64 bit architecture. Is that true?
3) I saw that Mocha was talking about replacing files or creating alternate files, which would eliminate the need for removing the existing packages on your system. I'm not clear on the current standing. Is it possible, in some way, to create a "shadow" install by compiling so we have the new features but don't have to worry about apt's upgrades?
4) I'm worried about packages dependent on FFmpeg and I'm still not clear how that is handled. I know if I remove FFmpeg and x264, that other packages will be removed by apt as well. Then if I compile my own FFmpeg and x264, do I reinstall all those packages? I'm not clear if the compile and make process creates .deb files that are then installed or if it just places the files in the appropriate directory. This leads to a couple concerns that have been brought up, but which I'm not clear about: A) Are the repository packages replaced by ones we create?, and B) If we use apt and not aptitude, is there any way to keep FFmpeg out of the upgrade cycle so it's not replaced along the way and we don't keep getting notices of it needing an upgrade?
5) Has anyone considered creating an independent repository with FFmpeg and x264 packaged for Intrepid (or/also for Hardy and possibly others)? If so, is there a way to specify which repository we get a particular package from? That would provide packaged versions that could be upgraded as needed and would eliminate issues with upgrading packages. If someone has an idea of how much that would cost to create such an archive, I'd be interesting in discussing contributing towards what it would take to host such a repository.
6) The man page on FFmpeg is quite short on 2 pass encoding. Just what are the benefits of this? It looks like, from the man page, it just breaks up the task in 2 parts. How does it improve quality?
Thanks for your patience with all these questions! I know some of this has been discussed, but it's hard to keep straight what is settled and what isn't after 30 pages of details!
FakeOutdoorsman
January 22nd, 2009, 10:35 PM
I'm supposed to be working on some videos for a film festival that starts tonight, so I'll just answer a few of these and then get back to you after the weekend:
1) Missing codecs
The difference in codec names have caused a number of issues. The developers of ffmpeg made the name changes. Older ffmpeg revisions use simpler names such as aac and mp3, and newer revisions use libfaac and libmp3lame. My guess is that this was done to differentiate between ffmpegs de/en-coders and external ones like libmp3lame.
The option "-target DVD" doesn't work for me, but "-target dvd" does. This option should use mpeg2video and ac3 audio by default.
2) I'm using a quad-core 64 bit system. From comments earlier, if I try to follow the instructions here to compile FFmpeg and x264, I'm wondering if I might run into problems due to the 64 bit architecture. Is that true?
I can't test this, but I've been told that this guide worked on a few 64-bit systems without issues. I'm not much help here.
3) I saw that Mocha was talking about replacing files or creating alternate files, which would eliminate the need for removing the existing packages on your system. I'm not clear on the current standing. Is it possible, in some way, to create a "shadow" install by compiling so we have the new features but don't have to worry about apt's upgrades?
You shouldn't worry about your package manager upgrading your self-compiled ffmpeg and x264 anymore because the guide now loosely follows the Ubuntu package naming conventions. In an earlier version of this guide you would have to lock your packages or give them a different name to prevent "upgrades", but that introduced other problems.
4) I'm worried about packages dependent on FFmpeg and I'm still not clear how that is handled. I know if I remove FFmpeg and x264, that other packages will be removed by apt as well. Then if I compile my own FFmpeg and x264, do I reinstall all those packages? I'm not clear if the compile and make process creates .deb files that are then installed or if it just places the files in the appropriate directory.
This guide uses checkinstall to create a .deb file and the appropriate entry in your package manager which leads to a cleaner and safer (un/in)stallation process.
This leads to a couple concerns that have been brought up, but which I'm not clear about: A) Are the repository packages replaced by ones we create?
It is advised to remove the repository ffmpeg, x264, and libx264-dev packages before installing your own to prevent conflicts. Your version is effectively replacing the repository versions, but it can be removed in the same way as regular repository package. There are ways to install both the repository package and a self-compiled package, but I haven't tried that.
6) The man page on FFmpeg is quite short on 2 pass encoding. Just what are the benefits of this? It looks like, from the man page, it just breaks up the task in 2 parts. How does it improve quality?
The first pass creates a stats file about the input video that the second pass reads from so the encoder has a better idea of what to expect. It is advised to either use two-pass or one-pass CRF when encoding with libx264. In my opinion they both look good but have different purposes. Use two pass if you want to specify a bitrate, and thus a specific file size for your output video. Use one-pass CRF if you want to specify a quality level and don't really care about what the final size is. One-pass is faster, but that doesn't mean two-pass is twice as slow, especially if you use the fastfirstpass preset for your first pass.
HalNineThousand
January 23rd, 2009, 06:56 AM
Well, I had a carefully written reply that responded to every point and I have no idea where it went, but it didn't post. So, in short:
- I used "-target dvd", with lower case, but wasn't getting sound. I realized the mistake was mine: I was using VLC. I have no idea what VLC's problem is, but when I play .mts files, I get video and no audio. It should have occurred to me that I could have the same issue with .mpg files: VLC is making a mistake. So I used "-target dvd" again and this time played it in another viewer. Yes. Video and audio. Problem solved -- and user made irate! If this issue weren't an issue in VLC, then I would have been happy with what I was getting 2 days ago! I seriously think Ubuntu has really messed up a lot of things with the way they've set up FFmpeg and the codecs.
- Thanks for clarifying the package and upgrade info. I was foggy on that, but now realize I had read your tutorial and THEN read the thread, so I was reading about problems that had already been solved!
And if I haven't said it, THANK YOU for all your time in not only creating the tutorial, but for keeping it up to date and for all your help with all of us who have been asking all these questions!
kevdog
January 23rd, 2009, 07:50 AM
Sure would be nice to provide an automation script for updating the packages (an unattended uninstall/install script) :)
FakeOutdoorsman
January 23rd, 2009, 08:18 AM
And if I haven't said it, THANK YOU for all your time in not only creating the tutorial, but for keeping it up to date and for all your help with all of us who have been asking all these questions!
Ok, I'm back from the festival and I only have to fix two videos. I'm happy the guide has been useful. I started it as notes to myself because I was tired of not knowing how to encode properly (you can thank Adobe Premiere for being such a horrible encoding tool). I'm still learning as you probably noticed from reading those 30 pages. If you really want to learn a particular program or procedure then I recommend writing a howto guide on these forums.
Sure would be nice to provide an automation script for updating the packages (an unattended uninstall/install script) :)
I did use something like this for testing this guide on Dapper recently and it would be nice for a zealous recompiler like me. Basically the "Updating Your Installation" section in script form, but it requires user input for checkinstall. I didn't spend much time in figuring out how to pass on the data to checkinstall, such as the package description. I also think it's good to observe the upgrade process as this is the bleeding-edge and can have occasional issues.
andrew.46
January 23rd, 2009, 10:38 AM
Hi,
Basically the "Updating Your Installation" section in script form, but it requires user input for checkinstall. I didn't spend much time in figuring out how to pass on the data to checkinstall, such as the package description. I also think it's good to observe the upgrade process as this is the bleeding-edge and can have occasional issues.
Can I echo the thanks of several others here? Maintaining an ffmpeg guide under Ubuntu is a great ask, not the least because of the different versions of ffmpeg available to Ubuntu users and the Ubuntu policy of stripping out some functionality.
I use an installation script myself for updating but it is highly idiosyncratic and covers x264, ffmpeg and the svn MPlayer. In case somebody can use aspects of it I include it here. Particularly idiosyncratic is:
I run the script with sudo and alter permissions after the installation
I add the documentation for ffmpeg and MPlayer to my Desktop
I run checkinstall unattended by using --default
I clean out the checkinstall mess from the svn tree and also delete the backups
#!/bin/sh
################################################## ####################
# Updater script for x264, ffmpeg and MPlayer #
################################################## ####################
set -e
# ------------------------------------------------------------------ #
# Update the x264 Libraries #
# git clone git://git.videolan.org/x264.git #
# ------------------------------------------------------------------ #
cd $HOME/x264
git pull
./configure --prefix=/usr --enable-shared
make
sudo checkinstall -D --pkgname=x264 --fstrans=no --pakdir "$HOME/Desktop" \
--maintainer "$USER" --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --backup=no \
--deldoc=yes --deldesc=yes --delspec=yes --default
make clean
#----> Adjust permissions of the svn tree:
chown -R andrew:users $HOME/x264
# ------------------------------------------------------------------ #
# Update the ffmpeg Libraries #
# svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg #
# ------------------------------------------------------------------ #
cd $HOME/ffmpeg
svn update
./configure \
--disable-debug \
--enable-shared \
--disable-static \
--enable-postproc \
--enable-avfilter \
--enable-pthreads \
--enable-libtheora \
--enable-libvorbis \
--enable-swscale \
--enable-x11grab \
--enable-libmp3lame \
--enable-libxvid \
--enable-libx264 \
--enable-libschroedinger \
--enable-libfaac \
--enable-libfaad \
--enable-libamr-wb \
--enable-libamr-nb \
--enable-libspeex \
--enable-libgsm \
--enable-zlib \
--enable-nonfree \
--enable-gpl
make
sudo checkinstall -D --pkgname=ffmpeg --fstrans=no --pakdir "$HOME/Desktop" \
--maintainer "$USER" --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --backup=no \
--deldoc=yes --deldesc=yes --delspec=yes --default
make clean
# ---> ffmpeg docs to the front:
if [ -d /home/andrew/Desktop/ffmpeg_docs ]; then
echo 'Already there numbnuts!!'
else
mkdir -pv /home/andrew/Desktop/ffmpeg_docs
fi
cp /usr/share/doc/ffmpeg/doc/*.html /home/andrew/Desktop/ffmpeg_docs/
chown -R andrew:users /home/andrew/Desktop/ffmpeg_docs
#----> Adjust svn tree permissions
chown -R andrew:users $HOME/ffmpeg
# ------------------------------------------------------------------ #
# Update the svn MPlayer and Docs #
# svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer #
# ------------------------------------------------------------------ #
cd $HOME/mplayer
if [ -e version.h ]; then
rm version.h
fi
svn update
./configure
#--> Build the html docs <--#
cd DOCS/xml
./configure
make html-single-en
cd ../../
#--> Return to MPlayer <--#
make
sudo checkinstall -D --install=yes --fstrans=no --pakdir "$HOME/Desktop" \
--maintainer "$USER" --pkgname mplayer --pkgversion "3:1.0~svn" \
--backup=no --deldoc=yes --deldesc=yes --delspec=yes --gzman --default
make clean
# ---> MPlayer docs to the front:
if [ -d /home/andrew/Desktop/mplayer_docs ]; then
echo 'Already there numbnuts!!'
else
mkdir -pv /home/andrew/Desktop/mplayer_docs
fi
cd $HOME/mplayer/DOCS/
cp -v HTML-single/en/MPlayer.html HTML-single/en/default.css tech/*.txt \
$HOME/Desktop/mplayer_docs/
chown -R andrew:users /home/andrew/Desktop/mplayer_docs/
# -------> Adjust permissions for the svn MPlayer tree:
chown -R andrew:users $HOME/mplayer
# ------------------------ Clean Up ------------------------------- #
cd $HOME/Desktop
rm mplayer_3:1.0~svn-1_i386.deb x264_1:0.svn`date +%Y%m%d`-0.0ubuntu1-1_i386.deb \
ffmpeg_3:0.svn`date +%Y%m%d`-12ubuntu3-1_i386.deb
But I certainly agree that a 'manual' installation can be safest, although the 'set -e' catches errors. Of course I have chosen a few different options for x264 and ffmpeg than are given in the guide and for the svn MPlayer I have an extra section that generates the docs but the general idea is clear.
Andrew
mocha
January 23rd, 2009, 07:49 PM
3) I saw that Mocha was talking about replacing files or creating alternate files, which would eliminate the need for removing the existing packages on your system. I'm not clear on the current standing. Is it possible, in some way, to create a "shadow" install by compiling so we have the new features but don't have to worry about apt's upgrades?
I don't do things the "Debian" way, I do things the hack way to make the installation simpler for myself because I tend to install a lot of software from source to get newer or hacked versions. If you install ffmpeg from the Ubuntu repository the binary is located at /usr/bin/ffmpeg. If you then compile and install your own it goes to /usr/local/bin/ffmpeg and when you run ffmpeg it will always run the /usr/local version, binaries in /usr/local always take priority over /usr. So what I do is rename /usr/bin/ffmpeg to something else like /usr/bin/ffmpeg.old, then I symlink /usr/local/bin/ffmpeg to /usr/bin/ffmpeg, just in case any ffmpeg frontends are pointing to /usr/bin/ffmpeg.
andrew.46
January 29th, 2009, 06:26 AM
Hi,
I am hoping you have some ideas on a subject I will admit that I have also posted to ffmpeg-users. I am encoding from a DVD rip, exporting the audio file and altering it. I encode the video with 2 pass h264 presets and a syntax drawn mostly from your excellent guide. The commandline I use is:
First Pass:
ffmpeg -i blues.vob -croptop 12 -cropbottom 12 -s 512x288 -pass 1 \
-vcodec libx264 -vpre fastfirstpass -aspect 16:9 -b 512k -bt 512k \
-threads 0 -f mp4 -an /dev/null
Second Pass:
ffmpeg -i blues.vob -i sound_vol.wav -map 0:0 -map 1:0 -croptop 12 -cropbottom 12 \
-s 512x288 -pass 2 -acodec libfaac -alang eng -ab 128k -ac 2 \
-vcodec libx264 -vpre hq -b 512k -bt 512k -threads 0 -f mp4 output.mp4
The final file is perfect on my computer but gives one warning and one (und)efined, which I have made bold and red below:
andrew@skamandros~/Desktop/blues$ ffmpeg -i output.mp4
FFmpeg version SVN-r16768, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --mandir=/usr/man --disable-debug
--enable-shared --disable-static --enable-postproc --enable-avfilter
--enable-pthreads --enable-libtheora --enable-libvorbis --enable-swscale
--enable-x11grab --enable-libmp3lame --enable-libxvid --enable-libx264
--enable-libschroedinger --enable-libfaac --enable-libfaad
--enable-libamr-wb --enable-libamr-nb --enable-libgsm
--enable-nonfree --enable-gpl
libavutil 49.14. 0 / 49.14. 0
libavcodec 52.11. 0 / 52.11. 0
libavformat 52.25. 0 / 52.25. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 2. 0 / 0. 2. 0
libswscale 0. 6. 1 / 0. 6. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jan 25 2009 21:59:20, gcc: 4.2.4
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8066b60]edit list not starting at 0,
a/v desync might occur, patch welcome
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Duration: 00:05:28.20, start: 0.000000, bitrate: 646 kb/s
Stream #0.0(und): Video: h264, yuv420p, 512x288, 25.00 tb(r)
Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16
At least one output file must be specified
There is no av sync problem, and as you can see I have 'defined' the audio stream with '-alang eng' but I have no idea how to 'define' the video stream or what this definition should comprise. I am more than a little curious about the a/v sync error warning as well.
Any thoughts? Please forgive me for also asking on the ffmpeg-users :-).
Andrew
FakeOutdoorsman
January 29th, 2009, 08:31 PM
Any thoughts? Please forgive me for also asking on the ffmpeg-users :-).
Andrew
Good question. I get the same message, but so far I haven't had any sync issues. Hopefully someone more knowledgeable than me will give an answer on ffmpeg-user.
Halfwalker
February 16th, 2009, 01:38 AM
A couple of issues with the debian packages under Ubuntu 8.10 x64 ...
It looks like the ffmpeg package provides the libraries for libavutil and libswscale. The problem is that those libs are normally provided by the standard packages :
libavutil49 and libswscale0
The chain gets long and ugly, especially if you want some of the other video manipulation packages. For example, if you want the mjpegtools package, you get hosed.
mjpegtools
--> libquicktime1
--> --> libavcodec51
--> --> --> libavutil49 and libswscale0
How can one build the ffmpeg package such that it "provides" libavutil49 and libswscale49, and whatever other ones it conflicts with ? Using the --provides parameter to checkinstall doesn't seem to work. It will only take one package name OK, but upon installing mjpegtools after installing ffmpeg, it will wants to install that package.
Here's the process I'm using ...
sudo apt-get -y purge ffmpeg libavcodec-dev libavutil49
cd ~/src
mkdir ffmpeg
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --prefix=/usr --disable-debug --enable-shared --disable-static --enable-postproc --enable-avfilter --enable-pthreads --enable-libtheora --enable-libvorbis --enable-swscale --enable-x11grab --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libamr-wb --enable-libamr-nb --enable-libspeex --enable-libgsm --enable-zlib --enable-nonfree --enable-gpl
make --jobs=5
sudo mkdir /usr/local/lib/pkgconfig
sudo mkdir /usr/include/libavdevice
sudo mkdir /usr/include/libavformat
sudo mkdir /usr/include/libavcodec
sudo mkdir /usr/include/libavutil
sudo mkdir /usr/lib/vhook
sudo mkdir /usr/include/libpostproc
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3"
mkdir ~/.ffmpeg
cp ~/src/ffmpeg/ffpresets/* ~/.ffmpeg
D.
Edit: packagename typo and more info
Edit: Show process
FakeOutdoorsman
February 18th, 2009, 11:23 PM
I compiled svn FFmpeg and then installed mjpegtools and it's dependencies. FFmpeg seemed to work fine with libswscale0, libavutil49, and libavcodec51 from the repository, but I didn't do extensive testing. I also didn't test mjpegtools since I'm ignorant of it's usage.
Halfwalker
February 19th, 2009, 02:59 AM
I compiled svn FFmpeg and then installed mjpegtools and it's dependencies. FFmpeg seemed to work fine with libswscale0, libavutil49, and libavcodec51 from the repository, but I didn't do extensive testing. I also didn't test mjpegtools since I'm ignorant of it's usage.
Did you use the configure line I had above ? Note, it has --enable-swscale in it - that can be removed. But that still leaves us with the libavutil49 and libavcodec51 dependencies.
Here is the full sequence of command I did on a clean Ubuntu Intrepid x64 install (Virtualbox VM actually). This is after all updates have been applied, but no other packages have been installed.
Set up for building the packages
sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libtheora-dev libxvidcore4-dev libgpac-dev libgpac0.4.4
Additional libraries and codecs
sudo apt-get install libsdl1.2-dev zlib1g-dev libfaad-dev libfaac-dev libmp3lame-dev libtheora-dev libvorbis-dev libxvidcore4-dev libschroedinger-dev libspeex-dev libgsm1-dev libamrnb3 libamrnb-dev libamrwb3 libamrwb-dev
Install most recent x264 from the official git repository
sudo apt-get -y purge x264 libx264-dev libx264-59
cd ~/
mkdir src
cd ~/src
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-pthread --enable-mp4-output --enable-shared --prefix=/usr
make --jobs=5
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1"
sudo ldconfig
Install most recent ffmpeg from official svn repository
sudo apt-get -y purge ffmpeg libavcodec-dev libavutil49
cd ~/src
mkdir ffmpeg
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --prefix=/usr --disable-debug --enable-shared --disable-static --enable-postproc --enable-avfilter --enable-pthreads --enable-libtheora --enable-libvorbis --enable-x11grab --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libamr-wb --enable-libamr-nb --enable-libspeex --enable-libgsm --enable-zlib --enable-nonfree --enable-gpl
make --jobs=5
sudo mkdir /usr/local/lib/pkgconfig
sudo mkdir /usr/include/libavdevice
sudo mkdir /usr/include/libavformat
sudo mkdir /usr/include/libavcodec
sudo mkdir /usr/include/libavutil
sudo mkdir /usr/lib/vhook
sudo mkdir /usr/include/libpostproc
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3"
mkdir ~/.ffmpeg
cp ~/src/ffmpeg/ffpresets/* ~/.ffmpeg
Then try to install mjpegtools ...
sudo apt-get install mjpegtools
results in this ...
The following NEW packages will be installed:
libavcodec51 libavutil49 libmjpegtools0c2a libquicktime1 libswscale0
mjpegtools
:
Unpacking libavutil49 (from .../libavutil49_3%3a0.svn20080206-12ubuntu3_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libavutil49_3%3a0.svn20080206-12ubuntu3_amd64.deb (--unpack):
trying to overwrite `/usr/lib/libavutil.so.49', which is also in package ffmpeg
You can see the problem with libavutil49 - the library is installed with th new ffmpeg package we built. That's something we want - that version is quite a bit newer than the stock one. libavcodec51 installed fine, so I'm not sure what the problem was earlier.
We need some way to have the ffmpeg package also provide at least the libavutil49 package as far as apt/dpkg is concerned. So when you try to install mjpegtools, it will see that libavutil49 is already installed.
D.
Halfwalker
February 19th, 2009, 03:43 AM
OK, I have a workaround ...
First we have to temporarily modify the /usr/bin/checkinstall script ...
Add the line "Replaces: libavutil49, libswscale0, libavcodec51" in the section at line 2406
cat << EOF >> $BUILD_DIR/DEBIAN/control
Package: $PKG_BASENAME
Priority: extra
Section: $PKG_GROUP
Installed-Size: `du -s $BUILD_DIR | awk '{print $1}'`
Maintainer: $MAINTAINER
Architecture: $ARCHITECTURE
Version: ${VERSION}-${RELEASE}
Depends: $REQUIRES
Provides: $PROVIDES
Replaces: libavutil49, libswscale0, libavcodec51
Description: $SUMMARY
EOF
Then do the regular sudo checkinstall command, and once done, remove the added line from the script. Now the libavutil49/libswscale0/libavcodec51 packages will install cleanly without complaining or overwriting our new library files.
D.
rkleemann
February 19th, 2009, 06:12 PM
Hi,
I followed this howto and it worked very well for me, thanks!
I do have a related question... I have the standard VLC installed, but I'm not sure if it's using the latest ffmpeg that I just built. The libavcodec libraries went into /usr/local/lib, and I do also have /usr/lib/libavcodec.so.1d.51.38.0 in my system (as well as /usr/local/lib/libavcodec.so.51.56.0).
How can I have VLC use the correct library?
Also, would it be best if I recompile VLC? Is there a similar HOWTO for that?
Ricardo
FakeOutdoorsman
February 20th, 2009, 12:06 AM
OK, I have a workaround ...
First we have to temporarily modify the /usr/bin/checkinstall script ...
Add the line "Replaces: libavutil49, libswscale0, libavcodec51" in the section at line 2406
cat << EOF >> $BUILD_DIR/DEBIAN/control
Package: $PKG_BASENAME
Priority: extra
Section: $PKG_GROUP
Installed-Size: `du -s $BUILD_DIR | awk '{print $1}'`
Maintainer: $MAINTAINER
Architecture: $ARCHITECTURE
Version: ${VERSION}-${RELEASE}
Depends: $REQUIRES
Provides: $PROVIDES
Replaces: libavutil49, libswscale0, libavcodec51
Description: $SUMMARY
EOF
Then do the regular sudo checkinstall command, and once done, remove the added line from the script. Now the libavutil49/libswscale0/libavcodec51 packages will install cleanly without complaining or overwriting our new library files.
D.
I don't mess around with Ubuntu packaging often since it's not my primary distro, so I don't really know much about checkinstall and just leech ideas from andrew.46. I'm glad you found a way around it, although it would be nice to see a "--replaces" option in checkinstall for more advanced / adventurous users.
Another option is to remove "--enable-shared" from the FFmpeg configure line. This will let mjpegtools bring in the lib-whatevers from the repo, although I assume you went through all this trouble to get the recent lib(sw|av)*s.
A second option would be to compile mjpegtools to use the svn FFmpeg provided libraries.
A third option is to use a distro like Arch or Slackware that has a customizable ports-like build system that nicely integrates into the packaging system. Very nice.
I wish I knew more about having the Ubuntu packaging system recognize what FFmpeg provides because this has come up a few times and I don't have an easy answer.
psychok9
February 20th, 2009, 10:37 PM
Andrew your work is very appreciated by me.
I'm trying to adapt your great script for auto-update x264, ffmpeg and mplayer... :)
Sorry for my OT, but with this tool (ffmpeg/x264) can we make m4a/aac audio files?
Thank you!
FakeOutdoorsman
February 21st, 2009, 12:04 AM
can we make m4a/aac audio files?
Here's a simple way to make aac audio files:
ffmpeg -i input.foo -ab 196k output.aac
or m4a:
ffmpeg -i input.foo -ab 196k -vn output.m4a
Adjust the bitrate (-ab) as necessary.
andrew.46
February 21st, 2009, 12:12 AM
Hi psychok9,
Andrew your work is very appreciated by me.
I'm trying to adapt your great script for auto-update x264, ffmpeg and mplayer... :)
Well this whole thread is the work of FakeOutdoorsman of course; he is responsible for my own introduction to FFmpeg for which I will always be grateful. That rather rough little script could definitely use some polishing and as the FakeOutdoorsman has mentioned there can be breakages in compilation with both MPlayer and FFmpeg that might tempt you to perform the whole process manually. I don't have an Ubuntu installation at the moment but on my other distro I update all three one at a time with similar scripts and this perhaps might be a better approach?
Sorry for my OT, but with this tool (ffmpeg/x264) can we make m4a/aac audio files?
This is a question of course for the FakeOutdoorsman :-).
Andrew
psychok9
February 21st, 2009, 03:59 PM
Here's a simple way to make aac audio files:
ffmpeg -i input.foo -ab 196k output.aac
or m4a:
ffmpeg -i input.foo -ab 196k -vn output.m4a
Adjust the bitrate (-ab) as necessary.
Thank you for your answer!
I found WinFF gui and with your command, I can make AAC, but is AAC-LC... not HE-AAC :( It seems ffmpeg doesn't support Aac Plus.
FakeOutdoorsman
February 21st, 2009, 08:34 PM
I think neroaacenc (http://www.nero.com/eng/technologies-aac-codec.html) may be the best choice for Linux HE-AAC encoding. Others include enhAacPlusEnc (http://dgaapenc.berlios.de/en/) and mp4tools (http://teknoraver.net/software/mp4tools/), but I never heard of these until today.
To install neroAacEnc:
wget ftp://ftp6.nero.com/tools/NeroDigitalAudio.zip
unzip NeroDigitalAudio.zip -d nero
cd nero/linux
sudo install -D -m755 neroAacEnc /usr/local/bin
Usage example:
neroAacEnc -if input.wav -of output.mp4
Usage information can be found in the included readme.txt.
psychok9
February 21st, 2009, 09:41 PM
Thanks! The quality it's a great!
You know if exist a GUI/frontend for automate the conversion of all/selected files?
I've tried -if *.mp3 -of *.mp4 but don't work on Linux (maybe need other symbol/commands for operate on multiple files?).
IT:
@andrew
I've downloaded last svn smplayer, and now work correctly with my custom mplayer svn :)
I've found an problem only on the line
cp /usr/share/doc/ffmpeg/doc/*.html /home/gianluca/Desktop/ffmpeg_docs/
And i don't know why (i've only txt files on this directory).
andrew.46
February 21st, 2009, 11:58 PM
Hi psychok9
@andrew
I've downloaded last svn smplayer, and now work correctly with my custom mplayer svn :)
I've found an problem only on the line
cp /usr/share/doc/ffmpeg/doc/*.html /home/gianluca/Desktop/ffmpeg_docs/
And i don't know why (i've only txt files on this directory).
I suspect you have missed a small part of the FakeOutdoorsman's guide which installs texi2html. FFmpeg uses this to generate the html docs. Have a look at this thread where I was banging my head against a wall with this one:
http://www.linuxquestions.org/questions/slackware-14/svn-ffmpeg-no-man-file-623007/
Different problem on this thread but same idea :-).
Andrew
akm3
February 23rd, 2009, 05:41 AM
Hi,
I am using Ubuntu 8.1
I do the instructions to have ffmpeg along with all the shared libraries mentioend, but for some strange reason I have not the executable for ffplay.
Can anybody help?
FakeOutdoorsman
February 23rd, 2009, 07:13 AM
Hi,
I am using Ubuntu 8.1
I do the instructions to have ffmpeg along with all the shared libraries mentioend, but for some strange reason I have not the executable for ffplay.
Can anybody help?
The libsdl1.2-dev package is a required dependency for FFplay. Did you install it before compiling FFmpeg? From the instructions:
libsdl1.2-dev: Required for FFplay, a simple media player using the FFmpeg libraries and the SDL library.
amtriorix
February 24th, 2009, 11:30 PM
Thank You very much for this howto.
Do You known how I can transcode AVC / AAC ( H.264 ) files with FFmpeg ?
Mediainfo gives this:
----------------------
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3.0
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Muxing mode : Container profile=Unknown@3.0
Duration : 23mn 4s
Bit rate : 288 Kbps
Width : 544 pixels
Height : 308 pixels
Display aspect ratio : 16/9
Frame rate : 25.000 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.069
Stream size : 47.5 MiB (80%)
Audio
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Duration : 23mn 4s
Bit rate : 64.3 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 22.05 KHz
Resolution : 16 bits
Stream size : 10.6 MiB (18%)
----------------------
It does play in Kafeinne, but Avidemux fails, VLC player, etc.
So I did this
ffmpeg -i input.flv test1.mov
ffmpeg -i input.flv test2.mp4
ffmpeg -i input.flv test2.swf
Works well, so I can edit them.
However I do see this error ?:
[aac @ 0x28b6ed0]SSR not implemented.
FakeOutdoorsman
February 24th, 2009, 11:37 PM
Thank You very much for this howto.
Do You known how I can transcode AVC / AAC ( H.264 ) files with FFmpeg ?
...
It does play in Kafeinne, but Avidemux fails, VLC player, etc.
I don't understand what you are trying to do. What errors does Avidemux and VLC give you? What FFmpeg commands are you using?
amtriorix
February 25th, 2009, 12:11 AM
I don't understand what you are trying to do. What errors does Avidemux and VLC give you? What FFmpeg commands are you using?
Yes.
I found this:
http://www.drizweb.com/content/encoding-and-transcoding-ffmpeg
So I did this:
ffmpeg -i input.flv test1.mov
ffmpeg -i input.flv test2.mp4
ffmpeg -i input.flv test2.swf
Works well, so I can edit them...
Q1) However I do see this error ?
[aac @ 0x28b6ed0]SSR not implemented ?!
Q2) It seems ffmpeg is not limited to transcoding of video but audio too.
Would this be a better option to transcode to lossless audio ?
I saw rubyripper as linux alternative for Exact Audio Copy.
http://wiki.hydrogenaudio.org/index.php?title=Rubyripper
To store Your own music, You need that cdparanoia error correcting power (what's a name)
As lossless compression in flac, ape or ... ? What's the best anyway ? aac lossless ? Wavepack ?
However if this can be done quickly by ffmpeg...
FakeOutdoorsman
February 25th, 2009, 03:54 AM
Q1) However I do see this error ?
[aac @ 0x28b6ed0]SSR not implemented ?!
Paste your FFmpeg command that give you this error and paste the complete FFmpeg output.
Q2) It seems ffmpeg is not limited to transcoding of video but audio too.
Would this be a better option to transcode to lossless audio ?
I saw rubyripper as linux alternative for Exact Audio Copy.
http://wiki.hydrogenaudio.org/index.php?title=Rubyripper
To store Your own music, You need that cdparanoia error correcting power (what's a name)
As lossless compression in flac, ape or ... ? What's the best anyway ? aac lossless ? Wavepack ?
However if this can be done quickly by ffmpeg...
Rubyripper is used to rip a CD. I have only used FLAC for lossless audio and it works fine for me. I personally use abcde to rip CDs:
abcde: Command Line Music CD Ripping for Linux (http://www.andrews-corner.org/abcde.html)
Naegling23
March 2nd, 2009, 02:00 AM
im stuck in dependency heck
Im trying to install via the first post, but Im getting a dependency error:
The following packages have unmet dependencies:
libmp3lame-dev: Depends: libmp3lame0 (= 3.98-0.0) but 3.98.2-0.0 is to be installed
libxvidcore4-dev: Depends: libxvidcore4 (= 2:1.1.2-0.1ubuntu3) but 2:1.1.3-0.5 is to be installed
any help?
FakeOutdoorsman
March 2nd, 2009, 09:44 PM
im stuck in dependency heck
Im trying to install via the first post, but Im getting a dependency error:
The following packages have unmet dependencies:
libmp3lame-dev: Depends: libmp3lame0 (= 3.98-0.0) but 3.98.2-0.0 is to be installed
libxvidcore4-dev: Depends: libxvidcore4 (= 2:1.1.2-0.1ubuntu3) but 2:1.1.3-0.5 is to be installed
any help?
I've never seen this error before. Are you using 8.10 Intrepid Ibex? How is it attempting to install more recent versions of these packages than what is in the repository? Did you add any third party repositories?
Paste the response of this command:
cat /etc/apt/sources.list
Anyone else have an idea? Ubuntu package management isn't a strong point for me.
jjalan
March 2nd, 2009, 11:24 PM
I installed the ffmpeg and x264 as mentioned without any error. To make sure, I execute ffmpeg from command line and I get the following message:
FFmpeg version SVN-r17737, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid
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
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 2 2009 16:18:47, gcc: 4.3.2
I am trying to compile the C code tutorial01.c located at http://www.dranger.com/ffmpeg/tutorial01.html
Before executing this code, I change the code to include the header file as:
#include <libavcodec/avcodec.h>
#include <libavformcat/avformat.h>
The command to execute is :
gcc -o tutorial01 -lavutil -lavformat -lavcodec tutorial01.c
/tmp/cc2pAZbY.o: In function `main':
tutorial01.c:(.text+0x110): undefined reference to `av_register_all'
tutorial01.c:(.text+0x142): undefined reference to `av_open_input_file'
and many more
But I keep on getting the above errors. I am trying this for quite sometime now but I am still not able to find any solution. I tried all the solution for example, wrapping the library in extern "C" etc. Any help will be very much appreciated. I understand that somehow it is not able to link the library but I dont understand whats going wrong.
FakeOutdoorsman
March 3rd, 2009, 12:45 AM
I'm not going to be much help here. The tutorial01.c code is almost two years old and is probably too outdated to use with SVN FFmepg. Development is active and there have been many changes. Did you contact the author and request an update? His email address is in the code. The only clue I can give you is that you misspelled libavformat:
#include <libavformcat/avformat.h>
jjalan
March 3rd, 2009, 01:29 AM
Thanks for pointing that out. That was a typo, I corrected it and it still give the same error. I will try contacting the author. Somehow I thought it was more of a linking problem because the code compiled just fine. It was giving the error when I was trying to link the library.
Do you have any pointer to new sample code?
mc4man
March 3rd, 2009, 04:08 AM
libmp3lame-dev: Depends: libmp3lame0 (= 3.98-0.0) but 3.98.2-0.0 is to be installed
libxvidcore4-dev: Depends: libxvidcore4 (= 2:1.1.2-0.1ubuntu3) but 2:1.1.3-0.5 is to be installed
Those are debian-multimedia (testing) packages. One revision back from current
qyot27
March 5th, 2009, 09:22 AM
Thanks for the guide, it allowed me to build x264 without a hitch. However, I prefer to have MP4 output support via GPAC in x264 itself, rather than use MP4Box after-the-fact. To compile in support for that, this worked wonders (copy and pasted from a guide I wrote up for my own purposes).
Download, compile, and install zlib. zlib is required for building GPAC, which provides the MP4 output support in x264.
wget http://www.zlib.net/zlib-1.2.3.tar.gz
tar -zxf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
sudo make install
Download, compile, and install GPAC 0.4.5. Once again, you'll only need to do this once (although feasibly when GPAC updates it might be a good idea; the reason I don't suggest this for zlib is because, well, it hasn't been updated since 2005).
wget http://superb-east.dl.sourceforge.net/sourceforge/gpac/gpac-0.4.5.tar.gz
wget http://voxel.dl.sourceforge.net/sourceforge/gpac/gpac_extra_libs-0.4.5.tar.gz
tar -zxf gpac-0.4.5.tar.gz
tar -zxf gpac_extra_libs-0.4.5.tar.gz
cd gpac_extra_libs
cp -r * ../gpac/extra_lib
cd ../gpac
chmod +x configure
./configure --disable-opengl --use-js=no --use-ft=no --use-jpeg=no --use-png=no --use-faad=no --use-mad=no --use-xvid=no --use-ffmpeg=no --use-ogg=no --use-vorbis=no --use-theora=no --use-openjpeg=no
make lib
make apps
sudo make install-lib
sudo make install
sudo cp bin/gcc/libgpac.so /usr/lib
(The string of disables I used with the configure step is a result of my paranoia about getting GPAC to build. The only ones indicated on the help forum over at Sourceforge as needing to be disabled were opengl, jpeg, and png. However, since what I put down above worked, then I don't mind. If I get confirmation on how the others don't affect the build process, I'll amend that step. But until then, I'd just rather not take the chance)
Also, to be able to retain framerate and resolution information (which is pertinent for MP4 or MKV output - it also means not having to declare them), this is necessary:
mkfifo input.y4m
x264 input.y4m <options> | mplayer -nosound -vo yuv4mpeg:file=input.y4m inputfile
(note: I have SMplayer installed, just in case that makes a difference)
I've only tested all this on 8.10, but it works on both x86 and AMD64 versions.
A blurb about applying patches to the source would also be nice. Most current custom builds I've seen include the hrd pulldown and win_zone_parse patches, but there could be others that're relevant. Seems patch -p1 <file.diff is what's necessary to do it, per this post:
http://forum.doom9.org/showthread.php?p=1157901#post1157901
FakeOutdoorsman
March 6th, 2009, 04:16 AM
qyot27,
Thanks for the input. Did you try installing zlib1g-dev from the repository instead of compiling it? The package from the repository is up to date. I used to have gpac as a dependency for this guide, but I removed it since I didn't think it was necessary.
I may add a sentence about the patches, but I want to keep things simple.
fishyboy
March 7th, 2009, 03:44 PM
Thanks for the guide. I'm using Ubuntu 8.10 and the installation seemed to work without any problems. However, I now get an encoding error where I didn't before, and I was wondering if anyone else has seen it. I'm trying to encode a DVD vob file to an xvid avi (I haven't got around to using the x264 stuff yet!).
ffmpeg -i VTS_01_3.VOB -vcodec libxvid -f avi -vtag XVID -s 320x128 -b 300k
-acodec libmp3lame -ar 44100 -ab 16k -ac 2 -vsync 0 -async 1 out.avi
I know for sure that the above worked with the ffmpeg I had previously from the Medibuntu repos. The error I now get from ffmpeg is:
[libxvid @ 0xa340f50]error, non monotone timestamps 20 >= 20
av_interleaved_write_frame(): Error while opening file
This error occurs only for one of the vobs, but still, it didn't occur before I upgraded ffmpeg. I have found some workarounds, and it might be that my original command was wrong?
The first workaround is to use 'vsync 1' instead of 'vsync 0' (or omitting the vsync option altogether). I only used 'vsync 0' for historical reasons, i.e. I copied it from somewhere. I've yet to find an explanation of the ffmpeg vsync option that I understand:
ffmpeg -i VTS_01_3.VOB -vcodec libxvid -f avi -vtag XVID -s 320x128 -b 300k
-acodec libmp3lame -ar 44100 -ab 16k -ac 2 -vsync 1 -async 1 out.avi
Another thing that avoids the error is to skip the start of the file using '-ss 0.001', which is not ideal because I want all of it:
ffmpeg -i VTS_01_3.VOB -ss 0.001 -vcodec libxvid -f avi -vtag XVID -s 320x128 -b 300k
-acodec libmp3lame -ar 44100 -ab 16k -ac 2 -vsync 0 -async 1 out.avi
Here's some ffmpeg output for those of you that can find problems hidden within gobbledygook:
FFmpeg version SVN-r17855, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac
--enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.21. 0 / 52.21. 0
libavformat 52.31. 1 / 52.31. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 6 2009 19:14:35, gcc: 4.3.2
I'd usually put this down to my source file being nonsense, but in this case I know it worked before.
Has anyone got any suggestions? Is ffmpeg broken? Is vsync useful?
Thanks in advance.
pedrotuga
March 8th, 2009, 03:57 AM
I hope I don't break the discussion. Just a quick question, aren't there meta-packages for this anywhere?
FakeOutdoorsman
March 9th, 2009, 12:30 AM
The error I now get from ffmpeg is:
[libxvid @ 0xa340f50]error, non monotone timestamps 20 >= 20
av_interleaved_write_frame(): Error while opening file
I was unable to duplicate this problem. Can you make a sample of the offending VOB available? This will copy the first 10 seconds:
ffmpeg -i VTS_01_3.VOB -acodec copy -vcodec copy -t 10 test.vob
I've never used async or vsync (and I don't use libxvid anymore). From man ffmpeg:
-vsync parameter
Video sync method. Video will be stretched/squeezed to match the timestamps, it is done by duplicating and dropping frames. With -map you can select from which stream the timestamps should be taken. You can leave either video or audio unchanged and sync the remaining stream(s) to the unchanged one.
-async samples_per_second
Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by
which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction.
I don't totally understand that. More info:
[Ffmpeg-user] How does -vsync work ? (http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2007-September/011421.html)
[Ffmpeg-user] problem with seek to given time position (http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2007-July/009892.html)
Has anyone got any suggestions?
1. Try a simpler command:
ffmpeg -i VTS_01_3.VOB -vcodec libxvid -f avi -s 320x128 -b 300k -acodec libmp3lame out.avi
2. Try FFmpeg's mpeg4 encoder:
ffmpeg -i VTS_01_3.VOB -vcodec mpeg4 -vtag XVID -f avi -s 320x128 -b 300k -acodec libmp3lame out.avi
3. Use the libx264 presets as mentioned in the tutorial. Example:
ffmpeg -i VTS_01_3.VOB -vcodec libx264 -s 320x128 -crf 30 -acodec libfaac -ab 96k -threads 0 -vpre hq out.mp4
4. You could try to compile the latest Xvid yourself since the version in the repo is outdated.
FakeOutdoorsman
March 9th, 2009, 12:43 AM
I hope I don't break the discussion. Just a quick question, aren't there meta-packages for this anywhere?
There are some unofficial deb files available:
Up to date FFmpeg xvid and x264 builds ppa (http://ubuntuforums.org/showthread.php?t=1084588)
Might be more convenient for some users, but you will be at the mercy of someone else configuring FFmpeg for you. They are untested by me. Use at your own risk.
andrew.46
March 10th, 2009, 06:35 AM
Hi FakeOutdoorsman,
Woooo hoooooooooo FFmpeg release is out!! Will this figure in your guide or will you stick with svn?
Andrew
FakeOutdoorsman
March 10th, 2009, 05:35 PM
Hi FakeOutdoorsman,
Woooo hoooooooooo FFmpeg release is out!! Will this figure in your guide or will you stick with svn?
Andrew
Hi Andrew,
I think the most recent development code will always be the way to go for FFmpeg, but I may add a little section mentioning FFmpeg 0.5 for those who insist on "stable" releases. I want to keep the guide as simple as I can, but I, and Linux users in general, like to have many choices.
cor2y
March 10th, 2009, 06:25 PM
With this modern stable release, do you think it will make it into the repos for intrepid etc?
Hopefully it will be jaunty but what about current earlier distros of ubuntu, do you think it will be added?
FakeOutdoorsman
March 10th, 2009, 06:35 PM
With this modern stable release, do you think it will make it into the repos for intrepid etc?
Hopefully it will be jaunty but what about current earlier distros of ubuntu, do you think it will be added?
I don't know much about how Ubuntu updates or backports earlier releases. It also may not make it into Jaunty because it would require a feature freeze exception. Here's a bug report with more info:
Bug #340303: Please sync with upstream release of ffmpeg .5 (https://bugs.launchpad.net/ubuntu/+source/ffmpeg/+bug/340303)
qyot27
March 10th, 2009, 07:24 PM
qyot27,
Thanks for the input. Did you try installing zlib1g-dev from the repository instead of compiling it? The package from the repository is up to date. I used to have gpac as a dependency for this guide, but I removed it since I didn't think it was necessary.
I may add a sentence about the patches, but I want to keep things simple.
My memory is rather sketchy on it, but I do seem to remember that GPAC wouldn't build against zlib1g-dev and that I had to use the package from zlib.net (basically I only make mental notes on what works rather than what doesn't, except in outstanding cases, so I could be wrong here). In general though I only include GPAC in my builds to be as holistic as possible (and because, way back - as in, two or three years - in x264's development, I remember there were problems with the MKV output, so to be able to pass correct fps and res info directly from the input file to the output, MP4 was necessary; I'm sure that it's fixed now, but old habits die hard). If there was an OS-native way to build in AVIS support on Linux I'd probably do that too. At the very least, though, piping in the video from mplayer secures that the info is retained, even with MKV. It eliminates complaints that the video isn't in sync with the audio, since MP4Box defaults to a framerate of 25fps if no value is explicitly declared.
On the patches, I'm honestly not sure what the win_zone_parse_fix patch does, but I know that the HRD/Pulldown patch is necessary for creating streams that're compliant with Blu-ray (and possibly HD-DVD, although I'm not sure). It'll be important if anyone wants to correctly author standard discs for those players.
Also, concerning checkinstall, is there a way to read the revision number from the x264 sources/binary and include that in the created package's statistics?
cor2y
March 11th, 2009, 06:19 AM
Theres a bug in the intrepid release that relates to a parsing issue.
Fixes recommended are using the cvs version of gpac or fix listed on launchpad
https://bugs.launchpad.net/ubuntu/+source/gpac/+bug/273075
talen9
March 11th, 2009, 11:59 AM
Also, concerning checkinstall, is there a way to read the revision number from the x264 sources/binary and include that in the created package's statistics?
Yep, there it is:
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn-$(grep X264_VERSION config.h | cut -d' ' -f 4)-0.0ubuntu1" --default
This gets you a nice package file named (for the architecture of my machine and to the current date):
x264_1:0.svn-r1127-0.0ubuntu1-1_amd64.deb
It's not a very nice and readable line of code, but I think it respects the KISS principle for writing tutorials :)
bodark
March 11th, 2009, 09:41 PM
Hey all I am having a problem getting fuppes to compile the error message I get is this when I attempt the checkinstall:
gcc -shared .libs/libmetadata_libavformat_la-metadata_libavformat.o -L/usr/local/lib -lavformat -
Wl,-soname -Wl,libmetadata_libavformat.so.0 -o .libs/libmetadata_libavformat.so.0.0.0
/usr/bin/ld: /usr/local/lib/libavformat.a(allformats.o): relocation R_X86_64_32 against `aac_demuxer
' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavformat.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libmetadata_libavformat.la] Error 1
make[1]: Leaving directory `/home/smiller/fuppes/src/plugins'
make: *** [install-recursive] Error 1
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
This is revision 634 on Hardy with AMD Phenom 2 processor. I have tried recompiling and re-installing ffmpeg andall its dependancies, since I found a post on the fuppes forum suggesting that.
Also I am curious why I am missing the mysql dependancy:
SUMMARY
audio transcoding enabled
encoder:
lame : yes
twolame : yes
wav : yes
pcm : yes
decoder:
vorbis : yes (libvorbisfile)
mpc : yes
flac : yes
faad : yes (aac/mp4/m4a)
mad : yes (mpeg Layer I, II & III)
video transcoding plugins
ffmpeg : enabled
image conversion/rescaling plugins
ImageMagick: enabled (Wand C-API)
metadata extraction plugins
taglib : enabled (mp3, ogg, flac & mpc metadata extraction)
ImageMagick : enabled (Wand C-API)
Exiv2 : enabled
libavformat : enabled
mpeg4ip/mp4v2 : enabled (mp4/m4a metadata extraction)
miscellaneous
iconv : enabled (charset conversion)
uuid : enabled
mysql : disabled
Thanks for using fuppes
even though I have sqlite3 and sqlite3-dev installed.
my configure is this:
./configure --enable-gnome-panel-applet --prefix=/usr --enable-video-transcoding
and my ffmpeg configure is this:
./configure --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --
enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-
libxvid
If there is any other information I am missing please let me know.
Thanks in advance!
Edit: Also here is my ffmpeg --version info:
smiller@MilServ:~/ffmpeg$ ffmpeg --version
FFmpeg version SVN-r17933, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid
libavutil 50. 0. 0 / 50. 0. 0
libavcodec 52.21. 0 / 52.21. 0
libavformat 52.31. 1 / 52.31. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 11 2009 02:13:36, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
ffmpeg: missing argument for option '--version'
fishyboy
March 12th, 2009, 12:02 AM
Thanks for the reply. Unfortunately I've had to revert to the previous ffmpeg from the medibuntu repos, because this new one was seg-faulting on another file (mp4 with H.264/MPEG-4 AAC audio) and I had things I really had to finish. The seg-fault occurred while converting to a xvid/avi as before - the medibuntu ffmpeg worked fine.
If I get time I'll reinstall the latest ffmpeg again and give your suggestions a try. I can make the start of the VOB available if there's somewhere I can put it? Of course that would assume the error would still occur for the truncated version. In my original problem, the error occurred immediately, whereas my latest seg-fault problem occurred near the end of the encoding process.
Thanks again for your feedback.
FakeOutdoorsman
March 12th, 2009, 02:34 AM
Hey all I am having a problem getting fuppes to compile...
I've never used FUPPES and actually had to look up FUPPES to see what it is. Looks like you got FFmpeg to install correctly, but I can't help you with FUPPES. Perhaps this will help you:
Compiling FUPPES on Ubuntu Linux (http://fuppes.ulrich-voelkel.de/wiki/index.php?title=Compiling_on_Ubuntu_Linux)
bodark
March 12th, 2009, 06:57 AM
I've never used FUPPES and actually had to look up FUPPES to see what it is. Looks like you got FFmpeg to install correctly, but I can't help you with FUPPES. Perhaps this will help you:
Compiling FUPPES on Ubuntu Linux (http://fuppes.ulrich-voelkel.de/wiki/index.php?title=Compiling_on_Ubuntu_Linux)
I am still curious about the FFMpeg insall. The reason is due to some oddities I see during the compile and when I do sh ffmpeg --version
During the compile I see a lot of lines that look like this:
libswscale/yuv2rgb.c:639: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:640: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:641: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:673: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:674: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:675: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
and the ffmpeg --version gives me this:
FFmpeg version SVN-r17944, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enabl
e-libtheora --enable-libx264 --enable-libxvid
libavutil 50. 0. 0 / 50. 0. 0
libavcodec 52.21. 0 / 52.21. 0
libavformat 52.31. 1 / 52.31. 1
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Mar 12 2009 00:20:24, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
ffmpeg: missing argument for option '--version'
Any idea why I am getting this?
ffmpeg: missing argument for option '--version'
How else can I verify the insallation or what else should I do to test to provide the information that would best help you , help me :)
Edit: figured out the version thing...I had an extra '-' and not sure where I picked it up but I just kept doing it.
brunods
March 12th, 2009, 07:40 AM
Hey I ran the tutorial exactly as it is and I'm getting this error:
brunods@maxwell:~/Projects/audiovideo/film_psyke$ ffmpeg -r 30 -b 4800K -s 1280x800 -i %05d.jpg -vcodec libx264 test.avi
ffmpeg: error while loading shared libraries: libx264.so.67: cannot open shared object file: No such file or directory
could anyone help me? thanks
qyot27
March 12th, 2009, 02:52 PM
Yep, there it is:
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn-$(grep X264_VERSION config.h | cut -d' ' -f 4)-0.0ubuntu1" --default
This gets you a nice package file named (for the architecture of my machine and to the current date):
x264_1:0.svn-r1127-0.0ubuntu1-1_amd64.deb
It's not a very nice and readable line of code, but I think it respects the KISS principle for writing tutorials :)
Thanks, that worked great.
FakeOutdoorsman
March 13th, 2009, 02:17 AM
Hey I ran the tutorial exactly as it is and I'm getting this error:
brunods@maxwell:~/Projects/audiovideo/film_psyke$ ffmpeg -r 30 -b 4800K -s 1280x800 -i %05d.jpg -vcodec libx264 test.avi
ffmpeg: error while loading shared libraries: libx264.so.67: cannot open shared object file: No such file or directory
could anyone help me? thanks
You probably forgot to run "sudo ldconfig". Once you do that FFmpeg should be able to find the shared libraries for x264.
Actually, --enable-shared in x264 is not a requirement for FFmpeg and x264 to work together. You may get a very small improvement in encoding quality, and perhaps negligible faster encoding if you leave out --enable-shared, but I added it so this guide would work well with Andrew's series of HowTo: Install the very latest MPlayer under Jaunty Jackalope (http://ubuntuforums.org/showthread.php?t=1081070) and [Howto] Install the svn Mplayer under Intrepid Ibex (http://ubuntuforums.org/showthread.php?t=1024592).
FakeOutdoorsman
March 13th, 2009, 02:19 AM
During the compile I see a lot of lines that look like this:
libswscale/yuv2rgb.c:639: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:640: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:641: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:673: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:674: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:675: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
I don't think you have to worry about any warnings as long as FFmpeg compiles, installs, and runs successfully.
piratec
March 18th, 2009, 05:10 PM
Yay! This is still up and running good :) I have a nice Ubuntu 64 installed on my new c2d machine and I will need to compile ffmpeg on it. Good work and thx!
HolyRoses
March 19th, 2009, 03:22 PM
anyone notice that like -artist and -title options are now gone from SVN? Anyone know if that is a bug or if it is supposed to be coming back?
-HR
FakeOutdoorsman
March 19th, 2009, 09:56 PM
anyone notice that like -artist and -title options are now gone from SVN? Anyone know if that is a bug or if it is supposed to be coming back?
-HR
Looks like there is a new metadata API and the old one has been depreciated:
$ ffmpeg -h | grep metadata
-metadata string=string add metadata
HolyRoses
March 20th, 2009, 02:15 AM
hmmmm, fun.
Got a list of accepted metadata? Wonder if you can do iPod tagging with it now.
FakeOutdoorsman
March 20th, 2009, 09:16 AM
hmmmm, fun.
Got a list of accepted metadata? Wonder if you can do iPod tagging with it now.
I'm not sure what is accepted with the new API. I never used the old metadata API. I use AtomicParsley to add iTunes style tags for iPod.
smiley_27
March 24th, 2009, 11:47 AM
hi @ all ...
thank' s a lot for thise fine how-to.
but i' ve a problem. i wanna install the Xine-Lib 1.2 CVS with VDPAU Patch, but i get a error in "make" ...
../../contrib/libxdg-basedir/.libs/libxdg-basedir.a -Wl,--no-whole-archive -ldl -lz -lm -lrt -lresolv -lnsl -L/usr/local/lib -lavutil -Wl,--gc-sections -pthread -pthread -Wl,-soname -Wl,libxine.so.2 -o .libs/libxine.so.2.0.0
/usr/bin/ld: /usr/local/lib/libavutil.a(base64.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavutil.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libxine.la] Fehler 1
make[2]: Verlasse Verzeichnis '/home/smiley/ffmpeg/xine-lib-1.2/src/xine-engine'
make[1]: *** [../src/xine-engine/libxine.la] Fehler 2
make[1]: Verlasse Verzeichnis '/home/smiley/ffmpeg/xine-lib-1.2/misc'
make: *** [all-recursive] Fehler 1
smiley@pc-1:~/ffmpeg/xine-lib-1.2$
"Fehler" means ERROR ;)
anyone some ideas, what i can do?
further ... before i begun to install xine-lib-1.2 i' ve installed succesfully ffmpeg.
hope somebody can help me. .... thank' s ... smiley
FakeOutdoorsman
March 25th, 2009, 12:40 AM
hi @ all ...
thank' s a lot for thise fine how-to.
but i' ve a problem. i wanna install the Xine-Lib 1.2 CVS with VDPAU Patch, but i get a error in "make" ...
../../contrib/libxdg-basedir/.libs/libxdg-basedir.a -Wl,--no-whole-archive -ldl -lz -lm -lrt -lresolv -lnsl -L/usr/local/lib -lavutil -Wl,--gc-sections -pthread -pthread -Wl,-soname -Wl,libxine.so.2 -o .libs/libxine.so.2.0.0
/usr/bin/ld: /usr/local/lib/libavutil.a(base64.o): relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavutil.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libxine.la] Fehler 1
make[2]: Verlasse Verzeichnis '/home/smiley/ffmpeg/xine-lib-1.2/src/xine-engine'
make[1]: *** [../src/xine-engine/libxine.la] Fehler 2
make[1]: Verlasse Verzeichnis '/home/smiley/ffmpeg/xine-lib-1.2/misc'
make: *** [all-recursive] Fehler 1
smiley@pc-1:~/ffmpeg/xine-lib-1.2$
"Fehler" means ERROR ;)
anyone some ideas, what i can do?
further ... before i begun to install xine-lib-1.2 i' ve installed succesfully ffmpeg.
hope somebody can help me. .... thank' s ... smiley
I wish I could help you, but I know nothing of Xine or VDPAU. Hopefully someone with some experience in these areas will be able to help.
andrew.46
March 27th, 2009, 12:38 AM
Hi,
I have a small suggest that may have a place in your guide. I recently installed Hardy Heron again, using VirtualBox, and installed the svn MPlayer / x264 + yasm. I used checkinstall for yasm and in a step that may not be totally necessary I used:
--pkgversion "0.7.2"
which was designed to defeat the repository version of 0.5.xxxxx in Hardy. I did not test if an unlabelled yasm 0.7.2 would necessarily be overwritten by the older repository version though.
Good to see that moth-eaten heron on my desktop again though :-).
Andrew
FakeOutdoorsman
March 27th, 2009, 01:54 AM
Hi,
I have a small suggest that may have a place in your guide. I recently installed Hardy Heron again, using VirtualBox, and installed the svn MPlayer / x264 + yasm. I used checkinstall for yasm and in a step that may not be totally necessary I used:
--pkgversion "0.7.2"
which was designed to defeat the repository version of 0.5.xxxxx in Hardy. I did not test if an unlabelled yasm 0.7.2 would necessarily be overwritten by the older repository version though.
Good to see that moth-eaten heron on my desktop again though :-).
Andrew
Hi Andrew,
I don't remember the compiled yasm being replaced by repository yasm in my tests, but it's been a while now. I added "pkgversion" anyway because it's nice to see what version it is in the package manager.
I'm working on the Jaunty FFmpeg guide now. It seems as if "--fstrans=no" and "--install=yes" are no longer required in checkinstall for Jaunty. So far that seems to be the only difference between the two Ubuntu releases. I'll probably just leave these options to have one guide for both, but what do you think?
FakeOutdoorsman
March 27th, 2009, 02:05 AM
This guide has moved to the official FFmpeg wiki:
How to Compile FFmpeg and x264 on Ubuntu Hardy Heron 8.04 (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideHardy)
andrew.46
March 27th, 2009, 03:35 AM
Hi,
I'm working on the Jaunty FFmpeg guide now. It seems as if "--fstrans=no" and "--install=yes" are no longer required in checkinstall for Jaunty. So far that seems to be the only difference between the two Ubuntu releases. I'll probably just leave these options to have one guide for both, but what do you think?
I note that the fstrans problem has finally been acknowledged (http://changelogs.ubuntu.com/changelogs/pool/universe/c/checkinstall/checkinstall_1.6.1-8/changelog):
checkinstall (1.6.1-8) unstable; urgency=low
* Recommend make since it's the most used install tool. (Closes: #487964).
* Use quilt for managing patches to upstream sources.
* Allow Requires to be used in Debian. (Closes: #469639)
* Turn off system translation by default, since it is currently broken.
* Update the Vcs-* tags since we moved to Git.
The solution seems to have been in Jaunty to turn it off in checkinstall's configuration file in /etc/checkinstallrc:
# Are we going to use filesystem translation?
# Note: checkinstall, as of 1.6.1 doesn't handle the at family of syscalls.
# This means that translation doesn't work as coreutils uses them.
TRANSLATE=0
You have my sympathies in catering for so many different versions of Ubuntu each with slightly different needs :-).
All the best,
Andrew
zg_gogs
April 1st, 2009, 09:51 AM
On 8.10, I was able to sucessfully install x264 without issue. However when running
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3"
it throws a most frustrating error...
**** Installation failed. Aborting package creation.
Cleaning up.../usr/bin/checkinstall: line 302: [: /home/goran/Workdir/new: binary operator expected
OK
I wish that I could offer something a bit more descriptive, but unfortunately that is all I've been given. Can anyone out there help me? Further, would this final command log anywhere else except to standard output and is there any way to turn on further debugging?
FakeOutdoorsman
April 2nd, 2009, 08:09 PM
I was unable to reproduce this error. Is that all of the info that checkinstall provided? There is a debug option for checkinstall, but I have no experience with it. From "man checkinstall":
-d Set debug level. Must be one of 0, 1 and 2.
From /etc/checkinstallrc:
# Debug level
# 0: No debug
# 1: Keep all temp files except the package's files
# 2: Keep the package's files too
You could also install FFmpeg without checkinstall, but the package will not be integrated with your package managers. After running "make", enter the following:
sudo make install
If you want to remove FFmpeg:
cd ~/ffmpeg
sudo make uninstall
andrew.46
April 4th, 2009, 12:24 AM
Hi,
Can I make a request, rather than a suggestion, concerning your FFmpeg guide? Across the forums it is a very common question: 'Why can't my repository FFmpeg convert mp3 / aac, demux ac3' etc. To this there is always an answer that involves either installing a Medibuntu version or installing 'unstripped' libraries of various names depending on the version of Ubuntu involved.
Would you consider publishing a single post either annexed to your guide or completely apart from your guide that would give all of these details in one place in a definitive manner? I am sure this would be of great benefit to those who are not prepared to utilise svn and of great benefit to the many Ubuntu users banging their heads into their keyboards when their Repository FFmpeg is not producing the goods.
All the very best,
Andrew
InspiredIndividual
April 4th, 2009, 01:27 AM
Hi,
Can I make a request, rather than a suggestion, concerning your FFmpeg guide?
(...)
Would you consider publishing a single post either annexed to your guide or completely apart from your guide that would give all of these details in one place in a definitive manner? I am sure this would be of great benefit to those who are not prepared to utilise svn and of great benefit to the many Ubuntu users banging their heads into their keyboards when their Repository FFmpeg is not producing the goods.
I second that wholeheartedly... after stumbling upon this thread after a couple of hours of head banging. The first time I really started to regret updating to Intrepid.
FakeOutdoorsman
April 4th, 2009, 01:38 AM
Sounds good to me. I'll probably make it a separate guide with some examples and link to it from this guide.
InspiredIndividual
April 4th, 2009, 02:01 AM
Sounds good to me. I'll probably make it a separate guide with some examples and link to it from this guide.
Brilliant! By the way, I'm ashamed to have forgotten to thank you for your instructive tutorial! I'll put it down to being grumpy from banging my head against my keyboard for so long... I just tried your instructions, and ffmpeg worked like a charm! Thanks a lot!
andrew.46
April 4th, 2009, 05:54 AM
Hi FakeOutdoorsman,
Sounds good to me. I'll probably make it a separate guide with some examples and link to it from this guide.
Wonderful! Thanks for doing this, it should lift some of the confusion that clouds the multiple variants of FFmpeg available to Ubuntu users.
BTW I note that your guide has clocked up 95,115 views. Will there be a party at 100,000?
All the best,
Andrew
FakeOutdoorsman
April 8th, 2009, 01:33 AM
Hi FakeOutdoorsman,
Wonderful! Thanks for doing this, it should lift some of the confusion that clouds the multiple variants of FFmpeg available to Ubuntu users.
BTW I note that your guide has clocked up 95,115 views. Will there be a party at 100,000?
All the best,
Andrew
Ok, it took them a few days to approve the guide (I prodded them in #ubuntuforums because I'm impatient), but it's now up. I'll make a note on the first page of this guide as well:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
As for 100,000 views? I suppose I'll have a dram or two, and then maybe come up with some other FFmpeg or other video guide. Any other requests? x11grab seems like a good candidate, but I need to actually learn how to use it first.
mocha
April 8th, 2009, 05:39 AM
Would you consider publishing a single post either annexed to your guide or completely apart from your guide that would give all of these details in one place in a definitive manner?
Andrew, you also got me thinking about mplayer/mencoder/x264. Perhaps you should also add this type of information to your guide? I know another good reason for a compiled mplayer, VDPAU.
andrew.46
April 8th, 2009, 06:25 AM
Hi mocha,
Andrew, you also got me thinking about mplayer/mencoder/x264. Perhaps you should also add this type of information to your guide?
The Fakeoutdoorsman is more patient with the quirks of the Ubuntu package management/production system than me :-).
And BTW Fakeoutdoorsman: the new guide looks great and I am sure will be hugely popular!
All the best,
Andrew
theophile
April 14th, 2009, 07:42 AM
Following the steps in the OP exactly as stated on an AMD64 Intrepid, ffmpeg finished the build process with the following:
libswscale/swscale.c:3409: warning: assignment discards qualifiers from pointer target type
gcc -DHAVE_AV_CONFIG_H -I. -I"/home/theophile/Desktop/mlbviewer stuff/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -c -o libswscale/swscale_avoption.o libswscale/swscale_avoption.c
gcc -DHAVE_AV_CONFIG_H -I. -I"/home/theophile/Desktop/mlbviewer stuff/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -c -o libswscale/yuv2rgb.o libswscale/yuv2rgb.c
libswscale/yuv2rgb.c: In function ‘ff_yuv2rgb_c_init_tables’:
libswscale/yuv2rgb.c:670: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:671: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:672: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:706: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:707: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c:708: warning: passing argument 4 of ‘fill_table’ from incompatible pointer type
libswscale/yuv2rgb.c: At top level:
libswscale/yuv2rgb.c:298: warning: ‘yuv2rgb_c_8’ defined but not used
libswscale/yuv2rgb.c:346: warning: ‘yuv2rgb_c_4’ defined but not used
libswscale/yuv2rgb.c:403: warning: ‘yuv2rgb_c_4b’ defined but not used
gcc -DHAVE_AV_CONFIG_H -I. -I"/home/theophile/Desktop/mlbviewer stuff/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -c -o libswscale/x86/yuv2rgb_mmx.o libswscale/x86/yuv2rgb_mmx.c
rm -f libswscale/libswscale.a
ar rc libswscale/libswscale.a libswscale/rgb2rgb.o libswscale/swscale.o libswscale/swscale_avoption.o libswscale/yuv2rgb.o libswscale/x86/yuv2rgb_mmx.o
ranlib libswscale/libswscale.a
gcc -DHAVE_AV_CONFIG_H -I. -I"/home/theophile/Desktop/mlbviewer stuff/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -c -o ffmpeg.o ffmpeg.c
theophile@graven:~/Desktop/mlbviewer stuff/ffmpeg$
I don't see any errors but the binaries (ffmpeg, ffplay) are not built! 'make install' installs the libraries but no binaries and the binaries are not created in the root of the source tree. Anyone know why this would happen?
FakeOutdoorsman
April 14th, 2009, 06:20 PM
I've never seen this "error" before. Since this is the bleeding-edge, there may have been a problem with your specific revision. Show the output of:
cd ~/Desktop/mlbviewer stuff/ffmpeg
svn info | grep Revision
I haven't tested this guide on 64-bit myself as I am limited to an ancient single-core CPU (I also don't get to play around with VDPAU which would be useful for my new video camera), but other users have mentioned that it works.
I recommend trying the latest revision. Refer to the "Updating Your Installation" section of the guide. If is still doesn't work then you may want to post your question on the ffmpeg-users mailing list.
theophile
April 15th, 2009, 04:33 PM
Revision: 18504
I just reupped. We'll see if it makes a difference.
theophile
April 15th, 2009, 05:27 PM
It did not help. However, moving the source tree to a different directory that did not include a space in the path DID work. Odd.
madhi19
April 16th, 2009, 07:58 PM
amazing tutorial and it made me realize how easy it is to convert all those old flv video for my ps3 just by using ffmpeg in terminal
andrew.46
April 17th, 2009, 04:04 AM
Hi Fakeoutdoorsman,
Congrats on this guide cracking the 100,000 mark!!!!!!!!!
Andrew
FakeOutdoorsman
April 17th, 2009, 09:32 PM
Thanks Andrew! I'll have a shot of Scotch tonight. A drink to celebrate a computer forum thread? Yeah, I know I'm a nerd.
speed32219
April 19th, 2009, 11:15 PM
First and foremost I want to thank FakeOutdoorsman for an outstanding job. If only some of the other guides were so encompassing here in the forums.
I have read all 38 pages (Should have taken notes) but as soon as I get home this eveing from work I am going to follow the guide to install the intrepid release.
I have about 360 dvd's stored in ISO format, many home video's as well as a large collection of music, and my machine is physically maxed out on physical HD's. (2.8TB)
I have tested/tried Hanbrake to encode to H264/AC3/Xvid I believe, and my movie file size droped from roughly 4.15/4.3GB to 1.8GB. This was good news since I could increase the available disk space significantly. I completed 2 conversions so far.
But the only problem was the time it took for a 2 pass encoding right from the disk, although the output, except for text/credits was outstanding. No visible perception that it was encoded to a different space saving format. In addition, I was having problems coming up with a commnad line string that worked.
Is this method faster as far as encoding?
It will be easier with some scripts or just plain copy and paste command lines.
FakeOutdoorsman
April 20th, 2009, 07:47 PM
...But the only problem was the time it took for a 2 pass encoding right from the disk, although the output, except for text/credits was outstanding. No visible perception that it was encoded to a different space saving format. In addition, I was having problems coming up with a commnad line string that worked.
Is this method faster as far as encoding?
It will be easier with some scripts or just plain copy and paste command lines.
I'm glad this guide has been helpful for you. I've never used Handbrake, so I can't comment on that, but if you want something faster than two-pass VBR (Variable Bit Rate) then one-pass CRF (Constant Rate Factor) may be what you're looking for. Two-pass VBR is great when you want to control the size of the video file. One-pass CRF is faster than two-pass (it all depends on your option settings of course) and is useful when you want a certain quality and aren't too concerned about the exact file size. This doesn't mean that two-pass is 2x as slow as one-pass CRF since the first pass is usually fast. You can read more about this at the recently updated FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/).
There are many ways to do this, but I think I would mount the ISO and then try a CRF encode using the libx264 presets:
sudo modprobe loop
sudo mount video.iso /media/dvd/ -t udf -o loop
ffmpeg -i -ss 00:00:10:00 -t 00:01:00:00 /media/dvd/VIDEO_TS/VTS_01_1.VOB -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -crf 26 -threads 0 output.mp4
sudo umount /media/dvd/
The -ss option will start the encode 10 minutes into the input video and the -t option tells FFmpeg to encode for one minute. I added those to make a quick test encode to check the quality and to make sure I got the size and other options correct. The most important option is -crf and is explained in the link above.
gaixixon
April 23rd, 2009, 11:15 AM
I try to convert an video to another format using -vcodec but got following error:
teppy@BP:~/Videos$ ffmpeg -i "hua xin.dat" -vcodec libx264 "hua xin.mpg"
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Mar 16 2009 21:16:26, gcc: 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
Input #0, mpeg, from 'hua xin.dat':
Duration: 00:03:43.3, start: 0.253333, bitrate: 1422 kb/s
Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 352x240, 1152 kb/s, 29.97 fps(r)
Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, stereo, 224 kb/s
Unknown codec 'libx264'
1/ How do I install libx264 codec?
2/ what is another codec option other than libx264?
cyper
April 23rd, 2009, 11:16 AM
Thanks for nice guide! I just got rid of "Segmentation fault" issue. Used Hardy HOW-TO on Intrepid. ;)
good luck to you
FakeOutdoorsman
April 23rd, 2009, 06:29 PM
I try to convert an video to another format using -vcodec but got following error:
1/ How do I install libx264 codec?
2/ what is another codec option other than libx264?
You are using FFmpeg from the Ubuntu repository. This does not include support for libx264 by default. Ubuntu Hardy users can:
1. Uninstall the repository FFmpeg and compile FFmpeg and x264 yourself:
HOWTO: Install and use the latest FFmpeg and x264 (http://ubuntuforums.org/showthread.php?t=786095)
or
2. Use FFmpeg from a third-party repository:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
gaixixon
April 24th, 2009, 02:47 AM
hi FakeOutdoorsman, I still got error
Unknown codec 'libx264'
what is another video codec options that I can use?
I am now trying to convert some .dat movie files to what ever (maybe flv, mpg to play on my mobile phone).
FakeOutdoorsman
April 24th, 2009, 09:01 AM
hi FakeOutdoorsman, I still got error
what is another video codec options that I can use?
I am now trying to convert some .dat movie files to what ever (maybe flv, mpg to play on my mobile phone).
For mpg:
ffmpeg -i inputvideo.dat -b 512k output.mpg
You will need to compile FFmpeg yourself or install FFmpeg from Medibuntu (http://www.medibuntu.org/) to create flv with mp3 audio.
hz428
May 15th, 2009, 12:30 PM
hi, my installation stop at "install FFmpeg" because I accidentally closed the terminal. When restart the whole process I got this error
" svn: Working copy 'ffmpeg' locked"
soon after entered this command "svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg".
how can I fix this problem?
FakeOutdoorsman
May 15th, 2009, 06:43 PM
Rename or delete ~/ffmpeg and then run svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg again:
cd
rm -rf ffmpeg
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
kishigo
May 20th, 2009, 11:38 PM
Hi,
This question may have been asked already, but I couldn't find it in the thread. Do I need to uninstall the unstripped ffmpeg libraries such as libavutil-unstripped49 et al before compiling ffmpeg?
Thank you,
Kevin
FakeOutdoorsman
May 20th, 2009, 11:55 PM
Hi,
This question may have been asked already, but I couldn't find it in the thread. Do I need to uninstall the unstripped ffmpeg libraries such as libavutil-unstripped49 et al before compiling ffmpeg?
Thank you,
Kevin
I doubt that you need to remove them. However, the libav*-dev packages may cause issues if my memory is correct. I usually like to test these things out before replying (instead of relying on my often faulty memory), but I'm out of town now, so I can't test it to be completely sure.
andrew.46
May 23rd, 2009, 08:00 AM
Hi hz428,
svn: Working copy 'ffmpeg' locked
The Gordian Knot approach (http://en.wikipedia.org/wiki/Gordian_Knot) is to delete and start again as FakeOutdoorsman has already suggested. An alternative is to change to your FFmpeg source tree and run:
svn cleanup .
Don't forget the '.' which of course signifies that the target of the command is the present working directory. This command recursively cleans up the working copy, removing locks, resuming unfinished operations, etc.
All the best,
Andrew
andrew.46
May 27th, 2009, 03:05 AM
Hi FakeOutDoorsman,
Apropos of my previous post I have written another guide in a 'linux basics' series that may or may not be of some use to readers of your guide:
Linux Basics: A gentle introduction to accessing 'svn' repositories
http://ubuntuforums.org/showthread.php?t=1167578
The special relevance to your FFmpeg guide is that I have used the FFmpeg svn repository as an example throughout the guide. Not sure if this is any help as you have covered the most immediate svn needs already...
All the best,
Andrew
rob4
May 28th, 2009, 04:33 PM
Hi All -
Looking for some help. Everything went well until step4 - Install FFmpeg
When performing make I get this error:
/home/rob/ffmpeg/libavcodec/libavcodec.so: undefined reference to `faacDecDecode'
/home/rob/ffmpeg/libavcodec/libavcodec.so: undefined reference to `faacDecInit2'
/home/rob/ffmpeg/libavcodec/libavcodec.so: undefined reference to `faacDecClose'
/home/rob/ffmpeg/libavcodec/libavcodec.so: undefined reference to `faacDecOpen'
/home/rob/ffmpeg/libavcodec/libavcodec.so: undefined reference to `faacDecSetConfiguration'
/home/rob/ffmpeg/libavcodec/libavcodec.so: undefined reference to `faacDecInit'
/home/rob/ffmpeg/libavcodec/libavcodec.so: undefined reference to `faacDecGetCurrentConfiguration'
/home/rob/ffmpeg/libavcodec/libavcodec.so: undefined reference to `faacDecGetErrorMessage'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
I have Jaunty and I'm not too sure what else you need to help - please let me know and I will post. Ultimate goal is to get Fuppes to transcode but gotta get ffmpeg working first.
Rob
FakeOutdoorsman
May 28th, 2009, 06:37 PM
I just compiled FFmpeg revision SVN-r18971 on Jaunty and encountered no errors. There may have been issues with your particular revision. I recommend trying the newest revision. Go to the Updating Your Installation secion of the guide and start at cd ~/ffmpeg. Let me know if that does not work.
rob4
May 28th, 2009, 08:53 PM
Thanks for the response! The latest was revision 18972 and now I have this error:
/home/rob/ffmpeg/libavcodec/libavcodec.a(libfaad.o): In function `faac_decode_init':
/home/rob/ffmpeg/libavcodec/libfaad.c:252: undefined reference to `faacDecOpen'
/home/rob/ffmpeg/libavcodec/libfaad.c:253: undefined reference to `faacDecClose'
/home/rob/ffmpeg/libavcodec/libfaad.c:254: undefined reference to `faacDecGetCurrentConfiguration'
/home/rob/ffmpeg/libavcodec/libfaad.c:255: undefined reference to `faacDecSetConfiguration'
/home/rob/ffmpeg/libavcodec/libfaad.c:256: undefined reference to `faacDecInit'
/home/rob/ffmpeg/libavcodec/libfaad.c:257: undefined reference to `faacDecInit2'
/home/rob/ffmpeg/libavcodec/libfaad.c:258: undefined reference to `faacDecDecode'
/home/rob/ffmpeg/libavcodec/libfaad.c:260: undefined reference to `faacDecGetErrorMessage'
/home/rob/ffmpeg/libavcodec/libfaad.c:274: undefined reference to `faacDecOpen'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
rob@Base:~/ffmpeg$
Do you need more information?
Rob
FakeOutdoorsman
May 28th, 2009, 09:01 PM
Did you change anything from the guide? Give the output of:
tail ~/ffmpeg/config.err
rob4
May 28th, 2009, 09:06 PM
I copy/paste. I have tried a number of tutorials before I got to this but fuppes would never transcode. I thought this tutorial may be the answer but now I cant play anything using Mplayer/ splayer/ vlc, etc.
Here is the output:
rob@Base:~/ffmpeg$ tail ~/ffmpeg/config.err
END /tmp/ffconf.qJgELLYM.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -c -o /tmp/ffconf.cZhmsYxD.o /tmp/ffconf.qJgELLYM.c
check_asm asmalign_pot ".align 3"
check_as
BEGIN /tmp/ffconf.qJgELLYM.c
1 void foo(void){ __asm__ volatile(".align 3"); }
END /tmp/ffconf.qJgELLYM.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -c -o /tmp/ffconf.cZhmsYxD.o /tmp/ffconf.qJgELLYM.c
/tmp/ffconf.qJgELLYM.c: Assembler messages:
/tmp/ffconf.qJgELLYM.c:1: Error: alignment not a power of 2
rob@Base:~/ffmpeg$
FakeOutdoorsman
May 28th, 2009, 09:23 PM
I'm not sure what is causing your error and I can't duplicate it. I would guess it is a conflict with an installed package; possibly from a non-Ubuntu repository. Check /etc/apt/sources.list and /etc/apt/sources.list.d/ for any non-Ubuntu repositories.
Perhaps the problem is caused by the prior tutorials you followed. Do you have links to those tutorials?
If I can't figure this out the next step is asking for help in the #ffmpeg IRC channel or at the ffmpeg-user (http://ffmpeg.org/contact.html) mailing list.
shane2peru
June 7th, 2009, 09:37 PM
Thanks for the how to. Worked like a charm. How often do those packages get updated? Does svn trunk mean it is more of a stable than the beta packages? I have understood svn to be beta stuff, but that is more just my impression than factual.
Shane
FakeOutdoorsman
June 8th, 2009, 07:00 PM
Thanks for the how to. Worked like a charm. How often do those packages get updated?
Glad it worked for you. Development is active for both FFmpeg and x264. Yesterday there were two updates to FFmpeg and Saturday had eight updates. You can see a FFmpeg changelog with:
svn log -l 6 svn://svn.mplayerhq.hu/ffmpeg/trunk
The option -l 6 will display the last six log entries. You can view the x264 changelog (http://mirror01.x264.nl/x264/changelog.txt) in your browser. Your installed FFmpeg and x264 packages can be updated as often as you would like. Refer to the "Updating Your Installation" section of the guide.
Does svn trunk mean it is more of a stable than the beta packages? I have understood svn to be beta stuff, but that is more just my impression than factual.
Shane
I'm not aware of any FFmpeg beta packages and since I've been using FFmpeg it was always recommended to use SVN. It is the bleeding-edge and I have experienced errors, but the are relatively rare and usually fixed by the next day. From ffmpeg.org/download.html:
FFmpeg has always been a very experimental and developer-driven project. It is a key component in many multimedia projects and has new features added constantly. SVN snapshots work really well 99% of the time so people are not afraid to use them.
shane2peru
June 8th, 2009, 09:20 PM
Glad it worked for you. Development is active for both FFmpeg and x264. Yesterday there were two updates to FFmpeg and Saturday had eight updates. You can see a FFmpeg changelog with:
svn log -l 6 svn://svn.mplayerhq.hu/ffmpeg/trunk
The option -l 6 will display the last six log entries. You can view the x264 changelog (http://mirror01.x264.nl/x264/changelog.txt) in your browser. Your installed FFmpeg and x264 packages can be updated as often as you would like. Refer to the "Updating Your Installation" section of the guide.
I'm not aware of any FFmpeg beta packages and since I've been using FFmpeg it was always recommended to use SVN. It is the bleeding-edge and I have experienced errors, but the are relatively rare and usually fixed by the next day. From ffmpeg.org/download.html:
FFmpeg has always been a very experimental and developer-driven project. It is a key component in many multimedia projects and has new features added constantly. SVN snapshots work really well 99% of the time so people are not afraid to use them.
Thanks for the info. Much appreciated.
Shane
conradin
June 12th, 2009, 09:20 PM
Indeed a great how to. When i get home i will try this.
Currently i have Jackalope installed and ffmpeg will export to .wav files but not .MP3 files. Anyone have some advice there?
I will try reinstalling ffmpeg soon.
FakeOutdoorsman
June 12th, 2009, 09:24 PM
Indeed a great how to. When i get home i will try this.
Currently i have Jackalope installed and ffmpeg will export to .wav files but not .MP3 files. Anyone have some advice there?
I will try reinstalling ffmpeg soon.
Jackalope uses a relatively new revision of FFmpeg unlike prior Ubuntu versions. Restricted encoders are disabled by default, but it is easy to enable them:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
dilog
July 1st, 2009, 05:03 PM
excellent instructions and working command row but trying afterwards WinFF with same input says "Could not find FFPlay"
Should I wait until next version of WinFF?
(Ubuntu 9.04 updated)
Dimitris
FakeOutdoorsman
July 1st, 2009, 07:31 PM
excellent instructions and working command row but trying afterwards WinFF with same input says "Could not find FFPlay"
Should I wait until next version of WinFF?
(Ubuntu 9.04 updated)
Dimitris
I'm not too familiar with WinFF. Did you install the libsdl1.2-dev package before compiling FFmpeg? It is under "Optional Dependencies" on this guide.
I am out of town, so my replies may be sparse.
dilog
July 2nd, 2009, 05:16 PM
I'm not too familiar with WinFF. Did you install the libsdl1.2-dev package before compiling FFmpeg? It is under "Optional Dependencies" on this guide.
I am out of town, so my replies may be sparse.
I did but all of the same....
SL666
July 2nd, 2009, 10:04 PM
Where I can get information for Jaunty?
I'm on jaunty, followed these instructions and it works perfectly.
dilog
July 3rd, 2009, 11:30 AM
I did but all of the same....
Sorry, it works perfectly now - many thanks!
Dimitris
andrew.46
July 9th, 2009, 02:01 AM
Hi Fakeoutdoorsman,
It seems that FFmpeg has dropped support for the non-free amr libraries in favour of opencore-amr:
andrew@skamandros~$ svn log svn://svn.mplayerhq.hu/ffmpeg/trunk -r 19365
------------------------------------------------------------------------
r19365 | diego | 2009-07-07 10:28:16 +1000 (Tue, 07 Jul 2009) | 3 lines
Remove support for nonfree libamr library for AMR-NB/WB decoding/encoding.
libopencore can now be used as a replacement except for AMR-WB encoding.
------------------------------------------------------------------------
which of course makes your brief guide:
How to play AMR audio files
http://ubuntuforums.org/showpost.php?p=6320667&postcount=9
correct only for older revisions. I am still scrabbling around myself with the gitorious git repository to re-enable amr support :-). Looks like the following will be a start:
$ git clone --depth=1 git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr
$ cd opencore-amr
$ make
$ sudo make install
$ make clean
and for the FFmpeg ./configure to succeed:
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-version3
Hmmm.... maybe I have given a little more than a start :-). Mind you I note there is a debian directory with the usual section for creating a debian package which would probably be a better idea.
Andrew
bgiannes
July 9th, 2009, 11:39 PM
i need to do a
cd ffmpeg
cp ffmpeg /usr/bin/
for the build to work
FakeOutdoorsman love your work!! :-)
oh and i needed one or more of these to make x11grab work, (i have a new 9.04 install)
sudo aptitude install libice-dev libsm-dev libx11-dev libxext-dev libxi-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxt-dev libxtrap-dev libxtst-dev libxv-dev x-dev zlib1g-dev
alexcckll
July 10th, 2009, 08:08 AM
Umm - I'm on Hardy, but now scared for when I may need to upgrade to the next LTS.
I trust that the non-free encoders are available in the version of ffmpeg that I would be able to buy from Canonical?
If that is the case - I'll buy the fully-supported version - if it's just an apt-get away...
FakeOutdoorsman
July 10th, 2009, 09:17 PM
Hi Fakeoutdoorsman,
It seems that FFmpeg has dropped support for the non-free amr libraries in favour of opencore-amr:
which of course makes your brief guide:
How to play AMR audio files
http://ubuntuforums.org/showpost.php?p=6320667&postcount=9
...
Hmmm.... maybe I have given a little more than a start :-). Mind you I note there is a debian directory with the usual section for creating a debian package which would probably be a better idea.
Andrew
Thanks for the update, Andrew. I forgot about that post, and truthfully, I've been out of the FFmpeg loop for about a month and even suspended my mailing list subscription. It's been a sunny summer so far which can be rare for southeast Alaska. I'll try to catch up this week, but I can't guarantee anything. It's good to have another video enthusiast at the forums here and I appreciate the time you put into this.
i need to do a
cd ffmpeg
cp ffmpeg /usr/bin/
for the build to work
FakeOutdoorsman love your work!! :-)
oh and i needed one or more of these to make x11grab work, (i have a new 9.04 install)
sudo aptitude install libice-dev libsm-dev libx11-dev libxext-dev libxi-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxt-dev libxtrap-dev libxtst-dev libxv-dev x-dev zlib1g-dev
I never needed to copy the binary to make it work since checkinstall seems to do that fine for me. Did you use checkinstall?
You're right about x11grab. I assumed I tested this when I added --enable-x11grab, but now that I think about it I probably forgot and just thought I did. The libx11-dev package seemed to do the trick so far, but I need to actually test it this time. Thanks for the suggestion!
Umm - I'm on Hardy, but now scared for when I may need to upgrade to the next LTS.
I trust that the non-free encoders are available in the version of ffmpeg that I would be able to buy from Canonical?
If that is the case - I'll buy the fully-supported version - if it's just an apt-get away...
Forgive my ignorance, but I don't really know what you're asking. Are you talking about the Fluendo (http://shop.canonical.com/product_info.php?products_id=244) pack from the Canonical Store? I really know nothing about this software and I don't see any mention of FFmpeg in the item description.
bgiannes
July 11th, 2009, 03:47 AM
Umm - I'm on Hardy, but now scared for when I may need to upgrade to the next LTS.
I trust that the non-free encoders are available in the version of ffmpeg that I would be able to buy from Canonical?
If that is the case - I'll buy the fully-supported version - if it's just an apt-get away...
hello, i think your asking, if you need to pay for ffmpeg (full version).
the full version is FREE! the codecs are all free as well, because the code was all written from the ground up to work as codecs in the market place.
but you need to "build" ffmpeg yourself if you would like these codecs.
so take a look at post #1 and follow it... there is only a little more for you to do them just a apt-get :)
ps i think www.Canonical.com only promotes ubuntu and does training
so updating will only cost you your time.
alexcckll
July 11th, 2009, 10:13 AM
Forgive my ignorance, but I don't really know what you're asking. Are you talking about the Fluendo (http://shop.canonical.com/product_info.php?products_id=244) pack from the Canonical Store? I really know nothing about this software and I don't see any mention of FFmpeg in the item description.
Yes.
What is the difference between the FFMPEG stuff and Fluendo?
And - isn't FFMPEG normally updated as a matter of course by Release Management? Just that I'd prefer to stick to fully-supported solutions. Seeing that I currently have no problem using iPlayer or 4OD...
cor2y
July 12th, 2009, 06:08 AM
Fluendo is the payware implementation of the gstreamer decoding libraries.
It doesnt allow encoding of any media just decoding.
In good conscience i cant recommend fluendo for that anymore because as of now the opensource gstreamer decoders that you can find in ubuntu via synaptic are on par with what fluendo can do.
Also fluendo does not decode EVERY media codec format for example real media (if you still use that or view it) cant be decoded by fluendo however the opensource gstreamer library can.
I discovered this shocking revelation when i tried media playback using the fluendo decoders alone, it made buying them from my point of view useless (Protip read the fine print about what decoding it supports) since when you install the opensource decoders they handle what fluendo was intended to do. Finally fluendo doesnt have 100% support for 64bit OS systems so if you have ubuntu 64 it will be required that you install the open decoders for the unsupported media which then makes fluendo again a moot point.
cor2y
July 12th, 2009, 06:21 AM
Hi Fakeoutdoorsman,
It seems that FFmpeg has dropped support for the non-free amr libraries in favour of opencore-amr:
andrew@skamandros~$ svn log svn://svn.mplayerhq.hu/ffmpeg/trunk -r 19365
------------------------------------------------------------------------
r19365 | diego | 2009-07-07 10:28:16 +1000 (Tue, 07 Jul 2009) | 3 lines
Remove support for nonfree libamr library for AMR-NB/WB decoding/encoding.
libopencore can now be used as a replacement except for AMR-WB encoding.
------------------------------------------------------------------------
which of course makes your brief guide:
How to play AMR audio files
http://ubuntuforums.org/showpost.php?p=6320667&postcount=9
correct only for older revisions. I am still scrabbling around myself with the gitorious git repository to re-enable amr support :-). Looks like the following will be a start:
$ git clone --depth=1 git://gitorious.org/opencore-amr/opencore-amr.git
$ cd opencore-amr
$ make
$ sudo make install
$ make clean
and for the FFmpeg ./configure to succeed:
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-version3
Hmmm.... maybe I have given a little more than a start :-). Mind you I note there is a debian directory with the usual section for creating a debian package which would probably be a better idea.
Andrew
Yes it scared me a bit when i had to go hunting for opencore-amr but the documentation on enabling it in ffmpeg is simple enough
cd to your ffmpeg directory and pull the code via git within there, next cd into opencore-amr , ./configure, make , cd up one level into the ffmpeg directory ( cd .. ) and them build ffmpeg like normal with --enable-libopencore-amrwb etc via ./configure.
andrew.46
July 12th, 2009, 07:00 AM
Hi cor2y,
Yes it scared me a bit when i had to go hunting for opencore-amr but the documentation on enabling it in ffmpeg is simple enough
cd to your ffmpeg directory and pull the code via git within there, next cd into opencore-amr , ./configure, make , cd up one level into the ffmpeg directory ( cd .. ) and them build ffmpeg like normal with --enable-libopencore-amrwb etc via ./configure.
I will admit that I installed the libraries to the system as I am hopeful that MPlayer will have support for opencore-amr eventually. Mind you FFmpeg will probably discard the opencore-amr libraries in the future anyway as the SOC amr project comes to completion.
Andrew
delphinen
July 13th, 2009, 03:13 AM
Things like mplayer, ffmpeg, x264, etc. should be repackaged for all versions of any Ubuntu at least every week.
With the ffmpeg of Ubuntu 8 Hardy Heron I couldnt watch high quality videos because of the heavy frame rate dropping, and it was very frustrating. I also couldnt manage to make the mkv subs of any anime work with the PS3 Media Server. But this last problem worked without problems on OpenSUSE... why? mplayer version? mencoder parameters? fonts? why???
Well, thanksfully, I reached this thread, which, after compiling everything, made all the high quality video files work without problems even without resintalling anything, I just opened mplayer again and it worked smoothly. It also fixed the problem with the subs on the MKV files and the PS3 Media Server.
Now I remember why I loved Gentoo so much... but because of work I dont have anymore time to maintain it, so I use Ubuntu/Fedora/OpenSUSE/Arch...
but im seriously thinking on coming back to Gentoo now... building your own programs takes a lot of time, but its something that really worth it after all. With ALL of your programs being improved/fixed every day, what packaging system could stand clean always?
SL666
August 2nd, 2009, 01:16 AM
Hi Guys,
I just managed to put my first HD video on youTube, which doesn't sound like an achievement until you try to get the settings that 'the tube' understands.
I ended up using
ffmpeg -y -i in.mts -deinterlace -acodec libmp3lame -ac 2 -ab 192k -ar 44100 -vcodec libx264 -b 6000k -bt 6000k -threads 5 -f mp4 out.mkv
until i managed to get these right, i had triple speed audio, double speed video, half speed video, no audio, youtube conversion failures and most combinations.
seems the -ar is important, needs to be 44100
This was raw AVCHD video - 12 MegaBit video from a Sony HFS10.
endocded with
FFmpeg version SVN-r18858
built on May 25 2009 17:48:50, gcc: 4.3.3
on quad core AMD.
I know this isn't strictly the correct place to post this information but when i was googling i couldn't find any settings for ffmpeg > youtube.
I'd just like to say thanks again for putting these instructions together, making it easier to get high quality video on linux.
andrew.46
August 2nd, 2009, 08:40 AM
Hi SL666,
ffmpeg -y -i in.mts -deinterlace \
-acodec libmp3lame -ac 2 -ab 192k -ar 44100 \
-vcodec libx264 -b 6000k -bt 6000k -threads 5 \
-f mp4 out.mkv
Good on you for working out the correct syntax for youtube HD videos :-). But can I ask 2 questions about your syntax?
You have -f mp4 out.mkv which I suspect is a contradiction. If you mean simply to use an mp4 container I suspect just out.mp4 would be enough for FFmpeg, or do you have a special reason for this?
Will the x264 presets do anything for these videos or does youtube do this sort of encoding with your finished product anyway?
Fascinating though, i have always held off submitting videos to youtube because I was not sure how to present a file that would not be mangled at the youtube end :-).
All the best,
Andrew
SL666
August 2nd, 2009, 01:32 PM
I can't honestly tell you if its a contradiction or not, all i know is that I've been using ffmpeg mostly for encoding DVB mpegTS to play on a mythbuntu box, and i've had trouble playing it if set any other way.
Happy to be corrected (i don't know much about this stuff) but it seems to produce a different file if the extension on the output is mp4 (for example) seems to actually put it into an mkv wrapper with that extension? (i did it, it worked, i didn't ask questions) i do know that it errors if you try '-f mkv'
Unknown input or output format: mkv
andrew.46
August 3rd, 2009, 07:32 AM
Hi SL666,
Happy to be corrected (i don't know much about this stuff) but it seems to produce a different file if the extension on the output is mp4 (for example) seems to actually put it into an mkv wrapper with that extension? (i did it, it worked, i didn't ask questions) i do know that it errors if you try '-f mkv'
Seems a little odd as normally if the output is *.mp4 FFmpeg will produce an mp4 container. Never mind, I am fairly new to this myself :-). BTW the option you are after for Matroska containers is -f matroska.
Andrew
SL666
August 3rd, 2009, 07:52 AM
Interesting, just tried that all 3 ways, the container was the same for both with -f mp4 but was different (as it should be i guess) with -f matroska.
Thanks - I do feel a bit silly about that, but these things happen when you stop questioning why things work.
Cheers Steve.
andrew.46
August 3rd, 2009, 08:11 AM
Hi again SL666,
Thanks - I do feel a bit silly about that, but these things happen when you stop questioning why things work.
Well, while you are re-evaluating your syntax perhaps you could have a look at the part of the Fakeoutdoorsman's guide that deals with 'Two-Pass encode using the fastfirstpass and hq presets'. I am honestly not sure how this would work with whatever conversions youtube will perform on your video but your x264 options are a little bare except for that impressive bitrate :-).
I'm not sure if the Fakeoutdoorsman has worked with youtube at all, and in particular with submitting videos for the 'HD' setting?
Andrew
Fe++
August 3rd, 2009, 09:26 AM
hi dear community,
I have a problem in ffmpeg installation, i follow the procedure explained in this thread and it work without problem, but when the installation is complete and I try to compile an example ffmpeg program (libavcodec/apiexample), the compiler don't find avcodec.h, and all the referenced function are indicated as undefined reference. Obviously i've specificate -lavacodec at gcc. What's the matter?
Thanks in advance
J1S1E1
August 3rd, 2009, 10:16 AM
Fe++
The avcodec.h file has been moved in one of the revision changes. It installs in /usr/include/libavcodec/ instead of /usr/include/ffmpeg/ I had a similar problem with another programs configure not detecting it, so I copied the file into the other folder (since I was too lazy to figure out how to change the configure script.) Perhaps this is the problem.
Fe++
August 3rd, 2009, 11:13 AM
Thanks for the quick reply. I haven't both of these two path, i found libavcodec.a in /usr/local/lib/, I think there is something wrong? Anyone have any idea?
Fe++
August 3rd, 2009, 11:34 AM
I found the ffmpeg folder in /root/mpeg/? It's correct? I include these library using netbeans but my compiler log there is a lot of undefined reference at ffmpeg function. What can I do?
Fe++
August 3rd, 2009, 04:16 PM
I resolve the dependencies by includes all these library: lbavformat,libavcodec, libavdevice, libavutil, libswscale, libthread, libxvidcore, libtheora, libogg,libfaac,libfaad, libx264. But now i have another error: /usr/bin/ld: cannot find -lx264.
I've installed ffmpeg and x264 following the procedure explained on this thread. What could be the problem?
Thanks in advance
FakeOutdoorsman
August 3rd, 2009, 08:39 PM
Hi again SL666,
Well, while you are re-evaluating your syntax perhaps you could have a look at the part of the Fakeoutdoorsman's guide that deals with 'Two-Pass encode using the fastfirstpass and hq presets'. I am honestly not sure how this would work with whatever conversions youtube will perform on your video but your x264 options are a little bare except for that impressive bitrate :-).
I'm not sure if the Fakeoutdoorsman has worked with youtube at all, and in particular with submitting videos for the 'HD' setting?
Andrew
I uploaded my first "HD" video to YouTube last week and also experienced issues. YouTube halved my frame rate and doubled the file size. I converted video from a AVCHD Panasonic HMC-150 to a huffyuv AVI (outputted from Adobe Premiere CS 3) to H.264/AAC using the libx264 fastfirstpass and hq presets for a two-pass encode. I made a good number of tests, including no audio tests, until I found a combination that worked. For some reason YouTube didn't like -flags2 +dct8x8 (included in the libx264 hq preset) in my encoded video because it worked after I added -vpre main to the second pass which I believe disables dct8x8 and changes the H.264 profile from High to Main. This could probably qualify as a bug on YouTube's side. I read some YouTube help posts of others having similar problems from AVCHD sources. I ended up using:
ffmpeg -i input.mts -an -vcodec libx264 -vpre fastfirstpass -threads 0 -b 1728k -bt 1728k -pass 1 -f mp4 -y /dev/null && ffmpeg -i input.mts -acodec libfaac -ab 192k -ac 2 -ar 44100 -vcodec libx264 -vpre hq -vpre main -threads 0 -b 1728k -bt 1728k -pass 2 -f mp4 -y output.mp4
andrew.46
August 4th, 2009, 10:25 AM
Hi Fakeoutdoorsman,
I made a good number of tests, including no audio tests, until I found a combination that worked.
Thanks yet again, I have included your final successful syntax in my personal FFmpeg 'cookbook'!
Andrew
FakeOutdoorsman
August 5th, 2009, 12:59 AM
hi dear community,
I have a problem in ffmpeg installation, i follow the procedure explained in this thread and it work without problem, but when the installation is complete and I try to compile an example ffmpeg program (libavcodec/apiexample), the compiler don't find avcodec.h, and all the referenced function are indicated as undefined reference. Obviously i've specificate -lavacodec at gcc. What's the matter?
Thanks in advance
I'm sorry to say that I have no experience with api-example. Perhaps the FFmpeg libav-user (http://ffmpeg.org/contact.html) mailing list could help or you could try the #ffmpeg IRC channel.
Hi Fakeoutdoorsman,
Thanks yet again, I have included your final successful syntax in my personal FFmpeg 'cookbook'!
Andrew
I'm glad it was useful. Does this mean we will get to see some HD videos of your side of the world?
andrew.46
August 5th, 2009, 01:08 PM
Hi FakeOutdoorsman,
I'm glad it was useful. Does this mean we will get to see some HD videos of your side of the world?
Nothing but kangaroos and dust here :-).
Andrew
chetan55
August 5th, 2009, 08:07 PM
Hello ,
I am trying to convert avi to 3gp and my end goal is to add text to the 3gp file so i started with convertting avi to 3gp and get this error and got stuck in first step would appreciate if any body can help me with this
./ffmpeg -i ../Continental/146362e7e49c3a6fa0f9c3960b05d62f.avi -s qcif -vcodec h263 -acodec libfaac -ac 1 -ar 8000 -r 25 -ab 32 -y outputfile.3gp
FFmpeg version SVN-r19583, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration:
libavutil 50. 2. 0 / 50. 2. 0
libavcodec 52.22. 3 / 52.22. 3
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Aug 5 2009 11:53:19, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
[avi @ 0x88b1ad0]non-interleaved AVI
Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001)
Input #0, avi, from '../Continental/146362e7e49c3a6fa0f9c3960b05d62f.avi':
Duration: 00:01:13.17, start: 0.000000, bitrate: 3965 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 29.97 tbr, 29.97 tbn, 30k tbc
Stream #0.1: Audio: adpcm_ima_wav, 44100 Hz, mono, s16, 177 kb/s
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Unknown encoder 'libfaac'
I am new ffmpeg. so please if somebody know the solution please post it
Thanks
Chetan
FakeOutdoorsman
August 5th, 2009, 08:29 PM
Unknown encoder 'libfaac'
Your FFmpeg configuration line is blank so libfaac is unavailable for audio encoding. Did you skip or change any of the steps from the guide?
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
You need to add a "k" after your bitrate: -ab 32k.
chetan55
August 5th, 2009, 09:48 PM
I didn't follow the steps because it was installed previosuly.
Thanks
Chetan
chetan55
August 5th, 2009, 09:51 PM
when i do configure I get
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --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.
FakeOutdoorsman
August 5th, 2009, 10:04 PM
when i do configure I get
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --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.
Did you start the guide from the beginning? I'm guessing that you omitted installing the libfaad-dev package because of the "FAAD test failed" error.
What version of Ubuntu are you using? You may find it easier to use FFmpeg from the repository if you are on Ubuntu Intrepid or Jaunty, or from Medibuntu if you are using Hardy:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
If you are looking for a FFmpeg GUI, try WinFF (http://code.google.com/p/winff/wiki/UbuntuInstallation).
chetan55
August 6th, 2009, 01:43 AM
Ok i delete everything and started from fresh
when I do configure i get below error please let me know the solution
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --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.
Thank you very much for helping me
Thanks
Chetan
FakeOutdoorsman
August 6th, 2009, 01:54 AM
Ok i delete everything and started from fresh
when I do configure i get below error please let me know the solution
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --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.
Thank you very much for helping me
Thanks
Chetan
Open a terminal window, and enter the following command. It will install the libfaad-dev package:
sudo apt-get install libfaad-dev
Now continue with your FFmpeg configuration command. If that fails to fix your error, then paste the end section of ~/ffmpeg/config.err.
chetan55
August 6th, 2009, 05:22 PM
Hey,
sudo apt-get install libfaad-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package libfaad-dev
Please let me know next steps to correct this
Thanks
Chetan
FakeOutdoorsman
August 6th, 2009, 06:58 PM
What version of Ubuntu are you using?
Are you using any third-party repositories or Personal Package Archives (PPA)?
What are the contents of your /etc/apt/sources.list file?
If there are any files in the /etc/apt/sources.list.d/ directory then give the contents of those files.
Give the result of the following command:
tail ~/ffmpeg/config.err
alexcckll
August 6th, 2009, 08:14 PM
Umm- I may sound dense.. but all the developer-level stuff is flying over my head.
All these enhancements you all talk about... will they be in my Update Manager eventually?
Possibly even making it into 8.04LTS.. so if a format is a bit teary.. will Release Management fix it eventually?
Without me using anything except Main, Restricted, Universe and Multiverse?
All I really know to do is stick to the Official Supported Release repositories...
Just your trusting Ubuntu desktop user...
chetan55
August 6th, 2009, 09:30 PM
Ubuntu Version
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"
Are you using any third-party repositories or Personal Package Archives (PPA)?
I don't know
What are the contents of your /etc/apt/sources.list
# deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
# deb cdrom:[Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu/ gutsy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy universe
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ gutsy multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates multiverse
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
# deb http://archive.canonical.com/ubuntu gutsy partner
# deb-src http://archive.canonical.com/ubuntu gutsy partner
deb http://security.ubuntu.com/ubuntu gutsy-security main restricted
deb-src http://security.ubuntu.com/ubuntu gutsy-security main restricted
deb http://security.ubuntu.com/ubuntu gutsy-security universe
deb-src http://security.ubuntu.com/ubuntu gutsy-security universe
deb http://security.ubuntu.com/ubuntu gutsy-security multiverse
deb-src http://security.ubuntu.com/ubuntu gutsy-security multiverse
No files in
/etc/apt/sources.list.d/
tail ~/ffmpeg/config.err
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -std=c99 -D_LARGEFILE_SOURCE -c -o /tmp/ffconf.ogwu4110.o /tmp/ffconf.YaQC4101.c
check_header faad.h
check_cpp
BEGIN /tmp/ffconf.YaQC4101.c
1 #include <faad.h>
2 int x;
END /tmp/ffconf.YaQC4101.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -E -o /tmp/ffconf.ogwu4110.o /tmp/ffconf.YaQC4101.c
/tmp/ffconf.YaQC4101.c:1:18: error: faad.h: No such file or directory
FAAD test failed.
I appreciate you helping me thanks
Chetan
FakeOutdoorsman
August 6th, 2009, 10:29 PM
Ubuntu Version
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"
Ubuntu Gutsy is out-dated and support for Gutsy was dropped on April 18, 2009. Can you upgrade to a supported version of Ubuntu? If not, you may still be able to compile FFmpeg. First, you need to change to the out-dated repository in /etc/apt/sources.list by replacing all instances of us.archive.ubuntu.com with old-releases.ubuntu.com. You may also be able to do this in the Synaptic Package Manager with Settings - > Repositories, but I didn't confirm this. Then run the following:
sudo apt-get update
Now follow this guide:
HOWTO: Install FFmpeg and x264 on Ubuntu Dapper Drake 6.06 LTS (http://ubuntuforums.org/showpost.php?p=6566863&postcount=287)
FakeOutdoorsman
August 6th, 2009, 10:32 PM
Umm- I may sound dense.. but all the developer-level stuff is flying over my head.
All these enhancements you all talk about... will they be in my Update Manager eventually?
I don't fully understand your questions. The installation of your compiled FFmpeg is handled by a program called checkinstall whose job is to nicely and cleanly integrate installed software into the Ubuntu package management system (apt, aptitude, and/or Synaptic Package Manager).
Possibly even making it into 8.04LTS.. so if a format is a bit teary.. will Release Management fix it eventually?
Without me using anything except Main, Restricted, Universe and Multiverse?
Sorry, but I don't understand what you're asking.
All I really know to do is stick to the Official Supported Release repositories...
This guide uses official packages from the Ubuntu repository to compile FFmpeg.
chetan55
August 7th, 2009, 12:19 AM
Thanks you very mcuh i did work channging the ulr and then following the process.
I have 2 more question and would be vey happy if you answer them
Url to be replace with this one
http://security.ubuntu.com/ubuntu : ??
how I can add text to 3gp
Thanks Lot
Chetan
FakeOutdoorsman
August 7th, 2009, 12:38 AM
Thanks you very mcuh i did work channging the ulr and then following the process.
I have 2 more question and would be vey happy if you answer them
Url to be replace with this one
http://security.ubuntu.com/ubuntu : ??
You can delete those lines because your version of Ubuntu is not supported by security updates anymore.
how I can add text to 3gp
I've never worked with subtitles before, so I am unsure what to recommend for that.
iheartubuntu
August 10th, 2009, 04:44 PM
After following the instructions, Im getting an error that I dont have FFPLAY installed now. Any tips how to fix this? I didnt get this error before, but WinFF would just crash out and not do the job. Now its asking me for FFPLAY.
FakeOutdoorsman
August 10th, 2009, 07:29 PM
After following the instructions, Im getting an error that I dont have FFPLAY installed now. Any tips how to fix this? I didnt get this error before, but WinFF would just crash out and not do the job. Now its asking me for FFPLAY.
Can you display the error here? Is FFmpeg or WinFF asking you for FFplay? What version of Ubuntu are you using?
TwistedNRG
August 12th, 2009, 08:35 PM
When trying to decode a video using this command I put in the terminal to start the ffmpeg process ...
ffmpeg -r 30 -vcodec libx264 -s 480x320 -f video4linux -i /dev/video0 http://localhost:8090/broadcast_feed.ffm
I get the following error (more specifically the very last line)
FFmpeg version SVN-r19633, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.37. 0 / 52.37. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Aug 12 2009 13:12:35, gcc: 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-24ubuntu
Unknown decoder 'libx264'
I followed the tutorial exactly more then once from beginning to end and I still keep getting the same error. Any help is greatly appreciated. Thank you.
FakeOutdoorsman
August 12th, 2009, 08:58 PM
...
Unknown decoder 'libx264'
I followed the tutorial exactly more then once from beginning to end and I still keep getting the same error. Any help is greatly appreciated. Thank you.
You're getting that error because libx264 is an encoder, not a decoder:
$ ffmpeg -formats | grep libx264
EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
The EV indicates that libx264 is an Encoder, Video Format. The H.264 decoder is called h264.
TwistedNRG
August 12th, 2009, 10:18 PM
You're getting that error because libx264 is an encoder, not a decoder:
$ ffmpeg -formats | grep libx264
EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10The EV indicates that libx264 is an Encoder, Video Format. The H.264 decoder is called h264.
oh ok I didn't realize that was the case. Thanks a lot
TwistedNRG
August 13th, 2009, 05:27 PM
new error ...
I am using the following command to decode a video ..
ffmpeg -r 30 -vcodec h264 -s 480x320 -f video4linux -i /home/phil/Desktop/iphone.avi http://localhost:8090/broadcast_feed.ffm
and I get the following error when I add in -f video4linux flag .. if I take that flag out there are no errors...
FFmpeg version SVN-r19605, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libx264
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.37. 0 / 52.37. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Aug 6 2009 13:44:14, gcc: 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-24ubuntu1)
[video4linux @ 0xa684450]VIDIOCGCAP: Inappropriate ioctl for device
/home/phil/Desktop/iphone.avi: I/O error occurred
Usually that means that input file is truncated and/or corrupted.
any help is greatly appreciated. Thank you.
FakeOutdoorsman
August 13th, 2009, 06:01 PM
Thanks. After installing ffmpeg with LAMP can I run youtube like websites?
You can use FFmpeg to encode your video to H.264/AAC MP4, upload it to your server, and use a Flash player such as JW Player (http://www.longtailvideo.com/) or Flowplayer (http://flowplayer.org/) to display your video to your audience. Here is a very simple example (http://greasedscotsman.com/) with no player controls.
Alternatively, you can use "YouTube Clones" like VidiScript (http://www.vidiscript.com/) or PHPmotion (http://www.phpmotion.com/), but I have absolutely no experience with them and I'm not sure if they even use FFmpeg.
FakeOutdoorsman
August 13th, 2009, 06:52 PM
new error ...
I am using the following command to decode a video ..
ffmpeg -r 30 -vcodec h264 -s 480x320 -f video4linux -i /home/phil/Desktop/iphone.avi http://localhost:8090/broadcast_feed.ffm
and I get the following error when I add in -f video4linux flag .. if I take that flag out there are no errors...
FFmpeg version SVN-r19605, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libx264
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.37. 0 / 52.37. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Aug 6 2009 13:44:14, gcc: 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-24ubuntu1)
[video4linux @ 0xa684450]VIDIOCGCAP: Inappropriate ioctl for device
/home/phil/Desktop/iphone.avi: I/O error occurred
Usually that means that input file is truncated and/or corrupted.
any help is greatly appreciated. Thank you.
This looks more like a video4linux issue, but I've only used it once myself. I recommend heading to the #ffmpeg IRC channel and asking there. Make sure to pastebin (http://ffmpeg.pastebin.com) your full command and full FFmpeg output when asking questions. If that fails to give an answer you can try the ffmpeg-user mailing list (http://ffmpeg.org/contact.html). Maybe someone with more experience with video4linux can help you.
TwistedNRG
August 13th, 2009, 08:02 PM
This looks more like a video4linux issue, but I've only used it once myself. I recommend heading to the #ffmpeg IRC channel and asking there. Make sure to pastebin (http://ffmpeg.pastebin.com) your full command and full FFmpeg output when asking questions. If that fails to give an answer you can try the ffmpeg-user mailing list (http://ffmpeg.org/contact.html). Maybe someone with more experience with video4linux can help you.
Ok great, thanks a lot. I shall do just that.
igorfelluga
August 14th, 2009, 08:48 AM
Hi
Sametime with this command
ffmpeg -i myfile -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -crf 22 -threads 0 test.1.mp4
I get this error:
[libx264 @ 0x2a21280]b-pyramid + mb-tree is not supported
[libx264 @ 0x2a21280]using SAR=1/1
[libx264 @ 0x2a21280]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[libx264 @ 0x2a21280]profile High, level 3.1
Output #0, mp4, to 'test.1.mp4':
Stream #0.0(und): Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=10-51, 200 kb/s, 25 tbn, 25 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
x264 [error]: malloc of size 4214784 failedtime=1.05 bitrate= 0.4kbits/s
Video encoding failed
FakeOutdoorsman
August 14th, 2009, 07:24 PM
Hi
Sametime with this command
ffmpeg -i myfile -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -crf 22 -threads 0 test.1.mp4
I get this error:
[libx264 @ 0x2a21280]b-pyramid + mb-tree is not supported
[libx264 @ 0x2a21280]using SAR=1/1
[libx264 @ 0x2a21280]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[libx264 @ 0x2a21280]profile High, level 3.1
Output #0, mp4, to 'test.1.mp4':
Stream #0.0(und): Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=10-51, 200 kb/s, 25 tbn, 25 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
x264 [error]: malloc of size 4214784 failedtime=1.05 bitrate= 0.4kbits/s
Video encoding failed
You have encountered a new error. x264 has a new option: mb-tree. This option is going to dramatically increase video quality of some sources, but it is very new and there are some problems to be aware of:
1. For now it is incompatible with the b-pyramid option. Some -vpre presets currently enable b-pyramid, and mb-tree is enabled by default and causes your error. You can disable b-pyramid by adding -flags2 -bpyramid after -vpre hq:
ffmpeg -i myfile -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -flags2 -bpyramid -crf 22 -threads 0 test.1.mp4
Right now the option to disable mb-tree hasn't been mapped to FFmpeg yet, but it should be soon.
2. The mb-tree option currently does a bad job with fades (video going to or from light and black) and makes them look blocky, but this is being worked on. [see post below]
When using the latest FFmpeg and x264 you get the advantage of bugfixes and recent additions, but once in a while you will encounter errors as new features are introduced. This is an exciting new option and should be watched closely. More info:
x264 "Macroblock Tree Ratecontrol" testing (committed) (http://forum.doom9.org/showthread.php?t=148686)
A tree of thought (http://x264dev.multimedia.cx/?p=98)
Update: This is the more important error:
x264 [error]: malloc of size 4214784 failedtime=1.05 bitrate= 0.4kbits/s
Video encoding failed
I am guessing that you ran out of memory because of mb-tree. You can either wait until you can disable mb-tree through FFmpeg, or revert to an earlier x264 before that option was enabled by default (revision 1196 and earlier).
Dark Shikari
August 14th, 2009, 08:29 PM
You have encountered a new error. x264 has a new option: mb-tree. This option is going to dramatically increase video quality of some sources, but it is very new and there are some problems to be aware of:
1. It is incompatible with the b-pyramid option. Some -vpre presets currently enable b-pyramid, and mb-tree is enabled by default and causes your error. You can disable b-pyramid by adding -flags2 -bpyramid after -vpre hq:That's not an error; x264 will simply disable B-pyramid if it's on and MB-tree isn't turned off.
2. The mb-tree option currently does a bad job with fades (video going to or from light and black) and makes them look blocky, but this is being worked on.Don't spread misinformation; if such a problem existed, I wouldn't have committed MB-tree. MB-tree simply doesn't help fades, so it's possible for them to look relatively worse if the rest of the video got a lot better.
Update: This is the more important error:
x264 [error]: malloc of size 4214784 failedtime=1.05 bitrate= 0.4kbits/s
Video encoding failed
I am guessing that you ran out of memory because of mb-tree. You can either wait until you can disable mb-tree through FFmpeg, or revert to an earlier x264 before that option was enabled by default (revision 1196 and earlier).Or encode at a lower resolution, or upgrade to 64-bit.
That error seems odd, since I can encode 1080p with -vpre hq just fine on 32-bit Windows despite the overhead of Avisynth input, so I suspect something may be weird/broken on your end, like a miscompiled ffmpeg and rc-lookahead being set to a very large value (you can tell how large rc-lookahead is by the number of frames x264 buffers before it starts encoding).
Additionally note that the malloc-checking was added only recently; prior to that, x264 would have just silently crashed.
FakeOutdoorsman
August 14th, 2009, 08:43 PM
Don't spread misinformation; if such a problem existed, I wouldn't have committed MB-tree. MB-tree simply doesn't help fades, so it's possible for them to look relatively worse if the rest of the video got a lot better.
I stand corrected. I shouldn't believe everything I read in #ffmpeg.
DDM
August 18th, 2009, 06:51 PM
Thanks for keeping this guide updated. ffmpeg's configure script seems to change syntax on a monthly basis.
Also that checkinstall trick is very handy.
FakeOutdoorsman
August 18th, 2009, 07:00 PM
Thanks for keeping this guide updated. ffmpeg's configure script seems to change syntax on a monthly basis.
Also that checkinstall trick is very handy.
I'm glad it has been useful, although, as you can see above, I don't get everything right. I must give credit to andrew.46 for much of the checkinstall stuff. I will be working on a new FFmpeg related screen capturing guide soon.
mocha
August 20th, 2009, 04:26 PM
Does anyone know what system-wide effect there is by compiling with --enable-shared? I need to do this in order to get xine-vdpau svn to compile.
Does --enable-shared affect the usage of ffmpeg or is it just to provide shared libraries for other programs that need them, such as xine-vdpau? Does it affect other programs that depend on ffmpeg? I'm not clear how this works. I guess my question is, what other files are added to the ffmpeg package when using --enable-shared and what collateral effects does that have (if any)?
What effect will there be on other libav**** packages that are installed in the package manager? I have a few packages called libavformat, unstripped, etc... If I try to remove them they want to take a ton of programs with them. What is their role and does --enable-shared mess things up even further?
Thanks for any insight!
FakeOutdoorsman
August 21st, 2009, 03:34 AM
Does anyone know what system-wide effect there is by compiling with --enable-shared? I need to do this in order to get xine-vdpau svn to compile.
Does --enable-shared affect the usage of ffmpeg or is it just to provide shared libraries for other programs that need them, such as xine-vdpau? Does it affect other programs that depend on ffmpeg? I'm not clear how this works. I guess my question is, what other files are added to the ffmpeg package when using --enable-shared and what collateral effects does that have (if any)?
What effect will there be on other libav**** packages that are installed in the package manager? I have a few packages called libavformat, unstripped, etc... If I try to remove them they want to take a ton of programs with them. What is their role and does --enable-shared mess things up even further?
Thanks for any insight!
I've hardly ever used FFmpeg with --enable-shared, but I also haven't compiled many things that need that. I don't think this option will have any effect on other packages unless, of course, you are compiling something that needs that option. This is because this guide installs everything to /usr/local/lib instead of /usr/lib. This separation of compiled and system/repository packages creates a nice safety net. Repository packages should look for the usual repository versions of libavformat, unstripped, etc in /usr/lib, and your other compiled packages can use whatever is in /usr/local/lib. I think you can have repository packages utilize your compiled stuff in /usr/local/lib, but I'm unsure how to do that. That's more of a subject for mc4man. Package management is where my attention starts to fade out.
Installing with --enable-shared adds the following files and links:
/usr/local/lib/libswscale.so.0.7.1
/usr/local/lib/libavformat.so.52.37.0
/usr/local/lib/libavcodec.so.52.32.0
/usr/local/lib/libavdevice.so.52.2.0
/usr/local/lib/libavutil.so.50.3.0
/usr/local/lib/libavutil.so.50 -> libavutil.so.50.3.0
/usr/local/lib/libavcodec.so -> libavcodec.so.52.32.0
/usr/local/lib/libavformat.so -> libavformat.so.52.37.0
/usr/local/lib/libavdevice.so.52 -> libavdevice.so.52.2.0
/usr/local/lib/libswscale.so -> libswscale.so.0.7.1
/usr/local/lib/libswscale.so.0 -> libswscale.so.0.7.1
/usr/local/lib/libavutil.so -> libavutil.so.50.3.0
/usr/local/lib/libavcodec.so.52 -> libavcodec.so.52.32.0
/usr/local/lib/libavdevice.so -> libavdevice.so.52.2.0
/usr/local/lib/libavformat.so.52 -> libavformat.so.52.37.0
I compared the .deb files (one with --enabled-shared, one without) that are created in ~/ffmpeg after installing with checkinstall:
dpkg -c ffmpeg_3:0.svn20090820-12ubuntu3-1_i386.deb | cut - -c 50- > ffmpegdebshared.txt
The only thing addition to this guide is to run sudo ldconfig after your shared FFmpeg installation to update the links to the new shared libraries; otherwise you might get some errors if you try using FFmpeg. Also, stay away from any libav*-dev packages if you're going to compile FFmpeg and other things that want a compiled FFmpeg. I'm not sure if they actually cause problems for such a setup, but I have a shadow of a memory that indicates that it has caused issues for some users.
mc4man
August 21st, 2009, 06:18 AM
Does anyone know what system-wide effect there is by compiling with --enable-shared
I don't see any real issue following the guide here and enabling shared. The packages you have or install that depend on libav*s will use the existing ones.
What happens, or what you can control when you build against not exactly sure, would be easy to test.
From my viewpoint of updating hardy to whatever extent possible, building ffmpeg and everything else off of it and doing all as packages was the best choice, the least of which of just keeping track, I think my local repo is about 130 packages now.
Plus there's the assurance that anything built or installed that uses libavcodec will use the current one.
Anyway I'm somewhat surprised your saying that xine-lib needs to build off of the shared libs, it would seem more likely it needs the dev files. (possibly it has some shared libs as install depends,
Would be curious to know what source your using, and if the config or build is failing, what's the error(s).
The xine-vdpau source I saw only needed the -dev's, and for interest's sake also took a look at xine-lib-1.2.
Actually both failed the build in exactly the same manner due to a faulty ff_video_decoder.c file ( at least using an ffmpeg build from yesterday.
So if you get an error concerning 'ff_video_decoder.c' let me know, I patched it so the build would complete, (on xine-lib-1.2), though haven't checked for any unintended issues. ( and probably can't as 1.2 is useless here.
mc4man
August 21st, 2009, 07:49 AM
small note slightly off topic to thread
Happened to be on a jaunty live cd so got this source of xine-vdpau
svn co svn://jusst.de/xine-vdpau
............................
Checked out revision 279.
Using just the jaunty repo libav*s (-devs) and adding a few other packages it built just fine. (libpostproc-dev is a must, as is cvs
Using the latest ffmpeg svn, built as described here, (static and shared, enabled postproc), the build failed as described previously.
So while the source can be patched to work with latest svn ffmpeg, you shouldn't have any issues with the jaunty repo version (if that's what your using, the intrepid repo version is a bit to old
That svn source of xine-vdpau seems a bit old, don't know how well it would work
mocha
August 21st, 2009, 09:42 AM
The main problem on my end is that something is broken. I can't even install the libav dev or libpostproc dev packages anymore. Note, I believe this happened from installing debs from getdeb.net. It seems to trace back to some dvd-slideshow program. Probably if I cleared all this stuff out everything would resolve again.
The following packages have unmet dependencies:
libavformat-dev: Depends: libavcodec-dev (= 3:0.svn20090303-1ubuntu6) but it is not going to be installed
E: Broken packages
Even though nothing in synaptic is shown as broken.
I did compile ffmpeg r18991 (an older version) with --enable-shared and then I was able to compile the latest svn of xine-vdpau. My ffmpeg and xine-vdpau are both in /usr/local, so I guess that's why it works.
Thanks for all the information.
mocha
August 21st, 2009, 05:30 PM
Okay I figured out what the problem is. I figured it out by looking at dvdstyler in the jaunty repo. dvdstyler depends on the libavcodec-unstripped-52 and libavutil-unstripped-49 packages, but you can't install any of the libav dev packages when these unstripped packages are installed. I guess most of you don't use dvdstyler?? What a shame!
This is actually a big problem for others too, see https://bugs.launchpad.net/ubuntu/+source/ffmpeg/+bug/312898 This bug report relates it to ffmpeg so you might want to review this fakeoutdoorsman. Apparently it's fixed in karmic by including the necessary dev files in the unstripped packages as well. Quote from the bug report:
"So if (in karmic) libavcodec-dev can now be satisfied by having libavcodec- unstripped, etc., then it's all good. thanks!"
igorfelluga
August 29th, 2009, 04:09 PM
That's not an error; x264 will simply disable B-pyramid if it's on and MB-tree isn't turned off.
Don't spread misinformation; if such a problem existed, I wouldn't have committed MB-tree. MB-tree simply doesn't help fades, so it's possible for them to look relatively worse if the rest of the video got a lot better.
Or encode at a lower resolution, or upgrade to 64-bit.
That error seems odd, since I can encode 1080p with -vpre hq just fine on 32-bit Windows despite the overhead of Avisynth input, so I suspect something may be weird/broken on your end, like a miscompiled ffmpeg and rc-lookahead being set to a very large value (you can tell how large rc-lookahead is by the number of frames x264 buffers before it starts encoding).
Additionally note that the malloc-checking was added only recently; prior to that, x264 would have just silently crashed.
how to upgrade to 64'
forgewire
August 29th, 2009, 11:39 PM
It looks like you need a Computer Science degree to install ffmpeg properly on Linux, but this tutorial works like charm.
The best I've come across.
To convert your flash video loaded from Internet to 3gp that you can play on your mobile phone use something like:
ffmpeg -i input.flv -s qcif -vcodec h263 -acodec libfaac -ac 1 -ar 22050 -r 25 -ab 128 -y output.3gp
FakeOutdoorsman
August 30th, 2009, 06:28 PM
how to upgrade to 64'
I believe he is referring to a 64-bit installation of Ubuntu.
It looks like you need a Computer Science degree to install ffmpeg properly on Linux, but this tutorial works like charm.
The best I've come across.
To convert your flash video loaded from Internet to 3gp that you can play on your mobile phone use something like:
ffmpeg -i input.flv -s qcif -vcodec h263 -acodec libfaac -ac 1 -ar 22050 -r 25 -ab 128 -y output.3gp
Thanks, forgewire. I'm glad it worked.
igorfelluga
August 31st, 2009, 09:21 AM
I believe he is referring to a 64-bit installation of Ubuntu.
I have Ubuntu 9 64bit
rodrigopolo
September 2nd, 2009, 08:40 AM
I want to make an static, stand alone, single file build of FFmpeg on Ubuntu 9.04
I have done this with SVN-r16315 using the following "config" settings:
./configure \
--enable-static \
--extra-cflags=-static \
--extra-ldflags=-static \
--disable-shared \
--enable-libmp3lame \
--enable-gpl \
--enable-libfaad \
--enable-pthreads \
--enable-libfaac \
--enable-libxvid \
--enable-x11grab \
--enable-libgsm \
--enable-libx264 \
--enable-libtheora \
--enable-libvorbis
As you can see the "--extra-cflags=-static --extra-ldflags=-static" options make the magic, but now with the latest SVN doesn't work, also with the V0.5
Here I share the guide that IT WORKS but only with SVN-r16315
[1-Install needed packages]:
sudo aptitude install build-essential subversion git-core zlib1g-dev checkinstall libgpac-dev libfaad-dev libfaac-dev liblame-dev libtheora-dev libvorbis-dev gpac liba52-dev libgsm1-dev libxvidcore4-dev libschroedinger-dev libogg-dev libspeex-dev
[2-Install yasm]:
cd ~
wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.1.tar.gz
tar xzvf yasm-0.7.1.tar.gz
cd yasm-0.7.1
./configure
make
sudo checkinstall
[3. Get latest libx264]:
cd ~/
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-pthread --enable-mp4-output --enable-shared
make
sudo checkinstall
[4-Update the links to the shared libraries created by x264]:
sudo ldconfig
[5. Get newest ffmpeg]:
cd ~/
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
-----------------------------------------------------------
./configure \
--enable-static \
--extra-cflags=-static \
--extra-ldflags=-static \
--disable-shared \
--enable-libmp3lame \
--enable-gpl \
--enable-libfaad \
--enable-pthreads \
--enable-libfaac \
--enable-libxvid \
--enable-x11grab \
--enable-libgsm \
--enable-libx264 \
--enable-libtheora \
--enable-libvorbis
ANY HELP will be apreciated
FakeOutdoorsman
September 2nd, 2009, 10:32 PM
I want to make an static, stand alone, single file build of FFmpeg on Ubuntu 9.04
I have done this with SVN-r16315 using the following "config" settings:
./configure \
--enable-static \
--extra-cflags=-static \
--extra-ldflags=-static \
--disable-shared \
--enable-libmp3lame \
--enable-gpl \
--enable-libfaad \
--enable-pthreads \
--enable-libfaac \
--enable-libxvid \
--enable-x11grab \
--enable-libgsm \
--enable-libx264 \
--enable-libtheora \
--enable-libvorbis
As you can see the "--extra-cflags=-static --extra-ldflags=-static" options make the magic, but now with the latest SVN doesn't work, also with the V0.5
Here I share the guide that IT WORKS but only with SVN-r16315
[1-Install needed packages]:
sudo aptitude install build-essential subversion git-core zlib1g-dev checkinstall libgpac-dev libfaad-dev libfaac-dev liblame-dev libtheora-dev libvorbis-dev gpac liba52-dev libgsm1-dev libxvidcore4-dev libschroedinger-dev libogg-dev libspeex-dev
[2-Install yasm]:
cd ~
wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.1.tar.gz
tar xzvf yasm-0.7.1.tar.gz
cd yasm-0.7.1
./configure
make
sudo checkinstall
[3. Get latest libx264]:
cd ~/
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-pthread --enable-mp4-output --enable-shared
make
sudo checkinstall
[4-Update the links to the shared libraries created by x264]:
sudo ldconfig
[5. Get newest ffmpeg]:
cd ~/
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
-----------------------------------------------------------
./configure \
--enable-static \
--extra-cflags=-static \
--extra-ldflags=-static \
--disable-shared \
--enable-libmp3lame \
--enable-gpl \
--enable-libfaad \
--enable-pthreads \
--enable-libfaac \
--enable-libxvid \
--enable-x11grab \
--enable-libgsm \
--enable-libx264 \
--enable-libtheora \
--enable-libvorbis
ANY HELP will be apreciated
I'm not going to be very helpful because I'm unsure of the answer. This would be a question for the #ffmpeg IRC channel or the ffmpeg-user (http://ffmpeg.org/contact.html) mailing list. Your instructions are dated in several ways, but you can see the differences in the guide. If you ask for help on the IRC channel or mailing list make sure to supply your FFmpeg error.
mc4man
September 3rd, 2009, 01:59 AM
While I can only make a very uneducated guess as to why you'd want to use those flags, based on your config this would work on a current svn.
./configure --enable-static --extra-cflags=-static --extra-ldflags=-static --disable-shared --enable-libmp3lame --enable-gpl --enable-pthreads --enable-libxvid --enable-x11grab --enable-libgsm --enable-libx264 --enable-libtheora
(lose the libfaad, libfaac, libvorbis and in the unlikely event you have libva-dev intalled then add a --disable-hwaccels (or specific to vaapi
qyot27
September 5th, 2009, 02:36 AM
One of the reasons is that FAAC is no longer considered free (because it contains code from the ISO reference encoder (http://www.audiocoding.com/faac.html)), and thus you have to use the --enable-nonfree option to include it.
I wouldn't be surprised in the least if that was the impetus behind the Low Complexity AAC encoder project in ffmpeg's SoC lineup in 2008.
qyot27
September 10th, 2009, 06:49 AM
Several months ago I had asked about including x264's revision number in the checkinstall process in place of the date. That's been working perfectly, but I cannot seem to figure out how to do the same with ffmpeg. Any ideas?
andrew.46
September 10th, 2009, 07:46 AM
Hi qyot,
Several months ago I had asked about including x264's revision number in the checkinstall process in place of the date. That's been working perfectly, but I cannot seem to figure out how to do the same with ffmpeg. Any ideas?
Traditionally you would use cut for this, perhaps something like:
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg \
--pkgversion "3:0.svn-`grep "FFMPEG_VERSION" version.h | \
cut -d '"' -f2 | cut -d '-' -f2`-12ubuntu3" --default
Or there is a fairly cool version of the above using sed:
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg \
--pkgversion "3:0.svn-r`grep "FFMPEG_VERSION" version.h | \
sed 's/[^0-9]//g'`-12ubuntu3" --default
My brain has always worked better with sed than cut, and I am not sure what that says about me :).
Andrew
FakeOutdoorsman
September 11th, 2009, 04:12 AM
Or there is a fairly cool version of the above using sed:
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg \
--pkgversion "3:0.svn-r`grep "FFMPEG_VERSION" version.h | \
sed 's/[^0-9]//g'`-12ubuntu3" --default
My brain has always worked better with sed than cut, and I am not sure what that says about me :).
Andrew
Excellent! The sed command is something I need to work on. I've often needed it, but not often enough to take the time to learn it but I'm getting better.
qyot27
September 11th, 2009, 07:12 AM
Hi qyot,
Traditionally you would use cut for this, perhaps something like:
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg \
--pkgversion "3:0.svn-`grep "FFMPEG_VERSION" version.h | \
cut -d '"' -f2 | cut -d '-' -f2`-12ubuntu3" --default
Or there is a fairly cool version of the above using sed:
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg \
--pkgversion "3:0.svn-r`grep "FFMPEG_VERSION" version.h | \
sed 's/[^0-9]//g'`-12ubuntu3" --default
My brain has always worked better with sed than cut, and I am not sure what that says about me :).
Andrew
Both worked, thanks. Is there any benefit for using the sed method over the one with cut?
Also, x264 always installs and gets listed fine, but apt put ffmpeg under the auto removable category. Which is somewhat annoying. Is that from a package numbering issue (which I hope can be resolved) or just an inherent thing?
Note: the first time I tried to install I used the cut method, but during the process everything locked up completely and I was forced to reboot, which canceled the installation. The sed method was the one that completed the install successfully, and then I noticed the auto removable thing. I don't know if that has anything to do with it, though.
andrew.46
September 11th, 2009, 10:35 AM
Hi qyot,
Both worked, thanks. Is there any benefit for using the sed method over the one with cut?
I guess what you would look for is the ever-present possibility of the FFmpeg developers changing the syntax and decide on a variation that might accommodate this.
Also, x264 always installs and gets listed fine, but apt put ffmpeg under the auto removable category. Which is somewhat annoying. Is that from a package numbering issue (which I hope can be resolved) or just an inherent thing?
I see the problem. The Jaunty Ubuntu repository version is in fact labelled by date --> 3:0.svn20090303-1ubuntu6 not by revision number. It depends how keen you are to use revision numbers, you may have to play with the initial 3:0 numbers...
Note: the first time I tried to install I used the cut method, but during the process everything locked up completely and I was forced to reboot, which canceled the installation. The sed method was the one that completed the install successfully, and then I noticed the auto removable thing. I don't know if that has anything to do with it, though.
I am afraid I am not entirely sure what that is all about, both techniques produce the same end result.
All the best,
Andrew
andrew.46
September 11th, 2009, 10:37 AM
Hi FakeOutdoorsman,
Excellent! The sed command is something I need to work on. I've often needed it, but not often enough to take the time to learn it but I'm getting better.
Works well but looks like it it will not work with your guide to trump the repository package version :(. I am sure a little more twiddling should get it working correctly though...
Andrew
qyot27
September 11th, 2009, 08:23 PM
I am afraid I am not entirely sure what that is all about, both techniques produce the same end result.
By that part I simply meant that I was thinking the freeze-up could have made the system think something was wrong and resulted in what I saw, not that the difference in method between cut and sed did. Just that I thought the interference might have had something to do with it.
I think what had happened was that the disc I was playing encountered an error and that made Audacious spazz out, and it in turn brought the rest of the freeze-up (I couldn't have used force quit, as the screen locked up, my music was either looping in ½-second bursts or had been replaced by endless beeping, etc. - the only way I could fix it was doing a hard reboot, and then everything was fine). I have no clue what happened, as I had to step out for just a couple of minutes and it was fine when I left, but when I came back it was in the middle of its panic attack or whatever that was. I also thought maybe it was a mini power surge, but there was no other evidence for that.
dmitryme
September 16th, 2009, 10:51 AM
Great thanks!
It helps me to convert FullHD (AVCHD) videos from my Canon cam to MPEG.
FakeOutdoorsman
September 16th, 2009, 06:49 PM
Great thanks!
It helps me to convert FullHD (AVCHD) videos from my Canon cam to MPEG.
Good to hear that it converted AVCHD with no problems. I'm sure we'll be seeing more of this format.
tvkpz
September 25th, 2009, 04:27 AM
Hi
I have successfully installed FFMPEG from source following your directions. Thanks for that.
I tried writing a simple program to test how it works (attached below)
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <stdio.h>
#include <math.h>
int main(int argc, char *argv[]) {
printf("Before av_register_all(); \n");
av_register_all();
printf("OK 1\n");
return 0;
}
and compiled using
gcc -o test-ffmpeg test-ffmpeg.c -lavformat -lavcodec -lavutil -lswscale -lz -lm
I get a whole list of errors (attached below). Seems there are too many undefined things. Am I missing out setting some env variables etc.
Looking forward to your help!
tvkpz
/usr/local/lib/libavcodec.a(libfaac.o): In function `Faac_encode_frame':
/home/sujoy/ffmpeg/libavcodec/libfaac.c:128: undefined reference to `faacEncEncode'
/usr/local/lib/libavcodec.a(libfaac.o): In function `Faac_encode_close':
/home/sujoy/ffmpeg/libavcodec/libfaac.c:144: undefined reference to `faacEncClose'
/usr/local/lib/libavcodec.a(libfaac.o): In function `Faac_encode_init':
/home/sujoy/ffmpeg/libavcodec/libfaac.c:46: undefined reference to `faacEncOpen'
/home/sujoy/ffmpeg/libavcodec/libfaac.c:51: undefined reference to `faacEncGetCurrentConfiguration'
/home/sujoy/ffmpeg/libavcodec/libfaac.c:75: undefined reference to `faacEncClose'
/home/sujoy/ffmpeg/libavcodec/libfaac.c:114: undefined reference to `faacEncSetConfiguration'
/home/sujoy/ffmpeg/libavcodec/libfaac.c:54: undefined reference to `faacEncClose'
/home/sujoy/ffmpeg/libavcodec/libfaac.c:102: undefined reference to `faacEncGetDecoderSpecificInfo'
/usr/local/lib/libavcodec.a(libfaad.o): In function `faac_decode_init':
/home/sujoy/ffmpeg/libavcodec/libfaad.c:252: undefined reference to `NeAACDecOpen'
/home/sujoy/ffmpeg/libavcodec/libfaad.c:253: undefined reference to `NeAACDecClose'
/home/sujoy/ffmpeg/libavcodec/libfaad.c:254: undefined reference to `NeAACDecGetCurrentConfiguration'
/home/sujoy/ffmpeg/libavcodec/libfaad.c:255: undefined reference to `NeAACDecSetConfiguration'
/home/sujoy/ffmpeg/libavcodec/libfaad.c:256: undefined reference to `NeAACDecInit'
/home/sujoy/ffmpeg/libavcodec/libfaad.c:257: undefined reference to `NeAACDecInit2'
/home/sujoy/ffmpeg/libavcodec/libfaad.c:258: undefined reference to `NeAACDecDecode'
/home/sujoy/ffmpeg/libavcodec/libfaad.c:260: undefined reference to `NeAACDecGetErrorMessage'
/home/sujoy/ffmpeg/libavcodec/libfaad.c:274: undefined reference to `NeAACDecOpen'
/usr/local/lib/libavcodec.a(libmp3lame.o): In function `MP3lame_encode_frame':
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:160: undefined reference to `lame_encode_buffer'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:152: undefined reference to `lame_encode_buffer_interleaved'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:170: undefined reference to `lame_encode_flush'
/usr/local/lib/libavcodec.a(libmp3lame.o): In function `MP3lame_encode_close':
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:212: undefined reference to `lame_close'
/usr/local/lib/libavcodec.a(libmp3lame.o): In function `MP3lame_encode_init':
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:48: undefined reference to `lame_init'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:50: undefined reference to `lame_set_in_samplerate'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:51: undefined reference to `lame_set_out_samplerate'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:52: undefined reference to `lame_set_num_channels'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:56: undefined reference to `lame_set_quality'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:59: undefined reference to `lame_set_mode'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:60: undefined reference to `lame_set_brate'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:66: undefined reference to `lame_set_bWriteVbrTag'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:67: undefined reference to `lame_set_disable_reservoir'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:68: undefined reference to `lame_init_params'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:71: undefined reference to `lame_get_framesize'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:54: undefined reference to `lame_set_quality'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:79: undefined reference to `lame_close'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:62: undefined reference to `lame_set_brate'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:63: undefined reference to `lame_set_VBR'
/home/sujoy/ffmpeg/libavcodec/libmp3lame.c:64: undefined reference to `lame_set_VBR_q'
/usr/local/lib/libavcodec.a(libtheoraenc.o): In function `encode_frame':
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:203: undefined reference to `theora_encode_YUVin'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:222: undefined reference to `theora_encode_packetout'
/usr/local/lib/libavcodec.a(libtheoraenc.o): In function `encode_close':
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:252: undefined reference to `theora_encode_packetout'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:253: undefined reference to `theora_clear'
/usr/local/lib/libavcodec.a(libtheoraenc.o): In function `encode_init':
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:89: undefined reference to `theora_info_init'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:124: undefined reference to `theora_encode_init'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:130: undefined reference to `theora_info_clear'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:142: undefined reference to `theora_encode_header'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:148: undefined reference to `theora_comment_init'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:149: undefined reference to `theora_encode_comment'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:154: undefined reference to `theora_comment_clear'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:157: undefined reference to `ogg_packet_clear'
/home/sujoy/ffmpeg/libavcodec/libtheoraenc.c:160: undefined reference to `theora_encode_tables'
/usr/local/lib/libavcodec.a(libx264.o): In function `X264_frame':
/home/sujoy/ffmpeg/libavcodec/libx264.c:105: undefined reference to `x264_encoder_encode'
/usr/local/lib/libavcodec.a(libx264.o): In function `X264_close':
/home/sujoy/ffmpeg/libavcodec/libx264.c:144: undefined reference to `x264_encoder_close'
/usr/local/lib/libavcodec.a(libx264.o): In function `X264_init':
/home/sujoy/ffmpeg/libavcodec/libx264.c:155: undefined reference to `x264_param_default'
/home/sujoy/ffmpeg/libavcodec/libx264.c:285: undefined reference to `x264_encoder_open_76'
/home/sujoy/ffmpeg/libavcodec/libx264.c:295: undefined reference to `x264_encoder_headers'
/usr/local/lib/libavcodec.a(libxvidff.o): In function `ff_xvid_encode_frame':
/home/sujoy/ffmpeg/libavcodec/libxvidff.c:431: undefined reference to `xvid_encore'
/usr/local/lib/libavcodec.a(libxvidff.o): In function `ff_xvid_encode_close':
/home/sujoy/ffmpeg/libavcodec/libxvidff.c:481: undefined reference to `xvid_encore'
/usr/local/lib/libavcodec.a(libxvidff.o): In function `ff_xvid_encode_init':
/home/sujoy/ffmpeg/libavcodec/libxvidff.c:184: undefined reference to `xvid_global'
/home/sujoy/ffmpeg/libavcodec/libxvidff.c:271: undefined reference to `xvid_plugin_lumimasking'
/home/sujoy/ffmpeg/libavcodec/libxvidff.c:349: undefined reference to `xvid_encore'
/home/sujoy/ffmpeg/libavcodec/libxvidff.c:264: undefined reference to `xvid_plugin_single'
/home/sujoy/ffmpeg/libavcodec/libxvidff.c:255: undefined reference to `xvid_plugin_2pass2'
/usr/local/lib/libavcodec.a(libxvid_rc.o): In function `ff_xvid_rate_control_uninit':
/home/sujoy/ffmpeg/libavcodec/libxvid_rc.c:146: undefined reference to `xvid_plugin_2pass2'
/usr/local/lib/libavcodec.a(libxvid_rc.o): In function `ff_xvid_rate_estimate_qscale':
/home/sujoy/ffmpeg/libavcodec/libxvid_rc.c:127: undefined reference to `xvid_plugin_2pass2'
/home/sujoy/ffmpeg/libavcodec/libxvid_rc.c:119: undefined reference to `xvid_plugin_2pass2'
/usr/local/lib/libavcodec.a(libxvid_rc.o): In function `ff_xvid_rate_control_init':
/home/sujoy/ffmpeg/libavcodec/libxvid_rc.c:80: undefined reference to `xvid_plugin_2pass2'
/usr/local/lib/libavcodec.a(pthread.o): In function `avcodec_thread_free':
/home/sujoy/ffmpeg/libavcodec/pthread.c:95: undefined reference to `pthread_join'
/usr/local/lib/libavcodec.a(pthread.o): In function `avcodec_thread_init':
/home/sujoy/ffmpeg/libavcodec/pthread.c:159: undefined reference to `pthread_create'
collect2: ld returned 1 exit status
zelalem
September 25th, 2009, 09:52 AM
Hi FakeOutdoorsman, I followed your step and when I issue the following command I got a series of errors that are listed after the command:
sudo apt-get purge ffmpeg x264 libx264-dev
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg-libc6.7-6.so.4.6)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg-libc6.7-6.so.4.6)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg-libc6.7-6.so.4.6)
apt-get: relocation error: /usr/lib/libapt-pkg-libc6.7-6.so.4.6: symbol _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13ba sic_ostreamIT_T0_ES6_PKS3_i, version GLIBCXX_3.4.9 not defined in file libstdc++.so.6 with link time reference
What could be the reason.
Thank you.
Zelalem
FakeOutdoorsman
September 25th, 2009, 06:48 PM
Hi
I have successfully installed FFMPEG from source following your directions. Thanks for that.
I tried writing a simple program to test how it works (attached below)
I get a whole list of errors (attached below). Seems there are too many undefined things. Am I missing out setting some env variables etc.
Looking forward to your help!
tvkpz
This goes beyond my experience with FFmpeg. This would be a question to ask the FFmpeg libav-user (http://ffmpeg.org/contact.html) mailing list and perhaps the #ffmpeg IRC channel. I'm sorry that I can't be more helpful.
FakeOutdoorsman
September 25th, 2009, 06:56 PM
Hi FakeOutdoorsman, I followed your step and when I issue the following command I got a series of errors that are listed after the command:
sudo apt-get purge ffmpeg x264 libx264-dev
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg-libc6.7-6.so.4.6)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg-libc6.7-6.so.4.6)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg-libc6.7-6.so.4.6)
apt-get: relocation error: /usr/lib/libapt-pkg-libc6.7-6.so.4.6: symbol _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13ba sic_ostreamIT_T0_ES6_PKS3_i, version GLIBCXX_3.4.9 not defined in file libstdc++.so.6 with link time reference
What could be the reason.
Thank you.
Zelalem
This seems more like an Ubuntu package management issue and I'm unsure what would have caused this. A possibly related bug report:
Bug #180160 in apt (Ubuntu): cannot run apt-get after upgrading to ubuntu 8.04 (https://bugs.launchpad.net/ubuntu/+source/apt/+bug/180160)
In your previous forum thread, Need help with ffmpeg installation (http://ubuntuforums.org/showthread.php?t=1272361), someone suggested that you make some changes to your .bashrc file. I am guessing, but this may have caused your error. Also, in that same thread you said, "I installed all the dependencies and ffmpeg". If you followed an FFmpeg installation guide, can you give me the link? I would like to check if the guide may have caused your errors somehow.
zelalem
September 26th, 2009, 11:27 AM
Hi FakeOutdoorsman, you are right it relates to ubuntu package management. I remember getting this e-mail long time ago but didn't know how i solved it. I might have tweked it. Anyway, I will try to check out the link you proposed and come back here if I got any problem.
Thank you again for the good work.
Best regards,
Zelalem
TuxProbe
September 27th, 2009, 04:33 AM
Movie time! :popcorn:
Hi all and thanks to authors of these very helpful howto's! I'd like to add to it an automation of things - customizable configuring by setting some variables defined in a Makefile.
It includes automated fetch, configure, compile and install each of the following targets:
x264,
live,
amr,
ffmpeg
Issuing the following will ultimately result in the four .deb packages being installed and mplayer ready to be built
make && sudo make install
While waiting turn on your favourite soapopera.. Of course at one point, you'll be prompted for sudo access :)
After de-/en-coders have been compiled and installed - mplayer can be rebuilt from svn. Specific make-targets are available for this, issue the following.
make mplayer && sudo make mplayer-install
Optionally trying to pull out a few more frames pr second on a multiprocessor system, use this statement while building mplayer:
make mplayer-mt && sudo make mplayer-install
The following code is to be copied into 'Makefile', use your fav. editor and save it to a separate dir (as andrew, im no big fan of buildchains deployed in $(HOME) :P )
################################################## #############################
### Automated Makefile for building a 'very-latest' mplayer package. ###
### suited for use on intrepid / jaunty ubuntu releases. ###
### Script was written by <Morten Sigsgaard Christensen> mschr@es.aau.dk. ###
### Distribute and use freely, but without warrenty. ###
### ###
### The following threads on ubuntuforums have been used as references. ###
### Thanks to Andrew.46, http://ubuntuforums.org/showthread.php?t=1081070 ###
### ###
### Runesvend pointed out how to make us of multithreaded decoding, ###
### see his thread: http://ubuntuforums.org/showthread.php?t=1049449 ###
### Replace 'make mplayer' with 'make mplayer-mt' to patch the av* sources. ###
### ###
### Set your ./configure options according to the targets below. ###
### If at some point mplayer.hu releases a new codecpack set CODECS_URL ###
################################################## #############################
# Target directory for generated .deb packages
PKGDIR=`pwd`
# Miscellaneous urls to fetch from
CODECS_URL="http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2"
LIVE_URL="http://www.live555.com/liveMedia/public/live555-latest.tar.gz"
# NB: repositories have been hardcodet, hopefully wont change
# Any configure options sent to ./configure
AMR_CFGOPTIONS=
X264_CFGOPTIONS=--prefix=/usr --enable-mp4-output --enable-shared
FFMPEG_CFGOPTIONS=--enable-gpl --enable-nonfree \
--enable-pthreads --enable-libfaac --enable-libfaad --enable-libvorbis \
--enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid \
--enable-x11grab --enable-libopencore-amrwb --enable-libopencore-amrnb \
--enable-version3
MPLAYER_CFGOPTIONS=--confdir=/etc/mplayer
################################################## #############################
### Output veriables, only for easy-readable maketarget-code ###
################################################## #############################
mpl_aptcmd="sudo apt-get install debhelper em8300-headers gawk gettext html2text \
intltool-debian ladspa-sdk libaa1-dev libasound2-dev libatk1.0-dev libaudio-dev \
libaudio2 libaudiofile-dev libavahi-client-dev libavahi-common-dev libcaca-dev \
libcairo2-dev libcdparanoia-dev libcelt0 libdbus-1-dev libdbus-glib-1-dev libdirectfb-dev \
libdirectfb-extra libdts-dev libdv4-dev libenca-dev libenca0 libesd0-dev libexpat1-dev \
libfaac-dev libfaac0 libffado0 libfontconfig1-dev libfreebob0 libfreetype6-dev \
libfribidi-dev libggi-target-x libggi2 libggi2-dev libggimisc2 libggimisc2-dev \
libgif-dev libgii1 libgii1-dev libgii1-target-x libgl1-mesa-dev libglib2.0-dev \
libglu1-mesa-dev libgtk2.0-dev libice-dev libjack-dev libjack0 libjpeg62-dev \
liblzo-dev liblzo1 liblzo2-2 liblzo2-dev libmad0-dev libmail-sendmail-perl \
libmp3lame-dev libmp3lame0 libmpcdec-dev libmpcdec3 libncurses5-dev libogg-dev \
libopenal-dev libopenal1 libpango1.0-dev libpixman-1-dev libpng12-dev libpopt-dev \
libpthread-stubs0 libpthread-stubs0-dev libpulse-dev libpulse-mainloop-glib0 \
libsdl1.2-dev libslang2-dev libsm-dev libsmbclient-dev libspeex-dev libsvga1 \
libsvga1-dev libsys-hostname-long-perl libsysfs-dev libtheora-dev libtwolame-dev \
libtwolame0 libvorbis-dev libx11-dev libxau-dev libschroedinger-dev libstdc++5 \
libxcb-render-util0-dev libxcb-render0-dev libxcb1-dev libxcomposite-dev \
libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev \
libxi-dev libxinerama-dev libxml++2.6-2 libxrandr-dev libxrender-dev libxt-dev \
libxv-dev libxvidcore4-dev libxvmc-dev libxxf86dga-dev libxxf86vm-dev mesa-common-dev \
po-debconf sharutils x11proto-composite-dev x11proto-core-dev x11proto-damage-dev \
x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev \
x11proto-render-dev x11proto-video-dev x11proto-xext-dev x11proto-xf86dga-dev \
x11proto-xf86vidmode-dev x11proto-xinerama-dev xtrans-dev zlib1g-dev \
liboil0.3-dev libcddb2-dev"
# mtime checks for non-repos
modified_on_amr=`stat opencore-amr | head -n 7 | tail -n 1 | cut -d " " -f2`
modified_on_live=`stat live | head -n 7 | tail -n 1 | cut -d " " -f2`
now=`date +%Y-%m-%d`
# a bit of coloured output
eprefix=echo -en '\e[1;34m---------------------------------------------------------------------------------------------------\e[0m\n\e[1;34m-- \e[0m'
epostfix=echo -e '\e[1;34m---------------------------------------------------------------------------------------------------\e[0m'
################################################## #############################
### Global targets ###
################################################## #############################
all: dependencies fetch config compile
@bash -c 'echo -en "\e[1;34m#\e[0m "'
@echo "Codecs have been prepared! Run the following to make em available for mplayer build"
@bash -c 'echo -e "\t\e[0;36msudo make install\e[0m"'
@bash -c 'echo -en "\e[1;34m#\e[0m "'
@echo "Then issue"
@bash -c 'echo -e "\t\e[0;36mmake mplayer mplayer-install\e[0m"'
dependencies:
@bash -c "${eprefix}"
@echo "Removing known conflicting packages"
@bash -c "${epostfix}"
sudo apt-get remove mplayer-nogui ffmpeg || echo Ok seems fine
@bash -c "${eprefix}"
@echo "Installing all dependencies"
@bash -c "${epostfix}"
@bash -c "${mpl_aptcmd1}"
fetch:
make amr-fetch live-fetch x264-fetch ffmpeg-fetch
config:
make amr-config live-config x264-config ffmpeg-config
compile:
@bash -c "${eprefix}"
@echo "AMR COMPILE"
@bash -c "${epostfix}"
make --directory opencore-amr 1> /dev/null
@bash -c "${eprefix}"
@echo "x264 COMPILE"
@bash -c "${epostfix}"
make --directory x264 1> /dev/null
@bash -c "${eprefix}"
@echo "LIVE COMPILE"
@bash -c "${epostfix}"
make --directory live 1> /dev/null
@bash -c "${eprefix}"
@echo "FFMPEG COMPILE"
@bash -c "${epostfix}"
make --directory ffmpeg 1> /dev/null || bash -c 'echo -e "\t\e[0;36m Trying to fix ownership\e[0m" && sudo chown ${USER} ffmpeg/* && make --directory ffmpeg'
install:
@bash -c "${eprefix}"
@echo "Starting install (amr, live, x264 & ffmpeg)"
@bash -c "${epostfix}"
make amr-install
make live-install
make x264-install
make ffmpeg-install
@bash -c "${eprefix}"
@echo "Codecs installed, now compile mplayer against em"
@bash -c 'echo -e "\t\e[0;36m make mplayer && sudo make mplayer-install\e[0m"'
@bash -c "${epostfix}"
clean:
make --directory opencore-amr distclean
make --directory live distclean
make --directory x264 distclean
make --directory ffmpeg distclean
make --directory mplayer distclean
################################################## #############################
### Encoder / decoder specific targets ###
################################################## #############################
amr-fetch:
@bash -c "${eprefix}"
@echo "AMR FETCH"
@bash -c "${epostfix}"
if [ "$(modified_on_amr)" != "$(now)" ]; then rm -fr opencore-amr && git clone --depth=1 \
git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/opencore-amr; fi
amr-config:
@bash -c "${eprefix}"
@echo "AMR CONFIG"
@bash -c "${epostfix}"
cd opencore-amr && ./configure ${AMR_CFGOPTIONS}
amr-install:
@bash -c "${eprefix}"
@echo "AMR INSTALL"
@bash -c "${epostfix}"
cd opencore-amr && sudo checkinstall --fstrans=no --install=yes --pakdir "${PKGDIR}" \
--maintainer "${USER}" --pkgname="libopencore-amr" --pkgversion="9999_$(date +%Y%m%d)" \
--backup=no --deldoc=yes --deldesc=yes --delspec=yes --gzman --default && cp *.deb ${PKGDIR}
live-fetch:
@bash -c "${eprefix}"
@echo "LIVE FETCH"
@bash -c "${epostfix}"
if [ "$(modified_on_live)" != "$(now)" ]; then rm -fr live && wget ${LIVE_URL} > `tty` && tar xf `basename ${LIVE_URL}` && rm `basename ${LIVE_URL}`; fi
live-config:
@bash -c "${eprefix}"
@echo "LIVE CONFIG"
@bash -c "${epostfix}"
cd live && ./genMakefiles linux
live-install:
@bash -c "${eprefix}"
@echo "LIVE INSTALL"
@bash -c "${epostfix}"
@rm $(ls live/config.[^lbu]*) 2> /dev/null || echo -O4
sudo cp -r live /usr/lib
x264-fetch:
@bash -c "${eprefix}"
@echo "x264 FETCH"
@bash -c "${epostfix}"
@test -d x264 || git clone git://git.videolan.org/x264.git > `tty`
@cd x264 && git pull > `tty`
x264-config:
@bash -c "${eprefix}"
@echo "x264 CONFIG"
@bash -c "${epostfix}"
cd x264 && ./configure ${X264_CFGOPTIONS}
x264-install:
@bash -c "${eprefix}"
@echo "x264 INSTALL"
@bash -c "${epostfix}"
cd x264 && sudo checkinstall --fstrans=no --install=yes --pakdir "${PKGDIR}" \
--maintainer "${USER}" --pkgname=x264 --pkgversion "9999_$(date +%Y%m%d)" \
--backup=no --deldoc=yes --deldesc=yes --delspec=yes --gzman --default && cp *.deb ${PKGDIR}
ffmpeg-fetch:
@bash -c "${eprefix}"
@echo "FFMPEG FETCH"
@bash -c "${epostfix}"
@test -d ffmpeg || svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg > `tty`
@cd ffmpeg && svn up > `tty`
ffmpeg-config:
@bash -c "${eprefix}"
@echo "FFMPEG CONFIG"
@bash -c "${epostfix}"
cd ffmpeg && ./configure ${FFMPEG_CFGOPTIONS}
ffmpeg-install:
@bash -c "${eprefix}"
@echo "FFMPEG INSTALL"
@bash -c "${epostfix}"
cd ffmpeg && sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg \
--pkgversion "9999_$(date +%Y%m%d)" --default && cp *.deb ${PKGDIR}
################################################## #############################
### MPlayer specific targets ###
################################################## #############################
mplayer: mplayer-fetch mplayer-config
@bash -c "${eprefix}"
@echo "MPLAYER COMPILE"
@bash -c "${epostfix}"
make --directory mplayer
#done, use make %MAKETARGET%-install to apply package
mplayer-config:
@bash -c "${eprefix}"
@echo "MPLAYER CONFIG"
@bash -c "${epostfix}"
cd mplayer && ./configure ${MPLAYER_CFGOPTIONS}
mplayer-fetch:
@bash -c "${eprefix}"
@echo "MPLAYER FETCH"
@bash -c "${epostfix}"
test -d mplayer || svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd mplayer && svn update
mplayer-mt: mplayer-fetch mplayer-patch-mt mplayer-config mplayer
mplayer-patch-mt:
@bash -c "${eprefix}"
@echo "MPLAYER PATCH"
@echo "(deploys ffmpeg-mt repo temporarily and overwrites av* src files in mplayer"
@bash -c "${epostfix}"
@test -d ffmpeg-mt || git clone http://git.gitorious.org/ffmpeg/ffmpeg-mt.git > `tty`
@cd ffmpeg-mt && git pull http://git.gitorious.org/ffmpeg/ffmpeg-mt.git > `tty`
@make --directory mplayer distclean
rm -rf mplayer/libavcodec mplayer/libavformat mplayer/libavutil
cp -a ffmpeg-mt/libavcodec ffmpeg-mt/libavformat ffmpeg-mt/libavutil mplayer
#@rm -fr ffmpeg-mt
mplayer-install:
@bash -c "${eprefix}"
@echo "MPLAYER (codec) INSTALL"
@bash -c "${epostfix}"
@test -f `basename ${CODECS_URL}` || wget ${CODECS_URL}
mkdir -pv /usr/lib/codecs
tar xjf `basename ${CODECS_URL}`
cp -v `echo $(shell basename ${CODECS_URL}|sed 's/\.tar.*//')`/* /usr/lib/codecs
rm `basename ${CODECS_URL}`
@bash -c "${eprefix}"
@echo "MPLAYER (binaries) INSTALL"
@bash -c "${epostfix}"
cd mplayer && checkinstall -D --install=yes --fstrans=no --pakdir "${PKGDIR}" \
--pkgname mplayer --backup=no --deldoc=yes --deldesc=yes --delspec=yes --default \
--maintainer "${USER}" --pkgversion "9999_$(grep "#define VERSION" version.h | cut -d"-" -f2)svn"
cp mplayer/*.deb ${PKGDIR}
Distribute freely, mail me if you have any questions - or post here, will try to monitor the thread. If others have success in using it also, feel free to use in ubuntu guides.
// Tuxprobe
arnab_das
September 28th, 2009, 09:40 PM
i am getting an error saying i need to install "ffplay" when i try converting anything with winff.
why is that?
FakeOutdoorsman
September 29th, 2009, 12:46 AM
i am getting an error saying i need to install "ffplay" when i try converting anything with winff.
why is that?
What version of Ubuntu are you using? FFplay needs the libsdl1.2-dev package as a dependency, so you need to install this before compiling FFmpeg. The guide on the first page of this thread for Intrepid and Hardy include this file in Step 2, but the guides for Hardy and Dapper put the package under "optional dependencies". I just did a test run of the first page guide and FFplay is installed successfully.
thank u so very much for writing such an awesome article. but can i delete the ffmpeg and x264 folders (under home directory) which have been created? they're consuming around 300mb.
Yes, you can delete these directories, but they are useful to keep if you ever want to upgrade x264 and FFmpeg. See the Updating Your Installation section of this guide.
Crosslinked to:
ffplay missing (http://ubuntuforums.org/showthread.php?t=1277681)
Re: Update ffmpeg (http://ubuntuforums.org/showthread.php?t=1277460)
Re: Any good video converter? (http://ubuntuforums.org/showthread.php?t=1275971)
arnab_das
September 29th, 2009, 08:56 AM
What version of Ubuntu are you using? FFplay needs the libsdl1.2-dev package as a dependency, so you need to install this before compiling FFmpeg. The guide on the first page of this thread for Intrepid and Hardy include this file in Step 2, but the guides for Hardy and Dapper put the package under "optional dependencies". I just did a test run of the first page guide and FFplay is installed successfully.
Yes, you can delete these directories, but they are useful to keep if you ever want to upgrade x264 and FFmpeg. See the Updating Your Installation section of this guide.
Crosslinked to:
ffplay missing (http://ubuntuforums.org/showthread.php?t=1277681)
Re: Update ffmpeg (http://ubuntuforums.org/showthread.php?t=1277460)
i installed winff after installing ffmpeg. then i tried converting a video with it.
and here's the error i find. i have installed libsdl1.2-dev as u can see in the synaptic.
whats the problem here?
http://i692.photobucket.com/albums/vv287/frnd08/Screenshot-3.png
FakeOutdoorsman
September 29th, 2009, 06:40 PM
i installed winff after installing ffmpeg. then i tried converting a video with it.
and here's the error i find. i have installed libsdl1.2-dev as u can see in the synaptic.
whats the problem here?
As paul.gevers mentioned in Re: Update ffmpeg (http://ubuntuforums.org/showpost.php?p=8024513&postcount=5) and in Re: Any good video converter? (http://ubuntuforums.org/showpost.php?p=8024501&postcount=7) If you're using WinFF from the repository you will need to go to WinFF -> Edit -> Preferences -> Linux Tab. In the Path to FFplay Executable box, enter:
/usr/local/bin/ffplay
WinFF is looking for FFplay in /usr/bin where repository FFplay gets installed, but this guide compiles FFmpeg and FFplay to /usr/local/bin to keep from conflicting with repository packages.
Also, you have asked this question in four different threads and I recommend just asking in one next time. Your question will be seen, you won't have people repeating answers, and it will be easier to follow.
Anyway, I quickly tested this with my compiled FFmpeg and WinFF from the repository and it seemed to work after I changed the path to the correct location as paul.gevers mentioned.
arnab_das
September 29th, 2009, 08:25 PM
As paul.gevers mentioned in Re: Update ffmpeg (http://ubuntuforums.org/showpost.php?p=8024513&postcount=5) and in Re: Any good video converter? (http://ubuntuforums.org/showpost.php?p=8024501&postcount=7) If you're using WinFF from the repository you will need to go to WinFF -> Edit -> Preferences -> Linux Tab. In the Path to FFplay Executable box, enter:
/usr/local/bin/FFplayWinFF is looking for FFplay in /usr/bin where repository FFplay gets installed, but this guide compiles FFmpeg and FFplay to /usr/local/bin to keep from conflicting with repository packages.
Also, you have asked this question in four different threads and I recommend just asking in one next time. Your question will be seen, you won't have people repeating answers, and it will be easier to follow.
Anyway, I quickly tested this with my compiled FFmpeg and WinFF from the repository and it seemed to work after I changed the path to the correct location as paul.gevers mentioned.
thanks. actually i changed the ffmpeg and ffplay location to "/usr/local/bin/ffmpeg" (-path to ffmpeg executable) and "/usr/local/bin/FFplay" (-path to ffplay executable) and "/usr/bin/x-terminal-emulator" (-terminal to run ffmpeg). is this the correct setting?
winff is working okay at the moment
P.S.- i apologise multiple posts. wont happen again.
FakeOutdoorsman
September 30th, 2009, 06:57 PM
thanks. actually i changed the ffmpeg and ffplay location to "/usr/local/bin/ffmpeg" (-path to ffmpeg executable) and "/usr/local/bin/FFplay" (-path to ffplay executable) and "/usr/bin/x-terminal-emulator" (-terminal to run ffmpeg). is this the correct setting?
winff is working okay at the moment
P.S.- i apologise multiple posts. wont happen again.
That may work, but the FFplay binary file is spelled "ffplay", so your path in WinFF should be "/usr/local/bin/ffplay". I capitalized it by mistake in my earlier post.
arnab_das
September 30th, 2009, 07:34 PM
That may work, but the FFplay binary file is spelled "ffplay", so your path in WinFF should be "/usr/local/bin/ffplay". I capitalized it by mistake in my earlier post.
okey dokey. thanks a lot mate.
rahul23
October 1st, 2009, 06:45 PM
php5-ffmpeg extension of php requires , ffmpeg to be compiled as shared , I installed successfully ffmpeg this method but got error while compiling php5-fmpeg
"ffmpeg: error while loading shared libraries: libavutil.so.50: cannot open
shared object file: No such file or directory"
Can you please solve my problem
thanks.
FakeOutdoorsman
October 1st, 2009, 07:14 PM
php5-ffmpeg extension of php requires , ffmpeg to be compiled as shared , I installed successfully ffmpeg this method but got error while compiling php5-fmpeg
"ffmpeg: error while loading shared libraries: libavutil.so.50: cannot open
shared object file: No such file or directory"
Can you please solve my problem
thanks.
Unfortunately I have no experience with php5-ffmpeg. I'm unsure if php5-ffmpeg will even recognize the shared libraries from a compiled FFmpeg SVN. Did you enable sharing on FFmpeg? The FFmpeg configure line requires "--enable-shared". After you install FFmpeg, you need to run "sudo ldconfig". I don't really know what I'm talking about here because shared FFmpeg and Ubuntu package management are not my strong points.
I have no idea what version of Ubuntu you're using, but why not install php5-ffmpeg with FFmpeg and libavcodec-unstripped-5* (to enable restricted encoders) from the repository?
supernath
October 2nd, 2009, 10:05 AM
Hi i worked through you tutorial the first time round and it worked fine. Thankyou. However i want to use ffmpeg-php as well so i rebuilt ffmpeg but this time enabling the shared option (./config --enable-shared)
but i now recieve the error:
ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory
Please can you help.
Many thanks
FakeOutdoorsman
October 2nd, 2009, 07:03 PM
Hi i worked through you tutorial the first time round and it worked fine. Thankyou. However i want to use ffmpeg-php as well so i rebuilt ffmpeg but this time enabling the shared option (./config --enable-shared)
but i now recieve the error:
ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory
Please can you help.
Many thanks
Please see post #500 (http://ubuntuforums.org/showpost.php?p=8036396&postcount=500) of this thread.
arnab_das
October 3rd, 2009, 08:49 AM
a question though. whenever i update ffmpeg, i find there's a new version!
how often do u recommend updating ffmpeg?
TuxProbe
October 3rd, 2009, 10:04 AM
Hi i worked through you tutorial the first time round and it worked fine. Thankyou. However i want to use ffmpeg-php as well so i rebuilt ffmpeg but this time enabling the shared option (./config --enable-shared)
but i now recieve the error:
ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory
Please can you help.
Many thanks
Hi
Whenever using the --enable-shared, you must make sure the appropiate libraries are available; while compiling as well as runtime.
Hence libavdevice.so, which in a regular build is compiled into libavdevice.a should turn into libavdevice.so.
So in which case, compile-time or run-time, do you experience this error?
mordantae
October 3rd, 2009, 04:29 PM
I get stuck when i run make to install ffmpeg :
tea@Ceylon:~/Untarz&Zips/FFmpeg/ffmpeg$ make
/home/tea/Untarz&Zips/FFmpeg/ffmpeg/version.sh "/home/tea/Untarz&Zips/FFmpeg/ffmpeg" version.h
/bin/sh: /home/tea/Untarz: not found
/bin/sh: Zips/FFmpeg/ffmpeg/version.sh: not found
make: *** [version.h] Error 127
I can't seem to find any useful information about make Error 127.
The ./configure step prior to this exits successfully...I don't really know what to do next.
Any similar experiences or ideas about what i could do?
cheers & thanks for a stellar tutorial.
mocha
October 3rd, 2009, 06:19 PM
I get stuck when i run make to install ffmpeg :
tea@Ceylon:~/Untarz&Zips/FFmpeg/ffmpeg$ make
/home/tea/Untarz&Zips/FFmpeg/ffmpeg/version.sh "/home/tea/Untarz&Zips/FFmpeg/ffmpeg" version.h
/bin/sh: /home/tea/Untarz: not found
/bin/sh: Zips/FFmpeg/ffmpeg/version.sh: not found
make: *** [version.h] Error 127
I can't seem to find any useful information about make Error 127.
The ./configure step prior to this exits successfully...I don't really know what to do next.
Any similar experiences or ideas about what i could do?
cheers & thanks for a stellar tutorial.
Get rid of the "&" symbol in your directory name
mordantae
October 3rd, 2009, 06:49 PM
Get rid of the "&" symbol in your directory name
Thanks ! :) *blush*
qyot27
October 4th, 2009, 03:07 AM
a question though. whenever i update ffmpeg, i find there's a new version!
how often do u recommend updating ffmpeg?
That I would say depends on how often you use it. If you use ffmpeg once in a blue moon, I'd say probably whenever your workflow requires it - update before you start working on the stuff, and then leave it be unless there's some egregious problem. You could also follow the ffmpeg git changelog (http://git.ffmpeg.org/) and see what fixes or new features matter enough to you to compile a new build.
If it's more regular, you could do anywhere from daily, weekly, monthly...whatever you prefer. There's the possibility of having an automated build system as well, where it'd just grab the source from SVN at a scheduled time (say every Friday at noon), compile, and install without any user interaction - I don't know how to do this, but I'm sure someone else on here could tell you.
gleenn
October 5th, 2009, 03:58 AM
Thanks, this worked great. I didn't need the x264 support, but it got ffmpeg turning flac files into mp3 quite well.
stoppage
October 7th, 2009, 02:54 AM
Hi, I installed latest version of Ffmpeg and x264 from http://ubuntuforums.org/showpost.php?p=6963607&postcount=360
Now I have a new problem converting an .ogg to .avi that I didn't have before. The .ogg in question is actually the container- form output from recordmydesktop. Probably better explained from terminal output.....
:~$ ffmpeg -i out2.ogg -b 128 -ar 11025 -s 400x240 -pass 1 -passlogfile log-file outputx.avi
FFmpeg version SVN-r20182, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 6 2009 21:34:02 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.36. 0 / 52.36. 0
libavformat 52.39. 0 / 52.39. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
[ogg @ 0x8b3f420]Could not find codec parameters (Video: theora, 1440x896)
Input #0, ogg, from 'out2.ogg':
Duration: 00:00:57.68, start: 0.000000, bitrate: 1074 kb/s
Stream #0.0: Video: theora, 1440x896, PAR 1:1 DAR 45:28, 15 tbr, 15 tbn, 15 tbc
Stream #0.1: Audio: vorbis, 48000 Hz, stereo, s16, 499 kb/s
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
swScaler: Unknown format is not supported as input pixel format
Cannot get resampling context
I don't know where I've gone wrong here, could somebody help me out please?
FakeOutdoorsman
October 7th, 2009, 03:05 AM
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
I don't know where I've gone wrong here, could somebody help me out please?
FFmpeg is telling you that your bitrate is too low. You need to add a "k" to your bitrate so your command should look like:
ffmpeg -i out2.ogg -b 128k -ar 11025 -s 400x240 -pass 1 -passlogfile log-file outputx.avi
Is there a reason you're converting to AVI? It's a somewhat dated format.
stoppage
October 7th, 2009, 04:03 AM
Thank you for the speedy reply, I've been tearing the hair out here. I tried exactly the line you supplied with „k“ added, output of terminal is still exactly the same. I think this newer version of ffmpeg has some (other) problem with this format.....
:~$ ffmpeg -i out2.ogg
FFmpeg version SVN-r20182, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 6 2009 20:47:37 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.36. 0 / 52.36. 0
libavformat 52.39. 0 / 52.39. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
[ogg @ 0x8b3f420]Could not find codec parameters (Video: theora, 1440x896)
Input #0, ogg, from 'out2.ogg':
Duration: 00:00:57.68, start: 0.000000, bitrate: 1074 kb/s
Stream #0.0: Video: theora, 1440x896, PAR 1:1 DAR 45:28, 15 tbr, 15 tbn, 15 tbc
Stream #0.1: Audio: vorbis, 48000 Hz, stereo, s16, 499 kb/s
At least one output file must be specified
...
and why .avi? I just want a format that I can host online, but available also to Windows users....conversion to .flv also doesn't work
!!!!!!!!!!!!?????????
stoppage
October 7th, 2009, 04:30 AM
Sorry, my mistake in last posting...... when I specify 128k the difference in output is that the „Warning“ line no longer appears...
„WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
“
Otherwise terminal output remains as original
FakeOutdoorsman
October 7th, 2009, 06:39 PM
Sorry, my mistake in last posting...... when I specify 128k the difference in output is that the „Warning“ line no longer appears...
„WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
“
Otherwise terminal output remains as original
This may be a broken file or FFmpeg may have a bug. Can you actually play out2.ogg with anything such as MPlayer or VLC? Are you able to provide a sample of the file? If it is large you can try cutting it down to size:
dd if=out2.ogg of=out2-small.ogg bs=1024 count=5000
This would create a 5 MB file. If you are unable to upload this anywhere you can PM me and I can give you my email address.
Edit: Also, what version of recordmydesktop did you use? What was your recordmydesktop command or settings? Perhaps it is creating non-standard ogg video.
qyot27
October 7th, 2009, 07:09 PM
and why .avi? I just want a format that I can host online, but available also to Windows users....conversion to .flv also doesn't work
!!!!!!!!!!!!?????????
To be able to play Theora video and Vorbis audio in the first place, Windows users will have to install additional software anyway - in the case of VLC, SMPlayer, or the CCCP, said additional software can already handle using those formats in the proper containers (Ogg or Matroska, whichever one you personally prefer). Putting it in AVI won't solve that for them. Not to mention AVI and Vorbis do not get along very well.
stoppage
October 8th, 2009, 12:33 AM
Recordmydesktop version is 0.3.6-1. File plays with vlc, mplayer, and opens in browser. WinFF wont play it since I introduced new version of ffmpeg. Its around 7MB. I hosted it here...
http://www.fileden.com/files/2009/9/9/2569301/out2.ogg
supernath
October 8th, 2009, 03:53 PM
Hi i have installed ffmpeg now finally!!! However i am having a problem with the exec command from php. When i run an ffmpeg command to convert a video file to an flv through the terminal it works fine. When i run the same command through php's exec function it silentlly fails. I have checked m php.ini and safe mode is off. Do you have any idea what is wrong and how i can fix it?
FakeOutdoorsman
October 8th, 2009, 06:41 PM
stoppage:
Recordmydesktop version is 0.3.6-1. File plays with vlc, mplayer, and opens in browser. WinFF wont play it since I introduced new version of ffmpeg. Its around 7MB. I hosted it here...
http://www.fileden.com/files/2009/9/9/2569301/out2.ogg
My FFmpeg is having trouble on this too. I'll try out some tests and try to figure this out but it may take me a few days.
supernath:
Hi i have installed ffmpeg now finally!!! However i am having a problem with the exec command from php. When i run an ffmpeg command to convert a video file to an flv through the terminal it works fine. When i run the same command through php's exec function it silentlly fails. I have checked m php.ini and safe mode is off. Do you have any idea what is wrong and how i can fix it?
Sorry, but I know next to nothing about php. You would have a better chance at getting a good answer in the Programming Talk (http://ubuntuforums.org/forumdisplay.php?f=39) section of these forums.
kevinguillorytraining
October 9th, 2009, 09:44 AM
Thanks for nice tutorial but I always failed to install ffmpeg :(
FakeOutdoorsman
October 9th, 2009, 06:43 PM
Thanks for nice tutorial but I always failed to install ffmpeg :(
If you provide some more information I may be able to help you. What version of Ubuntu are you using? When does installation fail? What errors do you get?
ArtInvent
October 10th, 2009, 02:17 AM
I have compiled successfully a couple of times according to this howto. Both x264 and ffmpeg seem to work fine with apps like WinFF and Kdenlive.
HOWEVER I can't get the latest Audacity 1.3.9 to recognize the ffmpeg library. As I understand it, the problem seems to be that this v. of Audacity needs a later version of this lib, but apparently I still have the old one from repos installed. It seems that compiling ffmpeg is not generating a new libavformat. As far as I can tell this is because the ./configure line I am using from this howto does not include --enable-shared.
So in compiling ffmpeg, I add this line to the ./configure with the following line
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab --enable-shared
After this, running make returns an error, the last few lines of which are:
/usr/bin/ld: /usr/local/lib/libx264.a(common.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libx264.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libavcodec/libavcodec.so.52] Error 1
Can anyone shed some light on this?
FakeOutdoorsman
October 10th, 2009, 03:24 AM
I believe if you enable-shared on FFmpeg you have to do the same on x264 on x86_64 systems, otherwise you'll have a PIC shared FFmpeg and non-PIC static x264.
Uninstall both x264 and FFmpeg, then run the following:
cd
cd x264
make distclean
git pull
./configure --enable-shared
make
Install with checkinstall as shown in the guide and then run sudo ldconfig. Now for FFmpeg:
cd
cd ffmpeg
make distclean
svn up
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab --enable-shared
make
Install with checkinstall and then run sudo ldconfig.
ArtInvent
October 11th, 2009, 03:17 AM
Thanks FakeOutdoorsman for the fast response. Appreciate it. I did all this; the apps compiled and seemed to install fine this time. I was able to use Kdenlive with these libs.
But I still have pretty much the same problem with Audacity, I point it to all the libavformat.so files I can find and it won't recognize any of them. I uninstalled everything again, installed x264 and ffmpeg from the dep packages I generated, then went to install Audacity 1.3.9 (I'm getting it from the getdeb repo at http://getdeb.masio.com.mx/
When I try to install this, it says it needs to install libavformat52. But isn't this the lib that should have been installed by ffmpeg shared? I have a libavformat.so.52.39.0 sitting in /usr/local/lib. But synaptic shows that no libavformat of any kind is installed.
I don't really understand the relationship between ffmpeg and libavcodec, libavformat, libavdevice, etc. I thought that compiling ffmpeg with --enable-shared would generate and install at least some of these as well but it doesn't seem to have worked that way. ???
FakeOutdoorsman
October 11th, 2009, 05:33 AM
...
But I still have pretty much the same problem with Audacity, I point it to all the libavformat.so files I can find and it won't recognize any of them. I uninstalled everything again, installed x264 and ffmpeg from the dep packages I generated, then went to install Audacity 1.3.9 (I'm getting it from the getdeb repo at http://getdeb.masio.com.mx/
When I try to install this, it says it needs to install libavformat52. But isn't this the lib that should have been installed by ffmpeg shared? I have a libavformat.so.52.39.0 sitting in /usr/local/lib. But synaptic shows that no libavformat of any kind is installed.
I don't really understand the relationship between ffmpeg and libavcodec, libavformat, libavdevice, etc. I thought that compiling ffmpeg with --enable-shared would generate and install at least some of these as well but it doesn't seem to have worked that way. ???
Try compiling Audacity itself instead of using a third-party repository. You never know what you're going to get with an unofficial repository or PPC. I'm not saying they're bad, but do you know what compile options they used or if they compiled it "correctly"? Read the Developing Audacity On Linux (http://wiki.audacityteam.org/index.php?title=Developing_On_Linux) guide before compiling. You will at least need the libwxgtk2.8-dev package to compile this according to this page.
The Audacity from that third-party repository was probably compiled with an older FFmpeg/libav* and might be looking for these old libraries in /usr/lib. Just a guess. I don't really know.
Your compiled shared version of FFmpeg did supply the libav* libraries as you show above. They just don't get integrated as separate packages in Ubuntu package management because I'm not too sure how to do that, nor am I really interested to tell you the truth. I'd rather spend time on FFmpeg itself than on managing the Ubuntu packaging system. Also, I'm not sure how useful that would be for already compiled packages from the Ubuntu repo or a third-party repo, because most repo packages are set to look for older FFmpeg stuff anyway...I think.
Maybe you should try compiling whatever you want to use with your compiled FFmpeg. Otherwise you'll have to learn how to wrangle Ubuntu package management and I'm not really sure how to do that.
Or of you are into compiling to get newer packages or to customize compiling options then perhaps you should look into a distro that is more suitable for that sort of thing. I personally use both Ubuntu and Arch Linux, but Arch is easier to do this sort of thing in my opinion, or perhaps I just didn't take the time to learn how to do it properly in Ubuntu.
A long answer for basically saying, "I don't know".
sumero
October 13th, 2009, 07:12 AM
problem solved
geoff123
October 13th, 2009, 05:46 PM
I don't really understand the relationship between ffmpeg and libavcodec, libavformat, libavdevice, etc. I thought that compiling ffmpeg with --enable-shared would generate and install at least some of these as well but it doesn't seem to have worked that way. ???
Hi ArtInvent,
I think I am trying to do the same thing as you (get an upgraded ffmpeg deb for use with kdenlive). I get a working ffmpeg out of this tutorial, but I also want to generate deb packages for libavcodec, libavformat, etc. like the ubuntu packages do.
Have you figured out how to do this yet?
Thanks, Geoff
sumero
October 13th, 2009, 07:50 PM
there is a white line on the right side of my video
with this version of ffmpeg.
i don't get it.
with the generic ffmpeg ( sudo apt-get install ffmpeg )
the white line is not there.
sumero
October 13th, 2009, 10:11 PM
this whole "SECOND PASS" or "TWO PASS" thing...
okay so, you have to run FFMPEG twice on the same file.
one with sound one without sound, right?
but if you don't run the second one on the output of
the first pass then how does the second pass even know
that there ever was a first pass?
can someone explain this? does it save in memory or something?
what's the deal?
oh and what does "two pass" even do exactly? improve the
quality?
how? it takes a mute version and then applies what to it?
sumero
October 13th, 2009, 11:07 PM
the ffmpeg on the ffmpeg's web site ( the one that is downloadable from their web site )
has "vhook" features but does not have x264 lib.
/ffmpeg-0.5# ./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
ERROR: libx264 not found
as you can see it says libx264 not found.
i really wanna use libx264 with vhook side by side.
which files or folders can i copy from the SVN version of FFMPEG and put it into
the older version of FFMPEG so i can have both libx264 and vhook enabled a tthe same time?
i tried copy pasting everything from SVN's ffmpeg folder to the downloaded older version's
folder then configure, it didn't do the trick.
any ideas?
FakeOutdoorsman
October 14th, 2009, 12:02 AM
there is a white line on the right side of my video
with this version of ffmpeg.
i don't get it.
with the generic ffmpeg ( sudo apt-get install ffmpeg )
the white line is not there.
Show your FFmpeg command and the complete FFmpeg output.
this whole "SECOND PASS" or "TWO PASS" thing...
okay so, you have to run FFMPEG twice on the same file.
one with sound one without sound, right?
but if you don't run the second one on the output of
the first pass then how does the second pass even know
that there ever was a first pass?
can someone explain this? does it save in memory or something?
what's the deal?
You don't have to output a file on the first pass. If you look at the two-pass example on the first page of this thread you can see that it outputs to /dev/null which is a special Linux file that discards whatever is fed to it. A logfile will be created consisting of data from the first pass. Then second pass then reads this log file so it can encode more efficiently.
oh and what does "two pass" even do exactly? improve the
quality?
You use two-pass encoding when you are targeting a specific bitrate. For example, if you have a portable device that has a max bitrate or only accepts file sizes below a certain amount you can use two-pass encoding to limit your output file size or bitrate. I recommend one-pass CRF encoding unless you need a specific output file size.
how? it takes a mute version and then applies what to it?
Read the FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/) for more details.
I will have to answer your vhook question later. I have a video deadline today and my files just got done transferring.
sumero
October 14th, 2009, 06:31 AM
problem solved
intoxination
October 14th, 2009, 03:35 PM
problem solved
Would you mind sharing how you did this? I am running into the exact same situation.
sumero
October 14th, 2009, 07:03 PM
Everytime i add -async 44100..
i get this "TICK TACK TICK TICK TICK TACK"
noise for the first 3-5 seconds of the video...
and then it goes normal.
something is sooo wrong with -async.
there has to be something other than this..
it appears no command is a wild card for all videos.
FakeOutdoorsman
October 14th, 2009, 07:29 PM
Everytime i add -async 44100..
i get this "TICK TACK TICK TICK TICK TACK"
noise for the first 3-5 seconds of the video...
and then it goes normal.
something is sooo wrong with -async.
there has to be something other than this..
it appears no command is a wild card for all videos.
I can't help you unless you give me your FFmpeg command and the complete output for each problem you are encountering. Also, instead of replacing your messages with "problem solved", it would be helpful if you explain how you solved your problem for other users who may be experiencing similar issues.
FFmpeg doesn't support wildcards for batch conversion but you can use the find command in addition of FFmpeg to perform a batch conversion. Refer to the excellent find tutorial written by andrew.46:
Linux Basics: A gentle introduction to 'find' (http://ubuntuforums.org/showthread.php?t=1128937)
the ffmpeg on the ffmpeg's web site ( the one that is downloadable from their web site )
has "vhook" features but does not have x264 lib.
/ffmpeg-0.5# ./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
ERROR: libx264 not found
as you can see it says libx264 not found.
i really wanna use libx264 with vhook side by side.
which files or folders can i copy from the SVN version of FFMPEG and put it into
the older version of FFMPEG so i can have both libx264 and vhook enabled a tthe same time?
i tried copy pasting everything from SVN's ffmpeg folder to the downloaded older version's
folder then configure, it didn't do the trick.
any ideas?
FFmpeg SVN does not contain vhook because it has been depreciated. You can download FFmpeg 0.5 and install that instead of FFmpeg SVN, but you will need to find a compatible x264 that will work with FFmpeg 0.5 because recent x264 has a changed API. I'm unsure what x264 revision you should use with FFmpeg 0.5. You can probably get an answer at the #ffmpeg IRC channel or ffmpeg-user (http://ffmpeg.org/contact.html) mailing list.
sumero
October 14th, 2009, 08:30 PM
by the way here's a question, does it matter what kinda server
you run ffmpeg on? for example if it has only 256 mb memory?
i mean is it possible i experience problems due to lack of memory
or something?
perhaps i should install ffmpeg on my imac as well and run
these commands?
is it possible? i guess i'll google it.
sumero
sorry, i meant to post a reply and it deleted my entire post
appears i clicked on "edit".. instead of reply.
andrew.46
October 16th, 2009, 10:13 AM
Hi FakeOutdoorsman,
Congrats on this amazing guide reaching 198,469 views, I hope a small celebration is in order when the magic 200,000 mark is reached :). I predict when the dust has settled from the Karmic release this guide will have some even more frenetic action when everybody realises that aac encoding is no longer possible with any permutation of the repository FFmpeg. Interesting times ahead...
Again: congratulations on this amazing guide!!
Andrew
andybondy
October 17th, 2009, 10:08 PM
Hello,
after a week of going round in circles, Im hoping you can point me in the right direction.
I upgraded to Karmic, and cannot convert avi files to mp4 using the following command:
/bin/ffmpeg -threads 2 -i "file.avi" -vcodec libx264 -r 15 -b 192 -s 320x240 -acodec libmp3lame -ac 2 -ab 64 -ar 32000 "outputfile.avi"
This is via WinFF. I get part encoding up to a point - but then it says 'Audio encoding failed'
I have tried to use the package version of ffmpeg - and I have tried to compile a version of my own, but thats a whole other set of problems fitting FakeOutdoorsMan's excellent intructions for Intrepid and Jaunty to my Karmic upgrade.
I am a novice. Heres my output:
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-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-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --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 Oct 13 2009 22:15:16, gcc: 4.4.1
I read that the AAC library has been dropped. Is this why I cannot encode to mp4 from avi?
Thanks
ArtInvent
October 17th, 2009, 11:32 PM
I finally got a working version of Audacity 1.3.9 and libavcodec by asking for help at the audacity forums. Pointed me to this ppa, this is repo line I added in Synaptic
http://ppa.launchpad.net/philip5/extra/ubuntu jaunty main
And I added the authentication key in a terminal with
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0x500e60ce43c56f3f
This is the thread - http://forum.audacityteam.org/viewtopic.php?f=18&t=9761&p=54091#p54091
I will reprint the post I just made there in thanks.
Per, thanks, this is the repo I've been looking for. Installed both ffmpeg and associated along with audacity from this ppa, and Audacity auto located the ffmpeg libs when I opened Preferences | Libraries | Locate. Awesome. The ppa does not seem to say if it has 32 bit only or 64 bit packages, I'm on 64 bit and it works fine so perhaps it is indeed both. Also has a lot of other good and up to date multimedia and driver packages. Very nice.
perab wrote:
Hello, ArtInvent!
You could try the repository from where I got a now working Audacity + ffmpeg. The location is found at https://launchpad.net/~philip5 There you will find the address to Philip's repo as well as the security key. And despite that Philip is a swede, the pages are in English. Audacity and Ffmpeg are found under "extra". This is the same repository as which I mentioned in a previous post above.
Per
ArtInvent
October 17th, 2009, 11:49 PM
As far as lack of aac encoding goes, have no idea why this would be dropped, it's pretty important. In Kdenlive I was trying to encode video to mp4 container with h264 and aac and it seems to always crash on render. So instead I rendered to .mov in the DNxHD (super high quality) codec, then used HandBrake to make my final mp4 files. I think I read that Handbrake has its own ffmpeg libs. Works well for now, though if they ever update their ffmpeg I guess that would stop working for aac as well.
My HandBrake version says 0.9.3-1.
One thing puzzling in HandBrake is that bitrate in aac seems limited to 160k for some reason, and I can't get resize video option to work either (I have to render to the exact final size I want in kdenlive.) The Windows version of HandBrake has neither of these limitations.
qyot27
October 18th, 2009, 04:00 AM
I read that the AAC library has been dropped. Is this why I cannot encode to mp4 from avi?
FAAC, which is an AAC encoder, was dropped. FFmpeg can still decode AAC just fine (whether by its own internal decoder or through FAAD2).
As far as lack of aac encoding goes, have no idea why this would be dropped, it's pretty important.
It may be important, but respecting software licenses are more important. Including FAAC support violates the GPL and LGPL by virtue of the fact that FAAC contains code from the MPEG reference encoder. That fact wasn't always known, but I'm sure the decision to remove it happened very very shortly after it was found out.
Straight from the horse's mouth (Audiocoding's website (http://www.audiocoding.com/faac.html)):
"FAAC is based on the original ISO MPEG reference code. The changes to this code are licensed under the LGPL license. The original license is not compatible with the LGPL, please be aware of this when using FAAC. The original license text can be found in the README file included in the download package."
It certainly doesn't stop you from grabbing/compiling an independent build of FAAC or using, say, Nero's AAC encoder (which handily beats FAAC in quality anyway; and yes, it does have a Linux version), and then simply muxing the video and audio together after-the-fact.
FakeOutdoorsman
October 18th, 2009, 08:07 PM
Hi FakeOutdoorsman,
Congrats on this amazing guide reaching 198,469 views, I hope a small celebration is in order when the magic 200,000 mark is reached :). I predict when the dust has settled from the Karmic release this guide will have some even more frenetic action when everybody realises that aac encoding is no longer possible with any permutation of the repository FFmpeg. Interesting times ahead...
Again: congratulations on this amazing guide!!
Andrew
Thanks Andrew! No celebration here yet. I've been doing long sessions of work for the last week trying to finish two big projects at once. I'd rather be working on my "vaporguide" about using x11grab. Unfortunately, my time at the forums has been severely reduced, and I still haven't done any Karmic testing.
Hello,
after a week of going round in circles, Im hoping you can point me in the right direction.
I upgraded to Karmic, and cannot convert avi files to mp4 using the following command:
/bin/ffmpeg -threads 2 -i "file.avi" -vcodec libx264 -r 15 -b 192 -s 320x240 -acodec libmp3lame -ac 2 -ab 64 -ar 32000 "outputfile.avi"
This command probably fails because it is declaring bitrates in bits instead of kilobits. You need to add a "k" to -b and -ab as in: -b 192k. However, you'll get better quality with the libx264 presets. Generally, whenever you use -vcodec libx264 you should also use a -vpre. See the first page of this guide for the one-pass CRF example. It's what I use the most. Also, scroll to the bottom of the guide and follow the link to the FFmpeg x264 Encoding Guide. That is a must read if you are going to encode with -vcodec libx264.
I read that the AAC library has been dropped. Is this why I cannot encode to mp4 from avi?
Thanks
Yes, AAC encoding with libfaac in the Karmic FFmpeg from the repo has been dropped due to license issues. Unfortunately, Ubuntu devs used a FFmpeg that missed the introduction of the native AAC encoder in FFmpeg by days. If you're using Karmic, and you want to use FFmpeg to encode to the AAC format you must compile FFmpeg. Once compiled you can either encode with libfaac or the native aac encoder in FFmpeg. The native aac encoder is new and is still being developed, but I have heard (and not confirmed) that it could use some improvements in increase the output quality.
Alternatively, as qyot27 has mentioned, you can use any other AAC encoder and then combine it with FFmpeg:
ffmpeg -i input.mp4 -i input.aac -vcodec copy -acodec copy output.mp4
or MP4Box from the gpac package. The following command is coming from my faulty memory and hasn't been tested:
MP4Box -add input.mp4 -add input.aac output.mp4
z0mbie
October 18th, 2009, 11:38 PM
Can we use Nero's AAC encoder with ffmpeg?
qyot27
October 19th, 2009, 03:05 AM
or MP4Box from the gpac package. The following command is coming from my faulty memory and hasn't been tested:
MP4Box -add input.mp4 -add input.aac output.mp4
Yeah, that's right. If anything, I'm sketchy on whether .mp4 files can be used with -add, or if you'd need to use -import to specify the track # itself. Most MP4Box muxing I do is with raw h264, which also requires the framerate to be declared.
Or depending on what type of hardware, if any, you're shooting for (like those that support DivX 7 profiles), you can use MKV - at least MKVToolNix has a GUI you can grab from either one of the Ubuntu repositories or straight from the official website's repos.
Can we use Nero's AAC encoder with ffmpeg?
Not as an internal library - Nero doesn't provide the source code. I suppose certain types of piping or joint command declaration could do the audio processing at the same time as the video, but there'd still be an additional muxing step needed.
This is partly why shell scripting is nice. It doesn't have to be complex at all. Just put the commands (as if you were entering them on the Terminal) on new lines, save the file and then execute the script with sh:
File (I'm just using x264 and Lame as an example here):
x264 --crf 18 output.mp4 input.i420
lame -m j --noreplaygain -q 0 -b 192 --cbr input.wav output.mp3
mp4box -add output.mp4 -add output.mp3 new-output.mp4
And then use the Terminal to call the script (may require sudo; the -x forces the Terminal to print each consecutive command so you know where exactly you are):
sh shellscriptname.sh -x
jan_everts
October 19th, 2009, 02:34 PM
Trying to update x264 and ffmpeg today ends with:
/home/jan/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/jan/ffmpeg/libavcodec/libx264.c:284: undefined reference to `x264_encoder_open_78'
collect2: ld gaf exit-status 1 terug
make: *** [ffmpeg_g] Fout 1
rm ffmpeg.o
Searched this forum and the Internet for an solution, but haven't found one.
Help needed
FakeOutdoorsman
October 19th, 2009, 08:43 PM
Trying to update x264 and ffmpeg today ends with:
/home/jan/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/jan/ffmpeg/libavcodec/libx264.c:284: undefined reference to `x264_encoder_open_78'
collect2: ld gaf exit-status 1 terug
make: *** [ffmpeg_g] Fout 1
rm ffmpeg.o
Searched this forum and the Internet for an solution, but haven't found one.
Help needed
Did you upgrade x264 as well? The x264 API has changed again recently and FFmpeg has been updated to reflect that but both packages must be up to date:
$ svn log -l 20 svn://svn.mplayerhq.hu/ffmpeg/trunk
...
r20308 | darkshikari | 2009-10-19 01:35:19 -0800 (Mon, 19 Oct 2009) | 3 lines
Update libx264.c for x264 API change
Change behavior of b-pyramid option.
jan_everts
October 19th, 2009, 10:00 PM
Did you upgrade x264 as well? The x264 API has changed again recently and FFmpeg has been updated to reflect that but both packages must be up to date:
Yes I did. It compiles and installs alright, but ffmpeg won't. Even a complete deletion of x264 and ffmpeg and complete new download installation from the beginning of the howto did not work. With --enable-libx264 removed, ffmpeg compiles fine, but....
FakeOutdoorsman
October 19th, 2009, 11:56 PM
Are you using a modified FFmpeg or x264 ./configure? What version of Ubuntu are you using? Do you know what revision of FFmpeg you are upgrading from or the date on the most recent .deb file in ~/ffmpeg?
I just did a successful test compile on Jaunty of:
$ x264 --version
x264 0.78.1301 bcba15d
built on Oct 19 2009, gcc: 4.3.3
and
$ ffmpeg -version
FFmpeg version SVN-r20320, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 19 2009 13:16:30 with gcc 4.3.3
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 0 / 52.37. 0
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
FFmpeg SVN-r20320
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 0 / 52.37. 0
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
stoppage
October 20th, 2009, 12:53 AM
Re: HOWTO: Install and use the latest FFmpeg and x264
Originally Posted by stoppage
Recordmydesktop version is 0.3.6-1. Ogg File plays with vlc, mplayer, and opens in browser. WinFF wont play it since I introduced new version of ffmpeg. Its around 7MB. I hosted it here...
http://www.fileden.com/files/2009/9/9/2569301/out2.ogg
http://ubuntuforums.org/showthread.php?t=786095&page=52
My FFmpeg is having trouble on this too. I'll try out some tests and try to figure this out but it may take me a few days.
Problem persists
tom.hagen
October 20th, 2009, 01:05 AM
Yes I did. It compiles and installs alright, but ffmpeg won't. Even a complete deletion of x264 and ffmpeg and complete new download installation from the beginning of the howto did not work. With --enable-libx264 removed, ffmpeg compiles fine, but....
I was running into the same problem. To fix it, remove all (lib)x264 packages and look for any libx264* files in /usr/local/lib/. I had some old files there. Remove them et voila!
FakeOutdoorsman
October 20th, 2009, 02:40 AM
Re: HOWTO: Install and use the latest FFmpeg and x264
Originally Posted by stoppage
Recordmydesktop version is 0.3.6-1. Ogg File plays with vlc, mplayer, and opens in browser. WinFF wont play it since I introduced new version of ffmpeg. Its around 7MB. I hosted it here...
http://www.fileden.com/files/2009/9/9/2569301/out2.ogg
http://ubuntuforums.org/showthread.php?t=786095&page=52
My FFmpeg is having trouble on this too. I'll try out some tests and try to figure this out but it may take me a few days.
Problem persists
Sorry for the delay, but I believe this file is broken and FFmpeg is unable properly decode it. MPlayer also has trouble with it, but it notices that FFmpeg can not play it and switches to another decoder and is able to play it. MEncoder may be able to re-encode it, but I am fairly ignorant of its usage. Andrew.46 would be the guy to ask about that.
You could also decode it with MPlayer and pipe it to FFmpeg. I've done that a few times and may be able to help you with that if you are interested.
sumero
October 20th, 2009, 04:10 AM
download any movie trailer from apple.com/trailer
trim it using quicktime and it no longer syncs properly
even with -async
sumero
October 20th, 2009, 05:07 AM
sorry double posted
FakeOutdoorsman
October 20th, 2009, 06:56 AM
download any movie trailer from apple.com/trailer
trim it using quicktime and it no longer syncs properly
even with -async
Show your FFmpeg command and the full output.
sumero
October 20th, 2009, 03:36 PM
Show your FFmpeg command and the full output.
same as what's on the front page, ( 2 pass )
all i modified was.. i added "-ar 44100" to the second pass...
but it meant nothing.
when i changed "faac" with "mp3lame" this time the video skips to
the middle so it's in sync with the sound but strangely there is no sound at all. but
this is probably because i need more values for mp3lame..
but skipping to the middle seems strange.. ( mp3lame )
and faac added black frames to the front of the video.. which is all sound
and then video begins... with syncing issues..
adding "-async 1" creates strange noises to the video.
why do videos go mute when the "libmp3lame" is used instead
of "libfaac".. is there an additional parameter that is needed?
sumero
FakeOutdoorsman
October 20th, 2009, 07:15 PM
same as what's on the front page, ( 2 pass )
all i modified was.. i added "-ar 44100" to the second pass...
but it meant nothing.
when i changed "faac" with "mp3lame" this time the video skips to
the middle so it's in sync with the sound but strangely there is no sound at all. but
this is probably because i need more values for mp3lame..
but skipping to the middle seems strange.. ( mp3lame )
and faac added black frames to the front of the video.. which is all sound
and then video begins... with syncing issues..
adding "-async 1" creates strange noises to the video.
why do videos go mute when the "libmp3lame" is used instead
of "libfaac".. is there an additional parameter that is needed?
sumero
You don't need to re-encode to trim video. Here is an example. I have a video with a duration of 5:00. I want to cut out the first 1:30 and the last 1:00, leaving me with an output that will be 2:30:
ffmpeg -ss 1:30 -t 2:30 -i input -acodec copy -vcodec copy output
This usually works for me, but a few times I had to decode the input and then seek:
ffmpeg -i input -ss 1:30 -t 2:30 -acodec copy -vcodec copy output
The -ss option is your time to offset and the -t option tells FFmpeg to process the following 2:30. I always start with the fist command because it is faster when working with files of large size.
You don't need to use two-pass encoding unless you are targeting a specific bitrate and thus, final output file size. This method is good for encoding for portable devices with bitrate limitations or other limited players.
I recommend using one-pass CRF for general encoding. There is an example on the first page of this guide. Make sure to read the FFmpeg x264 Encoding Guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/) as well.
You mentioned showing these videos online. You should run your output through MP4Box or qt-faststart for MP4 outputs to allow the video to begin playing before it is completely downloaded.
jan_everts
October 20th, 2009, 09:18 PM
Are you using a modified FFmpeg or x264 ./configure? What version of Ubuntu are you using? Do you know what revision of FFmpeg you are upgrading from or the date on the most recent .deb file in ~/ffmpeg?
I just did a successful test compile on Jaunty of:
$ x264 --version
x264 0.78.1301 bcba15d
built on Oct 19 2009, gcc: 4.3.3
and
$ ffmpeg -version
FFmpeg version SVN-r20320, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 19 2009 13:16:30 with gcc 4.3.3
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 0 / 52.37. 0
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
FFmpeg SVN-r20320
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 0 / 52.37. 0
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
Exactly the same here:
jan@j1:~$ x264 --version
x264 0.78.1301 bcba15d
built on Oct 19 2009, gcc: 4.3.3
jan@j1:~$ ffmpeg --version
FFmpeg version SVN-r20313, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 19 2009 18:14:47 with gcc 4.3.3
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 0 / 52.37. 0
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
Also on Jaunty
./configure with --enable-libx264 gives:
jan@j1:~/ffmpeg$ ./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
install prefix /usr/local
source path /home/jan/ffmpeg
C compiler gcc
.align is power-of-two no
ARCH x86 (generic)
big-endian no
runtime cpu detection no
yasm yes
MMX enabled yes
MMX2 enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
CMOV enabled no
CMOV is fast no
EBX available yes
EBP available yes
10 operands supported yes
gprof enabled no
debug symbols yes
strip symbols yes
optimizations yes
static yes
shared no
postprocessing support no
new filter support no
filters using lavformat no
network support yes
IPv6 support yes
threading support pthreads
SDL support yes
Sun medialib support no
AVISynth enabled no
libdc1394 support no
libdirac enabled no
libfaac enabled yes
libfaad enabled yes
libfaad dlopened no
libgsm enabled no
libmp3lame enabled yes
libnut enabled no
libopencore-amrnb support no
libopencore-amrwb support no
libopenjpeg enabled no
libschroedinger enabled no
libspeex enabled no
libtheora enabled yes
libvorbis enabled no
libx264 enabled yes
libxvid enabled yes
zlib enabled yes
bzlib enabled no
Enabled decoders:
aac eightsvx_fib pcm_s16be
aasc escape124 pcm_s16le
ac3 ffv1 pcm_s16le_planar
adpcm_4xm ffvhuff pcm_s24be
adpcm_adx flac pcm_s24daud
adpcm_ct flashsv pcm_s24le
adpcm_ea flic pcm_s32be
adpcm_ea_maxis_xa flv pcm_s32le
adpcm_ea_r1 fourxm pcm_s8
adpcm_ea_r2 fraps pcm_u16be
adpcm_ea_r3 frwu pcm_u16le
adpcm_ea_xas gif pcm_u24be
adpcm_g726 h261 pcm_u24le
adpcm_ima_amv h263 pcm_u32be
adpcm_ima_dk3 h263i pcm_u32le
adpcm_ima_dk4 h264 pcm_u8
adpcm_ima_ea_eacs huffyuv pcm_zork
adpcm_ima_ea_sead idcin pcx
adpcm_ima_iss imc pgm
adpcm_ima_qt indeo2 pgmyuv
adpcm_ima_smjpeg indeo3 pgssub
adpcm_ima_wav interplay_dpcm png
adpcm_ima_ws interplay_video ppm
adpcm_ms jpegls ptx
adpcm_sbpro_2 kmvc qcelp
adpcm_sbpro_3 libfaad qdm2
adpcm_sbpro_4 loco qdraw
adpcm_swf mace3 qpeg
adpcm_thp mace6 qtrle
adpcm_xa mdec ra_144
adpcm_yamaha mimic ra_288
alac mjpeg rawvideo
amv mjpegb rl2
ape mlp roq
asv1 mmvideo roq_dpcm
asv2 motionpixels rpza
atrac1 mp1 rv10
atrac3 mp2 rv20
avs mp3 rv30
bethsoftvid mp3adu rv40
bfi mp3on4 sgi
bmp mpc7 shorten
c93 mpc8 smackaud
cavs mpeg1video smacker
cinepak mpeg2video smc
cljr mpeg4 snow
cook mpeg_xvmc sol_dpcm
cscd mpegvideo sonic
cyuv msmpeg4v1 sp5x
dca msmpeg4v2 sunrast
dnxhd msmpeg4v3 svq1
dpx msrle svq3
dsicinaudio msvideo1 targa
dsicinvideo mszh theora
dvbsub nellymoser thp
dvdsub nuv tiertexseqvideo
dvvideo pam tiff
dxa pbm tmv
eac3 pcm_alaw truehd
eacmv pcm_bluray truemotion1
eamad pcm_dvd truemotion2
eatgq pcm_f32be truespeech
eatgv pcm_f32le tscc
eatqi pcm_f64be tta
eightbps pcm_f64le twinvq
eightsvx_exp pcm_mulaw txd
ulti vp5 wmv2
v210 vp6 wmv3
v210x vp6a wnv1
vb vp6f ws_snd1
vc1 vqa xan_dpcm
vcr1 wavpack xan_wc3
vmdaudio wmapro xl
vmdvideo wmav1 xsub
vmnc wmav2 zlib
vorbis wmv1 zmbv
vp3
Enabled encoders:
aac libxvid pcm_u32be
ac3 ljpeg pcm_u32le
adpcm_adx mjpeg pcm_u8
adpcm_g726 mp2 pcm_zork
adpcm_ima_qt mpeg1video pcx
adpcm_ima_wav mpeg2video pgm
adpcm_ms mpeg4 pgmyuv
adpcm_swf msmpeg4v1 png
adpcm_yamaha msmpeg4v2 ppm
alac msmpeg4v3 qtrle
asv1 nellymoser rawvideo
asv2 pam roq
bmp pbm roq_dpcm
dnxhd pcm_alaw rv10
dvbsub pcm_f32be rv20
dvdsub pcm_f32le sgi
dvvideo pcm_f64be snow
ffv1 pcm_f64le sonic
ffvhuff pcm_mulaw sonic_ls
flac pcm_s16be svq1
flashsv pcm_s16le targa
flv pcm_s24be tiff
gif pcm_s24daud v210
h261 pcm_s24le vorbis
h263 pcm_s32be wmav1
h263p pcm_s32le wmav2
huffyuv pcm_s8 wmv1
jpegls pcm_u16be wmv2
libfaac pcm_u16le xsub
libmp3lame pcm_u24be zlib
libtheora pcm_u24le zmbv
libx264
Enabled hwaccels:
Enabled parsers:
aac dvdsub mpeg4video
ac3 h261 mpegaudio
cavsvideo h263 mpegvideo
dca h264 pnm
dirac mjpeg vc1
dnxhd mlp vp3
dvbsub
Enabled demuxers:
aac iss pcm_u24le
ac3 lmlm4 pcm_u32be
aea m4v pcm_u32le
aiff matroska pcm_u8
amr mjpeg pva
apc mlp qcp
ape mm r3d
asf mmf rawvideo
*** mov redir
au mp3 rl2
avi mpc rm
avs mpc8 roq
bethsoftvid mpegps rpl
bfi mpegts rtsp
c93 mpegtsraw sdp
caf mpegvideo segafilm
cavsvideo msnwc_tcp shorten
daud mtv siff
dirac mvi smacker
dnxhd mxf sol
dsicin nc sox
dts nsv str
dv nut swf
dxa nuv thp
ea ogg tiertexseq
ea_cdata oma tmv
eac3 pcm_alaw truehd
ffm pcm_f32be tta
flac pcm_f32le txd
flic pcm_f64be vc1
flv pcm_f64le vc1t
fourxm pcm_mulaw vmd
gsm pcm_s16be voc
gxf pcm_s16le vqf
h261 pcm_s24be w64
h263 pcm_s24le wav
h264 pcm_s32be wc3
idcin pcm_s32le wsaud
iff pcm_s8 wsvqa
image2 pcm_u16be wv
image2pipe pcm_u16le xa
ingenient pcm_u24be yuv4mpegpipe
ipmovie
Enabled muxers:
ac3 matroska pcm_s16be
adts matroska_audio pcm_s16le
aiff mjpeg pcm_s24be
amr mlp pcm_s24le
asf mmf pcm_s32be
asf_stream mov pcm_s32le
*** mp2 pcm_s8
au mp3 pcm_u16be
avi mp4 pcm_u16le
avm2 mpeg1system pcm_u24be
crc mpeg1vcd pcm_u24le
daud mpeg1video pcm_u32be
dirac mpeg2dvd pcm_u32le
dnxhd mpeg2svcd pcm_u8
dts mpeg2video psp
dv mpeg2vob rawvideo
eac3 mpegts rm
ffm mpjpeg roq
flac mxf rtp
flv mxf_d10 sox
framecrc null spdif
gif nut swf
gxf ogg tg2
h261 pcm_alaw tgp
h263 pcm_f32be truehd
h264 pcm_f32le vc1t
image2 pcm_f64be voc
image2pipe pcm_f64le wav
ipod pcm_mulaw yuv4mpegpipe
m4v
Enabled protocols:
file pipe tcp
gopher rtmp udp
http rtp
Enabled filters:
null
Enabled bsfs:
aac_adtstoasc mjpega_dump_header noise
dump_extradata mov2textsub remove_extradata
h264_mp4toannexb mp3_header_compress text2movsub
imx_dump_header mp3_header_decompress
Enabled indevs:
alsa oss v4l2
dv1394 v4l x11_grab_device
jack
Enabled outdevs:
alsa oss
License: nonfree and unredistributable
Creating config.mak and config.h...
make results in:
/home/jan/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/jan/ffmpeg/libavcodec/libx264.c:284: undefined reference to `x264_encoder_open_78'
collect2: ld gaf exit-status 1 terug
make: *** [ffmpeg_g] Fout 1
FakeOutdoorsman
October 21st, 2009, 02:09 AM
make results in:
/home/jan/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/jan/ffmpeg/libavcodec/libx264.c:284: undefined reference to `x264_encoder_open_78'
collect2: ld gaf exit-status 1 terug
make: *** [ffmpeg_g] Fout 1
You have libx264-dev installed. Remove it and then follow the Updating Your Installation section of the guide. I will add libx264-dev removal to that section.
stoppage
October 21st, 2009, 03:59 AM
In order to eliminate the possability that it's just a damaged file, I tried same conversion on another .ogg file from same app.....
http://www.fileden.com/files/2009/9/9/2569301/out5.ogg
Terminal Outputs:
:~$ ffmpeg -i out5.ogg
FFmpeg version SVN-r20182, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 6 2009 21:34:02 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.36. 0 / 52.36. 0
libavformat 52.39. 0 / 52.39. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
[ogg @ 0x8b3f420]Could not find codec parameters (Video: theora, 704x528)
Input #0, ogg, from 'out5.ogg':
Duration: 00:00:36.73, start: 0.000000, bitrate: 598 kb/s
Stream #0.0: Video: theora, 704x528, PAR 1:1 DAR 4:3, 15 tbr, 15 tbn, 15 tbc
Stream #0.1: Audio: vorbis, 48000 Hz, stereo, s16, 499 kb/s
At least one output file must be specified
~$ ffmpeg -i out5.ogg -b 128k -ar 11025 -s 400x240 -pass 1 -passlogfile log-file output5.avi
FFmpeg version SVN-r20182, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 6 2009 21:34:02 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.36. 0 / 52.36. 0
libavformat 52.39. 0 / 52.39. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
[ogg @ 0x8b3f420]Could not find codec parameters (Video: theora, 704x528)
Input #0, ogg, from 'out5.ogg':
Duration: 00:00:36.73, start: 0.000000, bitrate: 598 kb/s
Stream #0.0: Video: theora, 704x528, PAR 1:1 DAR 4:3, 15 tbr, 15 tbn, 15 tbc
Stream #0.1: Audio: vorbis, 48000 Hz, stereo, s16, 499 kb/s
swScaler: Unknown format is not supported as input pixel format
Cannot get resampling context
Ffmpeg also has a problem in converting from avi to mp4.
FakeOutdoorsman
October 21st, 2009, 04:13 AM
In order to eliminate the possability that it's just a damaged file, I tried same conversion on another .ogg file from same app.....
I believe your version of recordmydesktop (0.3.6-1) is producing non-standard or broken OGG files. I tested recordmydesktop 0.3.8.1 and FFmpeg was able to convert the files it created.
Ffmpeg also has a problem in converting from avi to mp4.
Show your FFmpeg command and output.
sumero
October 21st, 2009, 05:03 AM
can someone please explain why people are creating
a file called .y4m or .yuv with...
mkfifo pipe.y4m
i mean what's the point of this whole mkfifo thing when
mplayer or ffmpeg can just create the file then you can
execute the next command...
seriously is this a "productivity" thing for people that want
to run 2 commands at once or what?
sumero
sumero
October 21st, 2009, 05:53 AM
what happened is that i pasted an mplayer command into ssh
( ubuntu ) and it froze, it opened a EOF or something.. strange stuff..
but here's the thing, i no longer see bold text like i used to.
what happened to my bold text? the whole root@localhost stuff..
now "root@localhost" is showing as plain text so it's really annoying.
it's no longer bold.. i re-started the server, didn't help.
did mplayer command ruin my ubuntu server? i think it was one
of those /dev/nul commands mixed with a command to over-ride a .yuv file...
this whole mkfifo stuff caused these problems i believe.
sumero
FakeOutdoorsman
October 21st, 2009, 06:28 AM
can someone please explain why people are creating
a file called .y4m or .yuv with...
mkfifo pipe.y4m
i mean what's the point of this whole mkfifo thing when
mplayer or ffmpeg can just create the file then you can
execute the next command...
seriously is this a "productivity" thing for people that want
to run 2 commands at once or what?
sumero
This is a helpful procedure with many uses. It allows one program to "pipe" date to another program without the need of an intermediate file. For example, I once had to re-encode a damaged huffyuv video into H.264. FFmpeg was unable to decode the huffyuv video, but MPlayer could, so I used mkfifo to make a named pipe and then FFmpeg was able to decode from the named pipe. You will find more info here:
http://en.wikipedia.org/wiki/Mkfifo
what happened is that i pasted an mplayer command into ssh
( ubuntu ) and it froze, it opened a EOF or something.. strange stuff..
but here's the thing, i no longer see bold text like i used to.
what happened to my bold text? the whole root@localhost stuff..
now "root@localhost" is showing as plain text so it's really annoying.
it's no longer bold.. i re-started the server, didn't help.
did mplayer command ruin my ubuntu server? i think it was one
of those /dev/nul commands mixed with a command to over-ride a .yuv file...
this whole mkfifo stuff caused these problems i believe.
sumero
I never heard of anything like that happening. Did you edit your ~/.bashrc or ~/.bash_profile files? Once again you need to show your command. If you don't remember it then look through your history file:
history
or
history | grep mplayer
or
tail history
sumero
October 21st, 2009, 06:10 PM
okay i noticed two things...
the ubuntu default mplayer says
Quicktime/MOV file format detected.
the newest mplayer says
libavformat file format detected.
the truth is, the newest mplayer is wrong.
i want it to say quicktime is detected.
how can i force it to say it's quicktime.
i tried adding "-format mov" it didnt work.
i guess the whole problem is this "[mov,mp4,m4a,3gp,3g2,mj2 ]"
they assigned to "libavformat "
i don't even know what "libavformat " is, how can i remove libavformat ?
so that it would use quicktime format rather than "libavformat " ...
here take a look at this..
Cannot find codec matching selected -vo and video format 0x34363248.
basically this happens when i try to force it to use quicktime format
rather than lavf
with -vc option.
and it gives me that error.
the question becomes.. why does it matter what the
-vo is..
shouldn't it read videos based on what the video can be read with?
as far as converting it via "-vo" goes that should be the job of the encoder
right?
aren't they seperate jobs
sumero
stoppage
October 21st, 2009, 11:46 PM
I believe your version of recordmydesktop (0.3.6-1) is producing non-standard or broken OGG files. I tested recordmydesktop 0.3.8.1 and FFmpeg was able to convert the files it created.
Show your FFmpeg command and output.
On the .ogg file, does this mean that I have to install v. 0.3.8.1 for it to work properly? Repos. ver. Is 0.3.6-1. Do you happen to know of a deb version?
On conversion to mp4 I'm not sure where to enter codec h264. Following renders output with AAC/Xvid...
:~$ ffmpeg -i HiltonComedy.avi -b 128k -ar 11025 -s 400x240 -pass 1 -passlogfile log-file output.mp4
FFmpeg version SVN-r20182, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 6 2009 21:34:02 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.36. 0 / 52.36. 0
libavformat 52.39. 0 / 52.39. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
[NULL @ 0x8b486d0]Invalid and inefficient vfw-avi packed B frames detected
Input #0, avi, from 'HiltonComedy.avi':
Duration: 00:01:06.60, start: 0.000000, bitrate: 800 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 128 kb/s
Output #0, mp4, to 'output.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 400x240 [PAR 4:5 DAR 4:3], q=2-31, pass 1, 128 kb/s, 2997 tbn, 29.97 tbc
Stream #0.1: Audio: aac, 11025 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg4 @ 0x8b486d0]Invalid and inefficient vfw-avi packed B frames detected
frame= 1993 fps=143 q=18.9 Lsize= 1808kB time=66.57 bitrate= 222.5kbits/s
video:1253kB audio:532kB global headers:0kB muxing overhead 1.289112%
sumero
October 22nd, 2009, 02:24 AM
i can run MP4Box inside ssh but when i run it in php with cli
i get I/O error.
i am guessing when it tries to add -inter 0.5...
it is trying to save the file to the same location to quickly or something?
what should i do? execute an ssh command from php?
could it be because i compiled gpac improperly?
./configure --disable-opengl --use-js=no --use-ft=no --use-jpeg=no --use-png=no --use-faad=no --use-mad=no --use-xvid=no --use-ffmpeg=no --use-ogg=no --use-vorbis=no --use-theora=no --use-openjpeg=no
is there something in there that says MP4Box can not be executed from php 's exec() command? also known as php cli...
im's sooo confused.
here's what it says..
Array ( [0] => Saving /test/test/test.mp4: 0.001 secs Interleaving [1] => Error: I/O Error )
see, the same exect command works great in ssh and says just the first part.
not the second part ( [1] => Error: I/O Error )...
but if execute it with php that's what i get as seen above
and file does not get modified at all... which means the execution was un-successful.
i can't make mp4creator work either, here's the error.
Array ( [0] => MP4ERROR: MP4Open: failed: Permission denied )
i don't know what's wrong with it. the folder is chmod to 777, file was chmod to 755..
what permission denied is this?
something in php cli's php.ini ? or somewhere else?
sumero
FakeOutdoorsman
October 22nd, 2009, 07:59 PM
On the .ogg file, does this mean that I have to install v. 0.3.8.1 for it to work properly?
This is a guess. It may be libtheora-dev or libvorbis-dev causing your errors, but I think it is recordmydesktop because FFmpeg can usually make usable files with libtheora-dev or libvorbis-dev.
Repos. ver. Is 0.3.6-1. Do you happen to know of a deb version?
No, but you can compile it yourself. Here is a mini-guide:
1. Get the dependencies. I found out the dependencies by looking at the Arch Linux recordmydesktop build script (http://repos.archlinux.org/wsvn/community/recordmydesktop/repos/community-i686/PKGBUILD) and then finding the correct packages in Ubuntu:
sudo apt-get install zlib1g-dev libvorbis-dev libxdamage-dev libxext-dev libsm-dev
2. Download the recordmydesktop source and check the md5sum to see if the file is valid:
cd
wget http://downloads.sourceforge.net/project/recordmydesktop/recordmydesktop/0.3.8.1/recordmydesktop-0.3.8.1.tar.gz
md5sum recordmydesktop-0.3.8.1.tar.gz
The md5sum should equal: 6998b165540598965499bd99d8aa0eef.
3. Untar, ./configure, make, and install:
tar xzvf recordmydesktop-0.3.8.1.tar.gz
cd recordmydesktop-0.3.8.1
./configure
make
sudo checkinstall --pkgname=recordmydesktop --pkgversion "0.3.8.1" --default
On conversion to mp4 I'm not sure where to enter codec h264. Following renders output with AAC/Xvid...
:~$ ffmpeg -i HiltonComedy.avi -b 128k -ar 11025 -s 400x240 -pass 1 -passlogfile log-file output.mp4
FFmpeg version SVN-r20182, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 6 2009 21:34:02 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.36. 0 / 52.36. 0
libavformat 52.39. 0 / 52.39. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
[NULL @ 0x8b486d0]Invalid and inefficient vfw-avi packed B frames detected
Input #0, avi, from 'HiltonComedy.avi':
Duration: 00:01:06.60, start: 0.000000, bitrate: 800 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0.1: Audio: mp3, 48000 Hz, 2 channels, s16, 128 kb/s
Output #0, mp4, to 'output.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 400x240 [PAR 4:5 DAR 4:3], q=2-31, pass 1, 128 kb/s, 2997 tbn, 29.97 tbc
Stream #0.1: Audio: aac, 11025 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg4 @ 0x8b486d0]Invalid and inefficient vfw-avi packed B frames detected
frame= 1993 fps=143 q=18.9 Lsize= 1808kB time=66.57 bitrate= 222.5kbits/s
video:1253kB audio:532kB global headers:0kB muxing overhead 1.289112%
Is this failing to create an output?
stoppage
October 23rd, 2009, 01:47 AM
This is a guess. It may be libtheora-dev or libvorbis-dev causing your errors, but I think it is recordmydesktop because FFmpeg can usually make usable files with libtheora-dev or libvorbis-dev.
No, but you can compile it yourself. Here is a mini-guide:
1. Get the dependencies. I found out the dependencies by looking at the Arch Linux recordmydesktop build script (http://repos.archlinux.org/wsvn/community/recordmydesktop/repos/community-i686/PKGBUILD) and then finding the correct packages in Ubuntu:
sudo apt-get install zlib1g-dev libvorbis-dev libxdamage-dev libxext-dev libsm-dev
2. Download the recordmydesktop source and check the md5sum to see if the file is valid:
cd
wget http://downloads.sourceforge.net/project/recordmydesktop/recordmydesktop/0.3.8.1/recordmydesktop-0.3.8.1.tar.gz
md5sum recordmydesktop-0.3.8.1.tar.gz
The md5sum should equal: 6998b165540598965499bd99d8aa0eef.
3. Untar, ./configure, make, and install:
tar xzvf recordmydesktop-0.3.8.1.tar.gz
cd recordmydesktop-0.3.8.1
./configure
make
sudo checkinstall --pkgname=recordmydesktop --pkgversion "0.3.8.1" --default
Is this failing to create an output?
It creates output, but video isn't h264...
I think it's my mistake in instruction but I'm not sure where,,,,
~$ ffmpeg -i HiltonComedy.avi -b 128k -ar 11025 -s 400x240 -pass 1 -passlogfile log-file output.mp4
Terminal.....
ffmpeg -i output.mp4
FFmpeg version......
................
Seems stream 0 codec frame rate differs from container frame rate: 2997.00 (2997/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Duration: 00:01:06.68, start: 0.000000, bitrate: 222 kb/s
Stream #0.0(und): Video: mpeg4, yuv420p, 400x240 [PAR 4:5 DAR 4:3], 29.97 tbr, 2997 tbn, 2997 tbc
Stream #0.1(und): Audio: aac, 11025 Hz, 2 channels, s16
Metadata
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
muxer : Lavf52.39.0
At least one output file must be specified
FakeOutdoorsman
October 23rd, 2009, 02:10 AM
It creates output, but video isn't h264...
I think it's my mistake in instruction but I'm not sure where,,,,
~$ ffmpeg -i HiltonComedy.avi -b 128k -ar 11025 -s 400x240 -pass 1 -passlogfile log-file output.mp4
Terminal.....
ffmpeg -i output.mp4
FFmpeg version......
................
Seems stream 0 codec frame rate differs from container frame rate: 2997.00 (2997/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Duration: 00:01:06.68, start: 0.000000, bitrate: 222 kb/s
Stream #0.0(und): Video: mpeg4, yuv420p, 400x240 [PAR 4:5 DAR 4:3], 29.97 tbr, 2997 tbn, 2997 tbc
Stream #0.1(und): Audio: aac, 11025 Hz, 2 channels, s16
Metadata
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
muxer : Lavf52.39.0
At least one output file must be specified
If you want H.264 video in a MP4 container then see some of the examples under Using FFmpeg and x264 on the first page of this guide. I recommend one-pass CRF for general use.
sumero
October 23rd, 2009, 06:37 AM
does anyone know what ffmpeg is using to convert a .mov file into a mp4 file..
i mean when it reads the .mov file.. HOW DOES IT READ IT?
what does it use?
how do we know what it is using? what is the name of that thing that
it uses.
that mysterious thing that we never get to see in the command line
next to "ffmpeg"
what is that mysterious name? that we NEVER get to see?
i really wanna know.
sumero
sumero
October 23rd, 2009, 07:20 AM
look what's happening with ffmpeg...
it says my video's duration is more than 2 minutes
when i do
ffmpeg -i movie.mov
and then it says time=26.23 (seconds)at the end of converting
when i convert that movie
to any other format such as...
ffmpeg -i movie.mov movie.mp4
and the truth is, the video is only 6 seconds long...
so.. what's going on, how can i tell it behave itself?
by the way this is the latest ffmpeg.
and then i do ffmpeg -i movie.mov -movie.wav
to extract the sound.. it says 6 seconds. finally.. this is the truth
but unfortunately.. 6 second sound with a 23 second video
just dont look right. yes indeed it doesn't... i watched movie.mp4
myself. it waited like 19 seconds with a frozen frame until the 6 seconds
was left and finally the movie started playing. peewf..
sumero
abominable
October 23rd, 2009, 03:50 PM
@FakeOutdoorsman A great thanx for your info !! Now I've got to learn how to use audacity. Hehehehe...
FakeOutdoorsman
October 23rd, 2009, 06:49 PM
@FakeOutdoorsman A great thanx for your info !! Now I've got to learn how to use audacity. Hehehehe...
I'm glad it was useful to you. I'm planning on finishing a few other FFmpeg related guides, but I've been saying that for a while now. Too many late nights at working hogging my day.
sumero
October 23rd, 2009, 10:30 PM
when you do ffmpeg -i video.mov
it shows Duration = 00:22:54.13
the question is, how does ffmpeg get that duration
if it has not played the video entirely.
( how does it know? )
is that duration saved somewhere in the metadata of a video
or what?
sumero
sumero
October 23rd, 2009, 11:46 PM
i just reported a bug on ffmpeg.
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1496
my first bug post, i wonder if they'll even consider it :)
this is not a rare situation, it is the most basic thing one
can do, and most common thing one can do. so it's not an "exotic case"
because i've been testing it in the past 2 weeks
trust me something is sooo wrong.. i know not everyone can test
this bug because you do not have an imac with quicktime pro...
but if you do, go ahead, download any movie trailer from apple.com/trailers
and then get rid of the front and back of it a little bit.
hey maybe you can test this with other stuff too, if you have a quicktime
on windows or something or whatever, just trim a video from apple.com/trailers
and test it please.
get rid of those logos that show up in the beginning of the video
and the text that shows up at the end of the video. by selecting the
middle and then doing a "TRIM TO SELECTION" with quicktime.
and then run a simple ffmpeg -i video.mov video.mp4
everything is out of sync, everything is sooo wrong
strange frozen frame in the beginning, audio is somewhere else..
i can not use async because #1, it is pointless because all i extract
is the video, not the audio. and even the video is acting strange.
if you do "ffmpeg -i video.mov" to see the duration about the video
it will give you the duration for the ORIGINAL movie trailer, in other words
the duration will be incorrect.
and then you can do "ffmpeg -i video.mov video.mp4" you get that
"time = 00:01:08 " now you think you got the correct video duration
but guess what.. while this is the correct duration, if you play the video.mp4
( the output ) you will notice it is longer than that duration reported at
the end of the conversion.
so we are all using a buggy FFMPEG and no-one even seems to care.
at first i thought maybe APPLE did something to QUICKTIME and
ffmpeg was unable to read it properly anymore.
but then i tested this same video with mplayer's OLDER versions
( the one on ubuntu by default for example ). no syncing issues at all.
no video issues at all.
BUT THIS OF COURSE COMES AT A TERRIBLE PRICE. video quality
was very bad. in other words MPLAYER/FFMPEG used to NOT have
this issue, but now they do, so they obviously screwed up as they
upgraded. what happened? i don't know...
it's almost as if they changed their entire ENGINE or something.
oh based on my tests, it seems to me like mplayer,ffmpeg are using
exact same stuff.
oh yeh let me ELABORATE..
if you do ffmpeg -i video.mov video.yuv
and then ffmpeg -i video.mov video.mp4
at the end of the conversion you will see "time=" has changed, for .yuv
it is a lot longer... STRANGE, VERY STRANGE, makes no sense at all.
sumero
andrew.46
October 24th, 2009, 10:44 AM
Hi FakeOutdoorsman,
I was wondering when you update your guide for Karmic (ready for the onslaught of people after aac encoding!) if you would consider adding in libopencore-amrwb-dev and libopencore-amrnb-dev as dependencies (and the appropriate ./configure options of course) thus making amr encoding + playback with ffplay possible?
All the best,
Andrew
Henrikx
October 24th, 2009, 12:01 PM
ffmpeg -i video.mov video.mp4and with mencoder ?
mencoder -oac pcm -ovc copy video.mov -o video.mp4
sumero
October 24th, 2009, 09:09 PM
okay, i added some additional information to that bug report...
i even added the test.mov ( and test.mov.zip ) so you can download
and test it yourself.
https://roundup.ffmpeg.org/roundup/ffmpeg/issue1496?
for the record... here's my ffmpeg version
FFmpeg version SVN-r20337, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 21 2009 16:15:21 with gcc 4.3.3
the original trailer was called 'Bad Lieutenant' and it was 2+ minutes long
i "trimmed" it with quicktime and i saved it as 'test.mov' now it was 6 seconds
long.
so i run... ffmpeg -i test.mov
Duration: 00:02:29.19, start: -20.-208542, bitrate: 126 kb/s
obviously this is wrong, this is probably the original video trailer's
original duration
then i run.. ffmpeg -i test.mov test.mp4
frame= 198 fps= 74 q=31.0 Lsize= 606kB time=6.04 bitrate= 821.9kbits/s
then i run.. ffmpeg -i test.mov test.yuv
frame= 629 fps=182 q=0.0 Lsize= 350038kB time=26.23 bitrate=109303.0kbits/s
see, now its 26.33 seconds instead of 6.04
but on top of this, if i play test.mp4 on my computer or via flash
doesn't matter really, it actually plays for 8 seconds with a 2 second frozen
frame in the front.
i do not really know how these things work, is it seeking a b-frame or what
is going on, it's beyond me at this point.
anyway let's do some mplayer and mencoder tests on this same video.
for the record here's the version:
MPlayer SVN-r29789-4.3.3 (C) 2000-2009 MPlayer Team
when i run... mplayer test.mov -vo test.mp4
well i do not see any duration reports but let me paste a few things...
Starting playback...
A: 5.9 (05.8) of 149.2 (02:29.1) 0.1%
i am actually not sure what that means. but that number in the
parenthesis seems to match with ffmpeg -i test.mov 's duration so
it seems to perhaps think.. it is that long as well..
as far as A: goes, i am guessing that's how long it played total.
so yeh, these numbers are all wrong.
let's see what mencoder tells us, i expect the same since its
tied to mplayer anyway...
mencoder -oac pcm -ovc copy test.mov -o test.mp4
this time i will paste a lot, since i wanna show you how
it skips frames too..
mencoder -oac pcm -ovc copy test.mov -o test.mp4
MEncoder SVN-r29789-4.3.3 (C) 2000-2009 MPlayer Team
WARNING: OUTPUT FILE FORMAT IS _AVI_. See -of help.
success: format: 0 data: 0x0 - 0x23dc1f
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1475b00]max_analyze_duration reached
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [H264] 848x448 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0x34363248 size:848x448 fps:23.976 ftime:=0.0417
================================================== ====
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
================================================== ====
and then there is this...
videocodec: framecopy (848x448 24bpp fourcc=34363248)
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos: 0.9s 21f (53%) 0.00fps Trem: 0min 0mb A-V:0.083 [0:1411]
Skipping frame!
Pos: 1.3s 31f (53%) 0.00fps Trem: 0min 1mb A-V:0.083 [1383:1411]
Skipping frame!
Pos: 1.6s 41f (53%) 0.00fps Trem: 0min 1mb A-V:0.083 [1873:1411]
these SKIPPING FRAME! stuff goes on for a while, i wont paste it all.
and this is the end portion.
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Video stream: 2030.705 kbit/s (253838 B/s) size: 1916277 bytes 7.549 secs 199 frames
Audio stream: 1411.200 kbit/s (176400 B/s) size: 1064960 bytes 6.037 secs
it seems to be correct with AUDIO STREAM's duration as reported
above as ( 6.037 secs ) but.. as far as the video stream goes..
it's showing 7.549 secs, so, the result, longer video, shorter audio
and you get all sorts of problems.
i can tell it to not give me any audio and still the video is about 8 seconds
long, initial 2 seconds consisting of a frozen frame that is not even suppose to
be played because when i play the original TRIMMED test.mov on my imac
i never see that initial frame that mencoder/mplayer/ffmpeg show me after a
conversion.
sumero
stoppage
October 25th, 2009, 02:40 AM
This is a guess. It may be libtheora-dev or libvorbis-dev causing your errors, but I think it is recordmydesktop because FFmpeg can usually make usable files with libtheora-dev or libvorbis-dev.
No, but you can compile it yourself. Here is a mini-guide:
1. Get the dependencies. I found out the dependencies by looking at the Arch Linux recordmydesktop build script (http://repos.archlinux.org/wsvn/community/recordmydesktop/repos/community-i686/PKGBUILD) and then finding the correct packages in Ubuntu:
sudo apt-get install zlib1g-dev libvorbis-dev libxdamage-dev libxext-dev libsm-dev
2. Download the recordmydesktop source and check the md5sum to see if the file is valid:
cd
wget http://downloads.sourceforge.net/project/recordmydesktop/recordmydesktop/0.3.8.1/recordmydesktop-0.3.8.1.tar.gz
md5sum recordmydesktop-0.3.8.1.tar.gz
The md5sum should equal: 6998b165540598965499bd99d8aa0eef.
3. Untar, ./configure, make, and install:
tar xzvf recordmydesktop-0.3.8.1.tar.gz
cd recordmydesktop-0.3.8.1
./configure
make
sudo checkinstall --pkgname=recordmydesktop --pkgversion "0.3.8.1" --default
Is this failing to create an output?
I installed recordmydesktop-0.3.8.1, now producing standard .ogg files, recognised by winff. Conversion to mp4 works from the command line but Winff has a problem, it returns „unrecognised option -me“. Winff installed version is 0.45.l.h-backto043. I prefer to use WinFF for conversions, I have a problem remembering mile-long command lines. Any ideas on how I might solve this latest little crisis? And thank you for your patience.
FakeOutdoorsman
October 25th, 2009, 03:32 AM
Hi FakeOutdoorsman,
I was wondering when you update your guide for Karmic (ready for the onslaught of people after aac encoding!) if you would consider adding in libopencore-amrwb-dev and libopencore-amrnb-dev as dependencies (and the appropriate ./configure options of course) thus making amr encoding + playback with ffplay possible?
All the best,
Andrew
Hi Andrew,
Yes, I will take a look at the process, and if it isn't any harder than the other steps in this guide then I will definitely add it.
I installed recordmydesktop-0.3.8.1, now producing standard .ogg files, recognised by winff. Conversion to mp4 works from the command line but Winff has a problem, it returns „unrecognised option -me“. Winff installed version is 0.45.l.h-backto043. I prefer to use WinFF for conversions, I have a problem remembering mile-long command lines. Any ideas on how I might solve this latest little crisis? And thank you for your patience.
I'm not very familiar with WinFF, but I believe your WinFF presets were designed for an old FFmpeg because it is using outdated FFmpeg options. For more information read WinFF: How to install a newer presets file (http://code.google.com/p/winff/wiki/InstallPresetsxml). An appropriate match seems to be presets-libavcodec52-v4.gz but I did not test this.
EQuake
October 27th, 2009, 01:37 PM
Hello!
I'm using Ubuntu Karmic and i've followed the howto step by step.
Have anybody seem this error? I've compiled ffmpeg+x264 in 2 different machines, same result.
$ ffmpeg -i VTS_01_1.VOB -vcodec libx264 comercial.mp4
FFmpeg version SVN-r20376, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 27 2009 10:04:22 with gcc 4.4.1
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 1 / 52.37. 1
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
Input #0, mpeg, from 'VTS_01_1.VOB':
Duration: 00:08:23.70, start: 0.000000, bitrate: 2717 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], 7000 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
[libx264 @ 0xa3b3f20]broken ffmpeg default settings detected
[libx264 @ 0xa3b3f20]use an encoding preset (vpre)
Output #0, mp4, to 'comercial.mp4':
Stream #0.0: Video: libx264, yuv420p, 720x480 [PAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
Stream #0.1: Audio: aac, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Everything is working if I don't use -vcodec libx264.
Any help will be appreciated.
Thanks!
Marcos
FakeOutdoorsman
October 27th, 2009, 06:23 PM
Hello!
I'm using Ubuntu Karmic and i've followed the howto step by step.
Have anybody seem this error? I've compiled ffmpeg+x264 in 2 different machines, same result.
$ ffmpeg -i VTS_01_1.VOB -vcodec libx264 comercial.mp4
FFmpeg version SVN-r20376, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 27 2009 10:04:22 with gcc 4.4.1
configuration: --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.37. 1 / 52.37. 1
libavformat 52.39. 2 / 52.39. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
Input #0, mpeg, from 'VTS_01_1.VOB':
Duration: 00:08:23.70, start: 0.000000, bitrate: 2717 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], 7000 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
[libx264 @ 0xa3b3f20]broken ffmpeg default settings detected
[libx264 @ 0xa3b3f20]use an encoding preset (vpre)
Output #0, mp4, to 'comercial.mp4':
Stream #0.0: Video: libx264, yuv420p, 720x480 [PAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
Stream #0.1: Audio: aac, 48000 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Everything is working if I don't use -vcodec libx264.
Any help will be appreciated.
Thanks!
Marcos
You need to use a preset when using libx264. See the Using FFmpeg and x264 section of this guide for some examples.
stoppage
October 27th, 2009, 06:42 PM
Hi Andrew,
Yes, I will take a look at the process, and if it isn't any harder than the other steps in this guide then I will definitely add it.
I'm not very familiar with WinFF, but I believe your WinFF presets were designed for an old FFmpeg because it is using outdated FFmpeg options. For more information read WinFF: How to install a newer presets file (http://code.google.com/p/winff/wiki/InstallPresetsxml). An appropriate match seems to be presets-libavcodec52-v4.gz but I did not test this.
„Presets-libavcodec52-v4.gz“ did the trick! Obliged for all your help
EQuake
October 28th, 2009, 02:50 AM
@FakeOutdoorsman (http://ubuntuforums.org/member.php?u=162846) hey, it works! Sorry, my fault. Thanks!
sumero
October 28th, 2009, 08:13 AM
is there an example on how to use libavfilter to apply a watermark to a
video?
or a way to enable vhook in the latest ffmpeg?
nothing was wrong with vhook it works great, except that it only works
on older ffmpeg
sumero
FakeOutdoorsman
October 28th, 2009, 08:08 PM
is there an example on how to use libavfilter to apply a watermark to a
video?
or a way to enable vhook in the latest ffmpeg?
nothing was wrong with vhook it works great, except that it only works
on older ffmpeg
sumero
I know very little of libavfilter. See the Libavfilter Documentation (http://ffmpeg.org/libavfilter.html).
mocha
October 30th, 2009, 11:56 PM
I wanted to tell about my experience with --enable-shared on recent SVN versions of ffmpeg. It appears that if you choose to build ffmpeg with shared libraries on Jaunty, you also have to remove all of the libav* and libav*-unstripped packages from the ubuntu repositories, otherwise unrecognized symbol errors will occur when making some conversions with ffmpeg.
I verified this by installing a shared library version of ffmpeg and then running "ldd -r /usr/local/bin/ffmpeg" and it says that there are unrecognized symbols and I'm able to trace the problem to the libav*** libraries which come from the ubuntu repo. It's also apparent because when you run ffmpeg and it displays the library versions in the header, there are 2 different versions shown for libavdevice, libavformat, and so on.
This is a problem because I cannot uninstall the repo libav* packages without taking about 50 other packages with it.
The only answer for now appears to be to build it statically, or in my case since I need to have the shared libs in order to build xine-vdpau and some other source packages, I just keep 2 debs around, one compiled with shared and the other as static.
It seems from the other thread that discusses the libav* packages that this situation may change in Karmic? Can anyone confirm?
FakeOutdoorsman
November 2nd, 2009, 04:52 AM
I wanted to tell about my experience with --enable-shared on recent SVN versions of ffmpeg. It appears that if you choose to build ffmpeg with shared libraries on Jaunty, you also have to remove all of the libav* and libav*-unstripped packages from the ubuntu repositories, otherwise unrecognized symbol errors will occur when making some conversions with ffmpeg.
I can confirm this with the unstripped libraries on Jaunty. I did not test the stripped ones. I first installed the unstripped libav* libraries and then added --enable-shared to the FFmpeg ./configure from the first page of this guide. After FFmpeg installation I ran sudo ldconfig. Attempting the one-pass CRF example from this guide gives an error:
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avcodec_channel_layout_num_channels
I never encountered this because I never --enable-shared on Ubuntu rarely have a system with any libav*.
... It's also apparent because when you run ffmpeg and it displays the library versions in the header, there are 2 different versions shown for libavdevice, libavformat, and so on.
I believe this is normal for FFmpeg to show two sets of libav*. My Arch Linux non-shared FFmpeg shows two sets as well with the same version numbers. (Update: Oops. When using "ffmpeg -version" it shows two sets, but not when using FFmpeg normally.)
This is a problem because I cannot uninstall the repo libav* packages without taking about 50 other packages with it.
The only answer for now appears to be to build it statically, or in my case since I need to have the shared libs in order to build xine-vdpau and some other source packages, I just keep 2 debs around, one compiled with shared and the other as static.
It seems from the other thread that discusses the libav* packages that this situation may change in Karmic? Can anyone confirm?
The extra packages (libavutil-extra-49 libswscale-extra-0 libpostproc-extra-51 libavformat-extra-52 libavcodec-extra-52 libavdevice-extra-52 libavfilter-extra-0) seem to cause issues in Karmic too. I'm unsure which one(s) cause errors, but I get:
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avcodec_decode_video2
And also libfaac is missing from "ffmpeg -formats", although it is listed under "Enabled encoders" after ./configure. Might be related to the extra packages or it might be a recent SVN FFmpeg issue.
ashmew2
November 2nd, 2009, 07:16 PM
One of The most comprehensive document on ffmpeg (comparable to the man pages)..I can finally stop using Windows XP on a virtualbox for converting stuff....Thank You :)
Jumbs
November 3rd, 2009, 03:19 AM
I wrote myself a little script that converted vids to ipod using ffmpeg, and it worked great in Jaunty.
I install karmic and ffmpeg and now it fails.
Give me a "Unknown encoder 'libx264'"
The only one available is libx264-67, and it doesnt do anything.
I don't recall doing anything special to get this to work in jaunty, did something change?
cor2y
November 3rd, 2009, 06:15 AM
If you want to convert video to ipod format and you need to compile ffmpeg yourself seems libfaac support has been removed from the unstripped library libavcodec-unstripped-52.
X264 encoding should work once libavcodec-unstripped-52 is installed dont forget the other unstripped libraries if you need them.
But for ipod video that uses aac for audio you will need to compile ffmpeg yourself to be able to have a libfaac or you could create the audio track seperate and mux or use another tool like avidemux.
Henrikx
November 3rd, 2009, 11:42 AM
64 encoding should work once libavcodec-unstripped-52NO.
No need for unstripped.
x264 --help
x264 core:78 r1318 fe83a90
ffmpeg
FFmpeg version SVN-r20419, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 30 2009 13:43:05 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
Works all fine, without unstripped !!!
Jumbs
November 4th, 2009, 02:46 AM
Installed from source, and now at least it encodes.
But i get the dreaded "Public atom failure"when trying to put them in iTunes...
Oh well, thanks for the help, I'll have to figure out a new approach
FakeOutdoorsman
November 4th, 2009, 02:59 AM
Installed from source, and now at least it encodes.
But i get the dreaded "Public atom failure"when trying to put them in iTunes...
Oh well, thanks for the help, I'll have to figure out a new approach
What is your FFmpeg command and complete FFmpeg output? I don't have iTunes so I can't test this, but you may be able to fix this error with qt-faststart (part of FFmpeg):
qt-faststart input.mp4 output.mp4
or MP4Box (part of the gpac package from the repository):
MP4Box -add input.mp4 output.mp4
FakeOutdoorsman
November 4th, 2009, 03:03 AM
NO.
No need for unstripped.
x264 --help
x264 core:78 r1318 fe83a90
ffmpeg
FFmpeg version SVN-r20419, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Oct 30 2009 13:43:05 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
Works all fine, without unstripped !!!
Yes, that is correct that FFmpeg that you compile youself from SVN doesn't need the unstripped libraries, but I believe the FFmpeg in question by the previous poster was the version from the repository which does require libavcodec-unstripped-5* to use restricted encoders.
Jumbs
November 4th, 2009, 04:13 AM
What is your FFmpeg command and complete FFmpeg output? I don't have iTunes so I can't test this, but you may be able to fix this error with qt-faststart (part of FFmpeg):
qt-faststart input.mp4 output.mp4
or MP4Box (part of the gpac package from the repository):
MP4Box -add input.mp4 output.mp4
Oh my, if that works, i don't know if i will be happy, or sad about all the stress that has caused me over the years.
I have constantly been changing encoding tool due to it, and eventual wrote my own script to try to avoid it.
I'll try it if and when i get a broken one and report back
BadSeqtor
November 4th, 2009, 03:40 PM
Hi, I get a problem when installing the pre-requsites;
libfaad-dev: Beroende av: libfaad0 (= 2.6.1-3.1) men 2.7.0~ppa1~karmic3 kommer att installeras
libsdl1.2-dev: Beroende av: libglu1-mesa-dev men det kommer inte att installeras
Beroende av = dependent of (swedish)
I.e. it sais that libfaad-dev is dependet on libfaad0 2.6.1-3.1, but 2.7.0~ppa1~karmic3 will be installed.
All third party repos have been deactivated.
Any ideas as to what the problem could be?
A have tried resolving my problems with third party repo (FreshMedia), it gives me AAC encoding in ffmpeg, but breaks Mencoder - that's why I'm looking to go with official Mencoder and compile ffmpeg by my self.
This is on a 9.10 system, upgraded from 9.04 where this all worked.
FakeOutdoorsman
November 4th, 2009, 07:19 PM
Hi, I get a problem when installing the pre-requsites;
Beroende av = dependent of (swedish)
I.e. it sais that libfaad-dev is dependet on libfaad0 2.6.1-3.1, but 2.7.0~ppa1~karmic3 will be installed.
All third party repos have been deactivated.
Any ideas as to what the problem could be?
A have tried resolving my problems with third party repo (FreshMedia), it gives me AAC encoding in ffmpeg, but breaks Mencoder - that's why I'm looking to go with official Mencoder and compile ffmpeg by my self.
This is on a 9.10 system, upgraded from 9.04 where this all worked.
You probably still have a third-party repo active and it is interfering with your installation. Show the output of your sources.list:
less /etc/apt/sources.list
Also show anything in /etc/apt/sources.list.d/.
BadSeqtor
November 4th, 2009, 08:36 PM
You probably still have a third-party repo active and it is interfering with your installation. Show the output of your sources.list:
less /etc/apt/sources.listAlso show anything in /etc/apt/sources.list.d/.
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://se.archive.ubuntu.com/ubuntu/ karmic main restricted multiverse
deb-src http://se.archive.ubuntu.com/ubuntu/ karmic restricted main universe #Added by software-properties
## Major bug fix updates produced after the final release of the
## distribution.
deb http://se.archive.ubuntu.com/ubuntu/ karmic-updates main restricted multiverse
deb-src http://se.archive.ubuntu.com/ubuntu/ karmic-updates restricted main universe #Added by software-properties
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://se.archive.ubuntu.com/ubuntu/ karmic universe
deb http://se.archive.ubuntu.com/ubuntu/ karmic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu karmic partner
deb http://security.ubuntu.com/ubuntu karmic-security main restricted multiverse
deb-src http://security.ubuntu.com/ubuntu karmic-security restricted main universe #Added by software-properties
deb http://security.ubuntu.com/ubuntu karmic-security universe
deb http://archive.ubuntu.com/ubuntu karmic universe
deb-src http://archive.ubuntu.com/ubuntu karmic universe #Added by software-properties
# deb http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu karmic main
# deb-src http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu karmic main
# deb http://repository.cairo-dock.org/ubuntu karmic cairo-dock #Cairo-dock
# deb http://ppa.launchpad.net/team-xbmc/jaunty-ppa/ubuntu karmic main #XBMC
# deb-src http://ppa.launchpad.net/team-xbmc/jaunty-ppa/ubuntu karmic main #XBMC
# deb http://le-web.org/repository stable main #BackInTime
# deb http://debian.scribus.net/debian/ karmic main non-free #Scribus
# ConvertIT
# deb http://ftp.osuosl.org/pub/pculture.org/miro/linux/repositories/ubuntu jaunty/ #Miro
# deb http://getswiftfox.com/builds/debian unstable non-free #Swiftfox
# deb-src http://ppa.launchpad.net/gstreamer-developers/ppa/ubuntu karmic main #GStreamer
# deb http://ppa.launchpad.net/gstreamer-developers/ppa/ubuntu karmic main #GStreamer
# deb http://ppa.launchpad.net/jonabeck/ppa/ubuntu karmic main #iFuse iPhone mount
# deb http://navit.latouche.info/ubuntu karmic main #Navit
# deb http://deb.torproject.org/torproject.org karmic main #TOR Project
# deb http://ppa.launchpad.net/freshmedia/ppa/ubuntu karmic main
# deb-src http://ppa.launchpad.net/freshmedia/ppa/ubuntu karmic main
deb http://se.archive.ubuntu.com/ubuntu karmic main multiverse #Multiverse
akirad.list
akirad.list.save
medibuntu.list
medibuntu.list.distUpgrade
medibuntu.list.save
opera.list
opera.list.distUpgrade
opera.list.saveThanks for taking time!
FakeOutdoorsman
November 4th, 2009, 09:07 PM
I believe the FreshMedia repository is still activate, although it is commented out in sources.list. Each time this file is edited you should run:
sudo apt-get update
This will resynchronize the package index files from their sources. Run this and then try downloading the FFmpeg dependencies again.
BadSeqtor
November 4th, 2009, 10:57 PM
I believe the FreshMedia repository is still activate, although it is commented out in sources.list. Each time this file is edited you should run:
sudo apt-get updateThis will resynchronize the package index files from their sources. Run this and then try downloading the FFmpeg dependencies again.
I allways do that, did it again just to make sure but still get the same error.
mc4man
November 4th, 2009, 11:57 PM
If libfaad0 - 2.7.0 is installed then you can't install the 2.6.1 libfaad-dev until it's removed (synaptic and or apt-get won't downgrade off of an attempted install of a -dev
So either remove/downgrade the 2.7.0 libfaad0 first and then install or ...
just go ahead an install the libfaad-dev (2.7.0... ) from your ppa, ffmpeg isn't going to care whether you have the 2.6.1 or 2.7.0 version, all that matters is the lib and -dev are the same version.
( you don't need to re-add the ppa if you decide to go with the 2.7.0 version, just go here and direct download and install the libfaad-dev, expand the arrow for faad0.....karmic3
https://launchpad.net/~freshmedia/+archive/ppa/+packages
mocha
November 5th, 2009, 01:29 AM
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avcodec_channel_layout_num_channels
The extra packages (libavutil-extra-49 libswscale-extra-0 libpostproc-extra-51 libavformat-extra-52 libavcodec-extra-52 libavdevice-extra-52 libavfilter-extra-0) seem to cause issues in Karmic too. I'm unsure which one(s) cause errors, but I get:
ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avcodec_decode_video2
Those are exactly the symbol errors I was getting. Oh well, I guess I will keep doing what I'm doing when I upgrade to Karmic. Thanks.
BadSeqtor
November 5th, 2009, 12:27 PM
If libfaad0 - 2.7.0 is installed then you can't install the 2.6.1 libfaad-dev until it's removed (synaptic and or apt-get won't downgrade off of an attempted install of a -devThanks for the help. I uninstalled libfaad0 and then did an autoremove, and tried to install the prerequisites again - and the libfaad0-error is gone!
Though, the libsdl1.2-dev remains. THe error states;
libsdl1.2-dev: Dependent on: libglu1-mesa-dev but that will not be installed.
Strangely enough?
Says "E: Broken pakage" after.
Any ideas?
mc4man
November 5th, 2009, 03:57 PM
Though, the libsdl1.2-dev remains. THe error states;
libsdl1.2-dev: Dependent on: libglu1-mesa-dev but that will not be installed.
That would be because you have a higher version of libglu1-mesa from one of your ppa's, probably the xorg-edgers.
Can't say what your best bet is there because I don't know why you're using that ppa, if it's the one.
Inclination would be to enable the ppa that you got libglu1-mesa from and install the libglu1-mesa-dev package from there rather than downgrade to the karmic repo version which may, at this point, have other consequences.
In the long run, if using ppa's, you should check and be aware of what they're upgrading, or in the case of ppa's that have multiple apps, be aware of what they could upgrade by leaving them enabled after installing whatever it is that caused you in add them in the first place. (thru the update manager, ect.
( not saying any of your ppa's are multi-app, just a 'in general' comment
Arup
November 6th, 2009, 03:42 AM
I have compiled ffmpeg and x264 following your directions, however using WinFF when I try and import presets for the updated svn ffmpeg from http://winff.googlecode.com/files/presets-r15824.tar.gz I get a the preset to import does not have a label message. Any ideas whats going on?
FakeOutdoorsman
November 6th, 2009, 03:58 AM
I have compiled ffmpeg and x264 following your directions, however using WinFF when I try and import presets for the updated svn ffmpeg from http://winff.googlecode.com/files/presets-r15824.tar.gz I get a the preset to import does not have a label message. Any ideas whats going on?
That file seems to be damaged for me at least. It will not extract:
$ tar xzvf presets-r15824.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
A more appropriate and up-to-date preset file for your FFmpeg is probably presets-libavcodec52-v4.gz (http://winff.googlecode.com/files/presets-libavcodec52-v4.gz).
Arup
November 6th, 2009, 04:04 AM
That file seems to be damaged for me at least. It will not extract:
$ tar xzvf presets-r15824.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
A more appropriate and up-to-date preset file for your FFmpeg is probably presets-libavcodec52-v4.gz (http://winff.googlecode.com/files/presets-libavcodec52-v4.gz).
Thanks a lot. That file is not in gzipped format, you need to remove the .gz extension for it to work. However WiFF doesn't allow me to import it somehow.
The preset your recommended worked out fine, however I can't encode with it anymore, previously with older one, I could encode. I get a error indicating incorrect parameters being passed to encode.
Finally figured out the issue of WinFF failing with new presets. It seems some of the codecs can't handle the multi cpu option which I had checked in WinFF, unticking that allowed me to encode the videos. Notably .flv is unable to do multi thread but x264 can.
kaninfaan
November 7th, 2009, 03:31 PM
Thank you FakeOutdoorsman for this thread. My life is better because of it.
Feelin_froggy8877
November 7th, 2009, 06:18 PM
Hey all, Everything seemed to go very well w/ the install. When all was completed I attempted to convert my first vid. Only prob is. Im getting a bash...usr/bin/ffmpeg, no such file or dir.
DeaD SouL
November 7th, 2009, 08:14 PM
Hi,
I'm using Ubuntu 9.10 (Karmic)
and I couldn't get winff to work
then followed the "Install FFmpeg and x264 on Ubuntu Hardy Heron 8.04 LTS (http://ubuntuforums.org/showpost.php?p=6963607&postcount=360) steps
but winff doesn't want want to work because of "Unknown encoder 'libx264'"
error:
http://uppix.net/1/0/e/16d77e2c1309eceb5137099087323tt.jpg (http://uppix.net/1/0/e/16d77e2c1309eceb5137099087323.png)
presets:
http://uppix.net/2/2/f/7bbe7fc820061d5467e66d9c2a243tt.jpg (http://uppix.net/2/2/f/7bbe7fc820061d5467e66d9c2a243.png)
x264:
http://uppix.net/9/a/a/efda91fb94302ef4fe2446b0b27eett.jpg (http://uppix.net/9/a/a/efda91fb94302ef4fe2446b0b27ee.png)
thanks
FakeOutdoorsman
November 7th, 2009, 09:13 PM
Hi,
I'm using Ubuntu 9.10 (Karmic)
and I couldn't get winff to work
then followed the "Install FFmpeg and x264 on Ubuntu Hardy Heron 8.04 LTS (http://ubuntuforums.org/showpost.php?p=6963607&postcount=360) steps
but winff doesn't want want to work because of "Unknown encoder 'libx264'"
thanks
Your first screenshot shows that you are using the FFmpeg from the Ubuntu repository, and not a compiled version that you would get from this guide. By default, FFmpeg from the Ubuntu repository does not have libx264 enabled. You must install libavcodec-extra-52 after installing FFmpeg if you want to enable libx264 and other restricted encoders. However, FFmpeg from the Karmic repository is troublesome because you can't encode to AAC audio (your WinFF preset uses AAC) with FFmpeg even after installing libavcodec-extra-52 because libfaac (the AAC encoder) has been removed due to a licensing issue. Annoying.
Anyway, in my opinion, the easiest way to get everything working right with FFmpeg and WinFF is to compile FFmpeg as shown in this guide, but maybe one of the WinFF developers will have some better advice since I do not have much experience with WinFF.
FakeOutdoorsman
November 7th, 2009, 09:16 PM
Thank you FakeOutdoorsman for this thread. My life is better because of it.
Thanks, kaninfaan! I didn't mean to reply out or order, but I must have submitted the wrong reply first.
Hey all, Everything seemed to go very well w/ the install. When all was completed I attempted to convert my first vid. Only prob is. Im getting a bash...usr/bin/ffmpeg, no such file or dir.
What is your FFmpeg command and the full output? This guide installs to /usr/local/bin and not /usr/bin.
Feelin_froggy8877
November 7th, 2009, 09:52 PM
Not sure what happened the first couple times I had tried, but now all the sudden it is working. (go figure) I did not change anything in this command.
ffmpeg -i Familyguy.avi -pass 1 -an -vcodec libx264 -vpre fastfirstpass -vpre ipod640 -b 512k -bt 512k -s 640x480 -threads 0 -f rawvideo -y /dev/null && ffmpeg -i Familyguy.avi -pass 2 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre hq -vpre ipod640 -b 512k -bt 512k -s 640x480 -threads 0 Familyguy.mp4
Well, very good HOWTO, thank you very much.
DeaD SouL
November 7th, 2009, 10:32 PM
thats stranger.. i tried it yesterday but it didn't work,
so because of your tip, i did:
sudo apt-get remove ffmpeg
then went to the ffmpeg source folder which i created & configured yesterday and entered
sudo checkinstall --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --default
finaly
sudo apt-get install winff
and i gave it a try............... it worked..!!
aw, thanks a lot man, i really do appreciate your help :D
bests
stmiller
November 9th, 2009, 04:11 PM
Or just use this PPA:
https://launchpad.net/~motumedia/+archive/ppa
?
$ sudo add-apt-repository ppa:motumedia
nikos_web
November 9th, 2009, 05:53 PM
Hi FakeOutdoorsman (http://ubuntuforums.org/member.php?u=162846), and thank you for your great posting. (I am only new to Linux and I found your instructions very clear to follow).
I followed your recommended steps carefully, however, I still cannot use VLC fully: When I try to convert video to .mp4, I still get the same error message:
"
Streaming / Transcoding failed:
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.
"
Can you please advise what further actions I could take, in order to enable VLC to encode into .mp4?
(I have ubuntu 9.10 amd64)
Many thanks,
Nikos.
Arup
November 9th, 2009, 07:42 PM
Or just use this PPA:
https://launchpad.net/~motumedia/+archive/ppa
?
$ sudo add-apt-repository ppa:motumedia
Most of the stuff there is quite old considering this thread is about compiling and updating these codecs on a regular basis. Problem with PPAs is that the sometimes they are dependent on the person putting up the packages, sometimes the updates stop for months. Other times you end up brining in other stuff which you didn't anticipate as they are in the PPA itself.
mc4man
November 9th, 2009, 10:08 PM
I followed your recommended steps carefully, however, I still cannot use VLC fully: When I try to convert video to .mp4, I still get the same error message.....
While this is not in the scope of this guide a bit of info there. Vlc (and some other apps), uses the system (shared) ffmpeg libraries for much of it's encoding,decoding.
As has been noted here and elsewhere the karmic ffmeg shared libs don't support aac encoding and will not thru libaac in the future. ( ubuntu 10.04 may offer native ffmpeg aac encoding, if so, it's usefulness may be debatable
The means to installing 'better' shared ffmpeg libs are varied, I don't believe there is a generic 'best' way.
The major consideration is the reason for doing so and which revision of ffmpeg one decides to use to best satisfy that reason.
At certain -r's and definitely with the current svn, you'd need to also re-build some libavcodec dependent apps to maintain compatibility and in particular, with vlc, may need to match the vlc source to ffmpeg/x264 sources
(vlc doesn't maintain sync with ffmpeg to the extent mplayer does.
qyot27
November 10th, 2009, 12:49 AM
Hi FakeOutdoorsman (http://ubuntuforums.org/member.php?u=162846), and thank you for your great posting. (I am only new to Linux and I found your instructions very clear to follow).
I followed your recommended steps carefully, however, I still cannot use VLC fully: When I try to convert video to .mp4, I still get the same error message:
"
Streaming / Transcoding failed:
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.
"
Can you please advise what further actions I could take, in order to enable VLC to encode into .mp4?
(I have ubuntu 9.10 amd64)
Many thanks,
Nikos.
Considering the rejection of libfaac from ffmpeg, just choose MP3 as the audio format instead (choose to edit the profile and then click over to the Audio codec tab). It's perfectly acceptable by MPEG-4 standards to use MP3 in conjunction with the MP4 container and ASP (i.e. Xvid) or H.264 video. And you won't run into the issues you would with AAC support - not to mention that FAAC has a pretty bad reputation for quality anyway (to the point that the developers of it even tell people it's not up to par (http://www.audiocoding.com/faac.html)). If I remember my comparison tests correctly, Lame even beat out FAAC, and as any MP3 encoding through VLC via ffmpeg is likely coming from Lame (barring some of those patent issues with the repositories and the stock ffmpeg, which I can never seem to keep straight), then that'll be fine.
Otherwise, grab the standalone version of FAAC or Nero AAC, encode the audio separately, and combine it with the video using MP4Box. Or hey, if the source audio of the file you're trying to convert is AAC or MP3 or AC3, just tell VLC to keep the original audio stream - that way you don't lose quality by introducing more lossy conversions than necessary (as AC3 is also an accepted audio stream format in MP4 now, and most if not all of the major video players should support it if we're talking recent builds).
sumero
November 10th, 2009, 10:56 PM
so let me get this straight, the only notable feature with
new ubuntu 9.10 is that it is a "KOLA" name which sounds
delicious like COCA COLA out of the FRIDGE and AMAZON
CLOUD HOSTING?
so, if a person simply looking EFFICIENCY and SPEED..
do they have a reason to upgrade to KARMIT?
sumero
FakeOutdoorsman
November 10th, 2009, 11:08 PM
so let me get this straight, the only notable feature with
new ubuntu 9.10 is that it is a "KOLA" name which sounds
delicious like COCA COLA out of the FRIDGE and AMAZON
CLOUD HOSTING?
so, if a person simply looking EFFICIENCY and SPEED..
do they have a reason to upgrade to KARMIT?
sumero
I don't fully understand what you are asking, but I have a feeling that it doesn't really relate to this guide. I suggest asking it in Absolute Beginner Talk (http://ubuntuforums.org/forumdisplay.php?f=326) or General Help (http://ubuntuforums.org/forumdisplay.php?f=331).
johnny_w
November 14th, 2009, 11:16 AM
Hi everybody...
Thanks a lot, FakeOutdoorsman (http://ubuntuforums.org/member.php?u=162846), for this great, easy to understand tutorial. I could successfully compile everything on 32bit Karmic Koala (Ubuntu 9.10).
However, when I try to perform the same steps on my production Ubuntu 9.04 64 bit (nearly out of the box install, no additional packages added), I get an error during compilation of ffmpeg.
When I execute:
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
makeI get this error message:
gcc -DHAVE_AV_CONFIG_H -I. -I"/home/kkunzelm/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -MMD -MF libavcodec/vdpau.d -MT libavcodec/vdpau.o -c -o libavcodec/vdpau.o libavcodec/vdpau.c
In file included from libavcodec/vdpau.c:32:
libavcodec/vdpau.h:76: Fehler: expected specifier-qualifier-list before »VdpPictureInfoMPEG4Part2«
libavcodec/vdpau.c: In Funktion »ff_vdpau_mpeg4_decode_picture«:
libavcodec/vdpau.c:320: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:321: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:322: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:323: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:324: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:325: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:326: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:327: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:328: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:329: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:330: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:331: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:333: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:334: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:336: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:337: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:343: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:344: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:349: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
make: *** [libavcodec/vdpau.o] Fehler 1
It would be great if somebody could help to figure out the problem. Any additional detail you would need will be posted as soon as possible.
Thanks a lot to everybody.
Sincerely
John
Bonster
November 14th, 2009, 02:15 PM
I keep getting this error x264
I ran this:
./configure --enable-mp4-output --enable-pthread --enable-debug --enable-gprof --enable-visualize --enable-shared
make
and got this: libx264.so.79 error?
gcc -shared -o libx264.so.79 common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/set.o common/quant.o common/vlc.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/visualize.o common/display-x11.o common/x86/mc-c.o common/x86/predict-c.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o common/x86/dct-64.o -Wl,-soname,libx264.so.79 -pg -L/usr/X11R6/lib -lX11 -lm -lpthread -lgpac_static
/usr/bin/ld: cannot find -lgpac_static
collect2: ld returned 1 exit status
make: *** [libx264.so.79] Error 1
anything im missing?
Henrikx
November 14th, 2009, 02:33 PM
sudo apt-get install gpac
FakeOutdoorsman
November 14th, 2009, 08:03 PM
Hi everybody...
Thanks a lot, FakeOutdoorsman (http://ubuntuforums.org/member.php?u=162846), for this great, easy to understand tutorial. I could successfully compile everything on 32bit Karmic Koala (Ubuntu 9.10).
However, when I try to perform the same steps on my production Ubuntu 9.04 64 bit (nearly out of the box install, no additional packages added), I get an error during compilation of ffmpeg.
When I execute:
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
makeI get this error message:
gcc -DHAVE_AV_CONFIG_H -I. -I"/home/kkunzelm/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -MMD -MF libavcodec/vdpau.d -MT libavcodec/vdpau.o -c -o libavcodec/vdpau.o libavcodec/vdpau.c
In file included from libavcodec/vdpau.c:32:
libavcodec/vdpau.h:76: Fehler: expected specifier-qualifier-list before »VdpPictureInfoMPEG4Part2«
libavcodec/vdpau.c: In Funktion »ff_vdpau_mpeg4_decode_picture«:
libavcodec/vdpau.c:320: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:321: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:322: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:323: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:324: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:325: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:326: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:327: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:328: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:329: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:330: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:331: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:333: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:334: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:336: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:337: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:343: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:344: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
libavcodec/vdpau.c:349: Fehler: »union VdpPictureInfo« hat kein Element namens »mpeg4«
make: *** [libavcodec/vdpau.o] Fehler 1
It would be great if somebody could help to figure out the problem. Any additional detail you would need will be posted as soon as possible.
Thanks a lot to everybody.
Sincerely
John
A better explanation than anything I could come up with can be found here:
[FFmpeg-user] build fail on ubuntu 9.10 (http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2009-November/022920.html)
Unfortunately, one solution they give is to use a PPA, however using a PPA can cause issues and package conflicts if it is not well managed. This isn't always the case, but something to be aware of.
I am unable to duplicate this error, but I don't have VDPAU or 64-bit capable hardware. Not sure which of those makes the most difference. If you don't want to upgrade your NVidia drivers/headers or don't care about VDPAU hardware accelerated decoding for MPEG-4 ASP, then perhaps you can use a slightly older FFmpeg revision:
r20502 | cehoyos | 2009-11-10 09:52:39 -0900 (Tue, 10 Nov 2009) | 5 lines
Add VDPAU hardware accelerated decoding for MPEG-4 ASP which can be used
by video players.
Original patch by NVIDIA corporation.
So perhaps r20501 is what you're looking for? I wish I could test this, but my hardware is too old.
cd ~/ffmpeg
make distclean
svn checkout -r 20501 svn://svn.ffmpeg.org/ffmpeg/trunk .
I keep getting this error x264
I ran this:
./configure --enable-mp4-output --enable-pthread --enable-debug --enable-gprof --enable-visualize --enable-shared
make
and got this: libx264.so.79 error?
gcc -shared -o libx264.so.79 common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/set.o common/quant.o common/vlc.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/visualize.o common/display-x11.o common/x86/mc-c.o common/x86/predict-c.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o common/x86/dct-64.o -Wl,-soname,libx264.so.79 -pg -L/usr/X11R6/lib -lX11 -lm -lpthread -lgpac_static
/usr/bin/ld: cannot find -lgpac_static
collect2: ld returned 1 exit status
make: *** [libx264.so.79] Error 1
anything im missing?
Why are you enabling all of these other options? Do you know what they all do?
--enable-mp4-output: Redundant. x264 handles this automatically.
--enable-pthread: Same as above.
--enable-debug: Are you going to do some debugging?
--enable-gprof: I don't know what this does.
--enable-visualize: Enables a visualization tool useful for debugging, but I'm not sure if it even compiles or works anymore.
--enable-shared: Are you going to be compiling other things that require the shared libraries?
Bonster
November 14th, 2009, 10:27 PM
well i always get this msg when i try to convert stuff, so i though i go and enable some of those options to make it work, base on the --help file.
----
ffmpeg: error while loading shared libraries: libx264.so.79: cannot open shared object file: No such file or directory
---
this is the --help file
--help print this message
--disable-avis-input disables avisynth input (win32 only)
--disable-mp4-output disables mp4 output (using gpac)
--disable-pthread disables multithreaded encoding
--disable-asm disables assembly optimizations on x86 and arm
--enable-debug adds -g, doesn't strip
--enable-gprof adds -pg, doesn't strip
--enable-visualize enables visualization (X11 only)
--enable-pic build position-independent code
--enable-shared build libx264.so
--extra-asflags=EASFLAGS add EASFLAGS to ASFLAGS
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS
--extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS
--host=HOST build programs to run on HOST
--cross-prefix=PREFIX use PREFIX for compilation tools
**********
So which options do i need to fix this error?
Thanks
mc4man
November 14th, 2009, 11:26 PM
@ johnny_w
I think your simplest solution would be to either just remove the nvidia vdpau headers, either for good or just while building ffmpeg or add --disable-vdpau to your configure ( in synaptic nvidia-XXX-libvdpau-dev
(tried both ways on my hardy/karmic installs and today's ffmpeg built fine using FO's guide verbatim
If you're actually using vdpau then it would make sense to to upgrade your drivers and nvidia-libvdpau packages ( though I'm not sure of any great advantage to having vdpau in ffmpeg itself...?
Edit: atm I'd think one would need to upgrade to the 190...... nvidia versions
sumero
November 15th, 2009, 12:10 AM
Well sorry, i actually was talking about this green announcement about UBUNTU 9.10 being out, it's called KARMIC i believe, i have not upgraded because i can not find a reason to upgrade, would ffmpeg run faster & better on KARMIC than on JAUNTY ? or would PHP run better on KARMIC than on JAUNTY ? if any of those is a yes, i will go for it.
but anyway, i guess this is a FFMPEG only topic so i'll just say this..
i reported a bug on FFMPEG.org about any video being trimmed with QUICKTIME
not being properly converted by ffmpeg, but no-one is really interested in even
looking into the issue, due to few factors.
first of all, to use quicktime's trim to selection feature and etc, you need to
make sure you have it purchased. so people just are ignoring it because
they do not have $29 for the quicktime.
in other words, i do not believe they are going to fix this problem with ffmpeg
unless few others complain about it to them. and no-one is likely to.
i reported the bug like a month ago, and no-one so far even bothered to
look at it.
my guess is that, come 11 months later, and it still wont be fixed.
to quickly summarize the problem.. any video modified ( trimmed or cut )
with quicktime.. that movie's headers are not modified, instead quicktime
adds it's own headers to it or something custom like that so quicktime
knows how to play it, but nothing else will know how to play it.
not ffplay not mplayer nothing, in other words if that video was originally
100 seconds long and you modified it with quicktime by cutting 50 seconds
from the beginning, and if you were to run ffmpeg -i movie.mov
it would still report 100 seconds, and it gets very confused when it tries
to convert it, the duration will be wrong and audio will be out of sync.
so my guess is that ffmpeg needs to see if it can read the headers
written by quicktime before it tries to read the generic headers.
sumero
FakeOutdoorsman
November 15th, 2009, 12:37 AM
Bonster
well i always get this msg when i try to convert stuff, so i though i go and enable some of those options to make it work, base on the --help file.
----
ffmpeg: error while loading shared libraries: libx264.so.79: cannot open shared object file: No such file or directory
Did you run sudo ldconfig after installing FFmpeg? This is a required step if you --enable-shared on x264.
So which options do i need to fix this error?
Thanks
This is probably the result of adding --enable-shared to x264 and/or FFmpeg and not running sudo ldconfig after installing FFmpeg. Also, I believe if you --enable-shared on FFmpeg, you must also have --enable-shared (or --enable-pic) on x264 if you are on a x86_64 system, but I am not totally sure because I don't have a x86_64 system. You could have most likely avoided this error if you didn't add the extra options.
sumero
Well sorry, i actually was talking about this green announcement about UBUNTU 9.10 being out, it's called KARMIC i believe, i have not upgraded because i can not find a reason to upgrade, would ffmpeg run faster & better on KARMIC than on JAUNTY ? or would PHP run better on KARMIC than on JAUNTY ? if any of those is a yes, i will go for it.
I don't know, but I suppose it probably wouldn't make a substantial difference. Read the release notes, "what's new", etc.
i reported the bug like a month ago, and no-one so far even bothered to
look at it.
That's not true. Two developers gave you input on your bug report (https://roundup.ffmpeg.org/roundup/ffmpeg/issue1496), and as bcoudurier mentioned, FFmpeg developers are all unpaid volunteers and if you were willing to sponsor this feature there would probably be someone willing to work on it for you.
to quickly summarize the problem.. any video modified ( trimmed or cut )
with quicktime.. that movie's headers are not modified, instead quicktime
adds it's own headers to it or something custom like that so quicktime
knows how to play it, but nothing else will know how to play it.
Makes me think Quicktime is creating non-standard files and you are expecting FFmpeg to work around that. With the limited amount of time I spent reading this, I would assume it is a problem with Quicktime. Why don't you just use FFmpeg to trim the videos?
Bonster
November 15th, 2009, 01:50 AM
Thanks FakeOutdoorsman!!
got it all worked out now. i started over with no extra configuring this time.
Digital hi5 for u =)
n.hinton
November 17th, 2009, 07:12 PM
Hi FakeOutdoorsman,
Used to be able to convert to gp3 format, but now seems I can't. Odd, winff can play the format.
Read through the How-To, since I have never done this before a couple of things are bugging me:
In steps 3 and 4 the code starts with a cd (change directory) with no directory specified, that wouldn't do anything (or am I missing something).
Steps 3 and 4 state respectively: 'If you are behind a firewall or unable to use git, then daily source tarballs are also available' and 'If you are behind a firewall or unable to use subversion, then nightly FFmpeg snapshots are also available'.
Is there any way to test ability to use first? As although I have downloaded x264-snapshot-20050824-2219.tar.bz2 and ffmpeg-checkout-snapshot.tar.bz2, I wouldn't know what to do with them.
Card is ATI Rage XL
libfaac0 is installed in synaptic.
Winff convert window:
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-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-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --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 Oct 13 2009 22:15:16, gcc: 4.4.1
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
Input #0, flv, from '/home/kingfisher/Videos/Charlie_the_Unicorn_3.flv':
Duration: 00:05:57.89, start: 0.000000, bitrate: 327 kb/s
Stream #0.0: Video: flv, yuv420p, 320x180, 263 kb/s, 29.97 tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: mp3, 22050 Hz, mono, s16, 64 kb/s
Unknown encoder 'libfaac'
cat /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy ourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://gb.archive.ubuntu.com/ubuntu/ jaunty-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu karmic partner
deb http://gb.archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse
deb http://ppa.launchpad.net/keepassx/ppa/ubuntu karmic main
deb http://ppa.launchpad.net/rvm/mplayer/ubuntu karmic main
deb http://ppa.launchpad.net/gilir/backports/ubuntu karmic main
deb http://ppa.launchpad.net/c-korn/vlc/ubuntu karmic main
# deb-src http://ppa.launchpad.net/c-korn/vlc/ubuntu karmic main
deb http://ppa.launchpad.net/rvm/libs/ubuntu karmic main
FakeOutdoorsman
November 17th, 2009, 08:37 PM
Hi FakeOutdoorsman,
Used to be able to convert to gp3 format, but now seems I can't. Odd, winff can play the format.
Read through the How-To, since I have never done this before a couple of things are bugging me:
In steps 3 and 4 the code starts with a cd (change directory) with no directory specified, that wouldn't do anything (or am I missing something).
It should take you to your home directory. It's the same as cd ~/ or cd /home/kingfisher.
Steps 3 and 4 state respectively: 'If you are behind a firewall or unable to use git, then daily source tarballs are also available' and 'If you are behind a firewall or unable to use subversion, then nightly FFmpeg snapshots are also available'.
Is there any way to test ability to use first? As although I have downloaded x264-snapshot-20050824-2219.tar.bz2 and ffmpeg-checkout-snapshot.tar.bz2, I wouldn't know what to do with them.
I guess the best method would be to try and see if you can use subversion and git. I added the snapshot options for users that can't use subversion or git. It looks like you downloaded an old x264 snapshot from 2005. If you scroll to the bottom of the page you will get the most recent snapshot. Once you download the snapshot you can extract it and then continue from the guide:
tar xvjf x264-snapshot-20091116-2245.tar.bz2
cd x264-snapshot-20091116-2245
./configure
libfaac0 is installed in synaptic.
That package isn't used directly by FFmpeg.
Winff convert window:
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-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-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --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 Oct 13 2009 22:15:16, gcc: 4.4.1
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)
Input #0, flv, from '/home/kingfisher/Videos/Charlie_the_Unicorn_3.flv':
Duration: 00:05:57.89, start: 0.000000, bitrate: 327 kb/s
Stream #0.0: Video: flv, yuv420p, 320x180, 263 kb/s, 29.97 tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: mp3, 22050 Hz, mono, s16, 64 kb/s
Unknown encoder 'libfaac'
Unfortunately, there is no support for libfaac in Karmic repository FFmpeg due to licensing issues, even with the extra libraries installed. You can read a little more about that here:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
deb http://ppa.launchpad.net/keepassx/ppa/ubuntu karmic main
deb http://ppa.launchpad.net/rvm/mplayer/ubuntu karmic main
deb http://ppa.launchpad.net/gilir/backports/ubuntu karmic main
deb http://ppa.launchpad.net/c-korn/vlc/ubuntu karmic main
# deb-src http://ppa.launchpad.net/c-korn/vlc/ubuntu karmic main
deb http://ppa.launchpad.net/rvm/libs/ubuntu karmic main
You have a good number of PPAs enabled. I'm not sure if they will interfere with this guide, but it's something to be aware of. Probably not anything to worry about, but if you encounter errors, I would recommend looking into these first.
n.hinton
November 17th, 2009, 10:42 PM
Thank you for your reply FakeOutdoorsman, will post back here and let you know how it went.
n.hinton
November 18th, 2009, 12:48 AM
Many thanks FakeOutdoorsman,
All went without a hitch, no problem using subversion and git, don't pretend to know what was going on though.
Used synaptic to reinstall winff (removed automatically with ffmpeg) and all seems to work great.
Do I need to do anything to prevent any unwanted update to ffmpeg?
Is it OK to remove x264-snapshot-20050824-2219.tar.bz2 and ffmpeg-0.5.tar.bz2 downloaded (as insurance) prior to install of the latest FFmpeg and x264 as I'd put them in /home/kingfisher?
Again thanks so much for your help.
FakeOutdoorsman
November 18th, 2009, 12:59 AM
Many thanks FakeOutdoorsman,
All went without a hitch, no problem using subversion and git, don't pretend to know what was going on though.
Used synaptic to reinstall winff (removed automatically with ffmpeg) and all seems to work great.
Do I need to do anything to prevent any unwanted update to ffmpeg?
I think the checkinstall command you used to install FFmpeg should take care of unwanted updates.
Is it OK to remove x264-snapshot-20050824-2219.tar.bz2 and ffmpeg-0.5.tar.bz2 downloaded (as insurance) prior to install of the latest FFmpeg and x264 as I'd put them in /home/kingfisher?
Yes, you can delete those.
FakeOutdoorsman
November 19th, 2009, 02:48 AM
Install FFmpeg and x264 on Ubuntu Jaunty Jackalope 9.04 & Ubuntu Intrepid Ibex 8.10
These versions of Ubuntu are 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 subversion git-core checkinstall yasm texi2html libfaac-dev libsdl1.2-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
Install x264
3. Get the most current source files from the official x264 git repository, compile, and install. Daily source tarballs (ftp://ftp.videolan.org/pub/videolan/x264/snapshots/) are also available as an alternative to using git.
cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --backup=no --deldoc=yes --fstrans=no --install=yes --default
Install LAME (optional)
4. This is used to encode mp3 audio. You can skip this step and omit --enable-libmp3lame from the ./configure line in step 7 if you don't plan on encoding mp3.
sudo apt-get remove libmp3lame-dev
sudo apt-get install nasm
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 --enable-nasm --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --deldoc=yes --install=yes --fstrans=no --default
Install libopencore-amr (optional)
5. This will allow you to decode and encode AMR audio. I recommend skipping this step and omitting --enable-libopencore-amrnb --enable-libopencore-amrwb from step 7 if you are not going to decode or encode AMR audio.
cd
wget http://transact.dl.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz
tar xvf opencore-amr-0.1.2.tar.gz
cd opencore-amr-0.1.2
./configure --disable-shared
make
sudo checkinstall --pkgname="libopencore-amr" --pkgversion="0.1.2" --backup=no --fstrans=no --install=yes --default
Install libtheora (optional)
6. This is used to encode to Theora, the video type usually found in OGG files. The repository libtheora is too old, so it must be compiled. I recommend skipping this step and omitting --enable-libtheora in step 7 if you don't plan on encoding to Theora video:
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 --fstrans=no --install=yes --default
Install FFmpeg
7. Get the most current source files from the official FFmpeg svn, compile, and install. Run "./configure --help" to see what features you can enable/disable. If you are behind a firewall or unable to use subversion, then nightly FFmpeg snapshots (http://ffmpeg.mplayerhq.hu/releases/ffmpeg-checkout-snapshot.tar.bz2) are also available.
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --backup=no --fstrans=no --install=yes --default
hash x264 ffmpeg ffplay
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.
That's it! Now head back to the FFmpeg guide (http://ubuntuforums.org/showthread.php?t=786095) for usage instructions and more.
Reverting Changes Made by This Tutorial
To remove FFmpeg/x264 and any changes made from this tutorial:
sudo apt-get remove x264 ffmpeg build-essential subversion git-core checkinstall yasm nasm texi2html lame-ffmpeg libfaac-dev libsdl1.2-dev libopencore-amr libtheora libvorbis-dev libx11-dev libxfixes-dev libxvidcore4-dev zlib1g-dev
Lastly, delete the ffmpeg and x264 directories in your home folder.
osced
November 20th, 2009, 07:04 PM
I tried this tutorial but got this error: "collect2: ld returned 1 exit status"
pbouf
November 20th, 2009, 07:05 PM
I also had to add a PPA (I used this one: https://launchpad.net/~rvm/+archive/mplayer) with opencore-amr to get step 2 to work on my 9.04 setup. Though later on I see that a (more recent) opencore-amr is installed anyway. So are these packages:
libopencore-amrnb-dev libopencore-amrwb-dev
(the ones that apt-get complained about in step 2 prior to adding the PPA) actually required in step 2?
Thanks for the great guide.
FakeOutdoorsman
November 20th, 2009, 08:26 PM
I tried this tutorial but got this error: "collect2: ld returned 1 exit status"
More information would be useful. When do you get this error? What version of Ubuntu are you using?
I also had to add a PPA (I used this one: https://launchpad.net/~rvm/+archive/mplayer) with opencore-amr to get step 2 to work on my 9.04 setup. Though later on I see that a (more recent) opencore-amr is installed anyway. So are these packages:
libopencore-amrnb-dev libopencore-amrwb-dev
(the ones that apt-get complained about in step 2 prior to adding the PPA) actually required in step 2?
Thanks for the great guide.
This guide used to combine instructions for Karmic, Jaunty, and Intrepid until a few days ago. You're correct, libopencore-amrnb-dev and libopencore-amrwb-dev do not belong in step two. I forgot to remove it. Thanks for letting me know.
liquidox
November 21st, 2009, 01:54 AM
Following this HOWTO I'm getting this while compiling ffmpeg on Mythbuntu 9.10:
/usr/local/src/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/usr/local/src/ffmpeg/libavcodec/libx264.c:284: undefined reference to `x264_encoder_open_79'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
Any ideas? Coincidentally I can't get mplayer to compile with x264 support either :(
andrew.46
November 21st, 2009, 02:46 AM
Hi liquidox,
Coincidentally I can't get mplayer to compile with x264 support either
Just a small point: MPlayer does not require x264 to run successfully and play back h264 media files. However x264 is required by MEncoder to create h264 media. I presume you need MEncoder as well as MPlayer?
Andrew
liquidox
November 21st, 2009, 10:51 AM
Hi liquidox,
Just a small point: MPlayer does not require x264 to run successfully and play back h264 media files. However x264 is required by MEncoder to create h264 media. I presume you need MEncoder as well as MPlayer?
Andrew
Yea I meant the compilation of mencoder, it just wont find h264, neither does ffmpeg now, so I'm thinking it's possibly a Mythbuntu problem?
Just wondering if anyone with Mythbuntu 9.10 has gotten this to work, maybe I should ask in that subforum as well or instead.
osced
November 21st, 2009, 12:31 PM
More information would be useful. When do you get this error? What version of Ubuntu are you using?
Oh Sorry I forgot to put more info in my post, but I tried again today and it worked this time..it was probably something I did wrong yesterday
/Osced
Bachstelze
November 21st, 2009, 12:34 PM
Hi liquidox,
Just a small point: MPlayer does not require x264 to run successfully and play back h264 media files. However x264 is required by MEncoder to create h264 media. I presume you need MEncoder as well as MPlayer?
Andrew
Actually, it is not. libavcodec has a builtin version of libx264, and mencoder uses that by default, so a separate installation of x264 is not required.
andrew.46
November 21st, 2009, 12:59 PM
Hi Bachstelze,
Actually, it is not. libavcodec has a builtin version of libx264, and mencoder uses that by default, so a separate installation of x264 is not required.
My apologies I was not aware of this...
Andrew
Nepherte
November 21st, 2009, 08:00 PM
Hi Bachstelze,
My apologies I was not aware of this...
Andrew
If you want to use the external x264, you need to use the --disable-x264-lavc flag, as stated in ./configure --help
FakeOutdoorsman
November 21st, 2009, 08:21 PM
Oh Sorry I forgot to put more info in my post, but I tried again today and it worked this time..it was probably something I did wrong yesterday
/Osced
You might be jumping to conclusions if you blame yourself. Most likely is was a change in x264 that FFmpeg needed to catch up with, but this is a guess. I haven't been keeping up with the changes much in the last week. Errors when compiling SVN FFmpeg occur every once in a while, but are usually fixed within a day or two.
andrew.46
November 21st, 2009, 09:58 PM
Hi Bachstelze,
libavcodec has a builtin version of libx264, and mencoder uses that by default, so a separate installation of x264 is not required.
Just for my own edification I have built MPlayer and MEncoder in the complete absence of any external x264 libraries. On my system this resulted in a failure to build x264 encoding support for MEncoder while still successfully compiling both MPlayer and MEncoder. Can you duplicate this result or is it an anomaly on my system?
All the best,
Andrew
Bachstelze
November 21st, 2009, 10:25 PM
Hi Bachstelze,
Just for my own edification I have built MPlayer and MEncoder in the complete absence of any external x264 libraries. On my system this resulted in a failure to build x264 encoding support for MEncoder while still successfully compiling both MPlayer and MEncoder. Can you duplicate this result or is it an anomaly on my system?
All the best,
Andrew
My mistake, I spoke a bit too fast. Even building x264 support in libavcodec requires the x264 headers. I wonder what difference it makes, then. I'll investigate that.
mc4man
November 22nd, 2009, 01:19 AM
If you were to build a static x264 and then build mplayer/mencoder off of it (w/ x264 enabled) then once it's built, encoding is 'built-in'. You could then remove your x264 build, (.h, .a, .pc, x264) and mencoder would still encode.
If you built x264 with --enabled-shared and mplayer/mencoder off of the headers then you'd need the corresponding libx264-XX present for encoding ( or mplayer/mencoder to run at all
andrew.46
November 22nd, 2009, 11:37 AM
Hi mc4man,
If you built x264 with --enabled-shared and mplayer/mencoder off of the headers then you'd need the corresponding libx264-XX present for encoding ( or mplayer/mencoder to run at all
This is my normal practice and admittedly it requires a sequence of re-compilation: first x264 and then MPlayer/MEncoder + FFmpeg + Transcode. A little tedious but that is what scripts are for :).
Andrew
n.hinton
November 23rd, 2009, 09:01 PM
Hi FakeOutdoorsman,
Trying to update my installation, all has gone well up to the ffmpeg ./configure line and got the following:
At revision 20590.
kingfisher@kingfisher-desktop:~/ffmpeg$ ./configure --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
ERROR: libopencore_amrnb 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.
kingfisher@kingfisher-desktop:~/ffmpeg$
Bachstelze
November 23rd, 2009, 09:09 PM
Do you have libopencore-amrnb-dev installed?
n.hinton
November 23rd, 2009, 09:23 PM
Do you have libopencore-amrnb-dev installed?
No
Bachstelze
November 23rd, 2009, 09:24 PM
No
I guess that's your problem, then. ;)
n.hinton
November 23rd, 2009, 09:30 PM
PS to post 652
Have reinstalled ffmpeg from /home/kingfisher/ffmpeg/ffmpeg_4:0.5+svn20091117-1_i386.deb
to get things going again but can't see what went wrong.
n.hinton
November 23rd, 2009, 09:37 PM
Hi Bachstelze,
libopencore-amrnb-dev Woudn't have been installed 6 days ago when I first installed latest ffmpeg and x264, or at least I haven't removed it.
Bachstelze
November 23rd, 2009, 09:51 PM
Hi Bachstelze,
libopencore-amrnb-dev Woudn't have been installed 6 days ago when I first installed latest ffmpeg and x264, or at least I haven't removed it.
If you want to compile ffmpeg with libopencore_amrnb support, you need libopencore-amrnb-dev, period. I don't know what happened to the package if you used to have it installed and now don't, but what I know is that you do need it. The guide lists it in the "dependencies" section.
n.hinton
November 23rd, 2009, 10:04 PM
Hi Bachstelze,
Yes your right, have no idea what happened to libopencore-amrnb-dev will try it again.
n.hinton
November 23rd, 2009, 10:42 PM
This time the make went fine but then:
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@kingfisher-desktop ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ ffmpeg ]
3 - Version: [ 4:0.5+svn20091123 ]
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 ===========================
install -d "/usr/local/lib"
install -m 644 libavdevice/libavdevice.a "/usr/local/lib"
ranlib "/usr/local/lib/libavdevice.a"
install -d "/usr/local/lib"
install -m 644 libavformat/libavformat.a "/usr/local/lib"
ranlib "/usr/local/lib/libavformat.a"
gcc -DHAVE_AV_CONFIG_H -I. -I"/home/kingfisher/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -MMD -MF libavcodec/libtheoraenc.d -MT libavcodec/libtheoraenc.o -c -o libavcodec/libtheoraenc.o libavcodec/libtheoraenc.c
libavcodec/libtheoraenc.c: In function ‘get_stats’:
libavcodec/libtheoraenc.c:93: error: ‘TH_ENCCTL_2PASS_OUT’ undeclared (first use in this function)
libavcodec/libtheoraenc.c:93: error: (Each undeclared identifier is reported only once
libavcodec/libtheoraenc.c:93: error: for each function it appears in.)
libavcodec/libtheoraenc.c: In function ‘submit_stats’:
libavcodec/libtheoraenc.c:129: error: ‘TH_ENCCTL_2PASS_IN’ undeclared (first use in this function)
make: *** [libavcodec/libtheoraenc.o] Error 1
**** Installation failed. Aborting package creation.
Cleaning up...OK
qyot27
November 23rd, 2009, 10:48 PM
While I really don't think it needs to be said, if you don't need a particular feature, don't feel obligated to add them. I've never encountered AMR-encoded material, so compiling the support for it into FFmpeg is worthless to me. Same with FAAC and FAAD, same with Theora, same with libx264, same with Lame...if you aren't going to use FFmpeg to handle them or do encoding with them, leave those options out of the ./configure step - as far as FFmpeg is concerned, those things are all optional to begin with, and if you aren't going to use or have a need to use that functionality (or use the standalone versions of the apps instead of FFmpeg), it saves time and space to not bother with compiling them in.
It's sort of like handing an umbrella to someone in a space suit or scuba gear. What's the point?
Bachstelze
November 23rd, 2009, 10:50 PM
While I really don't think it needs to be said, if you don't need a particular feature, don't feel obligated to add them.
Aye. That's exactly why in my CoreAVC guide, I just tell people to use ./configure for MPlayer.
n.hinton
November 23rd, 2009, 11:16 PM
Any idea why the checkinstall failed?
Bachstelze
November 23rd, 2009, 11:19 PM
Any idea why the checkinstall failed?
Nope, sorry. I never use checkinstall.
n.hinton
November 23rd, 2009, 11:29 PM
Ok thanks Bachstelze, seems I can't update my installation then.
FakeOutdoorsman
November 24th, 2009, 03:19 AM
This time the make went fine but then:
...
libavcodec/libtheoraenc.c: In function ‘get_stats’:
libavcodec/libtheoraenc.c:93: error: ‘TH_ENCCTL_2PASS_OUT’ undeclared (first use in this function)
libavcodec/libtheoraenc.c:93: error: (Each undeclared identifier is reported only once
libavcodec/libtheoraenc.c:93: error: for each function it appears in.)
libavcodec/libtheoraenc.c: In function ‘submit_stats’:
libavcodec/libtheoraenc.c:129: error: ‘TH_ENCCTL_2PASS_IN’ undeclared (first use in this function)
make: *** [libavcodec/libtheoraenc.o] Error 1
**** Installation failed. Aborting package creation.
I can duplicate this error on Karmic during the make process. There have been some changes lately to the libtheora wrapper in FFmpeg and this error is probably a result of that. Since this is the bleeding-edge, compilation errors will occur once in a while, but fixes usually come quickly.
If you don't think you'll need to encode to Theora video, you can omit --enable-libtheora from the FFmpeg ./configure and re-compile. Refer to Updating Your Installation for details on how to do this properly. Omitting --enable-libtheora will allow it to compile correctly until a fix is released, or until I figure out an alternative solution.
As for you missing libopencore-amrnb-dev, you may have been caught between revisions of this guide because it is a recent addition.
n.hinton
November 24th, 2009, 04:38 AM
Once again many thanks FakeOutdoorsman.
zelalem
November 24th, 2009, 12:02 PM
Hi FakeOutdoorsman, I have been using ffmpeg quite for some time. I can still use it to convert files from the command line, but when I try to use it from a script (a c code that uses the system API call), I get the following error:
"ffmpeg: symbol lookup error: ffmpeg: undefined symbol: sws_getContext".
I'm using ubuntu hardy. The same code can run on anotehr machine that runs Interpid. When I see the difference between the two computers, I saw that I don't have libavcodec-unstripped-51 package (which exist on the interpid machine), but i also couldn't install this package as i couldn't get it even when I use multiverse and universe repositories.
So, what do you think is the problem? What shall I do to fix this problem? Actually, I have anotehr problem that I thought could also be related to this. I have a video recorder program that creates mp4 files. It gets mulaw codec from clients and was supposed to create the file using that codec. But when I inspect the file it created it used mp4a codec (which ffmpeg doesn't even understand). Everything used to work properly sometime ago, but not now. I tried to install Live555 package recently and I think I messed up my system
Thank you.
Best regards,
Zelalem
Bachstelze
November 24th, 2009, 12:10 PM
"ffmpeg: symbol lookup error: ffmpeg: undefined symbol: sws_getContext".
You need libswscale-dev, but seriously, you don't want to use the packages from the Hardy repos. They're more than two years old...
FakeOutdoorsman
November 24th, 2009, 09:54 PM
Hi FakeOutdoorsman, I have been using ffmpeg quite for some time. I can still use it to convert files from the command line
Are you using a recent compiled FFmpeg from SVN as shown in this guide, or are you using FFmpeg from the repository?
but when I try to use it from a script (a c code that uses the system API call), I get the following error:
"ffmpeg: symbol lookup error: ffmpeg: undefined symbol: sws_getContext".
Can you show your script?
I'm using ubuntu hardy. The same code can run on anotehr machine that runs Interpid.
Are these machines both using the same FFmpeg version?
When I see the difference between the two computers, I saw that I don't have libavcodec-unstripped-51 package (which exist on the interpid machine), but i also couldn't install this package as i couldn't get it even when I use multiverse and universe repositories.
This package is not available for Hardy.
So, what do you think is the problem? What shall I do to fix this problem?
That is hard to answer without being able to see what is going on in the script, so I suppose the best answer for now is to compile the same revision of FFmpeg on both machines so you can eliminate any differences between FFmpeg versions.
Actually, I have anotehr problem that I thought could also be related to this. I have a video recorder program that creates mp4 files. It gets mulaw codec from clients and was supposed to create the file using that codec. But when I inspect the file it created it used mp4a codec (which ffmpeg doesn't even understand).
What is the name of this program? FFmpeg can encode and decode with pcm_mulaw. Show the output FFmpeg gives you when you inspect this file, as in:
ffmpeg -i input_file.foo
Everything used to work properly sometime ago, but not now. I tried to install Live555 package recently and I think I messed up my system
I'm not familiar with Live555, but Andrew.46 has an excellent guide that shows how to install it:
Howto: Utilise the svn MPlayer to Improve Karmic Koala's 'mplayer-nogui' Package (http://ubuntuforums.org/showthread.php?t=1305181)
FakeOutdoorsman
November 24th, 2009, 11:54 PM
FFmpeg now requires a newer libtheora than what is in the repositories. I've updated the guide to include libtheora compilation, but you could also skip this step if, like me, you don't use that encoder. The new libtheora resolves the issue experienced by n.hinton in post #660 (http://ubuntuforums.org/showpost.php?p=8374083&postcount=660).
Those of you that update every once in a while should probably remove libtheora-dev before your next FFmpeg update because it may interfere with the installation process of libtheora or FFmpeg. I haven't tested this theory though.
talsemgeest
November 25th, 2009, 12:16 AM
FFmpeg now requires a newer libtheora than what is in the repositories. I've updated the guide to include libtheora compilation, but you could also skip this step if, like me, you don't use that encoder. The new libtheora resolves the issue experienced by n.hinton in post #660 (http://ubuntuforums.org/showpost.php?p=8374083&postcount=660).
Those of you that update every once in a while should probably remove libtheora-dev before your next FFmpeg update because it may interfere with the installation process of libtheora or FFmpeg. I haven't tested this theory though.
Works perfectly, thanks. :)
FakeOutdoorsman
November 25th, 2009, 01:18 AM
Works perfectly, thanks. :)
Good to hear. I did a test run on a 32-bit system with libtheora-dev installed prior to compiling libtheora 1.1.1 and FFmpeg and I encountered no errors, so perhaps it is of no concern if libtheora-dev is not removed.
n.hinton
November 25th, 2009, 01:50 AM
Confirm works seamlessly here to.
FakeOutdoorsman your a star.
andrew.46
November 25th, 2009, 02:31 AM
Hi FakeOutdoorsman,
FFmpeg now requires a newer libtheora than what is in the repositories.
Thanks for the heads-up!
Andrew
mc4man
November 25th, 2009, 06:19 AM
Probably not too important, as far as enabling/building the new libtheora, I think i'd configure it with --disable-shared.
While a quick look doesn't suggest any conflicts with having 2 libtheora shared libs, ffmpeg doesn't need the shared library when built off of a static libtheora build ( nor the static either),... so it may be better in the long run.
(quite a number of repo apps do depend and link to libtheora0...
also taking from the perspective of someone that hasn't built before, you'd need to have libogg-dev installed for building libtheora
zelalem
November 25th, 2009, 08:00 AM
Hi Bachstelze, thank you for your comment. I installed the package and it is now working. Hi FakeOutdoorsman, thank you for your suggestion and opening this interesting forum. I will look at the wiki you suggested for the Live555. Actually, I will try to re-install ffmpeg by following your steps as well.
Once again thank you.
Cheers,
Zelalem
FakeOutdoorsman
November 25th, 2009, 09:14 AM
Probably not too important, as far as enabling/building the new libtheora, I think i'd configure it with --disable-shared.
While a quick look doesn't suggest any conflicts with having 2 libtheora shared libs, ffmpeg doesn't need the shared library when built off of a static libtheora build ( nor the static either),... so it may be better in the long run.
(quite a number of repo apps do depend and link to libtheora0...
also taking from the perspective of someone that hasn't built before, you'd need to have libogg-dev installed for building libtheora
I added libogg-dev to the guide. I had it in my notes but I missed it somehow. Thanks for pointing that out. I'll look into --disable-shared when I get back into town next week. I wanted to add libtheora before leaving and didn't get to geek out on it as much as I would have liked.
andrew.46
November 25th, 2009, 09:27 AM
Hi zelalem,
I will look at the wiki you suggested for the Live555.
You may have found out already that these directions are the same as the ones I gave you when we met elsewhere on the Forums :).
All the best,
Andrew
mc4man
November 25th, 2009, 10:32 AM
didn't get to geek out on it as much as I would have liked.
Probably worth looking at, possibly from 2 differing viewpoints.
The first would be that it (shared lib) isn't needed, as an ex.
Built static only, then ffmpeg off of it, after that removed the libtheora build completely and rebooted.
Then encoded an .avi w/ffmpeg, relevant info -
Writing library : Xiph.Org libtheora 1.1 20090822 (Thusnelda)
as compared to conversion done previously with ffmpeg built off of repo libtheora
Writing library : libTheora 3.2.1 (UTC 2008-10-20)
2nd would be - is there any advantage for other existing apps that use libtheora to use the new one, and is there any issue that they haven't been built off of it.
While it's hard to tell what vlc is linking, mplayer would show this
Mplayer built a few days ago
ldd /usr/local/bin/mplayer
libtheora.so.0 => /usr/lib/libtheora.so.0 (0x00181000)
After a new libtheora build as /shared/static to /usr/local
libtheora.so.0 => /usr/local/lib/libtheora.so.0 (0x00ac1000)
I think one way to test compatibility may be to build the new libtheora as shared/static but don't re-build your current ffmpeg. ( that was libtheora enabled.
Then do a conversion and see. (ffmpeg will use the new lib in /usr/local/lib just like mplayer was showing rather than the one it would have been built off of in /usr/lib
edit: tried with a vlc built off of old lib, it used the newer one and didn't seem to have any issue, so maybe in this case no harm in shared.
Though it appears that there was a commit to allow use of the older libtheora which could moot the whole deal unless one wanted support for the 1.1 version
_mikec_
November 27th, 2009, 05:09 PM
not working for me.. what i did:
# sudo apt-get remove ffmpeg x264 libx264-dev
# sudo apt-get update
# 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 libxvidcore4-dev zlib1g-dev
# cd
# git clone git://git.videolan.org/x264.git
# cd x264
# ./configure
# make
# sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`" --backup=no --default
# 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
# make
# sudo checkinstall --pkgname=libtheora --pkgversion "1.1.1" --backup=no --default
# cd
# svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
# cd ffmpeg
# ./configure --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
# make
# sudo checkinstall --pkgname=ffmpeg --pkgversion "4:0.5+svn`date +%Y%m%d`" --backup=no --default After, when i try to run ffmpeg i get this error:
bash: /usr/bin/ffmpeg: No such file or directory
Any ideas ?
in ffmpeg directory i tried to: make install :but i have the same problem., I am trying to convert an FLV video to MP4 using VLC player, i am getting this error:
Streaming / Transcoding failed:
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.
n.hinton
November 27th, 2009, 05:26 PM
Run in terminal: whereis ffmpeg
Should be in /usr/local/bin/
PS winff is good at ffmpeg command lines
wurzzero
November 27th, 2009, 09:04 PM
Hi, this is a great how to...congrats!
But, its noob time...
When i run the command make i get this messages ...
...
In file included from /usr/include/sys/shm.h:28,
from libavdevice/x11grab.c:46:
/usr/include/sys/ipc.h:25:3: warning: #warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE"
libavdevice/x11grab.c:48:35: warning: X11/extensions/Xfixes.h: Arquivo ou diretório não encontrado
libavdevice/x11grab.c: In function ‘paint_mouse_pointer’:
libavdevice/x11grab.c:253: error: ‘XFixesCursorImage’ undeclared (first use in this function)
libavdevice/x11grab.c:253: error: (Each undeclared identifier is reported only once
libavdevice/x11grab.c:253: error: for each function it appears in.)
libavdevice/x11grab.c:253: error: ‘xcim’ undeclared (first use in this function)
libavdevice/x11grab.c:254: warning: ISO C90 forbids mixed declarations and code
libavdevice/x11grab.c:259: warning: implicit declaration of function ‘XFixesGetCursorImage’
make: ** [libavdevice/x11grab.o] Erro 1
If i remove the '--enable-x11grab' option of the ./configure the make goes but stop again ...
...
/home/joao/ffmpeg/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/joao/ffmpeg/libavcodec/libx264.c:285: undefined reference to `x264_encoder_open_79'
collect2: ld returned 1 exit status
make: ** [ffmpeg_g] Erro 1
rm ffmpeg.o
Any idea?
n.hinton
November 27th, 2009, 10:57 PM
Hi wurzzero,
I've just duplicated that.
Best advice is to wait for FakeOutdoorsman to get back.
wurzzero
November 28th, 2009, 02:19 AM
Hi, n.hinton
One more thing...
The first attempt was in the 9.10.
I have a 9.04 too and i followed the steps for it, the same error ocurred..
...
make: ** [libavdevice/x11grab.o] Erro 1
When i removed the '--enable-x11grab it worked... but when i run ffmpeg it dont work..
ffmpeg: error while loading shared libraries: libopencore-amrnb.so.0: cannot open shared object file: No such file or directory
Lets wait FakeOutdoorsman.
FakeOutdoorsman
November 28th, 2009, 02:52 AM
not working for me.. what i did:
After, when i try to run ffmpeg i get this error:
bash: /usr/bin/ffmpeg: No such file or directory
I've seen this happen a few times on my virtual Ubuntu installations, but I'm not sure what causes it. The file is actually there in my case, but doesn't work correctly in the command-line until I either re-login or reboot. I can't remember which one of those works and I am out of town until Wednesday and unable to test anything. It's on my "todo" list and I assume it's probably an easy fix.
in ffmpeg directory i tried to: make install :but i have the same problem., I am trying to convert an FLV video to MP4 using VLC player, i am getting this error:
The repository VLC is looking for an encoder called FAAC which traditionally has been provided by the "unstripped" libavcodec packages from the repository. FAAC is a restricted encoder and has been removed from the Karmic repository libavcodec due to licensing issues, so you are probably out of luck for using the repository VLC to encode to AAC audio. More info on that (http://ubuntuforums.org/showthread.php?t=1117283).
I'm not sure how to get the repository VLC to use a compiled FFmpeg. You'll probably have to recompile FFmpeg with --enable-shared, but beyond that is a guess to me. Package management and getting repository packages to work with compiled stuff is not my strong point.
Hi, n.hinton
One more thing...
The first attempt was in the 9.10.
I have a 9.04 too and i followed the steps for it, the same error ocurred..
When i removed the '--enable-x11grab it worked... but when i run ffmpeg it dont work..
ffmpeg: error while loading shared libraries: libopencore-amrnb.so.0: cannot open shared object file: No such file or directory
I like to run tests when forum members encounter errors, but I am unable to do so for another five days and I am stuck with a network connection barely better than dial-up. Your x11grab error is most likely not your fault. There was an x11grab update (http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=e9ff5a990fcda553ca254ce205feb 46ba6c28425) to FFmpeg today that most likely caused this. It might be a good idea to go to the #ffmpeg IRC channel and mention that this update may have caused your compilation to fail.
As for your libopencore error, did you forget to run "sudo ldconfig"? Try that and then let me know if still doesn't work.
n.hinton
November 28th, 2009, 03:28 AM
Hi FakeOutdoorsman,
I read wurzzero's post and tried an update, 'make' duplicated the problem in his first 'quote' in post 683.
On the face of it, seems similar to the libtheora issue.
Hope this is of some help.
Neil
mc4man
November 28th, 2009, 04:37 AM
The latest svn builds fine ( -r20636), which was just a few after x11grab commit I belive
If having trouble ck. that libXfixes-dev is installed
sudo apt-get install libXfixes-dev
one of the +'s from the commit
-x11_grab_device_indev_extralibs="-lX11 -lXext"
+x11_grab_device_indev_extralibs="-lX11 -lXext -lXfixes"
(version 1:4.0.3-2 in karmic seems good
n.hinton
November 28th, 2009, 06:10 PM
Hi mc4man,
Installed libXfixes-dev, updated, and confirm (-r20640) builds fine.
Many thanks (again)
n.hinton
November 28th, 2009, 06:58 PM
My CPU is an old 900MHz AMD Duron, should I be building x264 with ./configure --disable-asm ?
FakeOutdoorsman
November 28th, 2009, 08:42 PM
Hi FakeOutdoorsman,
I read wurzzero's post and tried an update, 'make' duplicated the problem in his first 'quote' in post 683.
On the face of it, seems similar to the libtheora issue.
Hope this is of some help.
Neil
Thanks Neil. It's always good to have another tester for this thread.
The latest svn builds fine ( -r20636), which was just a few after x11grab commit I belive
If having trouble ck. that libXfixes-dev is installed
sudo apt-get install libXfixes-dev
one of the +'s from the commit
-x11_grab_device_indev_extralibs="-lX11 -lXext"
+x11_grab_device_indev_extralibs="-lX11 -lXext -lXfixes"
(version 1:4.0.3-2 in karmic seems good
I've never heard of libxfixes-dev, and I didn't make the connection that lXfixes was referencing it. Thanks for figuring that out. I added it to the guide as a dependency.
My CPU is an old 900MHz AMD Duron, should I be building x264 with ./configure --disable-asm ?
No. This option "disables assembly optimizations on x86". Duron is x86-compatible.
n.hinton
November 28th, 2009, 09:20 PM
Hi FakeOutdoorsman,
Thanks for your reply.
Please see screenshots.
I am aware of the line:
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
But I didn't provide parameters, as I never normaly need to unless, I have wanted a custom conversion, so left as winff's default ffmpeg command line:
#!/bin/sh
echo -n "\033]0; Converting Charlie_the_Unicorn_3.flv (1/1)\007"
/usr/local/bin/ffmpeg -i "/home/kingfisher/Videos/Charlie_the_Unicorn_3.flv" -f mp4 -r 29.97 -vcodec libx264 -s 640x480 -b 1000kb -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 1250k -maxrate 1500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 112kb -ar 48000 -ac 2 "/home/kingfisher/Videos/Charlie_the_Unicorn_3.mp4"
read -p "Press Enter to Continue" dumbyvar
rm "/home/kingfisher/.winff/ff091128201642.sh"
Maybe I should experiment with bit_rate, width and height etc.
mocha
November 28th, 2009, 09:35 PM
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
WinFF's presets don't work very well anymore for the latest SVN of ffmpeg. ffmpeg expects you to use the internal presets now. Many h264 WinFF presets would be replaced with something like this, the hq preset file should be in your ~/.ffmpeg directory.
-crf 22.0 -vcodec libx264 -acodec libfaac -ab 128kb -vpre hq
n.hinton
November 28th, 2009, 10:20 PM
Thanks mocha, but still get the same error with that preset as in:
http://ubuntuforums.org/attachment.php?attachmentid=137921&d=1259438978
ffmpeg is saying:
[libx264 @ 0xabea7e0]your cpu does not support SSE1, but x264 was compiled with asm support
[libx264 @ 0xabea7e0]to run x264, recompile without asm support (configure --disable-asm)
I posted (My CPU is an old 900MHz AMD Duron, should I be building x264 with ./configure --disable-asm ?) FakeOutdoorsman says 'No. This option "disables assembly optimizations on x86". Duron is x86-compatible'. And I'm inclined to believe FakeOutdoorsman.
n.hinton
November 28th, 2009, 11:38 PM
Used Everest (windows app) to interrogate CPU:
CPU Properties
CPU Type AMD Duron, 909 MHz (9 x 101)
CPU Alias Spitfire, Athlon Lite
CPU Stepping A2
Instruction Set x86, MMX, 3DNow!
L1 Code Cache 64 KB
L1 Data Cache 64 KB
L2 Cache 64 KB (On-Die, Full-Speed)
CPU Physical Info
Package Type 453 Pin PGA
Package Size 4.95 cm x 4.95 cm
Transistors 25 million
Process Technology 6Mi, 0.18 um, CMOS
Die Size 100 mm2
Core Voltage 1.6 V
I/O Voltage 1.6 V
Typical Power 24.5 - 37.2 W (depending on clock speed)
Maximum Power 27.4 - 41.5 W (depending on clock speed)
CPU Manufacturer
Company Name Advanced Micro Devices, Inc.
Product Information http://www.amd.com/us-en/Processors/ProductInformation/0,,30_118,00.html
CPU Utilization
CPU #1 16 %
--------------------------------------------------------------------------------------
Note Instruction Set: x86, MMX, 3DNow! but not SSE1
If libx264 is making calls to SSE1 instruction set, my CPU won't play ball, at least I think. SSE is as far as I know is, Streaming SIMD Extensions, some I first thought were in 3DNow, but SSE1, SSE2 and SSE3 were only added to Athlon XP, the remainder of the SSE1 instruction set, missing from earlier Athlons.
PS
mocha, WinFF's presets are actually very good unless broken for svn, quoting GMaq: 'There are an increasing number of posts regarding broken presets with SVN ffmpegs. Please be advised that it is almost impossible to instantly be on top of all the API changes in ffmpeg all the time.
We already have 2 separate "presets.xml" for the 2 official Windows versions, and most packaged ffmpegs in Linux.
I will update presets for SVN as time permits and post them in the presets forum for now until Matt decides to incorporate them or create a new official presets.xml'
FakeOutdoorsman
November 29th, 2009, 04:29 AM
Thanks mocha, but still get the same error with that preset as in:
http://ubuntuforums.org/attachment.php?attachmentid=137921&d=1259438978
ffmpeg is saying:
[libx264 @ 0xabea7e0]your cpu does not support SSE1, but x264 was compiled with asm support
[libx264 @ 0xabea7e0]to run x264, recompile without asm support (configure --disable-asm)
I posted (My CPU is an old 900MHz AMD Duron, should I be building x264 with ./configure --disable-asm ?) FakeOutdoorsman says 'No. This option "disables assembly optimizations on x86". Duron is x86-compatible'. And I'm inclined to believe FakeOutdoorsman.
I was wrong. Some Durons support SSE and others don't. I thought they all did, but apparently the original Duron using the Spitfire core, like yours, does not, so I would guess that you should try re-compiling with --disable-asm. Sorry about that.
I will update presets for SVN as time permits and post them in the presets forum for now until Matt decides to incorporate them or create a new official presets.xml'
I agree that it isn't always easy to keep up with FFmpeg, as you have seen first hand in the last few days, but I would argue that it is equally as challenging keeping up with the Ubuntu specific changes such dealing with restricted formats and the removal of libfaac. I, and the developers also, recommend using the libx264 presets instead of the outdated method of the long string of options. The presets should make things easier because they get updated along with any updates or API changes that affect the presets, but these changes are usually transparent to the end user.
See the FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/) for more preset usage examples. If you post your presets.xml, I and other forum media geeks can take a look at it.
n.hinton
November 29th, 2009, 04:57 AM
Thanks FakeOutdoorsman,
The SSE thing was bugging me. Please see attached presets.tar.gz, I hope that format of archive is acceptable.
PS
FakeOutdoorsman, your remarkably diplomatic with me (I don't think I'd have your patience)
wurzzero
November 29th, 2009, 06:13 AM
FakeOutdoorsman, n.hinton and mc4man, thanks for your attention!
As for your libopencore error, did you forget to run "sudo ldconfig"? Try that and then let me know if still doesn't work.
Yes, i forgot...
The latest svn builds fine ( -r20636), which was just a few after x11grab commit I belive
If having trouble ck. that libXfixes-dev is installed
sudo apt-get install libXfixes-dev
one of the +'s from the commit
-x11_grab_device_indev_extralibs="-lX11 -lXext"
+x11_grab_device_indev_extralibs="-lX11 -lXext -lXfixes"
(version 1:4.0.3-2 in karmic seems good
This resolves the make: ** [libavdevice/x11grab.o] Erro 1 problem ...
I compiled the ffmpeg successfully in karmic and jaunty...
Many tanks to everyone..
n.hinton
November 29th, 2009, 09:46 PM
Getting a strange error installing x264 and don't know how to fix it:
(Reading database ... 169353 files and directories currently installed.)
Unpacking x264 (from .../x264_1:0.svn20091129-1_i386.deb) ...
dpkg: error processing /home/kingfisher/x264/x264_1:0.svn20091129-1_i386.deb (--install):
trying to overwrite '/usr/local/include/x264.h', which is also in package libtheora 0:1.1.1-1
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/home/kingfisher/x264/x264_1:0.svn20091129-1_i386.deb
tried:
kingfisher@kingfisher-desktop:~$ sudo apt-get remove x264
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package x264 is not installed, so not removed
The following packages were automatically installed and are no longer required:
libavfilter0 libavdevice52
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
kingfisher@kingfisher-desktop:~$ whereis x264
x264: /usr/local/bin/x264
Its OK removed libtheora_1.1.1-1 then x264 installed.
Odd, first time I've encountered that, and have rebuilt and installed recently with libtheora_1.1.1-1 installed. Surely couldn't have anything to do with last previous build including x264 with ./configure --disable-asm, Could it ?
Bachstelze
November 29th, 2009, 09:54 PM
trying to overwrite '/usr/local/include/x264.h', which is also in package libtheora 0:1.1.1-1
Pretty self-explanatory. Your libtheora package, for some reason, installs x264.h. You have to fix that.
n.hinton
November 29th, 2009, 10:23 PM
Hi Bachstelze,
Had done exactly the same thing last night without the error occuring, the only difference being --disable-asm was not used tonight.
Its OK removed libtheora_1.1.1-1 then x264 installed.
Odd, first time I've encountered that, and have rebuilt and installed recently with libtheora_1.1.1-1 installed. Surely couldn't have anything to do with last previous build including x264 with ./configure --disable-asm, Could it ?
Bachstelze
November 29th, 2009, 10:25 PM
Hi Bachstelze,
Had done exactly the same thing last night without the error occuring, the only difference being --disable-asm was not used tonight.
Nope, doesn't have anything to do with it. The problem is in your libtheora package, since it installs files it obviously should not, not in your x264 one.
mc4man
November 29th, 2009, 10:33 PM
n.hinton -
while i'm not inclined to try out is there any possibility that when you were building x264 at some point you used the the checkinstall command for libtheroa...?
If you still have your libtheroa deb r. click on it -> open with archive manager and click thru to see what files are inside
n.hinton
November 29th, 2009, 10:34 PM
Yes but have done approximately 7 or so rebuilds since libtheora package was installed, why has that error waited till now to occur?
n.hinton
November 29th, 2009, 10:40 PM
Yes, checkinstall command for libtheroa is what FakeOutdoorsman says use in this HOWTO.
n.hinton
November 29th, 2009, 11:13 PM
Hi mc4man,
Sorry for delay answering, didn't want to open package manager while ffmpeg was building.
The attached screensot shows all listed included files at /usr/local/include/
x264.h is not in the entire list.
Whoops:
Did that wrong didn't I, have just used archive manager as you said in post 703 and no x264.h there either.
n.hinton
November 30th, 2009, 12:34 AM
Got lastnights x264 command lines from bash_history:
sudo apt-get remove ffmpeg x264 libx264-dev
cd x264
make distclean
git pull
./configure --disable-asm
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`" --backup=no --default
cd
Can't understand what went wrong, all seemed to work fine. But when ran sudo apt-get remove ffmpeg x264 libx264-dev tonight it said x264 was not installed.
n.hinton
November 30th, 2009, 02:33 AM
Have updated again and everything is as it should be, mystery to me what went wrong.
PS the presets issue, was a red herring, being caused by not building x264 with ./configure --disable-asm, required for my CPU, all winff presets now work perfectly.
FakeOutdoorsman
November 30th, 2009, 06:36 AM
the hq preset file should be in your ~/.ffmpeg directory.
If I remember correctly, when the libx264 presets were first introduced they were installed in ~/.ffmpeg, but the current installation directory is /usr/share/ffmpeg. I think ~/.ffmpeg takes priority, so if you have outdated presets in there they may cause issues.
Thanks FakeOutdoorsman,
The SSE thing was bugging me. Please see attached presets.tar.gz, I hope that format of archive is acceptable.
PS
FakeOutdoorsman, your remarkably diplomatic with me (I don't think I'd have your patience)
Now you're going to have to be patient with me because I'm not going to be able to take a look at your presets until later in the week.
kevdog
November 30th, 2009, 07:12 AM
Anyway to rig this homecooked ffmpeg compiled version into Handbrake? Ive got the handbrake sources, however I think the handbrake configure script goes ahead and downloads ffmpeg.
mc4man
November 30th, 2009, 08:33 AM
Anyway to rig this homecooked ffmpeg ....
no and probably would be to no avail anyway. Hb uses an -r that's it's been designed to work with. (atm is -r19067) and configures it for it's own purposes
/configure ..............
--disable-shared --enable-static --disable-bsfs --disable-encoders --disable-ffmpeg --disable-ffserver --disable-muxers --disable-network --enable-bzlib --enable-encoder=ac3 --enable-encoder=mpeg4 --enable-encoder=snow --enable-gpl --enable-libfaad --enable-muxer=ipod --enable-zlib
aircooledbusnut
November 30th, 2009, 11:42 PM
Ok, I have a Sony Walkman NWZ-E345. I have tried numerous settings with ffmpeg to convert but have had no luck with the walkman recognizing any of them. so, here is the mediainfo of a video that does work. It has WMV3 as the video codec. If someone would be so kind as to give me a hint on the parameters I need to use with ffmpeg to convert the video correctly. The following video works. I didnt produce it.
General
Count : 246
Count of stream of this kind : 1
Kind of stream : General
Kind of stream : General
Stream identifier : 0
Count of video streams : 1
Count of audio streams : 1
Video_Format_List : VC-1
Video_Format_WithHint_List : VC-1 (WMV3)
Codecs Video : WMV3
Video_Language_List : English
Audio_Format_List : WMA2
Audio_Format_WithHint_List : WMA2
Audio codecs : WMA2
Audio_Language_List : English
Complete name : C12G01F1.wmv
File name : C12G01F1.wmv
File extension : wmv
Format : Windows Media
Format : Windows Media
Format/Extensions usually used : asf wmv wma
Codec : Windows Media
Codec : Windows Media
Codec/Extensions usually used : asf wmv wma
File size : 2605580
File size : 2.48 MiB
File size : 2 MiB
File size : 2.5 MiB
File size : 2.48 MiB
File size : 2.485 MiB
Duration : 31253
Duration : 31s 253ms
Duration : 31s 253ms
Duration : 31s 253ms
Duration : 00:00:31.253
Overall bit rate mode : CBR
Overall bit rate mode : Constant
Overall bit rate : 666964
Overall bit rate : 667 Kbps
Maximum Overall bit rate : 661738
Maximum Overall bit rate : 662 Kbps
HeaderSize : 5258
DataSize : 27510
Encoded date : UTC 2008-08-31 00:23:07.781
Video
Count : 133
Count of stream of this kind : 1
Kind of stream : Video
Kind of stream : Video
Stream identifier : 0
ID : 2
Format : VC-1
Format profile : MP@LL
Codec ID : WMV3
Codec ID/Info : Windows Media Video 9
Codec ID/Hint : WMV3
Codec ID/Url : http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx
Codec : WMV3
Codec : WMV3
Codec/Family : VC-1
Codec/Info : Windows Media Video 9
Codec/Url : http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx
Codec/CC : WMV3
Codec profile : MP
Codec description : Windows Media Video 9 -
Duration : 31233
Duration : 31s 233ms
Duration : 31s 233ms
Duration : 31s 233ms
Duration : 00:00:31.233
Bit rate mode : CBR
Bit rate mode : Constant
Bit rate : 524288
Bit rate : 524 Kbps
Width : 320
Width : 320 pixels
Height : 240
Height : 240 pixels
Pixel Aspect Ratio : 1.000
Display aspect ratio : 1.333
Display aspect ratio : 4/3
Frame rate : 29.970
Frame rate : 29.970 fps
Frame count : 937
Resolution : 24
Resolution : 24 bits
Scan type : Progressive
Scan type : Progressive
Interlacement : PPF
Interlacement : Progressive
Bits/(Pixel*Frame) : 0.228
Language : en
Language : English
Audio
Count : 121
Count of stream of this kind : 1
Kind of stream : Audio
Kind of stream : Audio
Stream identifier : 0
ID : 1
Format : WMA2
Format profile : L1
Codec ID : 161
Codec ID/Info : Windows Media Audio 2
Codec ID/Url : http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx
Description of the codec : Windows Media Audio 9.2 - 128 kbps, 44 kHz, stereo (A/V) 1-pass CBR
Codec : 161
Codec : WMA2
Codec/Info : Windows Media Audio 2
Codec/Url : http://www.microsoft.com/windows/windowsmedia/format/codecdownload.aspx
Codec/CC : 161
Codec description : Windows Media Audio 9.2 - 128 kbps, 44 kHz, stereo (A/V) 1-pass CBR
Duration : 31252
Duration : 31s 252ms
Duration : 31s 252ms
Duration : 31s 252ms
Duration : 00:00:31.252
Bit rate mode : CBR
Bit rate mode : Constant
Bit rate : 128040
Bit rate : 128 Kbps
Channel(s) : 2
Channel(s) : 2 channels
Sampling rate : 44100
Sampling rate : 44.1 KHz
SamplingCount : 1378257
Resolution : 16
Resolution : 16 bits
Language : en
Language : English
Derek S
December 1st, 2009, 02:36 AM
The instructions on page 1 didn't work for me but I found a page that did enable x264 and aac encoding. Some of the commands aren't 100% accurate but it got me through.
Hope it helps you as well
http://www.kdenlive.org/forum/howto-install-kdenlive-melt-faad-faac-x264-theora-ffmpeg-ubuntu-karmic-910
kimme
December 1st, 2009, 02:39 AM
This tutorial worked perfect on my Ubuntu installation. :)
Thanks...
n.hinton
December 1st, 2009, 06:14 AM
Hi Derek S,
The instructions on page 1 didn't work for me but I found a page that did enable x264 and aac encoding. Some of the commands aren't 100% accurate but it got me through.
Hope it helps you as well
What went wrong when following the HOWTO ?
cor2y
December 1st, 2009, 02:13 PM
aircooledbusnut , what video/audio format are you trying to convert to?
What video/audio format are you converting from?
What is the error message ffmpeg spits out if any.
n.hinton
December 1st, 2009, 09:00 PM
If someone would be so kind as to give me a hint on the parameters I need to use with ffmpeg to convert the video correctly.
Try -vcodec wmv2 -acodec wmav2 -b 640kb -ab 128kb -r 29.97 -s 320x240 -aspect 4:3
aircooledbusnut
December 1st, 2009, 10:07 PM
I get no errors off of ffmpeg. I have tried several different scripts. The problem is I convert the file then put it on my walkman, it does not even show as being there. I downloaded several .wmv files that worked with no problem. The output from mediainfo I posted previously is of a file that does work. I will try the script posted by n.hinton and get back with you all shortly. My walkman only accepts .wmv files with the wmv3 codec it would seem.
Thanks
Clint
edit:
Tried the following : ffmpeg -i vid04.wmv -vcodec wmv2 -acodec wmav2 -b 640kb -ab 128kb -r 29.97 -s 320x240 -aspect 4:3 myvid04.wmv
With same results, everything goes smoothly, but when I transfer it to the walkman it does not show up in the list. I have transferred other .wmv files which show and work perfectly, hence the reason for posting the mediainfo output of a working .wmv. I have also tried .flv .mov .avi with the same results.
n.hinton
December 2nd, 2009, 01:26 AM
Hi aircooledbusnut,
Tried with same results, everything goes smoothly, but when I transfer it to the walkman it does not show up in the list.
Don't think this will make any difference, but try anyway.
-vcodec wmv2 -acodec wmav2 -b 640kb -ab 128kb -r 29.97 -s 320x240 -aspect 4:3 -f asf
aircooledbusnut
December 2nd, 2009, 02:58 AM
Sorri,
n.hinton, the following did not work as well.
ffmpeg -i vid04.wmv -vcodec wmv2 -acodec wmav2 -b 640kb -ab 128kb -r 29.97 -s 320x240 -aspect 4:3 -f asf myvid04.wmv
Thanks for you help
I will continue trying variations, but I a not having any lucK.
I even tried using Sony's converter, it doesnt work either. Used a freinds window machine.
n.hinton
December 2nd, 2009, 03:32 AM
Hi aircooledbusnut,
Have you tried other formats? Seems there's nothing to lose.
-acodec aac -ac 2 -vcodec mpeg4 -s 320x240 -aspect 4:3 -b 768k -r 29.97 -ab 64000 -ar 48000
Output file should be filename.mp4
aircooledbusnut
December 2nd, 2009, 04:27 AM
Still no go. I am looking through the other files that do work. So far all are using the wmv3 codec for video and wmav2 codec for audio. Most the other info is standard.
I will keep cracking. If I figure it out, I will deffinitely post it.
Clint
cor2y
December 2nd, 2009, 05:56 AM
I'd check your documentation for your walkman see what codecs it officially supports.
I believe the problem may be that it doesnt support the older wmv2 video codec, i could be wrong of course.
Since MS has yet to open up the wmv3 codec or its vc-1 codec fmpeg doesnt support encoding only decoding of those formats, you can only encode files to wmv1 or wmv2, did you try encoding using the libx264 library and mp4 container?
It should support H.264 and AAC audio, of course if its picky like the ipod about what type of mp4 it can playback you may have to invoke special options while encoding.
EDIT
I see there is this thread (http://ubuntuforums.org/showthread.php?t=593756) on encoding video to a walkman, its a bit old but it might give you some ideas, it also looks like the author used mpeg4 instead of H.264 or wmv2 as the video codec type for encoding along with libfaac, you could try that
I also found this post (http://www.associatedcontent.com/article/539019/how_to_put_videos_on_a_sony_walkman.html?cat=59)on Sony Walkman and video types.
the Walkman is notoriously particular about what types of files it will actually play. As stated in the manual, it only supports the MP4 "memory stick" format, with the file extensions .mp4 and .m4v. Two video codecs are supported: H.264/AVC (with maximum bit rate of 768 k/sec), and MPEG-4 (with maximum bit rate of 2,500 k/sec). The maximum frame rate is 30 fps, the maximum resolution is 320x240, and the maximum supported file size is 2 Gigabytes.
And there are these two more recent guides for different walkman models.
http://ubuntuforums.org/showthread.php?t=984339 http://ubuntuforums.org/showthread.php?t=693867
Pay attention to the ffmpeg syntax used for the encoding.
qyot27
December 2nd, 2009, 08:44 AM
Since MS has yet to open up the wmv3 codec or its vc-1 codec fmpeg doesnt support encoding only decoding of those formats
MS doesn't have to. (http://en.wikipedia.org/wiki/VC-1) VC-1 is a SMPTE standard, and thus can feasibly be implemented from their published docs. And on that standard, VC-1 is not just the Advanced profile that most people know it as - it's the entirety of WMV9 (VC-1 Main = WMV9 Main).
I do remember some buzz about the working stages of a FOSS VC-1 encoder, but that was a couple years ago. Besides, H.264 has beat out VC-1 in quality tests, and the speed of x264 vs. the often-horrible encode times for VC-1 Advanced from the MS offerings skew the results heavily in favor of H.264. IIRC, more Blu-rays now use H.264 instead of MPEG-2 or VC-1, even though it officially supports all three.
aircooledbusnut
December 2nd, 2009, 03:41 PM
I have checked the documentation. The Walkman manual specifically states the video format must be .wmv. All the video I have managed to play on it use the wmv3 codec.
Thanks
Sn3akyP3t3
December 2nd, 2009, 03:50 PM
With Ubuntu 9.04 the repository doesn't include a high enough version of libtheora-dev to satisfy FFMPEG during configuration.
This is the call to configure used:
sudo ./configure --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 --enable-libvorbis --enable-sharedHere is a snipit of the last paragraph or config.err:
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.BUmsxuGI.o /tmp/ffconf.YRSbYlno.c
In file included from /tmp/ffconf.YRSbYlno.c:1:
/usr/include/theora/theoraenc.h:25:20: error: codec.h: No such file or directory
ERROR: libtheora not foundI did some searching and found through this thread that the libtheora-dev library might not satisfy the requirements in 9.04, but some have found that it does not pose a problem.
My question then aside from upgrading to 9.10 is, How can I manually pull in through alternative repositories the latest libtheora-dev library? I would like to do so without manually compiling if possible.
Aside from my problems I give praise to FakeOutdoorsman for this excellent tutorial that I've followed on 3 different machines to setup FFMPEG with.
cor2y
December 2nd, 2009, 06:47 PM
I have checked the documentation. The Walkman manual specifically states the video format must be .wmv. All the video I have managed to play on it use the wmv3 codec.
Thanks
aircooledbusnut what model walkman do you possess?
And again read my previous post, ffmpeg does not support wmv3 encoding only wmv2, and that may be the problem.
I saw three sony walkman models, i looked at while trying to find a solution for you all support mpeg4.h.264 and wmv3 video codecs so i assume any later or previous models would also support this esp if has to use the mp4 container, i dont think sony would release a product that exclusively and only supports the microsoft wmv video codec and nothing else thats something i would expect from the zune players.
cor2y
December 2nd, 2009, 06:48 PM
With Ubuntu 9.04 the repository doesn't include a high enough version of libtheora-dev to satisfy FFMPEG during configuration.
This is the call to configure used:
sudo ./configure --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 --enable-libvorbis --enable-sharedHere is a snipit of the last paragraph or config.err:
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.BUmsxuGI.o /tmp/ffconf.YRSbYlno.c
In file included from /tmp/ffconf.YRSbYlno.c:1:
/usr/include/theora/theoraenc.h:25:20: error: codec.h: No such file or directory
ERROR: libtheora not foundI did some searching and found through this thread that the libtheora-dev library might not satisfy the requirements in 9.04, but some have found that it does not pose a problem.
My question then aside from upgrading to 9.10 is, How can I manually pull in through alternative repositories the latest libtheora-dev library? I would like to do so without manually compiling if possible.
Aside from my problems I give praise to FakeOutdoorsman for this excellent tutorial that I've followed on 3 different machines to setup FFMPEG with.
Libtheora is at the latest version for 9.10 as far as i know , it is recognized by svn ffmpeg when compiling
aircooledbusnut
December 2nd, 2009, 09:49 PM
My Sony Walkman is ann NWZ-E345. Manual states .wmv only. But I have seen several advertisements that state it does both. I have not been able to get any .mp4 to work.
cor2y
December 3rd, 2009, 12:20 AM
According to amazon.com your walkman does indeed support mp4 file format which means mpeg4 as well as H.264 codecs.
It seems a bit weird that while it does indeed list wmv/wma it has in brackets the words (DRM) i have no idea if that means in addition to wmv3 it also supports wmv3 drm'd files or if it ONLY supports wmv/wma files that have drm on them that would be insane but you can never tell with these companies.
Remember when encoding your video resolution must be 320x240 at maximum, must have a frame rate of 30/29.95 fps and your video bitrate cant exceed 768kbps for both mp4 or wmv3.
n.hinton
December 3rd, 2009, 01:23 AM
The string in post 721 is known to work in video walkman, I Googled for NWZ-E345 specs, and got Format : WMV (DRM) I'm wondering if Sony Walkman NWZ-E345 will only see WMV (Digital Rights Management (lives in header)) files.
PS cor2y, I wouldn't take too much notice of what rivers say, here in the UK some rivers contain so much estrogen, they can no longer find their own way to the sea... Oh I see, amazon.com !!!
aircooledbusnut
December 3rd, 2009, 02:25 AM
I have not had any luck with encoding anything for this walkman. I encoded some vids for my friends ipod with no issues. I will keep trying to figure this out. I tried the string in post 721 and nogo, the walkman does not even see the video.
FakeOutdoorsman
December 3rd, 2009, 02:57 AM
With Ubuntu 9.04 the repository doesn't include a high enough version of libtheora-dev to satisfy FFMPEG during configuration.
There was a recent change in FFmpeg that now requires a newer libvorbis-dev than what is available in the repository. Unfortunately the version of this FFmpeg tutorial for 9.04 was outdated. I just updated it and ran a successful test compile.
My question then aside from upgrading to 9.10 is, How can I manually pull in through alternative repositories the latest libtheora-dev library? I would like to do so without manually compiling if possible.
I don't have much experience with third-party repositories or PPAs, so I'm not aware of any that would have a recent enough libtheora. Personally, I would just compile it as shown in the recently updated tutorial if it isn't too much trouble. If you don't plan on using libtheora with FFmpeg, then just omit --enable-libvorbis and you won't need to find or compile libvorbis.
Make sure to start the tutorial from the beginning as there were some additional packages added in the dependencies section.
mc4man
December 3rd, 2009, 04:30 AM
Quote:
Originally Posted by Sn3akyP3t3 View Post
My question then aside from upgrading to 9.10 is, How can I manually pull in through alternative repositories the latest libtheora-dev library? I would like to do so without manually compiling if possible.
For the most part doing as described in the how to would be simplest - build as described if you wish libtheora support in ffmpeg and have any other apps that may use it use the newer version of shared lib . (/usr/local, static/shared
If you don't use in ffmpeg then skip and remove from ffmpeg configure.
If you only want the new version in ffmpeg then build libtheora with disabled-shared. ( after building ffmpeg you're free to remove the static libtheora build, it's no longer needed.
A corner case here would be if you also build vlc and wish to build in libtheora and or shout support, you would need to consider your options there.
If desired, Though in most cases not really needed, the lucid libtheora0 and libtheora-dev packages can be used in 9.04 and 9.10 with no issues ( same depends, remove current libtheora-dev, download and install/upgrade libtheora0 from here (http://packages.ubuntu.com/en/lucid/libtheora0), dl and install libtheora-dev from here (http://packages.ubuntu.com/lucid/libtheora-dev)
ercdvs
December 3rd, 2009, 05:18 PM
just a stupid question that I can't find an 'up to date' answer to.
For DTS / DCA audio, is it still needed to compile libdca for ffmpeg? or is that merged back in by default in current SVNs ?
I can't see any reference to DTS or DCA in the options, nor is there anything past january 2009 about it.
libdca seems to be the same version that i pulled almost a year ago.
cor2y
December 3rd, 2009, 07:55 PM
FFmpeg has had built in DCA/DTS decoding since march of this year with the stable 0.5 release.
ViperScull
December 4th, 2009, 04:50 PM
Hi, I have a Gigabyte Ga-785GMT-UD2H mobo which has an ATI HD 4200 GPU built in.
AFAIK with ATI series HD4xxx and HD5xxx is possible to have x.264 video hardware acceleration via xvba and UVD2. I'm using catalyst 9.11 (heard something about any trouble with this version and xvba and that 9.10 worked fine, but no really sure).
I installed x264 as you said. I was wondering what I should do to make xvba work. The only thing related to this I see when I configure MPlayer sources is a reference to xvmc: "Checking for XvMC ... no".
Do I have to use any parameter when I do the ./configure or install anything to have xvba running?
Cheers.
zimbot
December 4th, 2009, 06:41 PM
I suppose that the install instructions are true of both ubuntu 9.04 server and desktop.
basically i wish to create a machine that i can run a web page on [ apache2, mysql , php ] as well as php-ffmpeg and ffmpeg.
I will confess that i - enjoy a gui - and am only farmiluar with the desktop version... basically i am trying to decide go server or go desktop.
what are your thoughts?
Bachstelze
December 4th, 2009, 06:56 PM
I suppose that the install instructions are true of both ubuntu 9.04 server and desktop.
basically i wish to create a machine that i can run a web page on [ apache2, mysql , php ] as well as php-ffmpeg and ffmpeg.
I will confess that i - enjoy a gui - and am only farmiluar with the desktop version... basically i am trying to decide go server or go desktop.
what are your thoughts?
There is nothing in the guide that requires X so you can very well use it on the server version if you wish.
FakeOutdoorsman
December 4th, 2009, 07:27 PM
ViperScull
Hi, I have a Gigabyte Ga-785GMT-UD2H mobo which has an ATI HD 4200 GPU built in.
AFAIK with ATI series HD4xxx and HD5xxx is possible to have x.264 video hardware acceleration via xvba and UVD2. I'm using catalyst 9.11 (heard something about any trouble with this version and xvba and that 9.10 worked fine, but no really sure).
I installed x264 as you said. I was wondering what I should do to make xvba work. The only thing related to this I see when I configure MPlayer sources is a reference to xvmc: "Checking for XvMC ... no".
Do I have to use any parameter when I do the ./configure or install anything to have xvba running?
Cheers.
I must admit that I am behind the times when it comes to GPU hardware assisted video decoding. I don't have supported hardware and I haven't been keeping up with these new features. x264 is an encoder, so it can't use these APIs directly to encode video. However, I am guessing it may be able to utilize them during the decoding process with FFmpeg. I don't know. I'm fairly sure FFmpeg and MPlayer do support VAAPI (which XvBA should support) and VDPAU, and FFmpeg should detect these automatically. However, I'm unsure what dependencies are required for this.
Maybe some other forum members can provide more useful input. I need buy some new hardware and to do some research. It would be a good update for this guide to support hardware accelerated decoding.
zimbot
I suppose that the install instructions are true of both ubuntu 9.04 server and desktop.
Yes.
basically i wish to create a machine that i can run a web page on [ apache2, mysql , php ] as well as php-ffmpeg and ffmpeg.
I do this on a headless server, except I've never used php-ffmpeg and I don't really know what it even does. It's not related to FFmpeg though.
I will confess that i - enjoy a gui - and am only farmiluar with the desktop version... basically i am trying to decide go server or go desktop.
what are your thoughts?
I personally prefer a lightweight command-line system. I perform a custom installation and add only what I need, but our needs are probably different. The server and desktop versions of Ubuntu are essentially quite similar with a few different packages installed. You can create a server with the desktop version and vice versa.
If you want to learn Linux in more detail I recommend a command-line only system. If you are comfortable with the desktop version and want to minimize command-line usage, then go ahead and use a desktop version. Or you can do a combination of both. You can use your desktop system as a GUI for your GUI-less server with SSHFS or a number of other ways.
Whatever you decide, I recommend playing around with a virtualized system for practice. These are great because you can make "save points" and go back if you make a bad mistake. I currently use Virtualbox on my desktop system for testing this FFmpeg guide on the variety of Ubuntu versions that it supports, and doing tests and upgrades on a virtual server before I make major changes on the live, production server. Of course your server can be a virtual machine too, but this is a whole new topic. Check the sticky topics by bodhi.zazen in the Virtualization (http://ubuntuforums.org/forumdisplay.php?f=308) section of the Ubuntu Forums for more info.
mc4man
December 5th, 2009, 12:55 AM
I'm fairly sure FFmpeg and MPlayer do support VAAPI.....ect.
I have an unanswered post about hwaccels in ffmpeg, with a link to needed libs (for debian based vaapi
Personally the only hardware I have that supports either is a laptop w/ vdpau possible, though while I use it for encoding have no reason to actually want to view any video's on to any extent other than preview.
( the only purpose I saw to vaapi with an nvidia adapter was for use with vlc which is a bit of a twisted road to enable to say the least
http://ubuntuforums.org/showthread.php?t=1192904
Bachstelze
December 5th, 2009, 07:26 AM
I have built DEB packages of the latest x264, they are available here:
ftp://itsuki.fkraiem.org/pub/x264/
Feedback would be very welcome. If enough people are interested, I will probably update them regularly.
As a side-note, they won't work with the ffmpeg et al. packages from the repos, but you can use them to build your own ffmpeg. Also, if you're wondering why the x264 package is so much bigger than the one from the repos, it's because it was built with mp4 output enabled. I think it's a feature well worth a few hundred KBs since it allows playback of files directly after encoding, without the need for an extra muxing step.
EDIT: amd64 packages are coming as soon as I get back on my amd64 machine, or if a kind soul wants to build them from the source package. ;)
ercdvs
December 5th, 2009, 05:09 PM
Does anyone try and preserve 6 channel audio either with ac3 or transcoded from DTS?
It seems for the longest time, ffmpeg has been incorrectly moving the audio channels around, even when the audio is just set to 'copy', it seems the channels are incorrectly mapped. i see postings via google search for years now on this, although most postings go ignored.
I *could* use mkv2vob, which seems to do a proper mapping to audio channels, but i just can't figure out why I can't keep everything contained to ffmpeg (and linux).
Is anybody else going through this trouble with multichannel audio ?
mc4man
December 6th, 2009, 10:12 AM
I have built DEB packages of the latest x264..
If you have the time, a few things I was wondering about.
There were a couple of changes from the 1st. to 2nd build, one was adding fPIC, what's the thinking there and would that extend to ffmpeg
Is there any difference between a fprofile make done on one machine and used on another and one that's done locally, or is that irrelevant, insignificant.
It might be just as well to lose the shared libx264, don't see where it's of any use.
Bachstelze
December 6th, 2009, 10:41 AM
If you have the time, a few things I was wondering about.
There were a couple of changes from the 1st. to 2nd build, one was adding fPIC, what's the thinking there and would that extend to ffmpeg
Actually, both were built with -fPIC, since --enable-shared implicitly enables it, I just added it explicitly to the configure flags for clarity.
Is there any difference between a fprofile make done on one machine and used on another and one that's done locally, or is that irrelevant, insignificant.
The code is the same, and the system is mostly the same too. I don't think fprofile is very much hardware-dependent, so the benefit should be pretty much the same on the local machine as it is on another one. It would be interesting to benchmark it, though.
It might be just as well to lose the shared libx264, don't see where it's of any use.
Well, if it exists, it's probably useful in some way. If it were just for me, I wouldn't build any lib at all, since I only use the CLI encoder. ;)
mc4man
December 6th, 2009, 11:22 AM
It would be interesting to benchmark it, though.
Have to take a look at that next week. Happen to have 3 ffmpegs built off of your 2 sources (one done with and without pic) and a couple of recent non fprofiled ones
I built them with your diff altered to only build static, so could do a quick install of the .deb's, a ffmpeg build and see
Mustard
December 7th, 2009, 04:50 PM
I've referenced this tutorial at least 5 times in the last two weeks. Thanks for the updates along the way. :)
Bachstelze
December 7th, 2009, 09:47 PM
I have built DEB packages of the latest x264, they are available here:
ftp://itsuki.fkraiem.org/pub/x264/
Feedback would be very welcome. If enough people are interested, I will probably update them regularly.
[...]
EDIT: amd64 packages are coming as soon as I get back on my amd64 machine, or if a kind soul wants to build them from the source package. ;)
amd64 packages are up for r1360.
Actually, both were built with -fPIC, since --enable-shared implicitly enables it, I just added it explicitly to the configure flags for clarity.
This is actually only true on amd64 (and other architectures, but not i386). The configure script has:
if [ $shared = yes -a \( $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" -o $ARCH = "ARM" \) ] ; then
pic="yes"
fi
Correct me if I'm wrong (I'm not an expert on compilers), but I think it's a goot idea to have it enabled anyway when you're building shared libs, so I guess I'll leave it enabled explicitly.
mrfelton
December 7th, 2009, 10:52 PM
I just followed the updated tutorial for Karmic, and am getting the4 following when trying to convert a .ogv file that I created with gtk-recordMyDesktop (a screencast)
tom@yogaflame:~/src/ffmpeg$ ffmpeg -i ~/out.ogv -b 384000 -s 640x480 -pass 1 -passlogfile log-file out.flv
FFmpeg version SVN-r20761, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Dec 7 2009 21:46:01 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.42. 0 / 52.42. 0
libavformat 52.41. 0 / 52.41. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 2 / 0. 7. 2
[ogg @ 0x301b3c0]Could not find codec parameters (Invalid Codec type -1)
[ogg @ 0x301b3c0]Could not find codec parameters (Video: theora, 1680x1008)
[ogg @ 0x301b3c0]Estimating duration from bitrate, this may be inaccurate
Input #0, ogg, from '/home/tom/out.ogv':
Duration: 00:01:57.35, start: 0.000000, bitrate: 499 kb/s
Stream #0.0: Invalid Codec type -1
Stream #0.1: Video: theora, 1680x1008, PAR 1:1 DAR 5:3, 15 tbr, 15 tbn, 15 tbc
Stream #0.2: Audio: vorbis, 44100 Hz, stereo, s16, 499 kb/s
swScaler: Unknown format is not supported as input pixel format
Cannot get resampling context
Any ideas? Before I ran through the tutorial I was just getting seg faults, so this is progress at least!
FakeOutdoorsman
December 7th, 2009, 11:19 PM
I just followed the updated tutorial for Karmic, and am getting the4 following when trying to convert a .ogv file that I created with gtk-recordMyDesktop (a screencast)
tom@yogaflame:~/src/ffmpeg$ ffmpeg -i ~/out.ogv -b 384000 -s 640x480 -pass 1 -passlogfile log-file out.flv
FFmpeg version SVN-r20761, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Dec 7 2009 21:46:01 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.42. 0 / 52.42. 0
libavformat 52.41. 0 / 52.41. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 2 / 0. 7. 2
[ogg @ 0x301b3c0]Could not find codec parameters (Invalid Codec type -1)
[ogg @ 0x301b3c0]Could not find codec parameters (Video: theora, 1680x1008)
[ogg @ 0x301b3c0]Estimating duration from bitrate, this may be inaccurate
Input #0, ogg, from '/home/tom/out.ogv':
Duration: 00:01:57.35, start: 0.000000, bitrate: 499 kb/s
Stream #0.0: Invalid Codec type -1
Stream #0.1: Video: theora, 1680x1008, PAR 1:1 DAR 5:3, 15 tbr, 15 tbn, 15 tbc
Stream #0.2: Audio: vorbis, 44100 Hz, stereo, s16, 499 kb/s
swScaler: Unknown format is not supported as input pixel format
Cannot get resampling context
Any ideas? Before I ran through the tutorial I was just getting seg faults, so this is progress at least!
Another user has experienced similar issues (http://ubuntuforums.org/showpost.php?p=8137933&postcount=558). What version of gtk-recordMyDesktop did you use? Are you able to provide a sample recording?
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.
alexcckll
May 2nd, 2010, 10:22 AM
Umm - I don't get it.
What I have basically done is buy preinstalled Linux laptops from Linux Emporium - and iPlayer works.
What is this brokenness people talk about?
FakeOutdoorsman
May 3rd, 2010, 07:52 PM
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
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.
Thank you. I am glad this guide has been useful to others and helped spread the word about such useful tools.
Meccano
May 7th, 2010, 11:14 PM
Hi all,
Thanks for this great tutorial.
I followed each and every step and I get this message after the last command :
bash: hash: ffmpeg: not found
I don't know it this is a problem or not since I'm a total noob to this. Tried googling around and searching the forum but got nowhere... :(
Any ideas ? Did I miss something ? Should I uninstall and try to reinstall the whole thing (that's probably what I'm gonna try to do in the meantime...).
Thanks in advance for the help.
Ubuntu Lucid Lynx fresh install on AMD64.
Meccano
May 7th, 2010, 11:45 PM
Hi again,
Just did what I said in my last post. Uninstalled and reinstalled and it all went smooooth (don't ask me what happened the first time...).
Well, I can now join the happy campers club here and say : Thanks a bunch, FakeOutdoorsman !!!! :-)
Now, I'll get to work ;-)
the hoplite
May 10th, 2010, 03:08 PM
Great. Really. Thanks!
mrfreen
May 10th, 2010, 08:09 PM
Hmm... I've followed all these instructions, but whenever I try to convert a PNG sequence to a movie file I get the message
"Error opening filters!"
What does this mean?
Bachstelze
May 10th, 2010, 08:13 PM
whenever I try to convert a PNG sequence to a movie file I get the message
"Error opening filters!"
What is the command you're trying to run?
FakeOutdoorsman
May 10th, 2010, 08:17 PM
Hmm... I've followed all these instructions, but whenever I try to convert a PNG sequence to a movie file I get the message
"Error opening filters!"
What does this mean?
Also can you show the complete FFmpeg output from your command?
n.hinton
May 10th, 2010, 10:42 PM
Hi mrfreen,
From ffmpeg faq:
3.2 How do I encode single pictures into movies?
First, rename your pictures to follow a numerical sequence. For example, img1.jpg, img2.jpg, img3.jpg,... Then you may run:
ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
Notice that `%d' is replaced by the image number.
`img%03d.jpg' means the sequence `img001.jpg', `img002.jpg', etc...
If you have large number of pictures to rename, you can use the following command to ease the burden. The command, using the bourne shell syntax, symbolically links all files in the current directory that match *jpg to the `/tmp' directory in the sequence of `img001.jpg', `img002.jpg' and so on.
x=1; for i in *jpg; do counter=$(printf %03d $x); ln "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
If you want to sequence them by oldest modified first, substitute $(ls -r -t *jpg) in place of *jpg.
Then run:
ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
The same logic is used for any image format that ffmpeg reads.
mrfreen
May 11th, 2010, 02:16 PM
Thanks! I was trying to use wildcards (e.g. *.png instead of %04d.png).
Working now. Thanks again!
Hmmm... new problem...
Now it's segfaulting when I try to make an x264 file.
Here's what I'm sending it:
ffmpeg -y -shortest -r 24 -i PNG/480/%08d.png -i audio.wav -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 mp4/sintel_trailer-480p.mp4and here's what it's giving me:
FFmpeg version SVN-r23085, Copyright (c) 2000-2010 the FFmpeg developers
built on May 11 2010 14:30:24 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.15. 2 / 50.15. 2
libavcodec 52.67. 0 / 52.67. 0
libavformat 52.62. 0 / 52.62. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.20. 0 / 1.20. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
[image2 @ 0x143c470]MAX_READ_SIZE:5000000 reached
Input #0, image2, from 'PNG/480/%08d.png':
Duration: 00:00:52.20, start: 0.000000, bitrate: N/A
Stream #0.0: Video: png, rgb24, 854x480, 24 fps, 24 tbr, 24 tbn, 24 tbc
[wav @ 0x143df40]max_analyze_duration reached
[wav @ 0x143df40]Estimating duration from bitrate, this may be inaccurate
Input #1, wav, from 'audio.wav':
Duration: 00:00:54.07, bitrate: 1535 kb/s
Stream #1.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
[ffmpeg_output @ 0x14dcd70]auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x14e5fe0]w:854 h:480 fmt:rgb24 -> w:854 h:480 fmt:yuv420p flags:a0000004
[libx264 @ 0x14c3710]using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x14c3710]profile High, level 3.0
[libx264 @ 0x14c3710]264 - core 94 r1583 7608d73 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'mp4/sintel_trailer-480p.mp4':
Metadata:
encoder : Lavf52.62.0
Stream #0.0: Video: libx264, yuv420p, 854x480, q=10-51, 200 kb/s, 24 tbn, 24 tbc
Stream #0.1: Audio: aac, 48000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
Segmentation fault
When I remove the -vpre argument it says:
[libx264 @ 0x23331c0]broken ffmpeg default settings detected
[libx264 @ 0x23331c0]use an encoding preset (vpre)
... and doesn't segfault, but doesn't do anything, either...
prupert
May 11th, 2010, 05:42 PM
After much stress, I have written an ffmpeg progress indicator in Bash. It was a right pain in the ****, due to the way ffmpeg prints out its updates without the proper use of Carriage Returns.
I have written it up here:http://www.prupert.co.uk/2010/05/11/finally-a-bash-progress-indicator-for-ffmpeg-that-works/
UPDATE:
I have now added an ETA indicator (in hours mins and seconds) to show how long there is left, as well as some better error checking to deal with how ffmpeg prints out its updates.
I plan to convert it to Python, to make it more powerful and flexible and cross platform. As well add a GUI for those command-line hating types, it might even turn into YAFF (yet another ffmpeg frontend - which is what I'll call it once it is big enough).
prupert
May 14th, 2010, 05:42 PM
For those that are intersted. I have updated my scripts, so that they use a config file after first running the ffmpegupv1.4.sh script. This means that in future, the script can be run with no user interaction. So it can be called by cron if you want ;)
Updates can be found here:
http://code.google.com/p/x264-ffmpeg-up-to-date/
towerboy
May 17th, 2010, 08:50 AM
Hello, I made it through the install and tried it on my first AVI. I am running a fresh install of Ubuntu 10.04 x64. I used your "One-pass CRF" command and I changed my input filename but that is all:
ffmpeg -i IMGP7721.AVI -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mp4
This is the output that I get:
FFmpeg version SVN-r23149, Copyright (c) 2000-2010 the FFmpeg developers
built on May 16 2010 23:31:18 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.15. 2 / 50.15. 2
libavcodec 52.67. 1 / 52.67. 1
libavformat 52.62. 0 / 52.62. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.20. 0 / 1.20. 0
libswscale 0.10. 0 / 0.10. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, avi, from 'IMGP7721.AVI':
Metadata:
ISFT :
Duration: 00:00:10.99, start: 0.000000, bitrate: 23891 kb/s
Stream #0.0: Video: mjpeg, yuvj422p, 1280x720, 30 tbr, 30 tbn, 30 tbc
Stream #0.1: Audio: pcm_u8, 8000 Hz, 1 channels, u8, 64 kb/s
[ffmpeg_output @ 0x272eef0]auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x272f1b0]w:1280 h:720 fmt:yuvj422p -> w:1280 h:720 fmt:yuv420p flags:a0000004
[libx264 @ 0x270f160]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[libx264 @ 0x270f160]profile High, level 3.2
[libx264 @ 0x270f160]264 - core 94 r1583 7608d73 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00
[libfaac @ 0x270f7d0]libfaac doesn't support this output format!
Output #0, mp4, to 'output.mp4':
Stream #0.0: Video: libx264, yuv420p, 1280x720, q=10-51, 200 kb/s, 90k tbn, 30 tbc
Stream #0.1: Audio: aac, 8000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
I am very new at this and am not sure what my options are that I can use.
My AVI is from straight from a Pentax Optio W80 and the properties of the video are listed below...
Video:
Dimensions: 1280 x 720
Codec: Motion JPEG
Framerate: 30 FPS
Bitrate: N/A
Audio:
Codec: Uncompressed 8-bit PCM audio
Channels: Mono
Sample Rate: 8000 Hz
Bitrate: N/A
Thanks for your time and effort.
-Jeremy
prupert
May 17th, 2010, 09:43 AM
The important error message is:
[libfaac @ 0x270f7d0]libfaac doesn't support this output format!
and more information is given as well:
Stream #0.1: Audio: aac, 8000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
The first quote is telling you that libfaac is the codec used to create the audio stream, in this case aac and that the settings chosen aren't supported in the output format (mp4) that has been chosen.
The second quote is giving you more info, telling you that stream 0.1 is the Audio stream and what options you chose. It then says when ffmpeg tried to open the encoder you chose for that stream, it failed.
So, essentially, the settings chosen for the aac audio encoder don't work!
This is important, and fakeoutdoorsman will have to check to see why it doesn't work - I have no avi files to check it out on. I've just checked the command on a VOB file, and it seems to work fine. So I am wondering if it is to do with the AVI file you are using....
Sorry, not much help, but I thought I'd explain the error message a little more. Hopefully fakeoutdoorsman can shed some more light....
andrew.46
May 17th, 2010, 09:55 AM
Hi towerboy,
Does adding -ar 44100 to your aac options help?
Andrew
prupert
May 17th, 2010, 10:42 AM
I was hoping someone with knowledge of compilation can help here. I have asked on the ffmpeg lists, but thought I'd ask here as well.
I am writing my own little bash transcoder script, that I want to be able to distribute to anyone that wishes to use it. One of the features I want it to have, is to always use the latest versions of ffmpeg and x264. I was thinking, what I'd like to do is download the source and compile x264 and ffmpeg in a local folder, but not to install it. So the script uses these most recent versions, but they don't get installed on the system so as not to mess up any other installs of ffmpeg on the system (and also meaning that the script doesn't need to run as root after the initial run).
I can compile x264 on its own, but if I want to compile ffmpeg to use x264, how can I tell it where the libx264 sources are located, if I haven't installed them? I have had a look through the ffmpeg configure option and there seems to be no such option. Is what I am trying to do impossible?
towerboy
May 17th, 2010, 09:24 PM
Hi towerboy,
Does adding -ar 44100 to your aac options help?
Andrew
Hey Andrew,
Thanks for that little bit of info. It did convert the file but it wouldn't play smoothly on my netbook so I had to use "-s 640x360" and it plays just fine. When it did convert it though it gave this warning:
Warning, using s16 intermediate sample format for resampling
I'm not sure if that's good or bad so if anyone knows and can let me know, thanks. Again, thank you Andrew for your help!
-Jeremy
FakeOutdoorsman
May 17th, 2010, 11:15 PM
Thanks! I was trying to use wildcards (e.g. *.png instead of %04d.png).
Working now. Thanks again!
Hmmm... new problem...
Now it's segfaulting when I try to make an x264 file.
Here's what I'm sending it:
and here's what it's giving me:
When I remove the -vpre argument it says:
... and doesn't segfault, but doesn't do anything, either...
Late reply. I've been out of town for a week. Did you ever resolve this issue?
qyot27
May 18th, 2010, 04:08 AM
I was hoping someone with knowledge of compilation can help here. I have asked on the ffmpeg lists, but thought I'd ask here as well.
I am writing my own little bash transcoder script, that I want to be able to distribute to anyone that wishes to use it. One of the features I want it to have, is to always use the latest versions of ffmpeg and x264. I was thinking, what I'd like to do is download the source and compile x264 and ffmpeg in a local folder, but not to install it. So the script uses these most recent versions, but they don't get installed on the system so as not to mess up any other installs of ffmpeg on the system (and also meaning that the script doesn't need to run as root after the initial run).
I can compile x264 on its own, but if I want to compile ffmpeg to use x264, how can I tell it where the libx264 sources are located, if I haven't installed them? I have had a look through the ffmpeg configure option and there seems to be no such option. Is what I am trying to do impossible?
That's what --extra-cflags and --extra-ldflags are for (--extra-cflags is also used to perform C code optimization for the given CPU*). --extra-cflags points to the /include folder for the install, --extra-ldflags points to the /lib directory. Also, x264 and FFMS2's PKG_CONFIG_PATH variables allow for this too, in reference to FFMS2 finding a stripped-down version of ffmpeg and x264 finding both that same ffmpeg and FFMS2.
The other point, is that 'make install', despite 'install' being in the command, doesn't mean one has to be root or that it mucks with the system libs/apps/etc. For instance, when you compile x264,
./configure --prefix=$HOME/x264_build
make
make install
because you specified $HOME/x264_build as the prefix, the 'make install' step will install x264 to $HOME/x264_build instead of the system. Now, when compiling ffmpeg, you would do,
./configure --prefix=$HOME/x264_build [other options] --enable-libx264 --extra-cflags="-I$HOME/x264_build/include" --extra-ldflags="-L$HOME/x264_build/lib"
make
make install
which should allow ffmpeg to find the x264 stuff you just installed AND install ffmpeg to $HOME/x264_build as well. You'd find the ffmpeg executable in $HOME/x264_build/bin, and need to run it by cd-ing into the directory and calling it like so:
./ffmpeg
The ./ is required because the executable is not on the system PATH.
None of that requires root access.
*Using --extra-cflags for CPU optimization looks like this (for a Pentium 3 and other P3-family CPUs, like the Celeron Coppermine I have in my computer; change this depending on what CPU/family you use - the list of possible options is available in the documentation for GCC (http://gcc.gnu.org/onlinedocs/gcc-4.4.4/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options)):
--extra-cflags="-march=pentium3"
If you wanted to double this up, like with ffmpeg finding x264's files, it looks like this:
--extra-cflags="-I$HOME/x264_build/include -march=pentium3"
poltr1
May 18th, 2010, 12:54 PM
Just adding my voice to the choir of satisfied FFmpeg and x264 users. I installed it last night on my Compaq Presario M2000 laptop running Lucid. it took a while, but it was worth the wait. Sound Converter can now create mp3 files.
Thank you, FakeOutdoorsman!
avollmerhaus
May 19th, 2010, 10:57 AM
Hello folks.
At first, a big thank to FakeOutdoorsman for the excellent guide.
Compiling and installing worked flawless.
However, i have to call ffmpeg trough transcode, which in turn gets called by dvd::rip.
I´m getting this when i try to encode something:
export_ffmpeg.so Using FFMPEG codec 'h264' (FourCC 'h264', H264 (avc)).
export_ffmpeg.so No profile selected
export_ffmpeg.sowarning: Error opening configuration file ./ffmpeg.cfg: No such file or directory
export_ffmpeg.so Starting 1 thread(s)
export_ffmpeg.so Set display aspect ratio to input
[libx264 @ 0x230d940]broken ffmpeg default settings detected
[libx264 @ 0x230d940]use an encoding preset (vpre)
export_ffmpeg.so warning: could not open FFMPEG codec
encoder.cwarning video export module error: init failed
transcode critical: failed to init encoder
I´m really stuck on this. Would writing an ffmpeg.cfg help?
If so, what to put in there?
verb3k
May 23rd, 2010, 09:37 PM
Hi FakeOutdoorsman,
I've been meaning to ask this for some time. Why doesn't the guide build with libvorbis?
FakeOutdoorsman
May 23rd, 2010, 11:14 PM
Hi FakeOutdoorsman,
I've been meaning to ask this for some time. Why doesn't the guide build with libvorbis?
Good question. I don't remember why I removed it (or if I even had it there previously), but I put it back for the Lucid guide. I'll add it for the older releases in a few days probably. My test run worked fine:
ffmpeg -i IronMan.mkv -vn -acodec libvorbis -aq 5 ironman.ogg
The FFmpeg devs usually recommend using -acodec libvorbis instead of the native -acodec vorbis encoder due to output quality differences, but I've never tested the difference myself.
FakeOutdoorsman
May 24th, 2010, 05:38 AM
I'm planning on making a FFmpeg version of andrew.46's Top 10 Tricks and Tips for the svn MPlayer (http://ubuntuforums.org/showthread.php?t=1154431). I just need to organize my ~/ffmpegjunk file into something useful for a general audience. I would also like submissions from other forum members. Some tips I have include: changing the speed of a video, trimming, looking at the FFmpeg svn log, checking out a specific FFmpeg revision, piping to or from FFmpeg, and several others.
Could be an interesting guide.
nicolargo
May 24th, 2010, 10:15 AM
Hi all,
i write a simple shell script to install (ffmpeginstall.sh (http://svn.nicolargo.com/ubuntupostinstall/trunk/ffmpeginstall.sh)) and update (ffmpegupdate.sh (http://svn.nicolargo.com/ubuntupostinstall/trunk/ffmpegupdate.sh)) all the stuffs: FFMPEG, X264...
Tested on Ubuntu 10.04 Lucid.
Waiting for feedbacks...
wingnux
May 24th, 2010, 04:31 PM
Your script works great! Thanks for sharing it.
FakeOutdoorsman
May 24th, 2010, 06:06 PM
Hi all,
i write a simple shell script to install (ffmpeginstall.sh (http://svn.nicolargo.com/ubuntupostinstall/trunk/ffmpeginstall.sh)) and update (ffmpegupdate.sh (http://svn.nicolargo.com/ubuntupostinstall/trunk/ffmpegupdate.sh)) all the stuffs: FFMPEG, X264...
Tested on Ubuntu 10.04 Lucid.
Waiting for feedbacks...
You could add -y to the apt-get install commands to have fewer prompts for the user, but that my not be desired by everyone.
Because your script is for Lucid, I recommend adding something that will make sure the script runs only on Lucid. Maybe something like:
if [ "echo lsb_release -cs" != "lucid" ]; then
echo "You are not using Ubuntu Lucid 10.04. Exiting."
exit
fi
Adding set -e as the first command could be useful allowing the script to exit upon any errors instead of continuing blindly. However, running make distclean in an already clean directory when using set -e may cause the script to exit. I'm not sure how to deal with that.
Jart44
May 24th, 2010, 07:43 PM
Greetings,
Re: Uninstall Instructions
In Synaptic Manager when I try to uninstall current ffmpeg I notice that it warns that all other video such as Avidemux, SMPlayer and other devices will be disabled. Does this mean I will have to recompile these also? Or is it done automatically when I enter the new script?
Thanks
mc4man
May 24th, 2010, 10:01 PM
when I try to uninstall current ffmpeg I notice that it warns that all other video such as Avidemux, SMPlayer and other devices will be disabled
That's very atypical, the list of apps that depend on ffmpeg itself is very short and none you've mentioned.
you could run this and post (answer no if a lot is to be removed
sudo apt-get remove ffmpeg
Jart44
May 26th, 2010, 01:10 AM
Thanks,
Terminal input> sudo apt-get remove ffmpeg
did the trick. Now I'll move on to the install.
Kudos
mahela007
May 31st, 2010, 02:42 PM
Isn't there a way around building from source? Other instructions I have read say that ffmpeg (with all the proprietary codes) should be available in the universe (or multiverse) repository. It could have been mentioned in this thread but it is a hundred pages long...
NEVERMIND.. I found the answer in post #1
Tybion
June 1st, 2010, 09:54 AM
Should you add the (optional) step -
sudo apt-get install libgpac-dev
before running ./configure ?
Only after I did this, configure reported -
MP4 output: Yes
FakeOutdoorsman
June 1st, 2010, 08:30 PM
Should you add the (optional) step -
sudo apt-get install libgpac-dev
before running ./configure ?
Only after I did this, configure reported -
MP4 output: Yes
You only need libgpac-dev if you want to directly use x264 to output to .mp4.
andrew.46
June 3rd, 2010, 12:38 AM
Looks like the FFmpeg developers are really getting close to the cutting edge of x264 now:
enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm &&
{ check_cpp_condition x264.h "X264_BUILD >= 98" ||
die "ERROR: libx264 version must be >= 0.98."; }
Andrew
qyot27
June 3rd, 2010, 07:26 AM
My guess is because it's probably a major enough bugfix/change to warrant it.
http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=4cb7dfdb79fab67484e789d40e9f6 4b953a701e8
Properly initialize x264_picture_t in libx264.
Bump libx264 version requirement accordingly.
I'm simply assuming that x264_picture_t is a critical function.
@H.264
June 4th, 2010, 03:46 PM
I'm having problem regarding x264 with ffms support.
Can someone help me out how to install ffmpeg and x264 with ffms support?
FakeOutdoorsman
June 4th, 2010, 06:32 PM
I'm having problem regarding x264 with ffms support.
Can someone help me out how to install ffmpeg and x264 with ffms support?
What have you tried so far and what kind of problems are you experiencing? What version of Ubuntu are you using?
qyot27
June 4th, 2010, 06:52 PM
I'm having problem regarding x264 with ffms support.
Can someone help me out how to install ffmpeg and x264 with ffms support?
http://ubuntuforums.org/showpost.php?p=8916353&postcount=900
The only thing that needs changing is to take out the --disable-filters option in the first FFmpeg compile. And of course adding any additional decoding/encoding libraries you might want to the relevant FFmpeg (only decoders for the first one, decoders and encoders for the second).
Works on Karmic and Lucid, or should (I migrate up to the next version immediately, so I know it works on Lucid; it worked on Karmic when I wrote those steps back in March).
verb3k
June 5th, 2010, 12:16 AM
Now it is possible to produce a WebM-compliant file with latest ffmpeg SVN if you build with libvpx and libvorbis. It can be as simple as:
ffmpeg -i input output.webm
Plays nicely in Firefox's WebM build.
The only problem is that I can't find how to disable frame dropping of libvpx. Libvpx drops frames by default so your video might be choppy in some high motion areas.
FakeOutdoorsman
June 5th, 2010, 12:30 AM
Now it is possible to produce a WebM-compliant file with latest ffmpeg SVN if you build with libvpx and libvorbis. It can be as simple as:
ffmpeg -i input output.webm
Plays nicely in Firefox's WebM build.
The only problem is that I can't find how to disable frame dropping of libvpx. Libvpx drops frames by default so your video might be choppy in some high motion areas.
I plan on adding a libvpx section to the guide soon. I was waiting for the muxer to be finished. Yeah, that's my excuse:
$ svn log -l 24 svn://svn.mplayerhq.hu/ffmpeg/trunk
------------------------------------------------------------------------
r23474 | conrad | 2010-06-04 14:40:54 -0800 (Fri, 04 Jun 2010) | 3 lines
Add WebM muxer
Patch by James Zern <jzern at google>
------------------------------------------------------------------------
As requested through a PM, I will also add qt-faststart installation instructions once I can figure out an elegant package management solution. It's tasks like this that make me especially admire the ports-like capable systems such as Arch and Slackware (amirite, andrew.46? da.). This little FFmpeg tool moves the moov atom to the beginning of a file so it can start playing before it is completely downloaded. Useful for web videos. Usage: qt-faststart input.foo output.foo.
Update: I added a qt-faststart section to the Lucid guide. It's a somewhat messy way of doing it, but I can't make myself use checkinstall more than I have to. Anyone have a better method that works with Ubuntu package management, or is this Good Enough?
verb3k
June 5th, 2010, 01:09 AM
EDIT:wrong post.
FakeOutdoorsman
June 5th, 2010, 02:46 AM
Preliminary libvpx Installation Instructions
I quickly came up with a libvpx guide, tested on Lucid 64-bit, but I didn't get to mess with it as much as I wanted before other, less interesting things got in the way.
1. Install x264. Not required, but I added this to keep up with the first page of this guide.
2. Install libvpx from git.
cd
git clone git://review.webmproject.org/libvpx.git
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="`date +%Y%m%d%k%M`-git" --backup=no --nodoc --default
3. Install FFmpeg. Make sure to add:
--enable-libvpx
The --enable-nonfree may not be required once the license gets cleared up. libvpx is now under a (L)GPL-compatible license.
4. Encode to .webm:
ffmpeg -i input.foo -threads 4 output.webm
Replace -threads 4 with a value appropriate for your CPU or omit --threads.
Update: These instructions have been moved to the first page (http://ubuntuforums.org/showthread.php?t=786095) of the guide and will be kept up to date there.
verb3k
June 5th, 2010, 02:58 AM
Nice instructions. libvpx supports 2-pass encoding which results in much better quality than 1-pass. Until now -b -pass and -threads are the only optinos I use with libvpx. I wonder if there are any other. Also, if you could look into the framedrop issue and how to disable it, I would be very grateful.
Thanks.
Locke_99GS
June 5th, 2010, 06:00 AM
I've never used checkinstall before, I generally compile and package debianized source with dpkg-buildpackage, and debianize if needed with dh_make. Sometime dh_make is flakey.
Going purely by your instructions, checkinstall fails after a good make.
locke@locke-desktop:~/Build/libvpx$ sudo checkinstall --pkgname libvpx --pkgversion `date +%Y%m%d%k%M`-git --backup=no --nodoc --default
checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: n
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@locke-desktop ]
1 - Summary: [ library for VP8 ]
2 - Name: [ libvpx ]
3 - Version: [ 20100605 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ libvpx ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ libvpx ]
Enter a number to change any of them or press ENTER to continue:
Installing with 057-git...Installing with --backup=no...Installing with --nodoc...Installing with --default...
========================= Installation results ===========================
/var/tmp/tmp.w1jKmKcH6i/installscript.sh: 4: 057-git: not found
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
Ideas?
FakeOutdoorsman
June 5th, 2010, 06:25 AM
I've never used checkinstall before, I generally compile and package debianized source with dpkg-buildpackage, and debianize if needed with dh_make. Sometime dh_make is flakey.
I haven't used dpkg-buildpackage or dh_make before. I'll take a look at those. One of these days I should attempt to learn how to properly wrangle Debian type package management, but it's fairly low on the todo list.
Going purely by your instructions, checkinstall fails after a good make.
Installing with 057-git...Installing with --backup=no...Installing with --nodoc...Installing with --default...
========================= Installation results ===========================
/var/tmp/tmp.w1jKmKcH6i/installscript.sh: 4: 057-git: not found
Ideas?
Looks like it may not have liked the --pkgversion. Try changing it to a simple number. What version of Ubuntu are you using? I should have mentioned that I tested it only on Lucid 64-bit.
Update: I realized I forgot to put quotes around the pkgversion, although I'm fairly sure it worked for me before. I'm away from my Ubuntu machine, so I can't test now. I updated the checkinstall command in my libvpx post.
Locke_99GS
June 5th, 2010, 07:20 AM
Heh, I just figured it out. :) To tell you the truth, after cutting and pasting your instructions and seeing the no-go, I just moved on to other things.
In post 1042, your checkinstall arguments include --pkgname libvpx, when in fact it should be --pkgname=libvpx. A simple typographical error, it looks like. After adding the equals sign where appropriate, checkinstall appears to have done its thing.
Time to recompile ffmpeg :)
edit: Not that it matters now, but I am also using Lucid 64bit.
TBerk
June 5th, 2010, 08:08 AM
Looks like the FFmpeg developers are really getting close to the cutting edge of x264 now:
enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm &&
{ check_cpp_condition x264.h "X264_BUILD >= 98" ||
die "ERROR: libx264 version must be >= 0.98."; }
Andrew
This is where I too grind to a halt. I've read the rest of the post to date (Midnight, GMT -8) but I don't see a fix to enabling support for x264.
(I press because support for x264 is one of the main things I'm doing this for.)
ERROR: libx264 version must be >= 0.98.
Help Mr. Wizard!
TBerk
================
OK, I went back and deleted the ffmpeg and x264 directories (and the contents there of) and tried again. As I type this update it seems to be working, re: running "make".
OK, it's 12:40 in the morning and I seem to have a good install. Key point was to remove the directories I had left from the 1st time I did this install prior to the 'new' install.
<end>
mc4man
June 6th, 2010, 12:47 AM
As far as libvpx -
one thing to keep in mind is it is/will start showing up on ubuntu installs depending on which and or if certain ppa's are enabled
It's included in 10.10, and provided in karmic and or lucid by the gstreamer-devs ppa ( updated regularly ), and the chromium-daily ppa ( not a quick as the gst-dev's
So it may be worth seeing if any of the above libvpx and libvpx-dev do the job, or keep in mind if building.
https://launchpad.net/~gstreamer-developers/+archive/ppa/+packages
andrew.46
June 6th, 2010, 07:11 AM
Hi Fakeoutdoorsman,
I will admit that I am still between Ubuntu installations but certainly on my other distro I added in the compiler flags on the ./configure string as follows for 32bit:
./configure --target=x86-linux-gcc
and I presume the following would work with 64bit:
./configure --target=x86_64-linux-gcc
but I confess I will not be testing to see if this is required under Ubuntu as I have no short-term plans to reinstall :(.
Another short note: I have not investigated extensively to see the exact reason but I suspect if you run make with sudo the html docs will be built.
All the best,
Andrew
FakeOutdoorsman
June 6th, 2010, 07:22 PM
Hi Fakeoutdoorsman,
I will admit that I am still between Ubuntu installations but certainly on my other distro I added in the compiler flags on the ./configure string as follows for 32bit:
./configure --target=x86-linux-gcc
and I presume the following would work with 64bit:
./configure --target=x86_64-linux-gcc
but I confess I will not be testing to see if this is required under Ubuntu as I have no short-term plans to reinstall :(.
Hi Andrew,
I also did this when I first tested libvpx a week or two ago, but this time I tried it and I think it automatically detected the proper target on Lucid x86_64. I had to rush through this and maybe it actually didn't. I'll have to test this later tonight.
Another short note: I have not investigated extensively to see the exact reason but I suspect if you run make with sudo the html docs will be built.
All the best,
Andrew
I added --disable-install-docs because the readme mentioned PHP and doxygen (or something like that) as doc dependencies (or something like that). Wow, I can't remember anything if it isn't directly in front of me. I'll try it without this next time and see what happens.
Looks like libvpx now has a (L)GPL-compatible license (http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=c79ad3522baaf203f5b8937462329 8fb6a84d215) which probably makes --enable-nonfree unnecessary for libvpx.
FakeOutdoorsman
June 6th, 2010, 07:25 PM
As far as libvpx -
one thing to keep in mind is it is/will start showing up on ubuntu installs depending on which and or if certain ppa's are enabled
It's included in 10.10, and provided in karmic and or lucid by the gstreamer-devs ppa ( updated regularly ), and the chromium-daily ppa ( not a quick as the gst-dev's
So it may be worth seeing if any of the above libvpx and libvpx-dev do the job, or keep in mind if building.
https://launchpad.net/~gstreamer-developers/+archive/ppa/+packages
Thanks. I'll keep this in mind if libvpx becomes annoying to build, but I usually avoid PPAs. Might be useful for some users though.
FakeOutdoorsman
June 7th, 2010, 05:12 AM
Nice instructions. libvpx supports 2-pass encoding which results in much better quality than 1-pass. Until now -b -pass and -threads are the only optinos I use with libvpx. I wonder if there are any other. Also, if you could look into the framedrop issue and how to disable it, I would be very grateful.
Thanks.
I didn't figure out how to disable frame droppings, but this patch will probably be applied soon:
[FFmpeg-devel] [PATCH] libvpx: Disable frame dropping as rate control method (https://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-June/090152.html)
kamatschka
June 10th, 2010, 12:21 AM
Thank you for this Tutorial.
I used it for Carmic and now for Lucid.
With Carmic I got no errors on KDEnlive rendering MPEG4 or DivX etc. but now I cannot render into the most formats.
Here the screenshots of the error which I get at KDEnlive whith the installation of ffmpeg and x264.
"Nicht unterstützter" means "Not supported"
http://img444.imageshack.us/img444/3752/bildschirmfotorendern.png_http://img808.imageshack.us/img808/2548/bildschirmfotorendern1.png
http://img28.imageshack.us/img28/9927/bildschirmfotorendern4.png_http://img813.imageshack.us/img813/9009/bildschirmfotorendern3.png
Executing "ffmpeg -formats |grep aac:" in terminal gets:
FFmpeg version SVN-r23548, Copyright (c) 2000-2010 the FFmpeg developers
built on Jun 9 2010 11:41:56 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-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50.18. 0 / 50.18. 0
libavcodec 52.75. 1 / 52.75. 1
libavformat 52.68. 0 / 52.68. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.20. 0 / 1.20. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Is there something which I could done wrong following your tutorial?. It compiled and installed propperly..
Does anyone have a clue how to resolve this issue?
Thank you very much. Greetings from germany as you can see from the screenshots! :D ):P
andrew.46
June 11th, 2010, 01:50 AM
Hi,
Fakeoutdoorsman's guide lured me to FFmpeg a long time ago but it might be of interest for some to hear that it is now possible to use presets to transcode with x264 in the latest svn MEncoder...
Andrew
mocha
June 13th, 2010, 07:47 AM
Hi,
Fakeoutdoorsman's guide lured me to FFmpeg a long time ago but it might be of interest for some to hear that it is now possible to use presets to transcode with x264 in the latest svn MEncoder...
Andrew
As my Russian computer science professor used to say, "how to do?" Please enlighten us Andrew.46.
cor2y
June 17th, 2010, 02:08 AM
Thank you for this Tutorial.
I used it for Carmic and now for Lucid.
With Carmic I got no errors on KDEnlive rendering MPEG4 or DivX etc. but now I cannot render into the most formats.
Here the screenshots of the error which I get at KDEnlive whith the installation of ffmpeg and x264.
"Nicht unterstützter" means "Not supported"
http://img444.imageshack.us/img444/3752/bildschirmfotorendern.png_http://img808.imageshack.us/img808/2548/bildschirmfotorendern1.png
http://img28.imageshack.us/img28/9927/bildschirmfotorendern4.png_http://img813.imageshack.us/img813/9009/bildschirmfotorendern3.png
Executing "ffmpeg -formats |grep aac:" in terminal gets:
Is there something which I could done wrong following your tutorial?. It compiled and installed propperly..
Does anyone have a clue how to resolve this issue?
Thank you very much. Greetings from germany as you can see from the screenshots! :D ):P
You need to combine both the kdenlive compiling ffmpeg tutorial and fakeoutdoorsman's.
Thats what worked for me.
cmay4
June 20th, 2010, 07:49 PM
Trying to do an update (it's been a while), and I get the following on the configure step:
~/src/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-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
Unknown option "--enable-libfaad".The faad option is totally gone. I tested by looking at all the options:
~/src/ffmpeg$ ./configure --help | grep faa
--enable-libfaac enable FAAC support via libfaac [no]I removed the option an am compiling fine now. Any idea why that option no longer exists? Do the main instructions need to be updated?
mc4man
June 20th, 2010, 08:33 PM
Probably this - (r23652 )
doug@doug-desktop:~/ffmpeg$ svn log --limit 20 |grep libfaad
ChangeLog: note libfaad wrapper removal
Remove libfaad wrapper
cmay4
June 20th, 2010, 08:39 PM
I guess that means that it isn't needed anymore.i suppose the docs should be updated then.
verb3k
June 20th, 2010, 08:49 PM
I guess that means that it isn't needed anymore.i suppose the docs should be updated then.
It's not needed anymore because FFmpeg's native AAC decoder now supports all features of AAC.
cmay4
June 20th, 2010, 08:50 PM
It's not needed anymore because FFmpeg's native AAC decoder now supports all AAC features.
Awesome. Thanks!
FakeOutdoorsman
June 20th, 2010, 08:55 PM
Guide updated by removing libfaad as a dependency. It's nice to see fewer external libraries needed. Thanks for letting me know. I'm out of town and haven't been keeping up with FFmpeg developments.
verb3k
June 20th, 2010, 09:07 PM
Native VP8 decoder underway already :)
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-June/090751.html
prupert
June 23rd, 2010, 12:00 PM
Guide updated by removing libfaad as a dependency. It's nice to see fewer external libraries needed. Thanks for letting me know. I'm out of town and haven't been keeping up with FFmpeg developments.
So, did you just remove the --enable-libfaad option from ffmpeg ./configure or where there more changes?
Cheers.
FakeOutdoorsman
June 23rd, 2010, 06:45 PM
So, did you just remove the --enable-libfaad option from ffmpeg ./configure or where there more changes?
Cheers.
I also removed libfaad-dev from the Install the Dependencies and the Reverting Changes Made by This Guide sections.
meklu
June 23rd, 2010, 07:13 PM
# Ignore. I had accidentally installed x264 from the repos.
prupert
June 23rd, 2010, 09:15 PM
I also removed libfaad-dev from the Install the Dependencies and the Reverting Changes Made by This Guide sections.
Of course, cool, cheers - updating my script to reflect the changes.
Bachstelze
June 25th, 2010, 08:14 AM
So, finally, here's how to make kosher ffmpeg packages. :) Note that this is only for the ffmpeg source package so far, and therefore does not build the -unstripped versions of the libraries yet (those are in the ffmpeg-extras source package). I'll do ffmpeg-extras later, probably after the RMLL.
For the impatient, the result is here (ftp://iori.fkraiem.org/pub/ffmpeg/r23766/). Testing is of course welcome.
So here's a quick howto. First get the source. We use svn export instead of svn checkout so as to not be bothered by the svn metadata. Of course, this means that you will not be able to just svn update your tree. Fine with me, Internet is fast nowadays.
svn export svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
It's probably a good idea (though not required) to rename the created ffmpeg directory with the revision number, something like
mv ffmpeg ffmpeg-r23767
Then you must create your original source tarball
tar czvf ffmpeg_0.svn.r23767.orig.tar.gz ffmpeg-r23767
This is the version numbering scheme I use: 0.svn.rXXXXX-1firasX. It is of course totally arbitrary, and you can use another one if you don't like it (but it would be nice to not have over 9000 of them, so that people can seamlessly upgrade packages built by someone with packages built by someone else). The part after the hyphen can be customized at will, but it needs to start with a number (it will probably not be necessary to set it higher than 1, I don't think there will be many different packagings of the same revision).
Move in the source directory, and create the debian/ directory, that will be used for packaging. You probably don't want to create it from scratch yourself, so you can use mine:
cd ffmpeg-r2376
wget ftp://iori.fkraiem.org/pub/ffmpeg/r23766/ffmpeg_0.svn.r23766-1firas1.diff.gz -O - | gunzip | patch -p1
It will create the debian/ dir. You still have some work to do, though. ;) So get in there
cd debian
First thing is to edit the changelog to reflect your changes and increase the version number:
vim changelog
Add an entry usng my last one as a model. Normally you'll need at least a "new upstream snapshot" line, possibly some API bumps (there were two in mine, more about that later), your new version number, name, email address and the current date in RFC2822 format (as given by date -R), so something like:
ffmpeg (5:0.svn.r23767-1chucknorris1) lucid; urgency=low
* new upstream snapshot
-- Chuck Norris <chuck@norris.org> Fri, 25 Jun 2010 08:46:38 +0200
Note that normally, you need a GPG key with that name and email address, that will be used to sign your source package. It's always a good idea to have one as it is required if you want to put your packages on a PPA on Launchpad for example, but it is not an absolute requirement (your packages will still build fine without one). If you want to get one but don't know how, see for example this guide (http://www.gentoo.org/doc/en/gnupg-user.xml).
Also change the Maintainer field in the control file.
Now for the only really tricky part: checking for API bumps and updating the debian/ dir if there is one. I'll take the example of libavutil. In the debian/ dir, you have:
% ls libavutil*
libavutil50.install libavutil50.lintian-overrides libavutil-dev.install
You check for the current libavutil version with
% grep VERSION_MAJOR ../libavutil/avutil.h
#define LIBAVUTIL_VERSION_MAJOR 50
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
#define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \
libavutil is still at version 50, good. If it were at version 51, you'd have to do two things: first rename the libavutil50* files to libavutil51*
rename s/50/51/ libavutil50*
and then change all occurrences of libavutil50 to libavutil51 in control:
sed -i 's/libavutil50/libavutil51/g;s/libavutil-extra-50/libavutil-extra-51/g' control
Do the same for all libraries.
Hopefully, that's all you need so you can build your packages:
cd ..
debuild
Optionally, if you want to add moar configure flags, you must: add the flags to debian/confflags under "# Common configuration flags" and if a new confflag adds a dependency on another library, add the package for that library in the Build-Depends section of debian/control. It is probably possible to add all the libraries you need there, which will render the -unstripped versions useless.
prupert
June 25th, 2010, 09:23 AM
So, finally, here's how to make kosher ffmpeg packages. :)
Out of interest, why would someone want to do this - what are the advantages??
dannyboy79
June 25th, 2010, 07:36 PM
i am going to ask the same question also. i am having a huge mess trying to get --enable-shared working because of external libraries or something like that. all my library files in /usr/local/lib/ are empy so when i run ldconfig it fails with the following
sudo ldconfig
/sbin/ldconfig.real: File /usr/lib/libavutil.so.49 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/libavformat.so.52 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/libavfilter.so.0 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/libavfilter.so.0.4.0 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/libavdevice.so.52.1.0 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/libavdevice.so.52 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/libavformat.so.52.31.0 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/libavutil.so.49.15.0 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/libavcodec.so.52 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/libavcodec.so.52.20.1 is empty, not checked.
and my ffmpeg doesn't work because it says this
-bash: /sbin/ldconfig.real:: No such file or directory
root@core2duo:/home/daniel# /sbin/ldconfig.real: File /usr/lib/libavfilter.so.0 is empty, not checked.
-bash: /sbin/ldconfig.real:: No such file or directory
so, i am asking what is the main advantage of compileing ffmpeg with the --enable-shared option? I only want to make videos (edit, add transitions, and music) from captured files using kino and firewire so that i can upload them to youtube. do i even need --enable-shared?
thanks for any help anyone can provide?
qyot27
June 25th, 2010, 08:32 PM
It is not necessary to compile ffmpeg with --enable-shared, but if you want updated versions of libav[format/codec/util/etc] in programs that do read said shared libraries, it probably works as an update for them. I never compile it shared. Static compilation (which is the default) is far less trouble, IMO.
Out of interest, why would someone want to do this - what are the advantages??
Because checkinstall doesn't always complete successfully, and I'm not sure if checkinstall-produced builds are acceptable for repository submission. I assume they aren't, though.
Bachstelze
June 25th, 2010, 08:44 PM
Also, it allows to use programs in the repos with newer ffmpeg without recompiling the program. A lot of people in this thread hated the fact that some package depended on a particular libav* package, but their checkinstall'ed ffmpeg didn't provide it.
mc4man
June 25th, 2010, 09:36 PM
You should probably remove from orig. diff
+# there is no libfaad in ubuntu/main, on in ubuntu/multiverse
+gpl_confflags += $(call cond_enable,/usr/include/faad.h,libfaad)
or make adjustment before build in confflags file
The value of newer shared ffmpeg libs may depend of what your use of them is. - I've always done it at least once per install since hardy though some apps will require a re-build against. Overall the value is limited from what I've seen, less now than in hardy.
Would be interested in hearing of any specific gains in dependent apps (without a re-build
verb3k
June 25th, 2010, 10:40 PM
Thanks Firas. I've been looking into this just yesterday. :D It really bothers me that anything from the repo that depended on ffmpeg tried to install libav* while I already have them.
Peace be with you.
Stoneface
June 27th, 2010, 02:13 PM
Doing the 10.04 ffmpeg + x264 tutorial on Ubuntu 10.10 Maverick:
me@ubuntu:/etc$ cat lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu maverick (development branch)" and get stuck in the end as it seems not to be able to find x264 even though I followed all steps:
me@ubuntu:~$ cd ffmpeg
me@ubuntu:~/ffmpeg$ ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
ERROR: libx264 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.log" produced by configure as this will help
solving the problem.
Read http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2009-June/021190.html and reading http://ubuntuforums.org/showthread.php?p=8818886 . Maybe user prefix should be added during x264 configuration?
Stoneface
June 27th, 2010, 02:39 PM
Found one error during the x264 installation:
~/x264$ sudo checkinstall --pkgname=libvpx --pkgversion="`date +%Y%m%d%k%M`-git" --backup=no --nodoc --default
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
*****************************************
**** Debian package creation selected ***
*****************************************
*** Warning: The package version "20100627 637-git" is not a
*** Warning: debian policy compliant one. Please specify an alternate one
This package will be built according to these values:
0 - Maintainer: [ root@ubuntu ]
1 - Summary: [ Package created with checkinstall 1.6.2 ]
2 - Name: [ libvpx ]
3 - Version: [ 0 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ x264 ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ libvpx ]
12 - Conflicts: [ ]
13 - Replaces: [ ]
Enter a number to change any of them or press ENTER to continue:
Installing with make install...
========================= Installation results ===========================
install -d /usr/local/bin
install -d /usr/local/include
install -d /usr/local/lib
install -d /usr/local/lib/pkgconfig
install: cannot change permissions of `/usr/local/lib/pkgconfig': No such file or directory
make: *** [install] Error 1
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
The culprit seems to be:
install: cannot change permissions of `/usr/local/lib/pkgconfig': No such file or directory So I did:
sudo mkdir /usr/local/lib/pkgconfig and tried to install x264 again and did so successfully. But I still got the same error installing ffmpeg: ERROR: libx264 not found:
~/ffmpeg$ ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
ERROR: libx264 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.log" produced by configure as this will help
solving the problem.
Cleaned all started all over again. added --prefix=/user to configuration of ffmpeg:
./configure --prefix=/usr --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
and that worked:
install prefix /usr
source path /home/me/ffmpeg
C compiler gcc
ARCH x86 (generic)
big-endian no
runtime cpu detection no
yasm yes
MMX enabled yes
MMX2 enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
CMOV enabled no
CMOV is fast no
EBX available yes
EBP available no
10 operands supported yes
debug symbols yes
strip symbols yes
optimizations yes
static yes
shared no
postprocessing support yes
new filter support yes
filters using lavformat no
network support yes
threading support pthreads
SDL support yes
Sun medialib support no
AVISynth enabled no
libdc1394 support no
libdirac enabled no
libfaac enabled yes
libgsm enabled no
libmp3lame enabled yes
libnut enabled no
libopencore-amrnb support yes
libopencore-amrwb support yes
libopenjpeg enabled no
librtmp enabled no
libschroedinger enabled no
libspeex enabled no
libtheora enabled yes
libvorbis enabled yes
libvpx enabled yes
libx264 enabled yes
libxvid enabled yes
zlib enabled yes
bzlib enabled no
Enabled decoders:
aac dxa mpegvideo
aasc eac3 msmpeg4v1
ac3 eacmv msmpeg4v2
adpcm_4xm eamad msmpeg4v3
adpcm_adx eatgq msrle
adpcm_ct eatgv msvideo1
adpcm_ea eatqi mszh
adpcm_ea_maxis_xa eightbps nellymoser
adpcm_ea_r1 eightsvx_exp nuv
adpcm_ea_r2 eightsvx_fib pam
----------- cut -----
License: nonfree and unredistributable
Creating config.mak and config.h...
Which did the trick for that particular step. then make (compiling) and installation went well
Bachstelze
June 27th, 2010, 02:48 PM
Also, --pkgversion="`date +%Y%m%d%k%M`-git" should be --pkgversion="`date +%Y%m%d%H%M`-git". Otherwise it inserts a space if the hour is < 10, which as the warning says makes a non-compliant version number.
mc4man
June 27th, 2010, 03:54 PM
checkinstall 1.6.2, (used now on maverick), has some issues as currently built, one is it can fail to create some dirs and or dir. tree's
(when doing totem-xine I needed to create several) - 1.6.1 doesn't have this issue
Mr_bleu
June 27th, 2010, 07:47 PM
Cannot read log file '/home/djr/video/dp.log-0.log' for pass-2 encoding: No such file or directory
Help. I've finally gotten ffmpeg running again and I get that error when I click convert using winff.
mc4man
June 27th, 2010, 11:23 PM
As far as Maverick - don't see any issues as mentioned in post 1076 with the exception of checkinstall 1.6.2 failing to create a dir. for x264 install. (/pkgconfig
All of the commands in post 1 are fine as is.
(note that Stoneface was using the checkinstall command for libvpx on x264 build -
There is no need to use a --prefix for ffmpeg, though certainly one could if desired.
(again noting libx264 was probably installed as libvpx initially, and would have caused ffmpeg config error
edit
bug report on ckinstall (https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163) if anyone wants to test and confirm
FakeOutdoorsman
June 28th, 2010, 12:39 AM
Just got back from a two week trip. Time to re-compile!
So, finally, here's how to make kosher ffmpeg packages. :)...
Thanks for posting this. Interesting stuff.
Also, --pkgversion="`date +%Y%m%d%k%M`-git" should be --pkgversion="`date +%Y%m%d%H%M`-git". Otherwise it inserts a space if the hour is < 10, which as the warning says makes a non-compliant version number.
Guide updated. I didn't know %k would create a space, but now I see that it does in the man page. %H makes more sense anyway.
Cannot read log file '/home/djr/video/dp.log-0.log' for pass-2 encoding: No such file or directory
Help. I've finally gotten ffmpeg running again and I get that error when I click convert using winff.
Which version of WinFF are you using and which preset did you choose?
bug report on ckinstall (https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163) if anyone wants to test and confirm
I have yet to even download Maverick, but I'll get it and try to confirm this.
qyot27
June 28th, 2010, 02:23 AM
Considering the checkinstall error relates to pkgconfig data getting installed, my gut impulse would be that the problem is simply that pkg-config itself isn't installed. x264 uses pkg-config to find ffmpeg and FFMS2 (which also uses pkg-config to find ffmpeg during its compile process).
Perhaps the problem is A) attempting to use a pre-packaged ffmpeg or FFMS without also installing pkg-config, A2) ffmpeg hasn't been completely purged (sudo apt-get purge ffmpeg, or Synaptic's 'Completely Remove' option) from the system before x264 gets compiled, resulting in pkgconfig erroring out, or B) x264 is trying to use pkg-config by default, and something concerning the lack of said package is causing the error.
If the above is indeed true, it's easily resolved:
sudo apt-get install pkg-config
Should be all that's required to fix it. Also remembering to always use sudo apt-get purge for uninstalling apps instead of sudo apt-get remove, since remove leaves configuration files behind and purge doesn't.
Mr_bleu
June 28th, 2010, 02:49 AM
Just got back from a two week trip. Time to re-compile!
Thanks for posting this. Interesting stuff.
Guide updated. I didn't know %k would create a space, but now I see that it does in the man page. %H makes more sense anyway.
Which version of WinFF are you using and which preset did you choose?
I have yet to even download Maverick, but I'll get it and try to confirm this.
version 1.2 according to help. I've tried ipod, psp, and mp4 presets.
FakeOutdoorsman
June 28th, 2010, 03:12 AM
install: cannot change permissions of `/usr/local/lib/pkgconfig': No such file or directory
You can avoid this error by adding --fstrans=no to your x264 checkinstall line on Ubuntu Maverick Meerkat 10.10 (or at least on Alpha 1). This was also required on an earlier Ubuntu version (either Jaunty or Intrepid).
mc4man
June 28th, 2010, 03:15 AM
Considering the checkinstall error relates to pkgconfig data getting installed, ...
Actually it's a pkgconfig dir. being created in /urs/local/lib, but as previously mentioned it happens with other dir/subdir as well with other builds.
(not all though, I've seen it create some.
If one had built to /usr/local previously and had a pkgconfig dir previously created then it wouldn't come up.
(pkg-config is part of the default install
You can avoid this error by adding --fstrans=no to your checkinstall lines on Ubuntu Maverick Meerkat 10.10 (or at least on Alpha 1). This was also required on an earlier Ubuntu version (either Jaunty or Intrepid).
I guess I'll have to go back to that ...
Tested on another build with half a dozen errors - fixed as well.
What is a bit of a pita is the config output for ffmpeg - started a ways back for shared builds - from maverick
ubuntu@ubuntu:~$ ffmpeg
FFmpeg version 0.6-4:0.6-1ubuntu1, Copyright (c) 2000-2010 the FFmpeg developers
built on Jun 22 2010 18:44:51 with gcc 4.4.4
configuration: --extra-version=4:0.6-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
libavutil configuration: --extra-version=4:0.6-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
ect
ect
ect.
repeated for all shared libs
Maybe there's a way to clean that up
FakeOutdoorsman
June 28th, 2010, 04:08 AM
version 1.2 according to help. I've tried ipod, psp, and mp4 presets.
I installed WinFF 1.2 on Lucid, but I don't see any PSP or MP4 presets. The iPod presets I did see however are archaic and did not work for FFmpeg SVN:
[NULL @ 0x1ad6460] [Eval @ 0x7fffcd45bab0] Invalid chars 'b' at the end of expression '112kb'
[NULL @ 0x1ad6460] Unable to parse option value "112kb"
Invalid value '112kb' for option 'ab'
In this case, the b is superfluous and 112kb in the preset should be changed to 112k.
I'm not very familiar with WinFF. Perhaps a new thread on this issue will receive a better answer.
qyot27
June 28th, 2010, 05:20 AM
Actually it's a pkgconfig dir. being created in /urs/local/lib, but as previously mentioned it happens with other dir/subdir as well with other builds.
Yes, that's the normal behavior. The pkgconfig directory is created in the prefix's /lib directory, and the relevant data is then copied there. It happens when using custom prefixes as well (such as the case for the stripped-down ffmpeg recommended for FFMS2 compilation, since users shouldn't install such a crippled version to system; it's why I use $HOME/ffms2_build as a staging area).
(pkg-config is part of the default install
Strange, I distinctly remember having to install it from the repos myself.
mc4man
June 28th, 2010, 06:09 AM
Strange, I distinctly remember having to install it from the repos myself.
Maybe in an older install - never paid much mind.
Due to temp unavailability of my desktop maverick install am using a live cd this weekend - from a fresh boot -
ubuntu@ubuntu:~$ sudo apt-get remove pkg-config
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
gstreamer0.10-plugins-base-apps gstreamer0.10-tools pkg-config
ubuntu-desktop
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 614kB disk space will be freed.
Locke_99GS
June 28th, 2010, 12:57 PM
gcc -o x264 x264.o input/timecode.o input/yuv.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o input/thread.o libx264.a -lm -lpthread -s
/usr/bin/ld.bfd.real: libx264.a(cabac-a.o): relocation R_X86_64_32 against `x264_cabac_range_lps' can not be used when making a shared object; recompile with -fPIC
libx264.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [x264] Error 1
Hmmm. I wonder what I did that caused x264 to fail all of a sudden. Has been failing for me for a few revisions.
anafshalom
June 28th, 2010, 03:21 PM
FFmpeg is a versatile tool to encode and decode a multitude of video and audio formats. x264 encodes high-quality video superior to other popular encoders.
Although FFmpeg and x264 are available in the Ubuntu repositories, you may need to compile from source. For example, the ffmpeg-user mailing list (http://lists.mplayerhq.hu/pipermail/ffmpeg-user/) requires that you use the latest FFmpeg before asking for help. You may also like to have the bleeding-edge for encoding videos. Also, FFmpeg in the Ubuntu repository may not support necessary encoders, decoders, and formats.
Note: Those who are uncomfortable compiling can still enable restricted encoders in the repository FFmpeg:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
Choose your Ubuntu
0.The instructions on the page are for Ubuntu Lucid Lynx 10.04. Separate instructions are also available for older releases:
Install FFmpeg and x264 on Ubuntu Karmic Koala 9.10 (http://ubuntuforums.org/showpost.php?p=9114176&postcount=967)
Install FFmpeg and x264 on Ubuntu Jaunty Jackalope 9.04 (http://ubuntuforums.org/showpost.php?p=8345112&postcount=636)
Install FFmpeg and x264 on Ubuntu Intrepid Ibex 8.10 (http://ubuntuforums.org/showpost.php?p=8345112&postcount=636)
Install FFmpeg and x264 on Ubuntu Hardy Heron 8.04 LTS (http://ubuntuforums.org/showpost.php?p=6963607&postcount=360)
Install FFmpeg and x264 on Ubuntu Dapper Drake 6.06 LTS (http://ubuntuforums.org/showpost.php?p=6566863&postcount=287) (unsupported)
Install 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 subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
Install x264
3. Get the most current source files, compile, and install. You can run "./configure --help" to see what additional features you can enable/disable. Daily source tarballs (ftp://ftp.videolan.org/pub/videolan/x264/snapshots/) are also available, and forum member Bachstelze (http://ubuntuforums.org/member.php?u=51114) provides x264 Ubuntu packages (ftp://iori.fkraiem.org/pub/x264/) for anyone who doesn't want to compile.
cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default
Note: Ubuntu Maverick Meerkat 10.10 users will have to add --fstrans=no to the above checkinstall line.
Install libvpx (optional)
5. This is used to encode and decode VP8 video. If you skip this, remove --enable-libvpx from step 6.
cd
git clone git://review.webmproject.org/libvpx.git
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="`date +%Y%m%d%H%M`-git" --backup=no --nodoc --default
Install FFmpeg
6. Get the most current source files from the official FFmpeg SVN, compile, and install. Run "./configure --help" to see what features you can enable/disable. Nightly FFmpeg snapshots (http://ffmpeg.mplayerhq.hu/releases/ffmpeg-checkout-snapshot.tar.bz2) are also available.
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`svn info | grep Revision | awk '{ print $NF }'`" --backup=no --default
hash x264 ffmpeg ffplay
Install qt-faststart (optional)
7. This is a useful tool included with FFmpeg that rearranges a file with H.264 video, "such that the moov atom is in front of the data, thus facilitating network streaming". Basically, it allows web movies to start playing before they are completely downloaded. Usage: qt-faststart input.foo output.foo.
cd ~/ffmpeg
make tools/qt-faststart
sudo checkinstall --pkgname=qt-faststart --pkgversion "4:SVN-r`svn info | grep Revision | awk '{ print $NF }'`" --backup=no --default install -D -m755 tools/qt-faststart /usr/local/bin/qt-faststart
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 FFmpeg and x264 below for more details.
Using FFmpeg and x264
The easiest method for high quality video encoding is by using the libx264 presets that are included with FFmpeg. I recommend reading the FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/) before trying these presets so you have a better idea of what to use. You can add options such as frame size (for example: -s 640x480) or tweak my examples to customize your encode. You can see a current list of all libx264 presets (http://git.ffmpeg.org/?p=ffmpeg;a=tree;f=ffpresets) (such as ipod or lossless) or after installation look in the /usr/local/share/ffmpeg directory.
One-pass CRF (Constant Rate Factor) using the slow preset. One-pass CRF is good for general encoding and is what I use most often. Adjust -crf to change the quality. Lower numbers mean higher quality and a larger output file size. A sane range is 18 to 28.
ffmpeg -i input.avi -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mp4
Two-Pass encode using the fast presets. Two-pass encoding is used when you are targeting a specific bitrate and/or final output file size:
ffmpeg -i input.avi -pass 1 -vcodec libx264 -vpre fast_firstpass -b 512k -bt 512k -threads 0 -f rawvideo -an -y /dev/null && ffmpeg -i input.avi -pass 2 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre fast -b 512k -bt 512k -threads 0 output.mp4
iPod 640x480 using the slow and ipod640 presets:
ffmpeg -i input.avi -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -vpre ipod640 -crf 26 -threads 0 output.mp4
Updating FFmpeg and x264
Development of FFmpeg and x264 is active and an occasional update can give you new features and bug fixes. To update FFmpeg and x264 you will need to remove the packages, make distclean, update the source, recompile, and install. To update x264:
sudo apt-get remove ffmpeg x264 libx264-dev
cd ~/x264
make distclean
git pull
Now compile x264 as shown earlier in the guide starting with the x264 ./configure line. Now FFmpeg:
cd ~/ffmpeg
make distclean
svn update
Now continue with the installation starting with the FFmpeg ./configure line.
Reverting Changes Made by This Guide
To remove FFmpeg/x264 and other packages added for this guide:
sudo apt-get remove x264 ffmpeg qt-faststart build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
Lastly, delete the ffmpeg and x264 directories in your home folder.
Additional Resources
HOWTO: Proper Screencasting on Linux (http://ubuntuforums.org/showthread.php?t=1392026)
x264-ffmpeg-up-to-date (http://code.google.com/p/x264-ffmpeg-up-to-date/) - bash script to update x264 and ffmpeg
FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/)
x264 - a free h264/avc encoder (http://www.videolan.org/developers/x264.html)
x264 changelog (http://mirror01.x264.nl/x264/changelog.txt)
FFmpeg.org (http://ffmpeg.org/)
FFmpeg revision log (http://git.ffmpeg.org/?p=ffmpeg;a=summary)
If You Need Help
Feel free to ask your questions here and I'll try to answer you. Helpful information includes your Ubuntu version, names of any third-party repositories or PPA (https://help.launchpad.net/Packaging/PPA)s you are using, FFmpeg command, and the complete FFmpeg output if applicable.
Recent Tutorial Updates
2010-06-27: Changed libvpx pkgversion as suggested by Bachstelze in thread #1077 (http://ubuntuforums.org/showpost.php?p=9517087&postcount=1077).
2010-06-20: Removed libfaad-dev as dependency. Not used by FFmpeg now that the native AAC decoder can support HE-AAC v2.
2010-06-10: Added libvpx support for Lucid version of this guide.
Is there a way to do a batch of files with one input command?
Reuven
prupert
June 28th, 2010, 04:00 PM
Is there a way to do a batch of files with one input command?
Reuven
Are you any good at bash? Since that is the easiest way to do it.
This is how I do it. Create two files, once called trans.sh and one called ffmpeg.sh.
In trans.sh put the following:
#!/bin/bash
echo trans started on `date "+%m/%d/%y %l:%M:%S %p"` > ~/trans.log
find /path/to/your/videos -name "*.$1" -exec ~/ffmpeg.sh "{}" \;
echo ffmpeg stopped on `date "+%m/%d/%y %l:%M:%S %p"` >> ~/trans.log
Then in ffmpeg.sh put the following:
#!/bin/bash
#CUSTOMISE THE FOLLOWING
#change the ffmpeg command here to whatever you want, keeping "$1" as your input and output file names
#FYI this command seems to produce fairly decent files from .mpg transport streams recorded from MythTV
trans() {
ffmpeg -deinterlace -y -i "$1" -vcodec libx264 -level 41 -vpre normal -crf 24 -threads 0 -sn -acodec libfaac -ab 128k -ac 2 -ar 48000 -vsync 1 -async 1000 -map 0.0:0.0 -map 0.1:0.1 "$1".mkv
}
echo conversion of "$1" started on `date "+%m/%d/%y %l:%M:%S %p"` > ~/trans.log
#call the conversion and fork it
trans "$1" &>> ~/ffmpeg.log &
#get the PID of the conversion
pid=$!
echo "ffmpeg PID = $pid" >> ~/trans.log
echo "ffmpeg PID = $pid"
#this is a simple progress indicator
while ps |grep $pid &>/dev/null; do
echo -n "."
echo -en "\b-"
sleep 1
echo -en "\b\\"
sleep 1
echo -en "\b|"
sleep 1
echo -en "\b/"
sleep 1
done
echo ffmpeg stopped on `date "+%m/%d/%y %l:%M:%S %p"` >> ~/trans.log
exit
Save both these files in your home folder and make them executable. You can do this from the command line:
chmod a+x ffmpeg.sh trans.sh
Edit trans.sh where is says "/path/to/your/videos" and put in the path to your folder full of video files. Edit ffmpeg.sh to use the ffmpeg command you want to use, make sure that you keep "trans() {" before the comand and "}" after it as in my example. Also, make sure you keep "$1" as your input filename and "$1".mkv as your output filename, but change the extension if you want.
Then, finally, to convert the files. Put all the files you want to convert in a folder. Then, to run all this, open a Terminal window and type:
./trans.sh MPG
Replace MPG with the file extension of the video files you are converting. It should then go off and do it's thing, with a little progress bar that shows you something is happening (it doesn't give an ETA of the file conversion, since that is such a b!tch to get right).
This is probobly all far too complicated there are easy ways of doing it. Such as:
find /path/to/your/videos -name "*.MPG" -exec ~/ffmpeg -deinterlace -y -i "{}" -vcodec libx264 -level 41 -vpre normal -crf 24 -threads 0 -sn -acodec libfaac -ab 128k -ac 2 -ar 48000 -vsync 1 -async 1000 -map 0.0:0.0 -map 0.1:0.1 "{}".mkv \;
Typing all that into one line of a command line will search for all .MPG files in /path/to/your/videos and convert them using the FFmpeg command as written.
anafshalom
June 28th, 2010, 04:58 PM
Are you any good at bash? Since that is the easiest way to do it.
This is how I do it. Create two files, once called trans.sh and one called ffmpeg.sh.
In trans.sh put the following:
#!/bin/bash
echo trans started on `date "+%m/%d/%y %l:%M:%S %p"` > ~/trans.log
find /path/to/your/videos -name "*.$1" -exec ~/ffmpeg.sh "{}" \;
echo ffmpeg stopped on `date "+%m/%d/%y %l:%M:%S %p"` >> ~/trans.log
Then in ffmpeg.sh put the following:
#!/bin/bash
#CUSTOMISE THE FOLLOWING
#change the ffmpeg command here to whatever you want, keeping "$1" as your input and output file names
#FYI this command seems to produce fairly decent files from .mpg transport streams recorded from MythTV
trans() {
ffmpeg -deinterlace -y -i "$1" -vcodec libx264 -level 41 -vpre normal -crf 24 -threads 0 -sn -acodec libfaac -ab 128k -ac 2 -ar 48000 -vsync 1 -async 1000 -map 0.0:0.0 -map 0.1:0.1 "$1".mkv
}
echo conversion of "$1" started on `date "+%m/%d/%y %l:%M:%S %p"` > ~/trans.log
#call the conversion and fork it
trans "$1" &>> ~/ffmpeg.log &
#get the PID of the conversion
pid=$!
echo "ffmpeg PID = $pid" >> ~/trans.log
echo "ffmpeg PID = $pid"
#this is a simple progress indicator
while ps |grep $pid &>/dev/null; do
echo -n "."
echo -en "\b-"
sleep 1
echo -en "\b\\"
sleep 1
echo -en "\b|"
sleep 1
echo -en "\b/"
sleep 1
done
echo ffmpeg stopped on `date "+%m/%d/%y %l:%M:%S %p"` >> ~/trans.log
exit
Save both these files in your home folder and make them executable. You can do this from the command line:
chmod a+x ffmpeg.sh trans.sh
Edit trans.sh where is says "/path/to/your/videos" and put in the path to your folder full of video files. Edit ffmpeg.sh to use the ffmpeg command you want to use, make sure that you keep "trans() {" before the comand and "}" after it as in my example. Also, make sure you keep "$1" as your input filename and "$1".mkv as your output filename, but change the extension if you want.
Then, finally, to convert the files. Put all the files you want to convert in a folder. Then, to run all this, open a Terminal window and type:
./trans.sh MPG
Replace MPG with the file extension of the video files you are converting. It should then go off and do it's thing, with a little progress bar that shows you something is happening (it doesn't give an ETA of the file conversion, since that is such a b!tch to get right).
This is probobly all far too complicated there are easy ways of doing it. Such as:
find /path/to/your/videos -name "*.MPG" -exec ~/ffmpeg -deinterlace -y -i "{}" -vcodec libx264 -level 41 -vpre normal -crf 24 -threads 0 -sn -acodec libfaac -ab 128k -ac 2 -ar 48000 -vsync 1 -async 1000 -map 0.0:0.0 -map 0.1:0.1 "{}".mkv \;
Typing all that into one line of a command line will search for all .MPG files in /path/to/your/videos and convert them using the FFmpeg command as written.
I've never used bash, but I'll give it a try when I have a chance.
Thanks
FakeOutdoorsman
June 29th, 2010, 01:02 AM
gcc -o x264 x264.o input/timecode.o input/yuv.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o input/thread.o libx264.a -lm -lpthread -s
/usr/bin/ld.bfd.real: libx264.a(cabac-a.o): relocation R_X86_64_32 against `x264_cabac_range_lps' can not be used when making a shared object; recompile with -fPIC
libx264.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [x264] Error 1
Hmmm. I wonder what I did that caused x264 to fail all of a sudden. Has been failing for me for a few revisions.
I just compiled x264 on x86_64 Ubuntu Lucid with no problems. Did you follow the guide word-for-word, or did you customize it at all? Did you forget to make distclean as shown in the Updating FFmpeg and x264 section of this guide? What version of Ubuntu are you using?
EkoBR
June 29th, 2010, 01:36 AM
[ 74%] Building CXX object src/highgui/CMakeFiles/highgui.dir/grfmt_imageio.o
Linking CXX shared library ../../lib/libhighgui.so
/usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32S against `av_destruct_packet_nofree' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: ** [lib/libhighgui.so.2.1.0] Erro 1
make[1]: ** [src/highgui/CMakeFiles/highgui.dir/all] Erro 2
make: ** [all] Erro 2
:confused:
FakeOutdoorsman
June 29th, 2010, 01:51 AM
[ 74%] Building CXX object src/highgui/CMakeFiles/highgui.dir/grfmt_imageio.o
Linking CXX shared library ../../lib/libhighgui.so
/usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32S against `av_destruct_packet_nofree' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: ** [lib/libhighgui.so.2.1.0] Erro 1
make[1]: ** [src/highgui/CMakeFiles/highgui.dir/all] Erro 2
make: ** [all] Erro 2
:confused:
I can not duplicate this on Lucid. What step of the installation process did this error occur? Did you follow the guide word-for-word, or did you customize it at all? What version of Ubuntu are you using?
Update: Lots of guess work here and little information to work from. Is this an OpenCV error? I know nothing of OpenCV. Please create a new thread if this is for OpenCV as it is outside of the scope of this guide.
EkoBR
June 29th, 2010, 02:53 AM
I can not duplicate this on Lucid. What step of the installation process did this error occur? Did you follow the guide word-for-word, or did you customize it at all? What version of Ubuntu are you using?
Update: Lots of guess work here and little information to work from. Is this an OpenCV error? I know nothing of OpenCV. Please create a new thread if this is for OpenCV as it is outside of the scope of this guide.
Ubuntu 10.04
But yes, is an OpenCV compilation error.
I will search a correct thread, Thanks.
Update: Now I try compile ffmpeg with --enable-shared and...
LD libavcodec/libavcodec.so.52
/usr/bin/ld: /usr/local/lib/libvpx.a(vpx_codec.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libvpx.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: ** [libavcodec/libavcodec.so.52] Erro 1
How I compile with -fPIC ??
qyot27
June 29th, 2010, 07:38 AM
Ubuntu 10.04
But yes, is an OpenCV compilation error.
I will search a correct thread, Thanks.
Update: Now I try compile ffmpeg with --enable-shared and...
LD libavcodec/libavcodec.so.52
/usr/bin/ld: /usr/local/lib/libvpx.a(vpx_codec.c.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libvpx.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: ** [libavcodec/libavcodec.so.52] Erro 1
How I compile with -fPIC ??
--enable-pic
You'll probably need to use it on libvpx, and ffmpeg. And x264, et al. According to the Gentoo Wiki (http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3) at least, on AMD64 all shared builds must be position independent, meaning they have to use the --enable-pic option (or equivalent, since parameters can differ).
Locke_99GS
June 29th, 2010, 01:42 PM
I just compiled x264 on x86_64 Ubuntu Lucid with no problems. Did you follow the guide word-for-word, or did you customize it at all? Did you forget to make distclean as shown in the Updating FFmpeg and x264 section of this guide? What version of Ubuntu are you using?
Ubuntu Lucid 64bit.
I did make distclean, and everything is according to the first post here. I compiled it successfully several times before, but hasn't been compiling for a couple weeks for me.
I do have my CFLAGS as "-O3 -pipe -fomit-frame-pointer", which may be different than many, and I acknowledge that I'd be more likely to get errors this way, but these have been my CFLAGS for years and ffmpeg, vpx, and x264 compiled successfully with these cflags previously. I will change my cflags to "-O2" and see if recent code changes aren't playing well with my current CFLAGS.
dannyboy79
June 29th, 2010, 07:20 PM
Are you any good at bash? Since that is the easiest way to do it.
This is how I do it. Create two files, once called trans.sh and one called ffmpeg.sh.
In trans.sh put the following:
#!/bin/bash
echo trans started on `date "+%m/%d/%y %l:%M:%S %p"` > ~/trans.log
find /path/to/your/videos -name "*.$1" -exec ~/ffmpeg.sh "{}" \;
echo ffmpeg stopped on `date "+%m/%d/%y %l:%M:%S %p"` >> ~/trans.log
Then in ffmpeg.sh put the following:
#!/bin/bash
#CUSTOMISE THE FOLLOWING
#change the ffmpeg command here to whatever you want, keeping "$1" as your input and output file names
#FYI this command seems to produce fairly decent files from .mpg transport streams recorded from MythTV
trans() {
ffmpeg -deinterlace -y -i "$1" -vcodec libx264 -level 41 -vpre normal -crf 24 -threads 0 -sn -acodec libfaac -ab 128k -ac 2 -ar 48000 -vsync 1 -async 1000 -map 0.0:0.0 -map 0.1:0.1 "$1".mkv
}
echo conversion of "$1" started on `date "+%m/%d/%y %l:%M:%S %p"` > ~/trans.log
#call the conversion and fork it
trans "$1" &>> ~/ffmpeg.log &
#get the PID of the conversion
pid=$!
echo "ffmpeg PID = $pid" >> ~/trans.log
echo "ffmpeg PID = $pid"
#this is a simple progress indicator
while ps |grep $pid &>/dev/null; do
echo -n "."
echo -en "\b-"
sleep 1
echo -en "\b\\"
sleep 1
echo -en "\b|"
sleep 1
echo -en "\b/"
sleep 1
done
echo ffmpeg stopped on `date "+%m/%d/%y %l:%M:%S %p"` >> ~/trans.log
exit
Save both these files in your home folder and make them executable. You can do this from the command line:
chmod a+x ffmpeg.sh trans.sh
Edit trans.sh where is says "/path/to/your/videos" and put in the path to your folder full of video files. Edit ffmpeg.sh to use the ffmpeg command you want to use, make sure that you keep "trans() {" before the comand and "}" after it as in my example. Also, make sure you keep "$1" as your input filename and "$1".mkv as your output filename, but change the extension if you want.
Then, finally, to convert the files. Put all the files you want to convert in a folder. Then, to run all this, open a Terminal window and type:
./trans.sh MPG
Replace MPG with the file extension of the video files you are converting. It should then go off and do it's thing, with a little progress bar that shows you something is happening (it doesn't give an ETA of the file conversion, since that is such a b!tch to get right).
This is probobly all far too complicated there are easy ways of doing it. Such as:
find /path/to/your/videos -name "*.MPG" -exec ~/ffmpeg -deinterlace -y -i "{}" -vcodec libx264 -level 41 -vpre normal -crf 24 -threads 0 -sn -acodec libfaac -ab 128k -ac 2 -ar 48000 -vsync 1 -async 1000 -map 0.0:0.0 -map 0.1:0.1 "{}".mkv \;
Typing all that into one line of a command line will search for all .MPG files in /path/to/your/videos and convert them using the FFmpeg command as written.
would this command follow symlinks? i use mythrename.pl to make symlinks in human readable form to watch my recordings original xbox with xbmc prior to xbmc having the myth protocol. i'd like to use the symlinks cause i only wanna try to transcode some of my shows instead of all .mpg's. so instead of using "*.MPG", could i use something like "It's*.MPG" which would only transcode my it's always sunny in philedelphia shows? looking to save some space on the server so i want to transcode them down smaller. not to mention, xbox 360 can't play the mpgs that i am sharing from linux using ushare but it can see the avi file, so maybe i could use avi container with xvid and mp3 audio like my other avi movies that xbox 360 can play. thoughts?
braddjwinter
July 2nd, 2010, 10:38 PM
is there a reason why the "Install libvpx (optional)" instructions aren't in the Karmic Koala guide?
FakeOutdoorsman
July 2nd, 2010, 11:06 PM
is there a reason why the "Install libvpx (optional)" instructions aren't in the Karmic Koala guide?
Not a good reason. I meant to add it to Karmic after adding it to Lucid, but it's almost been a month already. I'll test it on Karmic now and add it shortly.
Update: libvpx added to Karmic. Installed successfully on a 32-bit VM.
papapep
July 3rd, 2010, 01:05 AM
What an awesome tutorial, thanks a lot!
Chame_Wizard
July 3rd, 2010, 01:34 AM
sudo aptitude ffmpeg ffmpeg-dbg
Always doing it.:lolflag:
sailor420
July 3rd, 2010, 05:32 PM
I'm getting the following error when compiling ffmpeg:
/home/ravenel/source/ffmpeg/libavformat/libavformat.a(id3v2.o): In function `read_ttag':
/home/ravenel/source/ffmpeg/libavformat/id3v2.c:142: undefined reference to `ff_id3v1_genre_str'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
Any ideas?
FYI, here are the configuration options I passed:
./configure --enable-pthreads --enable-gpl --enable-postproc --enable-memalign-hack --enable-runtime-cpudetect --disable-devices --disable-filters --disable-encoders --disable-muxers --disable-network --disable-outdevs --disable-decoder=aac,ac3,adpcm_*,alac,als,ape,atrac?,cook,d ca,dsicinaudio,dxa,eac3,flac,interplay_dpcm,mlp,mp 1,mp2,mp3,mp3*,mpc?,pcm_*,qcelp,ra_*,sipr,truehd,t ruespeech,tta,vorbis,wavpack,wma*,twinvq --disable-demuxer=aac,ac3,pcm_*,ape,amr,***,au,avs,dts,eac3, flac,mp3,mpc,mpc8,truehd,tta,w64,wav,wv --disable-parser=aac,ac3,dca,mlp,mpegaudio
sailor420
July 3rd, 2010, 07:37 PM
Apparently this is due to a bug in ffmpeg. I retried using source from 6/1 (just a date I picked), and it worked fine.
FakeOutdoorsman
July 3rd, 2010, 09:33 PM
FYI, here are the configuration options I passed:
./configure --enable-pthreads --enable-gpl --enable-postproc --enable-memalign-hack --enable-runtime-cpudetect --disable-devices --disable-filters --disable-encoders --disable-muxers --disable-network --disable-outdevs --disable-decoder=aac,ac3,adpcm_*,alac,als,ape,atrac?,cook,d ca,dsicinaudio,dxa,eac3,flac,interplay_dpcm,mlp,mp 1,mp2,mp3,mp3*,mpc?,pcm_*,qcelp,ra_*,sipr,truehd,t ruespeech,tta,vorbis,wavpack,wma*,twinvq --disable-demuxer=aac,ac3,pcm_*,ape,amr,***,au,avs,dts,eac3, flac,mp3,mpc,mpc8,truehd,tta,w64,wav,wv --disable-parser=aac,ac3,dca,mlp,mpegaudio
I'm curious as to why you are disabling so many options. Have you tried the --disable-everything option? You can use that and then follow it with whatever --enable-foo that you want. Might make your ./configure a little smaller and easier to read.
Apparently this is due to a bug in ffmpeg. I retried using source from 6/1 (just a date I picked), and it worked fine.
r24030 using both the ./configure from the guide and your ./configure compiled fine for me on x86_64 Lucid.
This happens once in a while when compiling FFmpeg SVN. Occasionally a revision will break something, but it is rare when a fix doesn't come quickly. Last time I let the developers in the #ffmpeg-devel IRC channel know that the most recent revision failed to make it was fixed very quickly.
Update: You probably don't need --enable-memalign-hack unless you're cross-compiling for Windows.
sailor420
July 4th, 2010, 03:07 PM
Thanks! I was following a guide from MakeMKV which suggested those options: http://www.makemkv.com/forum2/viewtopic.php?f=6&t=1313&start=0
I talked with the author of that guide, and he found a way to get it running--notably by doing just as you suggested and running --disable-all and then just enabling the things we needed.
Thanks for the informative response, much appreciated. Great guide!
sailor420
July 4th, 2010, 03:08 PM
Updating FFmpeg and x264
Development of FFmpeg and x264 is active and an occasional update can give you new features and bug fixes. To update FFmpeg and x264 you will need to remove the packages, make distclean, update the source, recompile, and install. To update x264:
sudo apt-get remove ffmpeg x264 libx264-dev
cd ~/x264
make distclean
git pull
Now compile x264 as shown earlier in the guide starting with the x264 ./configure line. Now FFmpeg:
cd ~/ffmpeg
make distclean
svn update
Now continue with the installation starting with the FFmpeg ./configure line.
Reverting Changes Made by This Guide
To remove FFmpeg/x264 and other packages added for this guide:
sudo apt-get remove x264 ffmpeg qt-faststart build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
Lastly, delete the ffmpeg and x264 directories in your home folder.
Many thanks for including this bit. So many guide neglect upgrade and removal instructions, so it's great to see it included. Great guide!
leonidv
July 4th, 2010, 07:35 PM
It's better to add zero step:
LC_LANG="en_US.utf8"
because output of svn info is locale sensitive.
Stoneface
July 5th, 2010, 02:00 PM
Just did a test run converting a .ogv (recordMyDesktop file) to a mp4 using ffmpeg (built using this threads tutorial).
$ ffmpeg -i all-in-one-seo-img-2.ogv -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mp4
I must say it went very well and quality seems to be good. Any tips or remarks on the way I converted this file?
FakeOutdoorsman
July 5th, 2010, 10:13 PM
It's better to add zero step:
LC_LANG="en_US.utf8"
because output of svn info is locale sensitive.
Thanks. I didn't know this and will look into it. What happens when a non-en_US.utf8 locale is used and LC_LANG="en_US.utf8" is not set?
Just did a test run converting a .ogv (recordMyDesktop file) to a mp4 using ffmpeg (built using this threads tutorial).
$ ffmpeg -i all-in-one-seo-img-2.ogv -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mp4
I must say it went very well and quality seems to be good. Any tips or remarks on the way I converted this file?
Looks good to me, but it depends on what your output is for (portable device, upload to video site, playing on computer, etc). Other things you can try:
Record your next screencast with this guide: HOWTO: Proper Screencasting on Linux (http://ubuntuforums.org/showthread.php?t=1392026). It's a great guide and will probably provide a better quality output than anything from recordMyDesktop.
Encode your audio with neroAacEnc. Many people claim it's a better encoder than libfaac. Example:
ffmpeg -i input.foo -f wav - | neroAacEnc -ignorelength -if - -of audio.mp4
ffmpeg -i input.foo -i audio.mp4 -vcodec copy -acodec copy -map 0:0 -map 1:0 output-combined.mkv
Or simply copy the audio from the original and throw it into a MKV container which handles just about anything:
ffmpeg -i input.foo -acodec copy -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mkv
Or use -aq instead of -ab, such as -aq 100 (the -aq values vary between encoders). From faac --long-help:
Set default variable bitrate (VBR) quantizer quality in percent. (default: 100, averages at approx. 120 kbps VBR for a normal stereo input file with 16 bit and 44.1 kHz sample rate; max. value 500, min. 10).
Try other -vpre presets and change -crf. Increase the CRF value until it reaches an unacceptable quality, and then use the previous value. Add -t 30 to your command to encode just 30 seconds for a test clip that may give you a general idea of how things can look without needing to encode the whole video.
Bachstelze
July 6th, 2010, 05:59 AM
Thanks. I didn't know this and will look into it. What happens when a non-en_US.utf8 locale is used and LC_LANG="en_US.utf8" is not set?
Absolutely nothing, because the output of svn info generally contains only ASCII characters. And most users will have an UTF-8 locale anyway.
leonidv
July 6th, 2010, 06:16 AM
Thanks. I didn't know this and will look into it. What happens when a non-en_US.utf8 locale is used and LC_LANG="en_US.utf8" is not set?
Here are my default svn info output (ru_RU.UTF-8):
<09:12:34> ffmpeg: locale
LANG=ru_RU.utf8
<..skipped...>
<09:12:34> ffmpeg: svn info
Путь: '.'
URL: svn://svn.ffmpeg.org/ffmpeg/trunk
Корень репозитория: svn://svn.ffmpeg.org/ffmpeg
UUID репозитория: 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
Редакция: 24040
Вид узла: каталог
Задано: нормально
Автор последнего изменения: ramiro
Редакция последнего изменения: 24040
Дата последнего изменения: 2010-07-04 21:24:57 +0400 (Вск, 04 Июл 2010)
So,
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`svn info | grep Revision | awk '{ print $NF }'`" --backup=no --default
doesn't work.
leonidv
July 6th, 2010, 06:18 AM
Absolutely nothing, because the output of svn info generally contains only ASCII characters. And most users will have an UTF-8 locale anyway.
UTF-8 is not locale :)
Bachstelze
July 6th, 2010, 07:10 AM
UTF-8 is not locale :)
That's why I said "an UTF-8 locale". I admit I didn't test for exotic locales, though... Anyway, better use C than en_US then, not everyone might have it installed.
flyone
July 10th, 2010, 02:05 PM
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
Hello i got the same problem... change "grep Revision" to "grep Révision"... because we are french we have somme anoying accent...
sorry for my poor english ;)
nothingspecial
July 10th, 2010, 11:56 PM
Do you happen to know how to do this easily on a minimal install without it wanting to pull X in?
Full ffmpeg, no X?
leonidv
July 11th, 2010, 08:22 AM
Hello i got the same problem... change "grep Revision" to "grep Révision"... because we are french we have somme anoying accent...
sorry for my poor english ;)
You can do it before compiling:
http://ubuntuforums.org/showpost.php?p=9547239&postcount=1109
Then all svn messages will be in English.
andrew.46
July 11th, 2010, 10:45 AM
Hi flyone,
Hello i got the same problem... change "grep Revision" to "grep Révision"... because we are french we have somme anoying accent...
I love fiddling with these things:
svn info | sed '5!d' | awk '{ print $NF }'
Would always work unless the number of lines changed, reasonably unlikely... A variation:
svn info | sed -e '5!d' -e 's/^.\{10\}//'
Andrew
Tom Dignan
July 12th, 2010, 12:15 AM
Wow, thanks for making what would otherwise have been a formidable task quite easy. I did have install libopencore-amrnb-dev, which isn't listed in your post as a dependency.
Nom du Clavier
July 12th, 2010, 12:40 AM
hi. i need to convert avi to Sony PSP, 480x272, h264, high quality if possible
i found this on ffmpeg FAQ and edit it.
however, i cant get it to work. what should be the correct command? thanks.
According to mencoder (http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-handheld-psp.html)'s docs:
mencoder -ofps 30000/1001 -af lavcresample=24000 -vf harddup -oac lavc \
-ovc lavc -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=libfaac \
-of lavf -lavfopts format=psp \
/home/ubuntu/Desktop/Shrek.avi -o /home/ubuntu/Desktop/Shrek.mp4
Also, you don't need to use sudo in front of ffmpeg in the command you gave. It doesn't need to be run as the root user.
mc4man
July 12th, 2010, 01:22 AM
So, finally, here's how to make kosher ffmpeg packages.....
For those that wish to try/use (post #1068. pg. 107), tried a quick run thru and it works quite well.
Though faad should still be removed from debian/confflags
(# there is no libfaad in ubuntu/main, on in ubuntu/multiverse
gpl_confflags += $(call cond_enable,/usr/include/faad.h,libfaad
If using at some point on maverick I'd probably move the line in blue from the libavcodec52.install file to the ffmpeg.install file to avoid an overwrite issue if upgrading to the new packages
usr/lib/{,*/,*/*/}libavcodec.so.*
usr/share/ffmpeg/*.ffpreset
( was fairly straightforward to adapt the .diff used here to produce extra versions instead, but only a very few apps require them and it's probably easier to just edit the control file in the <app>.deb before installing to accept a non extra name
FakeOutdoorsman
July 12th, 2010, 02:05 AM
Do you happen to know how to do this easily on a minimal install without it wanting to pull X in?
Full ffmpeg, no X?
I am currently out of town, but I run FFmpeg X-less occasionally. I'm not able to check dependencies now, so I'm not sure if anything wants to suck in X related junk, but libx11-dev and libxfixes-dev might be worth investigating. These probably aren't needed for a command-line only system anyway.
FakeOutdoorsman
July 12th, 2010, 02:09 AM
Wow, thanks for making what would otherwise have been a formidable task quite easy. I did have install libopencore-amrnb-dev, which isn't listed in your post as a dependency.
This looks like it's listed on the Lucid guide. Not sure of the others. What Ubuntu version are you using?
qyot27
July 12th, 2010, 11:03 PM
hi sorry for incomplete details.
hi. im trying to emulate this settings from Xilisoft. i need to convert avi to psp with high quality settings. i want to try the performance of this pc in windows and linux converting.
http://i151.photobucket.com/albums/s124/coolboi007/Screenshot-1.png
...
any help in replicating the xilisoft settings. thanks.
The screenshot doesn't tell us anything about the settings used, outside of bitrate. Take an output .mp4 from Xilisoft and use avinaptic to generate the report of what features the stream uses. There is a Linux version of avinaptic, but since you're using Xilisoft through a VM the Windows version would work too. Post the results and someone can probably translate it into x264 or ffmpeg parameters.
Nom du Clavier
July 13th, 2010, 12:30 AM
hi sorry for incomplete details.
....snip....
any help in replicating the xilisoft settings. thanks.
Right, what qyot27 said. I've been playing with transcoding DVD's using mplayer/mencoder myself, but with a bit more info I'm sure one of us here can replicate the settings to use with either ffmpeg or the mplayer stack.
dannyboy79
July 13th, 2010, 03:00 PM
i just want to follow up with my success with FFMPEG and x264 encoding. I am still using a static build of FFMPEG because i don't fully understand the whole sharing of libraries and i don't believe i even need it with the apps i currently use. i can now encode with x264 and aac in kdenlive. i used the google code bash script to install (and 2nd script to upgrade occasionally) svn ffmpeg and x264 from git. the code is here and all credit goes to r.plumridge
http://code.google.com/p/x264-ffmpeg-up-to-date/
I use the following versions of software on my Lucid Lynx setup
Qt: 4.6.2
KDE Development Platform: 4.4.2 (KDE 4.4.2)
Kdenlive: 0.7.7.1
MLT (melt) = 0.5.6
FFmpeg version SVN-r24084, Copyright (c) 2000-2010 the FFmpeg developers
built on Jul 7 2010 09:19:01 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50.20. 0 / 50.20. 0
libavcodec 52.79. 1 / 52.79. 1
libavformat 52.73. 0 / 52.73. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.20. 1 / 1.20. 1
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
FFmpeg SVN-r24084
libavutil 50.20. 0 / 50.20. 0
libavcodec 52.79. 1 / 52.79. 1
libavformat 52.73. 0 / 52.73. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.20. 1 / 1.20. 1
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
libx264 = not sure how to see what version but it's from git
I can export very nice x264 (8000k bit rate) aac (audio 128kb, 48000) mp4 (container) files from kdenlive. there's one here and it's not bad for standard definition. I am going to try to not scale it down to 640x480 and just try 720x480 and see if i don't get better quality.
http://www.youtube.com/watch?v=Ld4vSLkeTbo
Syed_karim
July 14th, 2010, 10:19 AM
Hi.,
I installed FFMPEG in Ubuntu 10.04LTS 32bit as per your instruction on this thread. I think installation is okay.,
karim@desktop:~$ ls -l /usr/local/include/
total 76
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavcodec
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavdevice
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavfilter
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavformat
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavutil
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libpostproc
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libswscale
drwxr-xr-x 2 root root 4096 2010-07-07 15:47 libusb-1.0
drwxr-xr-x 2 root root 4096 2010-07-08 11:45 SDL
drwxr-xr-x 2 root root 4096 2010-07-14 15:24 vpx
-rw-r--r-- 1 root root 36460 2010-07-14 15:22 x264.h
karim@desktop:~$ ls -l /usr/local/lib/
total 46216
-rw-r--r-- 1 root root 29157798 2010-07-14 15:36 libavcodec.a
-rw-r--r-- 1 root root 481196 2010-07-14 15:36 libavdevice.a
-rw-r--r-- 1 root root 353020 2010-07-14 15:36 libavfilter.a
-rw-r--r-- 1 root root 8756786 2010-07-14 15:36 libavformat.a
-rw-r--r-- 1 root root 285456 2010-07-14 15:36 libavutil.a
-rw-r--r-- 1 root root 79428 2010-07-14 15:36 libpostproc.a
lrwxrwxrwx 1 root root 20 2010-07-08 11:45 libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 2098338 2010-07-08 11:45 libSDL-1.2.so.0.11.3
-rw-r--r-- 1 root root 3313590 2010-07-08 11:45 libSDL.a
-rwxr-xr-x 1 root root 986 2010-07-08 11:45 libSDL.la
-rw-r--r-- 1 root root 3330 2010-07-08 11:45 libSDLmain.a
lrwxrwxrwx 1 root root 20 2010-07-08 11:45 libSDL.so -> libSDL-1.2.so.0.11.3
-rw-r--r-- 1 root root 595136 2010-07-14 15:36 libswscale.a
-rw-r--r-- 1 root root 201874 2010-07-07 15:47 libusb-1.0.a
-rwxr-xr-x 1 root root 955 2010-07-07 15:47 libusb-1.0.la
lrwxrwxrwx 1 root root 19 2010-07-07 15:47 libusb-1.0.so -> libusb-1.0.so.0.0.0
lrwxrwxrwx 1 root root 19 2010-07-07 15:47 libusb-1.0.so.0 -> libusb-1.0.so.0.0.0
-rwxr-xr-x 1 root root 156673 2010-07-07 15:47 libusb-1.0.so.0.0.0
-rw-r--r-- 1 karim karim 765920 2010-07-14 15:23 libvpx.a
-rw-r--r-- 1 root root 1035970 2010-07-14 15:22 libx264.a
Thanks for your effort. But when I tried to compile some samples http://dranger.com/ffmpeg/ffmpeg.html based on ffmpeg libraries, I'm getting linking error. Even I linked the proper libraries in the gcc.
I knew that those samples are little bit outdated. so I did some changes in his samples like
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/avutil.h>
#include <SDL/SDL.h>
#include <SDL/SDL_thread.h> ... etc.
In his sample program he mentioned that how to compile his samples? And some changes in FFMPEG. I followed his instruction., but I'm getting some linking error:
/usr/local/lib/libavformat.a(concat.o): In function `concat_open':
/home/karim/ffmpeg/libavformat/concat.c:67: undefined reference to `av_strstart'
/home/karim/ffmpeg/libavformat/concat.c:99: undefined reference to `av_strlcpy'
/usr/local/lib/libavformat.a(rl2.o): In function `rl2_read_seek':
/home/karim/ffmpeg/libavformat/rl2.c:277: undefined reference to `av_rescale_q'
/usr/local/lib/libavcodec.a(alsdec.o): In function `revert_channel_correlation':
/home/karim/ffmpeg/libavcodec/alsdec.c:1205: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o): In function `read_var_block_data':
/home/karim/ffmpeg/libavcodec/alsdec.c:628: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o): In function `decode_blocks':
/home/karim/ffmpeg/libavcodec/alsdec.c:1111: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o): In function `read_channel_data':
/home/karim/ffmpeg/libavcodec/alsdec.c:1148: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o): In function `read_frame_data':
/home/karim/ffmpeg/libavcodec/alsdec.c:1329: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o):/home/karim/ffmpeg/libavcodec/alsdec.c:1173: more undefined references to `av_log' foll
That message is so big.., so I just pasted few lines. Even I tried
export LD_INCLUDE_PATH=/usr/local/include:$LD_INCLUDE_PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
in .bashrc file, still I'm getting those errors. Do you have any idea about this?
Thanks...
Syed_karim
July 15th, 2010, 08:15 AM
Hi.,
I installed FFMPEG in Ubuntu 10.04LTS 32bit as per your instruction on this thread. I think installation is okay.,
karim@desktop:~$ ls -l /usr/local/include/
total 76
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavcodec
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavdevice
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavfilter
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavformat
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libavutil
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libpostproc
drwxr-xr-x 2 root root 4096 2010-07-14 15:37 libswscale
drwxr-xr-x 2 root root 4096 2010-07-07 15:47 libusb-1.0
drwxr-xr-x 2 root root 4096 2010-07-08 11:45 SDL
drwxr-xr-x 2 root root 4096 2010-07-14 15:24 vpx
-rw-r--r-- 1 root root 36460 2010-07-14 15:22 x264.h
karim@desktop:~$ ls -l /usr/local/lib/
total 46216
-rw-r--r-- 1 root root 29157798 2010-07-14 15:36 libavcodec.a
-rw-r--r-- 1 root root 481196 2010-07-14 15:36 libavdevice.a
-rw-r--r-- 1 root root 353020 2010-07-14 15:36 libavfilter.a
-rw-r--r-- 1 root root 8756786 2010-07-14 15:36 libavformat.a
-rw-r--r-- 1 root root 285456 2010-07-14 15:36 libavutil.a
-rw-r--r-- 1 root root 79428 2010-07-14 15:36 libpostproc.a
lrwxrwxrwx 1 root root 20 2010-07-08 11:45 libSDL-1.2.so.0 -> libSDL-1.2.so.0.11.3
-rwxr-xr-x 1 root root 2098338 2010-07-08 11:45 libSDL-1.2.so.0.11.3
-rw-r--r-- 1 root root 3313590 2010-07-08 11:45 libSDL.a
-rwxr-xr-x 1 root root 986 2010-07-08 11:45 libSDL.la
-rw-r--r-- 1 root root 3330 2010-07-08 11:45 libSDLmain.a
lrwxrwxrwx 1 root root 20 2010-07-08 11:45 libSDL.so -> libSDL-1.2.so.0.11.3
-rw-r--r-- 1 root root 595136 2010-07-14 15:36 libswscale.a
-rw-r--r-- 1 root root 201874 2010-07-07 15:47 libusb-1.0.a
-rwxr-xr-x 1 root root 955 2010-07-07 15:47 libusb-1.0.la
lrwxrwxrwx 1 root root 19 2010-07-07 15:47 libusb-1.0.so -> libusb-1.0.so.0.0.0
lrwxrwxrwx 1 root root 19 2010-07-07 15:47 libusb-1.0.so.0 -> libusb-1.0.so.0.0.0
-rwxr-xr-x 1 root root 156673 2010-07-07 15:47 libusb-1.0.so.0.0.0
-rw-r--r-- 1 karim karim 765920 2010-07-14 15:23 libvpx.a
-rw-r--r-- 1 root root 1035970 2010-07-14 15:22 libx264.a
Thanks for your effort. But when I tried to compile some samples http://dranger.com/ffmpeg/ffmpeg.html based on ffmpeg libraries, I'm getting linking error. Even I linked the proper libraries in the gcc.
I knew that those samples are little bit outdated. so I did some changes in his samples like
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavutil/avutil.h>
#include <SDL/SDL.h>
#include <SDL/SDL_thread.h> ... etc.
In his sample program he mentioned that how to compile his samples? And some changes in FFMPEG. I followed his instruction., but I'm getting some linking error:
/usr/local/lib/libavformat.a(concat.o): In function `concat_open':
/home/karim/ffmpeg/libavformat/concat.c:67: undefined reference to `av_strstart'
/home/karim/ffmpeg/libavformat/concat.c:99: undefined reference to `av_strlcpy'
/usr/local/lib/libavformat.a(rl2.o): In function `rl2_read_seek':
/home/karim/ffmpeg/libavformat/rl2.c:277: undefined reference to `av_rescale_q'
/usr/local/lib/libavcodec.a(alsdec.o): In function `revert_channel_correlation':
/home/karim/ffmpeg/libavcodec/alsdec.c:1205: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o): In function `read_var_block_data':
/home/karim/ffmpeg/libavcodec/alsdec.c:628: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o): In function `decode_blocks':
/home/karim/ffmpeg/libavcodec/alsdec.c:1111: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o): In function `read_channel_data':
/home/karim/ffmpeg/libavcodec/alsdec.c:1148: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o): In function `read_frame_data':
/home/karim/ffmpeg/libavcodec/alsdec.c:1329: undefined reference to `av_log'
/usr/local/lib/libavcodec.a(alsdec.o):/home/karim/ffmpeg/libavcodec/alsdec.c:1173: more undefined references to `av_log' foll
That message is so big.., so I just pasted few lines. Even I tried
export LD_INCLUDE_PATH=/usr/local/include:$LD_INCLUDE_PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
in .bashrc file, still I'm getting those errors. Do you have any idea about this?
Thanks...
Thanks.., I fixed this problem by myself... Actually this is library ordering problem... :-)
prupert
July 15th, 2010, 10:49 AM
Thanks.., I fixed this problem by myself... Actually this is library ordering problem... :-)
To help others in future, since your post was too complicated for me - can you write down a step by step of how you fixed this problem?
daaxix
July 17th, 2010, 05:38 PM
I compiled exactly as in the first post for 10.04, then ran the following command :
ffmpeg -i ./input.mkv -s 480x320 -vcodec mpeg4 -acodec libfaac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2 output.mp4
To attempt to transcode for my G1 Android phone.
This results in the following output :
[scale @ 0x2b28930] w:720 h:480 fmt:yuv420p -> w:480 h:320 fmt:yuv420p flags:0xa0000004
Output #0, mp4, to 'outut.mp4':
Metadata:
encoder : Lavf52.74.0
Stream #0.0: Video: mpeg4, yuv420p, 480x320 [PAR 1:1 DAR 3:2], q=2-31, 200 kb/s, 13 tbn, 13 tbc
Stream #0.1(eng): Audio: libfaac, 16000 Hz, 1 channels, s16, 32 kb/s
Metadata:
title : 6ch NDAAC
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[aac @ 0x2aeade0] Duplicate channel tag found, attempting to remap.
Resampling with input channels greater than 2 unsupported.
Can not resample 6 channels @ 48000 Hz to 1 channels @ 16000 Hz
but works just fine if I leave out the
-ac 1 -ar 16000 switches, but unfortunately will then not play on my G1. The G1 is very fickle.
Any suggestions?
Bachstelze
July 17th, 2010, 05:41 PM
I compiled exactly as in the first post for 10.04, then ran the following command :
ffmpeg -i ./input.mkv -s 480x320 -vcodec mpeg4 -acodec libfaac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2 output.mp4
To attempt to transcode for my G1 Android phone.
This results in the following output :
[scale @ 0x2b28930] w:720 h:480 fmt:yuv420p -> w:480 h:320 fmt:yuv420p flags:0xa0000004
Output #0, mp4, to 'outut.mp4':
Metadata:
encoder : Lavf52.74.0
Stream #0.0: Video: mpeg4, yuv420p, 480x320 [PAR 1:1 DAR 3:2], q=2-31, 200 kb/s, 13 tbn, 13 tbc
Stream #0.1(eng): Audio: libfaac, 16000 Hz, 1 channels, s16, 32 kb/s
Metadata:
title : 6ch NDAAC
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[aac @ 0x2aeade0] Duplicate channel tag found, attempting to remap.
Resampling with input channels greater than 2 unsupported.
Can not resample 6 channels @ 48000 Hz to 1 channels @ 16000 Hz
but works just fine if I leave out the
-ac 1 -ar 16000 switches, but unfortunately will then not play on my G1. The G1 is very fickle.
Any suggestions?
Since ffmpeg apparently has problems subsampling your 5.1 audio to Mono, I'd try to process the sound separately with other tools. Which format is it in?
daaxix
July 17th, 2010, 06:14 PM
Since ffmpeg apparently has problems subsampling your 5.1 audio to Mono, I'd try to process the sound separately with other tools. Which format is it in?
The audio is MPEG-4 AAC.
Thanks, I <3 Ubuntu Forums!
HHelsinger
July 17th, 2010, 07:41 PM
When I try to transcode using ffmpeg & libx264, I get the error "unknown encoder libx264" I've followed the threads, and reinstalled and updated libx264.
I've configured the latest ffmpeg (carefully following the instructions) with
--enable-nonfree --enable-libfaac --enable-gpl --enable-libx264
After configuring, it reports that both libfaac and libx264 are enabled.
But when I compile I get this error:
/usr/local/src/ffmpeg-export-2010-07-11/libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/usr/local/src/ffmpeg-export-2010-07-11/libavcodec/libx264.c:300: undefined reference to `x264_encoder_open_102'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
and indeed, here is the code from line 300 of libx264.c
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER)
x4->params.b_repeat_headers = 0;
x4->enc = x264_encoder_open(&x4->params);
So at this point I am way in over my head, and going under for the third time.
I'm trying to convert Cinelerra output for Vimeo. Anyone have any suggestions for alternative encodings that don't call libx264?
Thanks.
qyot27
July 18th, 2010, 12:03 AM
The audio is MPEG-4 AAC.
Thanks, I <3 Ubuntu Forums!
Assuming that the audio is the second track in the file:
mkvextract tracks input.mkv 2:input.aac
faad input.aac -o output.wav
Open the .wav in Audacity and merge the channels down to mono. Then either swap out the audio from the original using MKVToolNix (and use this new file to do the conversion) or find a way to point ffmpeg at the new audio file while disabling the original file's audio.
prupert
July 18th, 2010, 01:04 AM
Can you not transcode to a file with two audio channels and then to a file with one?
dannyboy79
July 19th, 2010, 03:31 PM
When I try to transcode using ffmpeg & libx264, I get the error "unknown encoder libx264" I've followed the threads, and reinstalled and updated libx264.
I've configured the latest ffmpeg (carefully following the instructions) with
After configuring, it reports that both libfaac and libx264 are enabled.
But when I compile I get this error:
and indeed, here is the code from line 300 of libx264.c
So at this point I am way in over my head, and going under for the third time.
I'm trying to convert Cinelerra output for Vimeo. Anyone have any suggestions for alternative encodings that don't call libx264?
Thanks.
i've had no problems at all using this google bash script to compile ffmpeg (svn) and x264 (git).
http://code.google.com/p/x264-ffmpeg-up-to-date/
prupert
July 19th, 2010, 05:01 PM
i've had no problems at all using this google bash script to compile ffmpeg (svn) and x264 (git).
http://code.google.com/p/x264-ffmpeg-up-to-date/
The script (that I wrote) basically does exactly what is listed in this HowTo, it just does it all automatically.
So, yeah, try it and see if it works for you, if it does, then you musta followed one of the instructions wrong somewhere...
n.hinton
July 19th, 2010, 07:04 PM
Hi prupert,
You beat me to it! I wouldn't run a script without at least having a glance through it, and if I learned nothing else from reading, at least I would have learned enough to credit yourself and FakeOutdoorsman for the script. Google script indeed!
FakeOutdoorsman
July 20th, 2010, 01:18 AM
Hi flyone,
I love fiddling with these things:
svn info | sed '5!d' | awk '{ print $NF }'
Would always work unless the number of lines changed, reasonably unlikely... A variation:
svn info | sed -e '5!d' -e 's/^.\{10\}//'
Andrew
I'm not very good at fiddling at these things (just look at that ugly x264 pkgversion). Much more useful. Adopting. Thanks, Andrew!
When I try to transcode using ffmpeg & libx264, I get the error "unknown encoder libx264" I've followed the threads, and reinstalled and updated libx264.
I've configured the latest ffmpeg (carefully following the instructions) with
After configuring, it reports that both libfaac and libx264 are enabled.
But when I compile I get this error:
and indeed, here is the code from line 300 of libx264.c
So at this point I am way in over my head, and going under for the third time.
I'm trying to convert Cinelerra output for Vimeo. Anyone have any suggestions for alternative encodings that don't call libx264?
Thanks.
My guess is that you still have an old x264 on your system. Try removing any x264 packages including libx264-dev and then continue with the Updating FFmpeg and x264 section of the guide.
madtowneast
July 20th, 2010, 04:53 AM
Hi,
Thank you for the tutorial and sorry of this error came up before, 110+ pages is a lot to go through. I was following the tutorial and got to the install ffmpeg step I was able to configure and make the needed files but when i wanted to install I got this error:
$ sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`svn info | sed '5!d' | awk '{ print $NF }'`" --backup=no --default
bash: !d': event not found
I am not sure what the problem is, so any help would be greatly appreciated.
Cheers
FakeOutdoorsman
July 20th, 2010, 06:35 AM
Hi,
Thank you for the tutorial and sorry of this error came up before, 110+ pages is a lot to go through. I was following the tutorial and got to the install ffmpeg step I was able to configure and make the needed files but when i wanted to install I got this error:
$ sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`svn info | sed '5!d' | awk '{ print $NF }'`" --backup=no --default
bash: !d': event not found
I am not sure what the problem is, so any help would be greatly appreciated.
Cheers
I just updated that command today, but it worked for me when I tested it on Lucid. I'll investigate more tomorrow. Until then you can use the old command:
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`svn info | grep Revision | awk '{ print $NF }'`" --backup=no --default
andrew.46
July 20th, 2010, 08:26 AM
Hi,
Looks like the '!' mark is experiencing some trouble with the double quote marks enclosing the --pkgversion string and history completion is being invoked. Perhaps a better solution might be:
--pkgversion "4:SVN-r$(svn info | sed -n '5p' | awk '{ print $NF }')"
Andrew
tylerious
July 20th, 2010, 03:40 PM
I can confirm madtowneast's problem. I get the same error. Thanks for looking into it so promptly!
I tried andrew.46's advice replacing "5!d" with "5p". It seemed to be progressing fine until I got an error (what appears to be a vi screen):
"dpkg-deb: parse-error, in file '/var/tmp/tmp.VZ4mXXK66k/package/DEBIAN/control' near line 10 package 'ffmpeg':
empty value for version
~
~..."
Output then said:
"Building Debian package... FAILED!
*** Failed to build the package
Do you want to see the log file? [y]: y
Erasing temporary files...OK
Deleting temp dir...OK"
The "old command" employing grep worked fine. I had to change sed to grep with the qt-faststart checkinstall command as well.
Bachstelze
July 20th, 2010, 03:45 PM
People these days... Just run svn info, find the revision number, and then use it directly. Takes about five seconds.
ron999
July 20th, 2010, 11:13 PM
Hi
I'm following the instructions to install x264 and ffmpeg on Karmic.
After I've installed x264 I run the checkinstall and get this result:-
ron@ubuntu:~/x264$ sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`+`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default
checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@ubuntu ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ x264 ]
3 - Version: [ 1:0.svn20100720+1a6fd47 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ x264 ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ x264 ]
Enter a number to change any of them or press ENTER to continue:
Installing with make...Installing with install...
========================= Installation results ===========================
/usr/bin/installwatch: /var/tmp/tmp.6VITgKHULa/installscript.sh: /bin/sh: bad interpreter: Permission denied
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
ron@ubuntu:~/x264$
Is this normal?
FakeOutdoorsman
July 20th, 2010, 11:37 PM
Definitely not normal. Did you install Ubuntu yourself or are you renting a server that had Ubuntu pre-installed? Show the output of:
mount | grep noexec
Is /var/tmp located on a non-standard drive?
ron999
July 20th, 2010, 11:48 PM
Here's the output:-
ron@ubuntu:~$ mount | grep noexec
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /tmp type tmpfs (rw,noexec,noatime)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
tmpfs on /var/tmp type tmpfs (rw,noexec,noatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
ron@ubuntu:~$
The /var/tmp folder is not on a different drive. It's on the same drive as my home folder and all the others such as:- media, mnt, opt, usr...
Edit I installed Ubuntu myself on my own computer.
FakeOutdoorsman
July 20th, 2010, 11:57 PM
Here's what I get on a standard Karmic 32-bit VM:
$ mount | grep noexec
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
For some reason your /var/tmp has been mounted with noexec causing things to go ape. Have you "hardened" your system or made any security modifications?
ron999
July 21st, 2010, 12:03 AM
For some reason your /var/tmp has been mounted with noexec causing things to go ape. Have you "hardened" your system or made any security modifications?
I've got Firefox running in RAM. I had to do some modifications.
The details are here:-http://ubuntuguide.net/speed-up-firefox-by-moving-cache-into-ram-in-ubuntu
FakeOutdoorsman
July 21st, 2010, 12:14 AM
Ah, ok. Maybe this will work for you then:
Getting around tmpfs 'noexec' problems (http://serialized.net/2010/03/getting-around-tmpfs-noexec-problems/)
Does running Firefox in RAM show any performance differences?
ron999
July 21st, 2010, 12:17 AM
Ah, ok. Maybe this will work for you then:
Getting around tmpfs 'noexec' problems (http://serialized.net/2010/03/getting-around-tmpfs-noexec-problems/)
Does running Firefox in RAM show any performance differences?
I'm going to try it now.
Watch this space...
ron999
July 21st, 2010, 12:26 AM
Yes, that's fixed it.:D
I'll carry on with the rest now.
Done. The new package has been installed and saved to
/home/ron/x264/x264_1:0.svn20100721+1a6fd47-1_i386.deb
You can remove it from your system anytime using:
dpkg -r x264
************************************************** ********************
ron@ubuntu:~/x264$
ron999
July 21st, 2010, 12:42 AM
Hi
x264 and libvpx and libtheora have installed OK.
But ffmpeg won't write to that /tmp folder.
So I'm going to # those 2 extra lines on my fstab file then re-boot and try again.
ron@ubuntu:~/ffmpeg$ ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
Unable to create and execute files in /tmp. Set the TMPDIR environment
variable to another directory and make sure that it is not mounted noexec.
Sanity 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.log" produced by configure as this will help
solving the problem.
ron@ubuntu:~/ffmpeg$
ron999
July 21st, 2010, 01:00 AM
Hi
I've deleted the two lines on the fstab file and I'm gonna start again.
I don't know whether running Firefox in RAM improves things or not.
I'm not sure.
It seems like a good idea, but maybe it's a con.:(
I've tried to follow your tutorial several times before, but each time when things went pear-shaped I lost my nerve. I didn't want to risk losing ffmpeg.
:o
ron999
July 21st, 2010, 01:42 AM
OK FakeOutdoorsman
Your tutorial is successful.:)
Everything is installed OK.
Thanks.:popcorn:
I have a question. I'd like to 'hide' the four new folders, so that I don't delete them by mistake.
Can I do this by putting a dot in front of their names, or is there a better way?
ron@ubuntu:~$ ffmpeg
FFmpeg version SVN-r24378, Copyright (c) 2000-2010 the FFmpeg developers
built on Jul 21 2010 01:34:53 with gcc 4.4.1
configuration: '--enable-gpl' '--enable-version3' '--enable-nonfree' '--enable-postproc' '--enable-pthreads' '--enable-libfaac' '--enable-libmp3lame' '--enable-libopencore-amrnb' '--enable-libopencore-amrwb' '--enable-libtheora' '--enable-libvpx' '--enable-libx264' '--enable-libxvid' '--enable-x11grab'
libavutil 50.22. 0 / 50.22. 0
libavcodec 52.84. 0 / 52.84. 0
libavformat 52.76. 0 / 52.76. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.25. 1 / 1.25. 1
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
ron@ubuntu:~$
FakeOutdoorsman
July 21st, 2010, 01:53 AM
I have a question. I'd like to 'hide' the four new folders, so that I don't delete them by mistake.
Can I do this by putting a dot in front of their names, or is there a better way?
I guess it depends on your file manager (if you even use one), but you could make a directory such as .compiledjunk and then move the appropriate directories into it. It's similar to what I do on another distro, such as: ~/builds/ffmpeg. Just remember where your directories are if you want to follow the Upgrading FFmpeg and x264 section of the guide.
I would avoid creating a .ffmpeg directory because that's usually used for custom preset files. Probably wouldn't cause any issues because the original presets would be in the ffpresets sub-directory, but it's something to be aware of.
Glad you got it working.
ron999
July 21st, 2010, 02:04 AM
Just remember where your directories are if you want to follow the Upgrading FFmpeg and x264
Yes, I understand.
When updating x264 I would need to cd ./compiledjunk/x264
and similar for ffmpeg.
:D
Gigalo
July 23rd, 2010, 01:48 AM
Thank you fore the excellent instructions ... I got this to work with no problems on my 32 bit P4 machine. Having since moved to an AMD Phenom II X4 based system, I again attempted to do this compile. Unfortunately, I have run into a roadblock, ld crashes with:
~/git/x264$ make
gcc -o x264 x264.o matroska.o muxers.o libx264.a -lm -lpthread -s
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/bin/ld: i386 architecture of input file `matroska.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `libx264.a(*.o)' is incompatible with i386:x86-64 output
the (*.o) in the libx264 line is substituted for all .o files in that group.
I am on Lucid, 64-Bit
Any and all assistance would be appreciatated.
FakeOutdoorsman
July 23rd, 2010, 02:15 AM
Did you follow the guide word-for-word, or did you add any modifications?
Update: I assumed you moved to a completely new system, but perhaps you're compiling from the same old ~/x264 directory? If that's the case then you'll need to make distclean. See the Updating FFmpeg and x264 section of the guide to see how to do that.
Gigalo
July 23rd, 2010, 05:13 AM
FakeOutdoorsman, your assumptions are all correct. Although I changed from 32 bit to 64 bit Ubuntu when I switched, doing a complete OS wipe to achieve a consistent result. That said, I have now recloned both x264 and ffmpeg. After this, no problem except that it took two compiles to ffmpeg to complete. Wierd.
At any rate, does anyone have any idea where the '-vf' command option went?
... As of my previous compile (~2mo ago) this worked.
ffmpeg -i $inFile -pass 1 -an -sn -vf crop=8:0:704:480 \
-vcodec libx264 -vpre slow_firstpass -b 2048k -bt 2048k \
-threads 0 -y -flags2 +dct8x8+bpyramid -flags +loop \
-deblockalpha 2 -deblockbeta 5 -r 30000/1001 -y \
-f matroska /dev/null
FFmpeg version SVN-r19327
... bunch of output ...
[NULL @ 0x21274b0]Unknown option 'vf'
[swscaler @ 0x21284e0]Unknown option 'vf'
[NULL @ 0x2126010]Unknown option 'f'
ffmpeg: unrecognized option '-vf'
Also, any critiques regarding my settings? This is being used to transcode DVD's.
dannyboy79
July 23rd, 2010, 02:32 PM
FakeOutdoorsman, your assumptions are all correct. Although I changed from 32 bit to 64 bit Ubuntu when I switched, doing a complete OS wipe to achieve a consistent result. That said, I have now recloned both x264 and ffmpeg. After this, no problem except that it took two compiles to ffmpeg to complete. Wierd.
At any rate, does anyone have any idea where the '-vf' command option went?
... As of my previous compile (~2mo ago) this worked.
ffmpeg -i $inFile -pass 1 -an -sn -vf crop=8:0:704:480 \
-vcodec libx264 -vpre slow_firstpass -b 2048k -bt 2048k \
-threads 0 -y -flags2 +dct8x8+bpyramid -flags +loop \
-deblockalpha 2 -deblockbeta 5 -r 30000/1001 -y \
-f matroska /dev/null
FFmpeg version SVN-r19327
... bunch of output ...
[NULL @ 0x21274b0]Unknown option 'vf'
[swscaler @ 0x21284e0]Unknown option 'vf'
[NULL @ 0x2126010]Unknown option 'f'
ffmpeg: unrecognized option '-vf'
Also, any critiques regarding my settings? This is being used to transcode DVD's.
not sure, according to here it's still there: http://www.ffmpeg.org/ffmpeg-doc.html
FakeOutdoorsman
July 23rd, 2010, 07:48 PM
FakeOutdoorsman, your assumptions are all correct. Although I changed from 32 bit to 64 bit Ubuntu when I switched, doing a complete OS wipe to achieve a consistent result. That said, I have now recloned both x264 and ffmpeg. After this, no problem except that it took two compiles to ffmpeg to complete. Wierd.
At any rate, does anyone have any idea where the '-vf' command option went?
... As of my previous compile (~2mo ago) this worked.
ffmpeg -i $inFile -pass 1 -an -sn -vf crop=8:0:704:480 \
-vcodec libx264 -vpre slow_firstpass -b 2048k -bt 2048k \
-threads 0 -y -flags2 +dct8x8+bpyramid -flags +loop \
-deblockalpha 2 -deblockbeta 5 -r 30000/1001 -y \
-f matroska /dev/null
FFmpeg version SVN-r19327
... bunch of output ...
[NULL @ 0x21274b0]Unknown option 'vf'
[swscaler @ 0x21284e0]Unknown option 'vf'
[NULL @ 0x2126010]Unknown option 'f'
ffmpeg: unrecognized option '-vf'
Also, any critiques regarding my settings? This is being used to transcode DVD's.
You're using an old FFmpeg revision (r19327). As of now, FFmpeg is at r24460. Can you show the complete FFmpeg output?
I usually recommend single-pass CRF instead of two-pass VBR (as it appears what you're using) unless you are require a specific bitrate and/or output file size. I would remove:
-flags2 +dct8x8+bpyramid -flags +loop -deblockalpha 2 -deblockbeta 5
...because the presets already cover most of these options. FFmpeg will inherit the frame rate of the input so you don't need to declare -r if you want the frame rate to remain the same as the input.
mocha
July 25th, 2010, 05:47 PM
Does anyone here know if ffmpeg has an equivalent option to mencoder's tele_src/tele_dest below:
tele_src and tele_dest
Enables arbitrary telecining using Donand Graft's DGPulldown
code. You need to specify the original and the desired framer‐
ate; the muxer will make the video stream look like it was en‐
coded at the desired framerate. It only works with MPEG-2 video
when the input framerate is smaller than the output framerate
and the framerate increase is <= 1.5.
EXAMPLE:
tele_src=25,tele_dest=30000/1001
PAL to NTSC telecining
If not, what is the recommended method in ffmpeg to convert PAL to NTSC for MPEG2-DVD encoding? Thanks.
qyot27
July 25th, 2010, 07:56 PM
Does anyone here know if ffmpeg has an equivalent option to mencoder's tele_src/tele_dest below:
tele_src and tele_dest
Enables arbitrary telecining using Donand Graft's DGPulldown
code. You need to specify the original and the desired framer‐
ate; the muxer will make the video stream look like it was en‐
coded at the desired framerate. It only works with MPEG-2 video
when the input framerate is smaller than the output framerate
and the framerate increase is <= 1.5.
EXAMPLE:
tele_src=25,tele_dest=30000/1001
PAL to NTSC telecining
If not, what is the recommended method in ffmpeg to convert PAL to NTSC for MPEG2-DVD encoding? Thanks.
It's been about 2 years since I messed with ffmpeg for MPEG-2 encoding, as it had issues encoding DVD compliant streams that are free of noticeable problems (namely, I-frames being encoded at a much higher quantizer than P or B frames, which is really obvious on the first frame of a video; fixing or lessening it required breaking DVD compliancy). And I also seem to remember it didn't support *any* form of pulldown flagging, although this might have changed, or changed only to support standard 3:2 pulldown. I do know that ffmpeg does report weird status info if you give it a stream with pulldown, although I don't know the extent of how good or bad a sign this is. All of that is why I use HCenc instead.
What I do know is that DGPulldown itself, which mencoder's docs mentioned that it uses, runs perfectly in Wine (as does HCenc, for that matter). You'll just need to mux the video and audio together with mplex from the MJPEGTools project after fixing the MPEG-2 stream. I do believe that mplex is available natively, although it'll run okay in Wine as well.
NobodyNowehreNothing
July 25th, 2010, 10:31 PM
Hey Guys,
Please if you can, help me out or just direct me to a right location, I have been stock for a whole week with this error, I have tried everything, Different versions of ubuntu (8.10,9.10 and now 10.04) , different versions of x264 , different versions of ffmpeg , everything i could, my client is now going mental!
This is now running on a Ubuntu Server 10.04 - I have gnome and everything installed, and I can VNC into the server which is setup on :1 , The server is at EC2 amazon, I did the same installation at home and I had no errors so I am going crazy! Whenever i try to use x11grab to capture screen, I get:
Segmentation fault
Here is the full version:
ffmpeg -v 2 -y -s 800x400 -r 9 -f x11grab -i :1.0 -g 300 -threads 0 -vcodec libtheora -sc_threshold -1 -cqp 22 -b 1200k /tmp/screenCapture1.ogv
FFmpeg version SVN-r24502, Copyright (c) 2000-2010 the FFmpeg developers
built on Jul 25 2010 20:36:29 with gcc 4.4.3
configuration: '--enable-gpl' '--enable-version3' '--enable-nonfree' '--enable-postproc' '--enable-pthreads' '--enable-libfaac' '--enable-libmp3lame' '--enable-libopencore-amrnb' '--enable-libopencore-amrwb' '--enable-libtheora' '--enable-libvorbis' '--enable-libvpx' '--enable-libx264' '--enable-libxvid' '--enable-x11grab'
libavutil 50.23. 0 / 50.23. 0
libavcore 0. 0. 0 / 0. 0. 0
libavcodec 52.84. 0 / 52.84. 0
libavformat 52.77. 0 / 52.77. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.26. 1 / 1.26. 1
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[x11grab @ 0x9872470] device: :1.0 -> display: :1.0 x: 0 y: 0 width: 800 height: 400
[x11grab @ 0x9872470] shared memory extension found
Segmentation fault
Please guys, if you have any clue, help me out or point me to the right direction! Long time ubuntu user here :(
FakeOutdoorsman
July 26th, 2010, 05:08 AM
-threads 0 is currently only for libx264 as far as I know. Try removing that option or use a value more suitable for your CPU.
Do you get a seg fault with a very basic command? Example:
ffmpeg -t 5 -f x11grab -r 30 -s 640x320 -i :0.0 -y x11grab.mpg
If the basic command also provides a seg fault, you should file a bug report: Reporting a Bug To The FFmpeg Project (http://ffmpeg.org/bugreports.html). It is important to use a minimal command in your bug report to rule out extras such as threads or external libraries.
If the basic command does work, then I suggest using libx264 to capture your screen as shown in this useful guide:
HOWTO: Proper Screencasting on Linux (http://ubuntuforums.org/showthread.php?t=1392026)
mocha
July 26th, 2010, 08:25 AM
It's been about 2 years since I messed with ffmpeg for MPEG-2 encoding, as it had issues encoding DVD compliant streams that are free of noticeable problems (namely, I-frames being encoded at a much higher quantizer than P or B frames, which is really obvious on the first frame of a video; fixing or lessening it required breaking DVD compliancy). And I also seem to remember it didn't support *any* form of pulldown flagging, although this might have changed, or changed only to support standard 3:2 pulldown. I do know that ffmpeg does report weird status info if you give it a stream with pulldown, although I don't know the extent of how good or bad a sign this is. All of that is why I use HCenc instead.
What I do know is that DGPulldown itself, which mencoder's docs mentioned that it uses, runs perfectly in Wine (as does HCenc, for that matter). You'll just need to mux the video and audio together with mplex from the MJPEGTools project after fixing the MPEG-2 stream. I do believe that mplex is available natively, although it'll run okay in Wine as well.
Thanks for the info. It's interesting considering that not much development happens on mencoder but it is superior for some MPEG2/DVD stuff compared to ffmpeg.
ron999
August 1st, 2010, 12:20 AM
Hi
I don't seem to be able to convert audio into ogg using vorbis codec any more.
I think that previously I used a command like:
ffmpeg -i < input > -acodec libvorbis output.ogg
When I try that now it doesn't recognize libvorbis.
Unknown encoder 'libvorbis'
So I tried vorbis instead
ffmpeg -i < input > -acodec vorbis output.ogg
When I tried that it tells me to use '-strict experimental'.
encoder 'vorbis' is experimental and might produce bad results.
Add '-strict experimental' if you want to use it.
So I tried
ffmpeg -i < input > -acodec vorbis -strict experimental output.ogg
It converted OK, but when I played it back there is no sound output.
General
Complete name : output.ogg
Format : OGG
File size : 447 KiB
Duration : 3mn 18s
Overall bit rate : 18.5 Kbps
Audio
ID : 530006952 (0x1F9743A8)
Format : Vorbis
Duration : 3mn 18s
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
There's information on the web that says the internal ogg encoder is no good and recommends that libvorbis is used instead.
Is this problem now caused because ffmpeg hasn't been compiled with libvorbis?
And is there some other way to use ffmpeg to convert using vorbis?
Or am I just doing something wrong?
FFmpeg version SVN-r24614, Copyright (c) 2000-2010 the FFmpeg developers
built on Jul 31 2010 15:19:46 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50.23. 0 / 50.23. 0
libavcore 0. 2. 0 / 0. 2. 0
libavcodec 52.84. 2 / 52.84. 2
libavformat 52.77. 0 / 52.77. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.27. 0 / 1.27. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
EDIT
I think I've answered my own questions now.
There's information in this blog here:-http://xiphmont.livejournal.com/51160.html
So I've re-compiled ffmpeg and added these two extras to the ./configure line
--disable-encoder=vorbis --enable-libvorbis
Now when I use the command:-
ffmpeg -i < input > -acodec vorbis output.ogg
It reports
Unknown encoder 'vorbis'
And when I use command:-
ffmpeg -i < input > -acodec libvorbis output.ogg
It converts OK and the result sounds alright.
General
Complete name : output.ogg
Format : OGG
File size : 1.33 MiB
Duration : 3mn 18s
Overall bit rate : 56.1 Kbps
Writing application : Lavc52.84.2
Audio
ID : 1396686445 (0x533FBE6D)
Format : Vorbis
Format settings, Floor : 1
Duration : 3mn 18s
Bit rate : 64.0 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Stream size : 1.51 MiB
Writing library : libVorbis 1.2 (UTC 2007-06-22)
ron@ubuntu:~$ ffmpeg
FFmpeg version SVN-r24643, Copyright (c) 2000-2010 the FFmpeg developers
built on Aug 1 2010 10:38:14 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --disable-encoder=vorbis --enable-libvorbis
libavutil 50.23. 0 / 50.23. 0
libavcore 0. 2. 0 / 0. 2. 0
libavcodec 52.84. 2 / 52.84. 2
libavformat 52.78. 0 / 52.78. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.27. 0 / 1.27. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Mustache Villain
August 1st, 2010, 09:05 AM
Any word on when we will see ffvp8 codec, the alternative to Google's libvpx?
dejan034
August 1st, 2010, 09:39 AM
Good frontend for ffmpeg...
http://kde-apps.org/content/show.php/Hyper+Video+Converter?content=67781
andrew.46
August 1st, 2010, 09:42 AM
Hi Mustache,
Any word on when we will see ffvp8 codec, the alternative to Google's libvpx?
Decoder is there now:
andrew@skamandros~$ mplayer -vc help | grep ffvp8
ffvp8 ffmpeg working FFmpeg VP8 [vp8]
Andrew
mc4man
August 1st, 2010, 10:57 AM
Hi
I don't seem to be able to convert audio into ogg using vorbis codec any more.
Is this problem now caused because ffmpeg hasn't been compiled with libvorbis?
That would do it.
You would want to add --enable-libvorbis to your ./configure
( Isn't in the posted karmic instr.'s but you can add w/ no issue
ron999
August 1st, 2010, 11:23 AM
That would do it.
You would want to add --enable-libvorbis to your ./configure
( Isn't in the posted karmic instr.'s but you can add w/ no issue
Thanks mc4man
We are cross-posting.:D
I've just edited my post here:-http://ubuntu-ky.ubuntuforums.org/showpost.php?p=9662787&postcount=1169
stressat
August 1st, 2010, 05:54 PM
Hello!
I use ffmpeg for recording audio/video x11:
ffmpeg -f oss -i /dev/audio -f x11grab -s 1280x960 -r 24 -b 6500 -bt 712k -sameq -i :0.0 ~/out.avi
It is possible to do same thing in tty (Ctrl+Alt+F1....F6) ???
Bachstelze
August 1st, 2010, 05:57 PM
Hello!
I use ffmpeg for recording audio/video x11:
ffmpeg -f oss -i /dev/audio -f x11grab -s 1280x960 -r 24 -b 6500 -bt 712k -sameq -i :0.0 ~/out.avi
It is possible to do same thing in tty (Ctrl+Alt+F1....F6) ???
There is nothing to record in a tty, it's just text. You can use script to get a transcript of a shell session.
Mustache Villain
August 1st, 2010, 09:30 PM
Hi Mustache,
Decoder is there now:
andrew@skamandros~$ mplayer -vc help | grep ffvp8
ffvp8 ffmpeg working FFmpeg VP8 [vp8]
Andrew
I don't see it, but I haven't compiled according to this thread. I used the lucidbleed experimental PPA (https://launchpad.net/%7Elucid-bleed/+archive/lucidbleed-exp). Are they in the latest svn?
stressat
August 2nd, 2010, 05:02 AM
There is nothing to record in a tty, it's just text. You can use script to get a transcript of a shell session.
I'm watching video file with mplayer (in a small window/ screen...), i use moc for audio file, i use fbterm +fbv for background image in tty...
But you can be more explicit with that script? An example???
Sorry for my poor english, is not my native language. I'm a noob too...
Thanks you for your answer, have a nice day!
stressat
August 2nd, 2010, 05:44 PM
Ok, i saw what doing "script", thanks, it's useful. But i want something else:
- fbgrab, scrot, import... = snapshots in tty
- ffmpeg, recordmydesktop...= audio/video record in x11
- ??? = audio/video record in tty...
Just text?;)
FakeOutdoorsman
August 2nd, 2010, 07:03 PM
That would do it.
You would want to add --enable-libvorbis to your ./configure
( Isn't in the posted karmic instr.'s but you can add w/ no issue
Updated the Karmic guide to include libvorbis. That should have been added a long time ago. Too many Ubuntu releases to keep up with.
I don't see it, but I haven't compiled according to this thread. I used the lucidbleed experimental PPA (https://launchpad.net/%7Elucid-bleed/+archive/lucidbleed-exp). Are they in the latest svn?
No. It appears to be using the FFmpeg 0.6 branch (4:0.6-2ubuntu2~ppa1~lucid1), but I did not test this to backup my assumption. To see if your FFmpeg includes the native VP8 decoder:
$ ffmpeg -codecs 2>/dev/null | grep vp8
D V D vp8 On2 VP8
Freyr92
August 4th, 2010, 03:34 AM
My solution to the checkinstall of ffmpeg in Spanish was:
cd
git clone git://git.ffmpeg.org/ffmpeg/
cd ffmpeg
git clone git://git.ffmpeg.org/libswscale/
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="`date +%Y%m%d%H%M`-git" --backup=no --default
hash x264 ffmpeg ffplay
I prefer git to SVN ;D
p.d: and update:
cd ~/ffmpeg
make distclean
git pull
FakeOutdoorsman
August 4th, 2010, 09:36 PM
If you're using FFmpeg SVN and you experience a crash or odd behavior, then you may be interested in submitting a bug report to the FFmpeg project. If you are using FFmpeg from the Ubuntu repository, please report bugs to Launchpad (https://bugs.launchpad.net/ubuntu/+source/ffmpeg) instead.
Read the bug report guidelines
Reporting a Bug To The FFmpeg Project (http://ffmpeg.org/bugreports.html). You don't want to get flamed for not strictly following directions. The goal of this post is not to duplicate the guidelines, but to provide some more instruction that may be useful to Ubuntu users, to help make reporting a bug less intimidating, and to make your bug report more informative.
Ask first
It is a good idea to ask the #ffmpeg IRC channel or ffmpeg-user mailing list (http://ffmpeg.org/contact.html) if anyone else can duplicate your bug. Insight from others may reveal your issue as not a bug or they can help provide additional information.
Search for your bug
Go to the FFmpeg Issue Tracker (https://roundup.ffmpeg.org/) (yes, it's horrendously slow), and then perform a search (https://roundup.ffmpeg.org/issue?@template=search) before creating a new bug report. Someone else may have already reported your bug. You don't want to get flamed for making a duplicate bug report. There are many search options. I generally just use the All text* search box and leave everything else as is.
Report your bug
If you find nothing, then register (https://roundup.ffmpeg.org/user?@template=register) and then create (https://roundup.ffmpeg.org/issue?@template=item) your new bug report.
http://fakeoutdoorsman.com/ffmpeg/bug.png
Creating a FFmpeg Bug Report
Title: Give a detailed and useful title. A title like segmentation fault when capturing screen with x11grab is better than ffmpeg crashes.
Type: Choose bug.
Priority: Choose important for crashes/segmentation faults and normal for everything else.
Status: I've always used New / New when creating a bug.
Nosy List: Adding your user name to the Nosy List will e-mail you when someone replies to your bug or updates the bug priority.
Change Note: This is where you provide a description of the bug, how to duplicate the bug, and where samples are located.
You can generally ignore the rest of the options.
Change Note Continued...
Always provide the most simple ffmpeg command. For example, if you experience a crash with:
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1024x768 -i :0.0 -acodec pcm_s16le \
-vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
...you should also try a more basic command:
ffmpeg -f x11grab -r 30 -s 1024x768 -i :0.0 output.mpg
If the simple command still crashes use it instead so the developers can rule out extra junk that may cause issues such as threads or external encoders.
Now submit your bug report. It will be assigned an issue ID number, such as issue1392, which will be important if you want to submit a sample file.
Providing a sample
You should provide a sample if it is important to reproducing the bug or if a developer asks for one. This is explained in the Submitting Sample Media section of Reporting a Bug To The FFmpeg Project (http://ffmpeg.org/bugreports.html). All that I will add is when creating a new directory as the page instructs, name it the same as your issue number. This will make life easier for the server admins. Then navigate back to your bug report and make a comment indicating where your sample is. Something like: "Sample located at incoming/issue1392/descriptive_sample_name.foo".
gdb output and backtrace
A developer will most likely ask you to provide the gdb output and a backtrace if you are reporting a crash bug. This is mostly described at Reporting a Bug To The FFmpeg Project (http://ffmpeg.org/bugreports.html). Some additional info:
Install gdb if you don't have it:
sudo apt-get install gdb
ffmpeg_g is located in your ~/ffmpeg directory if you followed HOWTO: Install and use the latest FFmpeg and x264 (http://ubuntuforums.org/showthread.php?t=786095).
If you need additional help, the best places to ask questions are the #ffmpeg IRC channel, the ffmpeg-user mailing list (http://ffmpeg.org/contact.html), or you can reply to this post.
FakeOutdoorsman
August 5th, 2010, 06:47 PM
I don't own an iPod, yet I have an iPod example on this guide: iPod 640x480 using the slow and ipod640 presets. I'm not sure if it actually works. Is anyone willing to test it (and mention the i[Pod|Pad|Phone] version)?
Also, the commands are in one long string. Originally I thought it would be easier for new users to show that each command is on it's own line. What do most people prefer? The long, unbroken commands, or something that you can see all at once, but is not un-broken like this:
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-pthreads --enable-libfaac --enable-libmp3lame \
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora \
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid \
--enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`svn info | grep Revision | \
awk '{ print $NF }'`" --backup=no --default
hash x264 ffmpeg ffplay
andrew.46
August 6th, 2010, 12:32 AM
Hi FakeOutdoorsman,
Also, the commands are in one long string. Originally I thought it would be easier for new users to show that each command is on it's own line. What do most people prefer? The long, unbroken commands, or something that you can see all at once, but is not un-broken...
I prefer a command I can see on one screen, divided by the '\' character as you have demonstrated. The downfall of course is that less experienced users will be unsure which is a single command and there will inevitably be some copy and paste errors...
Andrew
qyot27
August 6th, 2010, 07:23 AM
For quick reference, I also prefer the \ notation, but for copy-paste stuff (that isn't going into a script, anyway) it would make it harder for new users that aren't aware of what \ does. IMO, the way to remedy that is simply to add a cautionary note about the usage of \, and to ensure one has copied all lines before trying to execute it.
Bachstelze
August 6th, 2010, 07:32 AM
For quick reference, I also prefer the \ notation, but for copy-paste stuff (that isn't going into a script, anyway) it would make it harder for new users that aren't aware of what \ does. IMO, the way to remedy that is simply to add a cautionary note about the usage of \, and to ensure one has copied all lines before trying to execute it.
If you just copy-paste the lines with the \ one at a time (or even all at once), it will work just as well. I fail to see how a note would be useful.
skaag
August 6th, 2010, 03:49 PM
I have a problem compiling with libvpx. Here's the error:
CC libavcodec/libvpxdec.o
libavcodec/libvpxdec.c: In function ‘vp8_decode’:
libavcodec/libvpxdec.c:89: error: implicit declaration of function ‘av_check_image_size’
make: *** [libavcodec/libvpxdec.o] Error 1
For now I compiled ffmpeg without libvpx, but I would like to have that capability.
Could it be that the latest version in the repository simply has an error?
FakeOutdoorsman
August 6th, 2010, 08:12 PM
r24717 compiled and installed ok for me on Lucid 64-bit. Looks like it was already fixed:
$ svn log -l 24 svn://svn.mplayerhq.hu/ffmpeg/trunk
------------------------------------------------------------------------
r24717 | alexc | 2010-08-06 10:57:14 -0800 (Fri, 06 Aug 2010) | 4 lines
libvpxdec: Fix "error: implicit declaration of function ‘av_check_image_size’".
av_check_image_size() is declared in libavcore/imgutils.h.
------------------------------------------------------------------------
theluddite
August 12th, 2010, 12:47 AM
Everything was working famously until I got to step 6 in your guide (http://ubuntuforums.org/showpost.php?p=9114176&postcount=967). After make, I got this error:
...
libavformat/metadata.c:76: warning: assignment discards qualifiers from pointer target type
CC libavformat/metadata_compat.o
CC libavformat/mm.o
CC libavformat/mmf.o
make: *** No rule to make target `libavformat/mms.o', needed by `libavformat/libavformat.a'. Stop.
I'd really like to use some of the encoders not supplied in the .deb. What the heck is the problem?
FakeOutdoorsman
August 12th, 2010, 01:10 AM
Everything was working famously until I got to step 6 in your guide (http://ubuntuforums.org/showpost.php?p=9114176&postcount=967). After make, I got this error:
I'd really like to use some of the encoders not supplied in the .deb. What the heck is the problem?
Confirmed. The developers just noticed and it will probably will be fixed in less than a few hours. If you don't want to wait:
cd ~/ffmpeg
make distclean
svn up -r 24778 svn://svn.ffmpeg.org/ffmpeg/trunk .
...and then continue with the ./configure line in step 6.
iymovies
August 12th, 2010, 01:34 AM
Hello,
Linux Mint user here.
Just googled an error I got, and was sent to this page.
I'm getting a slightly different error however:
CC libavformat/metadata_compat.o
CC libavformat/mm.o
CC libavformat/mmf.o
CC libavformat/mms.o
libavformat/mms.c:23:17: error: mms.h: No such file or directory
libavformat/mms.c:27: error: expected ‘)’ before ‘*’ token
libavformat/mms.c:42: error: expected ‘)’ before ‘*’ token
libavformat/mms.c:52: error: expected ‘)’ before ‘*’ token
make: *** [libavformat/mms.o] Error 1
Any idea?
Here's what I'm cofniguring:
./configure --enable-libx264 --enable-pthreads --enable-libxvid --enable-libmp3lame --enable-libfaac --enable-gpl --enable-nonfree
FakeOutdoorsman
August 12th, 2010, 01:39 AM
...
Any idea?
...
Once in a while a revision to FFmpeg SVN will break something and it won't compile. It doesn't happen often but fixes usually come quickly. See my previous post on this thread of you want to compile the last working revision, or you can watch the FFmpeg log (http://git.ffmpeg.org/?p=ffmpeg;a=summary) for a new revision that fixes this error.
iymovies
August 12th, 2010, 01:44 AM
Once in a while a revision to FFmpeg SVN will break something and it won't compile. It doesn't happen often but fixes usually come quickly. See my previous post on this thread of you want to compile the last working revision, or you can watch the FFmpeg log (http://git.ffmpeg.org/?p=ffmpeg;a=summary) for a new revision that fixes this error.
Thanks for the response, Dark_Shikari from #ffmpeg had me run "svn up -r 24778" and it fixed it without a problem.
theluddite
August 12th, 2010, 03:55 AM
If you don't want to wait:
cd ~/ffmpeg
make distclean
svn up -r 24778 svn://svn.ffmpeg.org/ffmpeg/trunk .
Thanks for the super-fast response! But I guess the svn hasn't been updated yet. I'm still getting the same error. I'll try again tomorrow.
FakeOutdoorsman
August 12th, 2010, 06:30 AM
It should be working now:
$ svn log -l 3 svn://svn.mplayerhq.hu/ffmpeg/trunk
r24784 | rbultje | 2010-08-11 18:01:33 -0800 (Wed, 11 Aug 2010) | 3 lines
Add another missing file from r24799.
Compiled and installed fine for me.
theluddite
August 12th, 2010, 08:18 PM
It should be working now:
Compiled and installed fine for me.
I checked out version r24789. GTG. Thanks for the help.
dannyboy79
August 12th, 2010, 09:50 PM
I checked out version r24789. GTG. Thanks for the help.
huh? im using the google code script to keep my ffmpeg up to date, at least I thought. i just ran it again and it says this:
ffmpeg is at revision 24784
recent ffmpeg SVN changes
svn: No such revision 24785
one
ffmpeg updated.
maybe i need to check with google code script author about it not going to revision 24789
prupert
August 12th, 2010, 09:55 PM
huh? im using the google code script to keep my ffmpeg up to date, at least I thought. i just ran it again and it says this:
ffmpeg is at revision 24784
recent ffmpeg SVN changes
svn: No such revision 24785
one
ffmpeg updated.
maybe i need to check with google code script author about it not going to revision 24789
Hi, I wrote the script you are using (from here yes? http://code.google.com/p/x264-ffmpeg-up-to-date/) Sounds like you haven't updated to the latest version. The code that checked what SVN version was currrent and the version installed didn't work very well, so I ditched it. If you simply run
ffmpeg
It will show you which version of FFmpeg you are using...
Edit, I just checked using ffmpegupv1.7.sh and it built and installed:
FFmpeg version SVN-r24789, Copyright (c) 2000-2010 the FFmpeg developers
built on Aug 12 2010 22:01:01 with gcc 4.4.3
So all is ok.
feranick
August 15th, 2010, 04:30 AM
I am the maintainer of Lucidbleed ppa. The version of ffmpeg is a simple backport from the package currently available in Maverick.
mc4man
August 15th, 2010, 05:59 AM
I am the maintainer of Lucidbleed ppa ...
That appears to be a well rounded ppa with some replacement builds of apps that would be affected and or improved by new ffmpeg libs.
IF I was using lucid and the Lucidbleed ppa (https://launchpad.net/~lucid-bleed/+archive/ppa) I'd probably use this ppa instead for installing some updated gstreamer plugins (https://launchpad.net/~gstreamer-developers/+archive/ppa). (including the gstreamer-ffmpeg plugin
FakeOutdoorsman
August 16th, 2010, 06:58 AM
Another attempt to make the instructions work with non-English languages or locales. As we recall, the FFmpeg checkinstall command currently gives an error. En Español:
dpkg-deb - error: (origen) versión (`SVN-r') no contiene ningún dígito
dpkg-deb: 1 errores en el fichero de control
Adding LANG=C seems to solve this issue:
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | grep Revision \
| awk '{ print $NF }'`" --backup=no --default
I've only tested this on my new Spanish Ubuntu Maverick VM. As the crazy German asked in Marathon Man: "Is it safe?".
Also, I can't read Spanish.
mc4man
August 17th, 2010, 07:59 PM
What is avcore for?
FakeOutdoorsman
August 17th, 2010, 08:20 PM
Good question. According to the Add libavcore (http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=5b9b34740a10ed254ecd14e40e368 e375e7e7b97) commit:
The new library is meant to contain the core multimedia utilities for FFmpeg, to make them shareable between more libav* libraries.
...and [FFmpeg-devel] [RFC] New library for shared non-generic libav* utils (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-July/092675.html):
This new lib will contain all code/utils which need to be shared between more libav* libs, and are not enough generic to deserve a place in libavutil, which is to be considered a collection of generic/non-multimedia-related utilities.
tulpie
August 19th, 2010, 09:24 PM
I now have found this
http://www3.pic-upload.de/19.08.10/vqlfbodcs5o.png
http://wiki.ubuntuusers.de/HandBrake
my Problem was to transcode asf Stream (not seakable) in mp4 Format without video and audio delay. Couriosiusly AAC works :-)
Can Anyone inspect why it work ---> FFmpeg
Pakages are there:
https://edge.launchpad.net/~stebbins/+archive/handbrake-snapshots/+packages
My Commandline to transcode asf to mp4 is Simpel:
HandBrakeCLI -i "source.asf" -o "destination.mp4"
https://trac.handbrake.fr/wiki/CLIGuide
Hehehehehe it looks like all CPU-Cores are used.
(is it possible that this Programm realy use FFmpeg as backbone :-) :-) )))
FakeOutdoorsman
August 19th, 2010, 09:27 PM
Maybe I'm missing something obvious, but I don't understand your question.
tulpie
August 19th, 2010, 09:45 PM
I don't understand myself :-)
I am only happy that anyone compilied a nice Pakage, that use all Core's and the AAC encoder. that's all :lolflag:
mocha
August 19th, 2010, 10:47 PM
my Problem was to transcode asf Stream (not seakable) in mp4 Format without video and audio delay.
FYI, there's a neat Linux native app to deal with troublesome ASF streams here http://www.radioactivepages.com/index.php?docid=asfbin&lang=en§ion=software I use it a lot on streams I captured from sopcast.
Vrroom
August 20th, 2010, 04:35 PM
I don't know if anyone else have mentioned or not but I use this GUI for ffmpeg: Encode (http://ubuntu-vibes.blogspot.com/2010/08/encode-ffmpeg-video-converter-with-gui.html)
Linuxforall
August 20th, 2010, 05:49 PM
I don't know if anyone else have mentioned or not but I use this GUI for ffmpeg: Encode (http://ubuntu-vibes.blogspot.com/2010/08/encode-ffmpeg-video-converter-with-gui.html)
Thats a cool encoder, even though its gtk, will give it a spin, I usually use WinFF.
Vrroom
August 20th, 2010, 08:36 PM
yeah I used to have winff sometime back....but It cannot convert .ogv files. So I switched....
tulpie
August 21st, 2010, 09:09 PM
Hello Pupils,
I want you to show my Script i have made and improved.
this Script kann strip
--------- From Orginal Video -------- Input ---------
-Video duration
-aspect Ratio
-And Video dimension
-Bitrate
to set up all "optimum" Encoding result.
################################################## ######################
###Output Display:
#aim width
MAXW="400"
#aim height
MAXH="240"
#input file
INPUT=$1
#output file
OUTPUT=$2
#cut in second of beginning
V="00"
#cut from back of Video in Second
HINTENWEG="00"
#cut panel color
color="0x000000"
################################################## ##############
#change nothing until the ffmpeg line come down heer
ffmpeg -i "${INPUT}" 2> "${fileinfo}"
durati=$(cat "${fileinfo}" | gawk -F"Duration: " '{print $2}' | grep -v '^$')
hour=$(expr substr "${durati}" 1 2)
TIME=$(expr ${hour} \* 3600)
mins=$(expr substr "${durati}" 4 2)
mins=$(expr ${mins} \* 60)
TIME=$(expr ${TIME} + $mins)
secs=$(expr substr "${durati}" 7 2)
TIME=$(expr ${TIME} + ${secs})
TIME=$(expr ${TIME} + 1)
TIME=$(expr ${TIME} - $HINTENWEG)
TIME=$(expr ${TIME} + 1)
echo "###################"
echo "# TIME :${TIME}"
######## Größe genau einpassen
title=$( cat "${fileinfo}" | gawk -F"from '" '{print $2}' | sort | gawk -F: '{print $1}' | grep -v '^$' | gawk -F.avi '{print $1}')
bitra=$( cat "${fileinfo}" | gawk -Fbitrate: '{print $2}' | grep -v '^$' | gawk '{print $1}')
aspect=$(cat "${fileinfo}" | gawk -F#0.1 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1/$2}'| sed 's/ //g')
weight=$(cat "${fileinfo}" | gawk -F#0.1 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1}' | sed 's/ //g')
height=$(cat "${fileinfo}" | gawk -F#0.1 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $2}' | sed 's/ //g')
if [[ ${weight} == "stereo" ]]; then
echo "# weight=stereo"
weight=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1}' | sed 's/ //g')
height=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $2}' | sed 's/ //g')
aspect=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1/$2}'| sed 's/ //g')
fi
if [[ ${weight} == "2 channels" ]]; then
echo "# weight=2 channels"
weight=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1}' | sed 's/ //g')
height=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $2}' | sed 's/ //g')
aspect=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1/$2}'| sed 's/ //g')
fi
if [[ ${weight} == "" ]]; then
echo "# weight="
weight=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1}' | sed 's/ //g')
height=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $2}' | sed 's/ //g')
aspect=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1/$2}'| sed 's/ //g')
fi
if [[ ${weight} == "mono" ]]; then
echo "# weight=mono"
weight=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1}' | sed 's/ //g')
height=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $2}' | sed 's/ //g')
aspect=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1/$2}'| sed 's/ //g')
fi
if [[ ${weight} == "1 channels" ]]; then
echo "# weight=1 channels"
weight=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1}' | sed 's/ //g')
height=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $2}' | sed 's/ //g')
aspect=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1/$2}'| sed 's/ //g')
fi
if [[ ${weight} == "2channels" ]]; then
echo "# weight=2channels"
weight=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1}' | sed 's/ //g')
height=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $2}' | sed 's/ //g')
aspect=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1/$2}'| sed 's/ //g')
fi
if [[ ${weight} == "1channels" ]]; then
echo "# weight=1channels"
weight=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1}' | sed 's/ //g')
height=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $2}' | sed 's/ //g')
aspect=$(cat "${fileinfo}" | gawk -F#0.0 '{print $2}' | grep -v '^$' | gawk -F, '{print $3}' | gawk -F[ '{print $1}' | gawk -Fx '{print $1/$2}'| sed 's/ //g')
fi
rm "${fileinfo}"
echo "#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
echo "#title :${title}"
echo "#bitra :${bitra}"
echo "#aspect :${aspect}"
echo "#weight :${weight}"
echo "#height :${height}"
echo "#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
#Calculate padding?? :-)
maxw=$(expr ${MAXW})
maxh=$(expr ${MAXH})
kleiner="0"
#first look if any caluculation an changings are necessary
#Displays-width greater then Video-size
if [[ $(expr ${maxw}) -gt ${weight} ]]; then
#Display-high greater then Video-high
if [[ $(expr ${maxh}) -gt ${height} ]]; then
kleiner="1"
www=${weight}
hhh=${height}
fi
fi
#now it's clear.... orginal Video greater than Display
if [[ ${kleiner} == "0" ]]; then
hhh=${MAXH}
www=${MAXW}
#################################################
#Video-width greater Display-width
if [[ $(expr ${weight}) -gt ${maxw} ]]; then
www=${MAXW}
a=$(echo "scale=4 ; ${weight}/${maxw}" | bc)
h=$(echo "scale=0 ; ${height}/${a}" | bc)
### hhh keine ungerade Zahl
hh=$(echo "scale=0 ; ${h}/2" | bc)
hhh=$(echo "scale=0 ; ${hh}*2" | bc)
#Video-width smaler Displays-width
else
hhh=${MAXH}
a=$(echo "scale=4 ; ${height}/${maxh}" | bc)
w=$(echo "scale=0 ; ${weight}/${a}" | bc)
###look that www no 3,7,9,11,15,19,111 number
ww=$(echo "scale=0 ; ${w}/2" | bc)
www=$(echo "scale=0 ; ${ww}*2" | bc)
fi
#################################################
#Video-high always bigger than Display-high
if [[ $(expr ${hhh}) -gt ${maxh} ]]; then
hhh=${MAXH}
a=$(echo "scale=4 ; ${height}/${maxh}" | bc)
w=$(echo "scale=0 ; ${weight}/${a}" | bc)
###look that www no 3,7,9,11,15,19,111 number
ww=$(echo "scale=0 ; ${w}/2" | bc)
www=$(echo "scale=0 ; ${ww}*2" | bc)
#Videobreite kleiner Displaysbreite
fi
#################################################
#Video-width always bigger than Display-width
if [[ $(expr ${www}) -gt ${maxw} ]]; then
www=${MAXW}
a=$(echo "scale=4 ; ${weight}/${maxw}" | bc)
h=$(echo "scale=0 ; ${height}/${a}" | bc)
### look that hhhh no 3,7,9,11,15,19,111 number
hh=$(echo "scale=0 ; ${h}/2" | bc)
hhh=$(echo "scale=0 ; ${hh}*2" | bc)
fi
#################################################
echo "#www :${www}"
echo "#hhh :${hhh}"
echo "#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
#################################################
fi
padx="0"
pady="0"
#################################################
if [[ ! ${www} == ${MAXW} ]]; then
padx=$(echo "scale=0 ; ${MAXW}-${www}" | bc)
#padx=$(echo "scale=0 ; ${padx}/2" | bc)
fi
echo "#padx= ${padx}"
#################################################
if [[ ! ${hhh} == ${MAXH} ]]; then
pady=$(echo "scale=0 ; ${MAXH}-${hhh}" | bc)
#pady=$(echo "scale=0 ; ${pady}/2" | bc)
fi
echo "#pady= ${pady}"
echo "#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
#################################################
ffmpeg -y -i ${INPUT} -vcodec mpeg4 -b "${bitra}k" -acodec libmp3lame -f avi -ss 00:00:${V} -t ${TIME} -s ${www}:${hhh} -vf pad=${MAXW}:${MAXH}:${padx}:${pady}:${color} ${OUTPUT}.avi
there was until jet, no INPUT wich are not working with this littel script.
I knew that the work was a little bit to hard because aspect ratio would be enought for my little Player :-) :-)
Benoe
August 24th, 2010, 09:47 AM
I don't know if anyone else have mentioned or not but I use this GUI for ffmpeg: Encode (http://ubuntu-vibes.blogspot.com/2010/08/encode-ffmpeg-video-converter-with-gui.html)
I tried to install this encode but it stops with the following message:
" trying to overwrite '/usr/local/share/ffmpeg/libx264-max.ffpreset', which is also in package ffmpeg 4:SVN-r24894-1"
I think it is packaged against the ffmpeg version from the repository
tulpie
August 24th, 2010, 11:38 AM
I tried to install this encode but it stops with the following message:
" trying to overwrite '/usr/local/share/ffmpeg/libx264-max.ffpreset', which is also in package ffmpeg 4:SVN-r24894-1"
I think it is packaged against the ffmpeg version from the repository
the command line options has changed between the repository version and the svn version of ffmpeg. I don't know if the old Front-Ends use the new command line options :-) :-)
xidianzhangjun
August 25th, 2010, 08:41 AM
In the "install ffmpeg" step, "./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab"? "--enable-shared" is not required?
Benoe
August 25th, 2010, 10:22 AM
the command line options has changed between the repository version and the svn version of ffmpeg. I don't know if the old Front-Ends use the new command line options :-) :-)
Now I see that ffmpeg is already included in the Encode package. That's why it causes conflict
earthmeLon
August 25th, 2010, 05:21 PM
Thank you so much for this.
When trying to run the first command you mentioned, I got the error:
[libfaac @ 0x28a78b0] libfaac doesn't support this output format!
I changed my parameters to:
-acodec libfaac -ac 2 -ar 48000
vs what you have:
libfaac -ab 192k -ac 2
Not sure what the difference is, but it's working for me :D
prupert
August 25th, 2010, 06:02 PM
Thank you so much for this.
When trying to run the first command you mentioned, I got the error:
[libfaac @ 0x28a78b0] libfaac doesn't support this output format!
I changed my parameters to:
-acodec libfaac -ac 2 -ar 48000
vs what you have:
libfaac -ab 192k -ac 2
Not sure what the difference is, but it's working for me :D
Yeah, sometimes FFmpeg can be a bit backward and you have to tell it some things when you think they would be taken for granted. So, in your case, adding -ar 48000, which relates to the samplerate frequency which AAC requires to be at 48000.
FakeOutdoorsman
August 25th, 2010, 07:11 PM
In the "install ffmpeg" step, "./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab"? "--enable-shared" is not required?
No, it is not required. You may need it if you're compiling something else that requires FFmpeg to have --enable-shared. If you do --enable-shared, then make sure to run sudo ldconfig after FFmpeg installation.
Thank you so much for this.
When trying to run the first command you mentioned, I got the error:
[libfaac @ 0x28a78b0] libfaac doesn't support this output format!
I changed my parameters to:
-acodec libfaac -ac 2 -ar 48000
vs what you have:
libfaac -ab 192k -ac 2
Not sure what the difference is, but it's working for me :D
FFmpeg will attempt to use the same -ar as the input file. Your input probably has an -ar, such as 8000 Hz, that was incompatible with libfaac.
So, in your case, adding -ar 48000, which relates to the samplerate frequency which AAC requires to be at 48000.
AAC can use some -ar < 48000 Hz as well. I'm not sure of the range though.
earthmeLon
August 25th, 2010, 07:13 PM
FFmpeg will attempt to use the same -ar as the input file. Your input probably has an -ar, such as 8000 Hz, that was incompatible with libfaac.
Ah, so you're suggesting next time I use:
-acodec libfaac -ac 2 -ar 48000 -ab 192k
FakeOutdoorsman
August 25th, 2010, 07:35 PM
I don't know much about audio rate conversion, and I'm not sure what -ar would be optimal in your case, but if -ar 48000 sounds good to you and works on whatever device your file is playing on then go for it.
mc4man
August 25th, 2010, 09:08 PM
According to the Add libavcore commit: ect.
Thanks for that..
I've moved up to maverick and decided to put some new shared aac enabled packages in place.
While probably no advantage used a svn source rather than the 0.6 release and was a bit surprised when the new libs showed up (and nowhere to install package wise.
Went ahead and resolved that and the newer libs are fine in 10.10 - I guess down the road there will be 2 new packages as part of the ffmpeg set which has now grown to 19 possible.
(while technically improper, for various reasons I use ubuntu naming - this is the current set I've got for 10.10 (atm r24829, shared x264-104
doug@doug-laptop:~/ffmpegs/new/testup$ ls *.deb
ffmpeg_0.6-2ubuntu4_i386.deb
ffmpeg-dbg_0.6-2ubuntu4_i386.deb
ffmpeg-doc_0.6-2ubuntu4_all.deb
libavcodec-dev_0.6-2ubuntu4_i386.deb
libavcodec-extra-52_0.6-2ubuntu4_i386.deb
libavcore-dev_0.6-2ubuntu4_i386.deb
libavcore-extra-0_0.6-2ubuntu4_i386.deb
libavdevice-dev_0.6-2ubuntu4_i386.deb
libavdevice-extra-52_0.6-2ubuntu4_i386.deb
libavfilter-dev_0.6-2ubuntu4_i386.deb
libavfilter-extra-1_0.6-2ubuntu4_i386.deb
libavformat-dev_0.6-2ubuntu4_i386.deb
libavformat-extra-52_0.6-2ubuntu4_i386.deb
libavutil-dev_0.6-2ubuntu4_i386.deb
libavutil-extra-50_0.6-2ubuntu4_i386.deb
libpostproc-dev_0.6-2ubuntu4_i386.deb
libpostproc-extra-51_0.6-2ubuntu4_i386.deb
libswscale-dev_0.6-2ubuntu4_i386.deb
libswscale-extra-0_0.6-2ubuntu4_i386.deb
FakeOutdoorsman
August 25th, 2010, 09:19 PM
...and was a bit surprised when the new libs showed up
There is another possible addition in the works:
[FFmpeg-devel] [PATCH] Add libavsequencer (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-August/094880.html)
The new library is meant to contain the sequencer multimedia features for being able to playback modules and MIDI files in FFmpeg.
earthmeLon
August 25th, 2010, 09:30 PM
I am getting this warning:
Warning, using s16 intermediate sample format for resampling.
I have no clue what this means. If it's bad, please let me know :D
FakeOutdoorsman
August 25th, 2010, 09:35 PM
It's nothing to worry about if your output sounds fine to you. Can you show your FFmpeg command and the complete output?
tock
August 26th, 2010, 03:55 PM
I'm having trouble getting ffmpeg to find the x264 encoder. I used the link you have posted under the install x264 section to install the latest version (libx264-104). The package manager shows it to be installed but ffmpeg isn't finding it. When I try to remove it using apt-get remove x264 is says that it isn't installed. How do I get ffmpeg to find the newest x264?
earthmeLon
August 26th, 2010, 05:43 PM
I am getting 10FPS, but I think I should be going a bit faster...
I have changed --threads=0 to --threads=4 && --threads=5 to no avail v_v
ffmpeg -i /home/daryl/Desktop/encodes/PIC_0056.MOV -acodec libfaac -ac 2 -ar 48000 -ab 192k -vcodec libx264 -vpre slow -crf 22 -threads 5 /home/daryl/Desktop/encodes/out/pic_0056.mov.x264.mp4
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
stepping : 5
cpu MHz : 1734.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 3457.67
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
stepping : 5
cpu MHz : 933.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 3025.84
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
stepping : 5
cpu MHz : 933.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 3457.94
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
stepping : 5
cpu MHz : 1066.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 3457.94
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
stepping : 5
cpu MHz : 1734.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 3457.95
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
stepping : 5
cpu MHz : 933.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 3457.94
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
stepping : 5
cpu MHz : 1734.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 5
initial apicid : 5
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 3457.94
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 30
model name : Intel(R) Core(TM) i7 CPU Q 740 @ 1.73GHz
stepping : 5
cpu MHz : 1734.000
cache size : 6144 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 3457.95
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
Linuxforall
August 27th, 2010, 05:12 AM
Thats a surprise, I get far better FPS with my dual XEONs, with i7 it should be on fire.
mullens101
August 27th, 2010, 11:57 AM
earthmeLon,
What's top show your CPU load as while encoding (each CPU ... is ffmpeg attaching to one core or using all) and, more importantly, what are you encoding? (That is, what resolution are you encoding ... HD?) If you post what source resolution is, I'll run a matching sample on my Phenom II x4 and let you know what I get. RF 22 is a pretty high number ab should be faster, I typically use 20 (then again, I also typically use handbrake since it's easy and uses ffmpeg at its core)
FakeOutdoorsman
August 29th, 2010, 05:26 AM
I'm having trouble getting ffmpeg to find the x264 encoder. I used the link you have posted under the install x264 section to install the latest version (libx264-104).
What link are you referring to?
The package manager shows it to be installed but ffmpeg isn't finding it. When I try to remove it using apt-get remove x264 is says that it isn't installed. How do I get ffmpeg to find the newest x264?
What errors messages does FFmpeg tell you when it can't find x264? If there is a ~/ffmpeg/config.err (or maybe it's config.log) you can check the end of that file for more information.
I am getting 10FPS, but I think I should be going a bit faster...
I have changed --threads=0 to --threads=4 && --threads=5 to no avail v_v
When -threads is set to 0 it tells libx264 to automatically use an appropriate value for your CPU.
I can't say if your encode is being slow because your encoding time can vary among inputs. Experiment with other -vpre. You can see a current list of presets ordered by speed on the FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/). The slower presets will generally create a smaller output file but result in a longer encoding time. The -crf option can also affect your encoding speed, but I usually adjust the -vpre if I require faster encoding.
For comparison, re-encoding IronMan.mkv (http://mirror05.x264.nl/Dark/x264clips/IronMan.mkv) on an Intel i7 860 using FFmpeg r24961 and x264 0.104.1703 on Arch Linux x86_64:
$ time ffmpeg -i IronMan.mkv -vcodec libx264 -vpre slow -crf 22 -threads 0 -an -y output.mkv
real 2m43.037s
user 19m38.916s
sys 0m2.663s
tock
September 2nd, 2010, 04:40 PM
FakeOutdoorsman,
this is the link I used (http://ftp.itsuki.fkraiem.org/pub/x264/)
I went back and deleted the temp directories then tried just using the commands you layed out and it worked. but when I used the links to get the latest versions, I couldn't get ffmpeg to compile correctly.
After getting it installed and using the single pass preset to convert from avchd to h.264, the play back is still very lagging using gui-mplayer. Its a X2 amd with 2 gig of ram. How much horsepower does it take to play back h.264?
Thanks for the reply
mc4man
September 2nd, 2010, 07:25 PM
I went back and deleted the temp directories then tried just using the commands you layed out and it worked. but when I used the links to get the latest versions, I couldn't get ffmpeg to compile correctly.
You need for building ffmpeg both the libx264-XXX and companion libx264-dev packages installed
FakeOutdoorsman
September 2nd, 2010, 08:04 PM
FakeOutdoorsman,
this is the link I used (http://ftp.itsuki.fkraiem.org/pub/x264/)
I went back and deleted the temp directories then tried just using the commands you layed out and it worked. but when I used the links to get the latest versions, I couldn't get ffmpeg to compile correctly.
I'm not sure why Bachstelze's x264 package didn't work for you. I've never tested it myself. I put a note on the guide mentioning that I can't support these packages, but I'll leave the link for those who want to use it.
After getting it installed and using the single pass preset to convert from avchd to h.264, the play back is still very lagging using gui-mplayer. Its a X2 amd with 2 gig of ram. How much horsepower does it take to play back h.264?
It depends on the video you are trying to play and if you have any type of hardware accelerated decoding (VDPAU or any of those fancy things). The users in the #ffmpeg or #x264 IRC channels will know if your hardware is adequate. Just make sure to use a pastebin service to show some info about your file. Give them the output of: ffmpeg -i input.foo.
Cypress421
September 3rd, 2010, 03:55 AM
One question, I have the Medibuntu repository, this won't update new codecs from Medibuntu over the FFmpeg or x264 builds i.e. overwrite the newest SVN codecs that I've compiled with older ones? Will Ubuntu via Update Manager ever overwrite these files either?
bdebaere
September 3rd, 2010, 06:21 AM
I have a problem at step 6. When you install ffmpeg. I executed every step so far including the optional one however when I get here it says:
ERROR: libx264 not found
when I try to execute the line in the terminal.
Any assisstance would be appreciated, thanks.
Cypress421
September 3rd, 2010, 06:34 AM
Did you follow the x264 instructions correctly?
bdebaere
September 3rd, 2010, 06:50 AM
Did you follow the x264 instructions correctly?
Yes, I'm quite sure as all I did was
CTRL+C
SHIFT+CTRL+V
EDIT: if I wanted to restart the whole process and just begin from step 1, what would I have to do?
prupert
September 3rd, 2010, 11:23 AM
One question, I have the Medibuntu repository, this won't update new codecs from Medibuntu over the FFmpeg or x264 builds i.e. overwrite the newest SVN codecs that I've compiled with older ones? Will Ubuntu via Update Manager ever overwrite these files either?
It shouldn't do, as Ubuntu will see that the SVN version is more recent than the Mediabuntu one.
However, if you enabled Mediabuntu to install an app that uses FFmpeg, you might find there are issues if that app requires a specific version of FFmpeg, as the newer SVN versions may not be compatable..
prupert
September 3rd, 2010, 11:28 AM
EDIT: if I wanted to restart the whole process and just begin from step 1, what would I have to do?
The easiest thing is, if you want to restart, is to issue:
sudo apt-get remove ffmpeg x264 libx264-dev
Then delete the two folders x264 and ffmpeg that you downloaded the source to.
Then you can start again.
bdebaere
September 3rd, 2010, 11:59 AM
The easiest thing is, if you want to restart, is to issue:
sudo apt-get remove ffmpeg x264 libx264-dev
Then delete the two folders x264 and ffmpeg that you downloaded the source to.
Then you can start again.
Ok I went trough the whole setup again and this time I could execute all commands without trouble. I do have some questions though:
With these installed, is it now possible for me to use this as codec in Pitivi?
Can I now convert to x264 with Downloadhelper addon for Firefox?
Thanks for your help
prupert
September 3rd, 2010, 12:18 PM
If they both support x264 then it should work....
dannyboy79
September 5th, 2010, 02:04 PM
well, after using the google bash script to update to latest svn ffmpeg and x264 git my kdenlive no longer renders files to h264. ddkennedy from kdenlive forums believes its due to me using a mlt package from sanub's PPA along with ffmpeg and x264 from svn and git. this setup was working for weeks so I am not sure what the correct course of action is. Here's what's installed:
melt = 0.5.6-0ubuntu0~sunab~lucid1
ffmpeg = FFmpeg version SVN-r25041, Copyright (c) 2000-2010 the FFmpeg developers
built on Sep 4 2010 08:58:47 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
x264 = git
kdenlive = 7.7.1 (from ubuntu repos)
his comment on 9-5-10 is this:
"I just tested today's checkouts of x264 and ffmpeg, built from source, and it worked for me using kdenlive's render options. So, that's not it. It is possible the mlt package was not rebuilt using the version of ffmpeg that you are using. How did you install ffmpeg and x264? If they did not come from sunab's repo, then his repo may not be synchronized with whatever repo you grabbed x264 and ffmpeg from. Certainly, if you build those from source yourself, then it will be a problem. You can not arbitrarily update dependencies like that."
so, what does that mean for me? i am asking him over there but this forum is more active so I am asking here also.
-Do I rebuild mlt from source instead of using sanub's .5.6 mlt?
-do I somehow go back to a previous svn of ffmpeg? How to do that since I am using the google bash script that updates svn ffmeg and x264 from git?
I was able to render to h264/aac about 2 days ago so I am stuck now. Any help would be appreciated. Please anyone help, I need to get videos done for my youtube channel.
prupert
September 5th, 2010, 05:17 PM
It seems you are trying to use FFmpeg for two different things:
1) Have the most recent version from SVN
2) Use it as part of kdenlive.
I am not sure what the sanub PPA is for, is this where you get kdenlive from?
If so, if you want to use the bleeding edge of kdenlive, yes, I would build from source - but even that way, you might find occasionally updating to the latest version of FFmpeg via my script (the google code one) might break kdenlive.
If I were you, the easiest solution is to stop using my script, uninstall ffmpeg and x264 and stick to just using the PPA that you were using. That way, there will never be dependency problems. You wont be using the most recent version of FFmpeg, but there will never be an issue with it not working.
dannyboy79
September 5th, 2010, 08:22 PM
It seems you are trying to use FFmpeg for two different things:
1) Have the most recent version from SVN
2) Use it as part of kdenlive.
I am not sure what the sanub PPA is for, is this where you get kdenlive from?
If so, if you want to use the bleeding edge of kdenlive, yes, I would build from source - but even that way, you might find occasionally updating to the latest version of FFmpeg via my script (the google code one) might break kdenlive.
If I were you, the easiest solution is to stop using my script, uninstall ffmpeg and x264 and stick to just using the PPA that you were using. That way, there will never be dependency problems. You wont be using the most recent version of FFmpeg, but there will never be an issue with it not working.i am using sanub's PPA for melt .5.6. I believe the combination of melt from his PPA and the latest svn ffmpeg is broken. I am not sure how to go back to a previous build or 2 of ffmpeg. I dont know how to install mlt from source as I have tried and I just keep getting failures. if you could tell me how to change your script to install a previous svn version of ffmpeg I would be greatful.
kdenlive is from ubuntu repo's. 7.7.1
this is weird because ffmpeg from svn at version 24084 worked just fine
mc4man
September 5th, 2010, 10:53 PM
because ffmpeg from svn at version 24084 worked just fine
If you used this script previously then what did you do with the checkinstall .deb's for ffmpeg and x264? (maybe they're still in the source folders
If so, you can then use dpkg to downgrade your current installs to those versions.
dannyboy79
September 5th, 2010, 11:27 PM
If you used this script previously then what did you do with the checkinstall .deb's for ffmpeg and x264? (maybe they're still in the source folders
If so, you can then use dpkg to downgrade your current installs to those versions.
awesome idea except when i check the /usr/local/src/ folder there is nothing but a ffmpeg r25042.deb. Thanks for the suggestion. I dont know how to compile mlt against this version of ffmpeg. If I did I think i could solve my issue.
ffmpeg works fine from command line, its when I try to use kdenlive which uses the mlt framework to put in transitions and what not. I get a useless file when rendering. so my last hump to get over is to compile mlt. If I knew what ./configure options I needed to run I'd be good to go.
qyot27
September 5th, 2010, 11:56 PM
All things considered, I think this is a good reason why maintaining separate ffmpeg installations is a good idea. Use the regular kdenlive setup as needed, the stability of the components outweighs the need for bleeding edge. I'm saying this out of my own experience in video editing (albeit on Premiere 6.5 under Windows, so this doesn't apply directly to me), as well as doing fairly regular SVN compiles of ffmpeg; you don't want your editor to break, so if there's a conflict, you need to keep them separate.
Basically, keep kdenlive as it is when it's working, and then install SVN ffmpeg as static to a separate prefix (like /opt or something). Hopefully that would solve the issue, as I'm assuming the problem is arising because the SVN ffmpeg is being built shared, and that's why it's messing with kdenlive's dependencies. If you build static this shouldn't happen, and putting it in a completely different prefix is just further precaution that the two installs are kept in order. I don't know, however, if a conflict would occur with the two ffmpeg apps themselves if you added the new prefix to the $PATH, as it would have to decide which ffmpeg binary to use. But you can circumvent that by not adding the SVN ffmpeg to the $PATH and calling it manually, e.g.,
/opt/bin/./ffmpeg [options]
EDIT: Oh yeah, the way to checkout an arbitrary revision of a project from SVN is to use the -r [revision] parameter, like so:
svn checkout -r 20056 svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
Will checkout revision 20056 instead of the latest. You just have to know what revision you need.
andrew.46
September 6th, 2010, 12:58 AM
Hi qyot,
EDIT: Oh yeah, the way to checkout an arbitrary revision of a project from SVN is to use the -r [revision] parameter, like so:
svn checkout -r 20056 svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
Will checkout revision 20056 instead of the latest. You just have to know what revision you need.
Mind you there is a small problem with this approach in that the syntax you have given will download revision 20056 of all of FFmpeg except libswscale which will be the latest svn HEAD, it is an external library. Failure to compile can result. A slightly unwieldy way to correct this is to download revisions by date rather than revision:
$ svn co -r '{'2010-02-18'}' svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
$ cd ffmpeg/libswscale
$ svn up -r '{'2010-02-18'}'
although there are other methods...
Andrew
qyot27
September 6th, 2010, 02:10 AM
Mind you there is a small problem with this approach in that the syntax you have given will download revision 20056 of all of FFmpeg except libswscale which will be the latest svn HEAD, it is an external library. Failure to compile can result.
So it seems. I never noticed that before. Then again most times I work with ffmpeg revisions that far in the past it's on other branches that are restricted to git, and you have to grab libswscale manually afterward (making date cohesion more of an obvious task).
A slightly unwieldy way to correct this is to download revisions by date rather than revision:
$ svn co -r '{'2010-02-18'}' svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
$ cd ffmpeg/libswscale
$ svn up -r '{'2010-02-18'}'
although there are other methods...
Andrew
I suppose it could be do-able by having a script with nearly identical syntax to svn checkout that queries ffmpeg's svn log by revision, copies the date/time from the entry, and then performs the aforementioned date-based checkout.
So the command given would be something like:
ffcheckout -r 20056 svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
But what would go on is:
svn log -r 20056 svn://svn.ffmpeg.org/ffmpeg/trunk
r20056 | mru | 2009-09-27 04:16:50 -0400 (Sun, 27 Sep 2009) | 1 line
(copies '2009-09-27 04:16:50 -400' from the log entry)
svn co -r '{'2009-09-27 04:16:50 -400'}' svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg/libswscale
svn up -r '{'2009-09-27 04:16:50 -400'}'
dannyboy79
September 6th, 2010, 04:59 AM
i am not building ffmpeg with shared libraries. the ./configure command is here:
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
i understand you guys are trying to help but since I am using kdenlive which really depends on the mlt framework I am SOL at the moment because I can't seem to build a previous version of ffmpeg (r24084) and still use the sanub PPA for mlt .5.6. Kdenlive is being retrieved from normal ubuntu repos (7.7.1). all these libraries and dependencies are driving me nuts and I am just about ready to do a fresh install. I don't think that would fix my issue either though. I have tried the medibuntu repos and NO sanub PPA repo and still kdenlive won't render to h264. i noticed it was using melt .5.4.
I just wish now that I hadn't updated to the latest SVN of ffmpeg. My setup was running great 3 days ago. Now I htink I've buggered so much crap up I don't know what to do.
I tried to update the google bash script so it would download and install r24084 of ffmpeg but that didn't work either. AHHHHHHHHHHHHHH
Dang it, I wish I understood all these libav* libraries and what not. All these guides are great for merely ffmpeg and x264 but what about the mlt framework and kdenlive. I can't believe there are more video editors out there with a similar situation. Any help would be appreciated.
mc4man
September 6th, 2010, 06:50 AM
Well obviously your current ffmpeg and x264 are doing you no good so remove them
sudo apt-get remove ffmpeg x264
Then you could build a new x264 and ffmpeg without a script using older sources - using this guide (just different sources
What would be far easier is to just use the lucid ffmpeg, libx264, and your sunab repo with medibuntu also enabled.
To do that re-enable both sunab and medibuntu repo's, then run
sudo apt-get update
sudo apt-get install ffmpeg libx264
and ck. in synaptic that you have the extra versions of the ffmpeg libs installed. Search ffmpeg and scroll down ( libavcodec-extra-52, libavformat-extra-52, ect. - if not just mark the extra versions for install, synaptic will upgrade for you
If you wish to try to build a newer ffmpeg and x264 than the default lucid versions then a couple of commands will do so - I'd try the default lucid libs first.
If you know you wish to try building again then just remove as noted above and post back.
(small note - maverick will have a newer ffmpeg (0.6), a newer mlt (0.5.6) and your kdenlive should work fine
dannyboy79
September 6th, 2010, 11:44 AM
mc4man,
thanks for trying to help but the lucid ffmpeg (with extra libs) and x264 don't work with sanub's mlt. As I tried to explian mlt needs to be built against a particular ffmpeg installed. I have tried the lucid mlt package which is .5.4 and that doesn't work either as I end up getting conflicts with dependencies of libswscale or something like that.
i have veen tried to build an older version of ffmpeg but I get compiling errors also. There must be locations of files I am not removing or something which is why I really liked the google bash script but I just wish it would do a certain revision of svn.
as a side note I get this error at the end when trying to make ffmpeg r24084, do I just continue and do the checkinstall anyway?
libswscale/rgb2rgb.c: In function ‘palette8tobgr16’:
libswscale/rgb2rgb.c:234: error: implicit declaration of function ‘av_bswap16’
make: *** [libswscale/rgb2rgb.o] Error 1
checkinstall also fails:
========================= Installation results ===========================
INSTALL libavdevice/libavdevice.a
INSTALL libavfilter/libavfilter.a
INSTALL libavformat/libavformat.a
INSTALL libavcodec/libavcodec.a
INSTALL libpostproc/libpostproc.a
CC libswscale/rgb2rgb.o
libswscale/rgb2rgb.c: In function ‘palette8tobgr16’:
libswscale/rgb2rgb.c:234: error: implicit declaration of function ‘av_bswap16’
make: *** [libswscale/rgb2rgb.o] Error 1
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
andrew.46
September 6th, 2010, 12:23 PM
Hmmmm.... it will be of little help in this situation but in fact mlt 0.5.4 does compile against an up to date system svn FFmpeg and in fact I have just done this. The catch being that I compiled it on Slackware (http://slackbuilds.org/repository/13.1/multimedia/mlt/), perhaps there are a few hints in this build script? I will have a shot at kdenlive in the morning and see if it all hangs together, some monster dependencies in there though....
Andrew
dannyboy79
September 6th, 2010, 12:25 PM
Hmmmm.... it will be of little help in this situation but in fact mlt 0.5.4 does compile against an up to date system svn FFmpeg and in fact I have just done this. The catch being that I compiled it on Slackware (http://slackbuilds.org/repository/13.1/multimedia/mlt/), perhaps there are a few hints in this build script? I will have a shot at kdenlive in the morning and see if it all hangs together, some monster dependencies in there though....
Andrew
i was trying to build mlt .5.6 not .5.4. I just didn't know what to use for ./configure options. i will check out the link you provided thanks. this is driving me nuts.
andrew.46
September 6th, 2010, 12:31 PM
I note in ./configure --help for mlt 5.4:
NOTE: The recommended version of FFmpeg is SVN-r21322.
There will no doubt be a similar recommendation in ./configure --help for mlt 5.6?
Edit: For mlt 5.6:
andrew@skamandros~/Desktop/mlt-0.5.6$ ./configure --help | grep 'recommended version'
NOTE: The recommended version of FFmpeg is 0.6.
Andrew
Linuxforall
September 6th, 2010, 04:19 PM
I have sunab's ppa added for KDENLIVE and I use x264 and ffmpeg as well as Mplayer via FO's and Andrew's instructions. I just applied effects via KDENLIVE to few movies and then saved them under various formats using x264 or ffmpeg and all of then worked out fine here.
dannyboy79
September 6th, 2010, 06:07 PM
I have sunab's ppa added for KDENLIVE and I use x264 and ffmpeg as well as Mplayer via FO's and Andrew's instructions. I just applied effects via KDENLIVE to few movies and then saved them under various formats using x264 or ffmpeg and all of then worked out fine here.
weird, his ffmpeg-trunk and sanub2 repos say they are for intrepid and older releases not lucid. I have tried to do it and I got a dependency error with
The following packages have unmet dependencies:
kdenlive: Depends: libavfilter-extra-0 but it is not going to be installed
E: Broken packages
what version of melt are you using? if I could see your sources.list that would be cool. I am really stuck and irritated that this isn't working anymore. Could you please let me know what version of ffmpeg you're using all libraries? Everytime I try I get a zero length file if I try to encode to xvid or x264.
mc4man
September 6th, 2010, 07:16 PM
The lucid ffmpeg (with extra libs) and x264 don't work with sanub's mlt.
Interesting because than why would he be publishing lucid packages built off of the lucid ffmpeg source. (without providing an updated ffmeg and libs.
There are 2 sunab ppa's, one just provides a mlt package and uses the lucid kdenlive version
https://launchpad.net/~sunab/+archive/ppa?field.series_filter=lucid
The other (sunab2) provides both a kdenlive and mlt package
https://launchpad.net/~sunab/+archive/sunab2/+packages?field.name_filter=&field.status_filter=published&field.series_filter=lucid
You've stated you're using the lucid kdenlive, if that's the case you should be using the stable ppa
kdenlive = 7.7.1 (from ubuntu repos)
If you're using sunab2 then you should be using his kdenlive package, not lucid's.
It's quite likely the kdenlive and mlt packakes from sunab2 will work with newer ffmpeg sources in addition to the default lucid versions
Linuxforall
September 7th, 2010, 03:31 AM
weird, his ffmpeg-trunk and sanub2 repos say they are for intrepid and older releases not lucid. I have tried to do it and I got a dependency error with
The following packages have unmet dependencies:
kdenlive: Depends: libavfilter-extra-0 but it is not going to be installed
E: Broken packages
what version of melt are you using? if I could see your sources.list that would be cool. I am really stuck and irritated that this isn't working anymore. Could you please let me know what version of ffmpeg you're using all libraries? Everytime I try I get a zero length file if I try to encode to xvid or x264.
FFmpeg version SVN-r25050, Copyright (c) 2000-2010 the FFmpeg developers
built on Sep 6 2010 23:40:30 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50.25. 0 / 50.25. 0
libavcore 0. 6. 0 / 0. 6. 0
libavcodec 52.87. 1 / 52.87. 1
libavformat 52.78. 3 / 52.78. 3
libavdevice 52. 2. 1 / 52. 2. 1
libavfilter 1.38. 1 / 1.38. 1
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
kdenlive installed from https://launchpad.net/~sunab/+archive/ppa
dannyboy79
September 7th, 2010, 04:19 PM
FFmpeg version SVN-r25050, Copyright (c) 2000-2010 the FFmpeg developers
built on Sep 6 2010 23:40:30 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50.25. 0 / 50.25. 0
libavcore 0. 6. 0 / 0. 6. 0
libavcodec 52.87. 1 / 52.87. 1
libavformat 52.78. 3 / 52.78. 3
libavdevice 52. 2. 1 / 52. 2. 1
libavfilter 1.38. 1 / 1.38. 1
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
kdenlive installed from https://launchpad.net/~sunab/+archive/ppa
something is very different between your setup and mine then. I already tried ffmpeg from svn r25042 along with kdenlive from lucid repo an mlt from sanub repo. U say u get kdenlive from sanub repo but that ppa doesn't have kdenlive, only mlt .5.6 for lucid. There's an option to encode to h264 and aac but the file I get is zero an when I run mediainfo on it there is no info. It contains no audio or video streams.
I never checked to make sure my location I'm writing to is full but I would have thought kdenlive wouldve thru an error saying it couldn't write to that location. Will be checking that first thing when I get home from today. On my iPhone currently. Thanks for telling me that works it's just very strange it doesn't for me not to mention dan from kdenlive and sanub both have told me due to ffmpeg API freequent changes it's not smart to run ffmpeg from svn with packages from lucid repo (kdenlive) and a ppa (mlt)
mc4man
September 7th, 2010, 08:11 PM
with packages from lucid repo (kdenlive) and a ppa (mlt)
use the kdenlive from the ppa - sanab2 (linked above
dannyboy79
September 8th, 2010, 01:13 AM
use the kdenlive from the ppa - sanab2 (linked aboveyou're right, thanks
ok. i had a major brain fart and apparently kdenlive was writing zero size files because my hard drive that kdenlive was trying to save the rendered file to was full. Now I am all good. I ended up with this combination of software.
ffmpeg = medibuntu repo (SVN-r0.5.1-4:0.5.1-1ubuntu1)
libavcodec-extra-52 and all other ffmpeg libraries (4:0.5.1-1ubuntu1+medibuntu1)
mlt = sanub2 PPA (0.5.7+git20100907.c8b11129-0ubuntu0~sunab~lucid1)
kdenlive = sanub2 PPA (0.7.7.1+svn20100907.r4857-0ubuntu0~sunab~lucid1 )
I will say the new kdenlive has a slicker look and I can now see the audio wave pictoral within the timeline so I know where to cut if I am looking for a no audio point. I can now encode to x264 and aac again. I love it!!!
Peter Goldstein
September 16th, 2010, 07:39 AM
I'm running into an issue on the configure step of the ffmpeg library install. I'm on a relatively vanilla Ubuntu 10.04 install and I've confirmed that the libmp3lame-dev package is installed. When I run configure with the suggested flags I get:
ERROR: libmp3lame not found
Any thoughts?
Any help would be appreciated. Thanks.
FakeOutdoorsman
September 16th, 2010, 09:45 AM
After being throughly flamed by some developers I found out that revision 25128 (http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=4cf73bf5f2ffdd3a6d72db2750fbd c623ddfc93e) caused FFmpeg to now require LAME ≥ 3.98.3 (I know better...I should have more throughly checked the commitdiff). I will update the guide tomorrow with a LAME compilation section. Until then you can omit --enable-libmp3lame. If you require mp3 audio encoding, then you can use a pipe as in:
ffmpeg -i input.foo -f wav - | lame -V5 - output.mp3
andrew.46
September 16th, 2010, 09:55 AM
Hi FakeOutdoorsman,
I will update the guide tomorrow with a LAME compilation section.
That 'rolling release' model for your guide must be looking good round about now :).
Andrew
FakeOutdoorsman
September 16th, 2010, 10:11 AM
Hi FakeOutdoorsman,
That 'rolling release' model for your guide must be looking good round about now :).
Andrew
Hi Andrew,
Yes, definitely. As you've probably noticed a few of my Lucid updates never made it to the earlier guides.
Perhaps starting with 10.10 I will begin the 'rolling release' model. Thoughts?
For those wondering what Andrew and I are talking about see Howto: Build the svn MPlayer under the latest release version of Ubuntu (http://ubuntuforums.org/showthread.php?t=1542240) for an example.
andrew.46
September 16th, 2010, 11:00 AM
Hi FakeOutdoorsman,
Perhaps starting with 10.10 I will begin the 'rolling release' model. Thoughts?
It is a difficult question. I admire the way that you have covered so many releases of Ubuntu in a single guide and I am sure that this is at least part of the reason that your guide is so successful. Having said that I am sure there is a significant workload involved in keeping so many Ubuntu releases covered, the change in the rules with lame being a perfect example.
I will be interested to hear the thoughts of others who use your guide :).
Andrew
verb3k
September 16th, 2010, 04:56 PM
I will be interested to hear the thoughts of others who use your guide :).
Andrew
FakeOutdoorsman should be in the FFmpeg Hall of Fame by now :)
He really contributed a lot to uplift the state of multimedia handling/encoding for users of ubuntu and other distros. He's always provided support to people on the forums, mailing list and IRC.
I personally am very grateful to FakeOutdoorsman, and would like to thank him very warmly for everything.
FakeOutdoorsman
September 16th, 2010, 08:11 PM
I will update the guide tomorrow
Updated with a new LAME section. I took a slightly different approach to this package since so many repository packages depend on LAME. It will probably work fine alongside the repository LAME, but I didn't test that very much. I'm not sure if the method I used is the best way to go, but I think it will work for now. Perhaps Andrew's method in Howto: Build the development version of vlc under Ubuntu (http://ubuntuforums.org/showthread.php?t=1398119) is the best way to provide external libraries for FFmpeg while not replacing any official repository packages. Ahhh...package management. So boring. Let's just get to the encoding already.
FakeOutdoorsman should be in the FFmpeg Hall of Fame by now :)
He really contributed a lot to uplift the state of multimedia handling/encoding for users of ubuntu and other distros. He's always provided support to people on the forums, mailing list and IRC.
I personally am very grateful to FakeOutdoorsman, and would like to thank him very warmly for everything.
Thanks! Much appreciated.
DragGon7601
September 16th, 2010, 08:30 PM
The FFMpeg from the repository don't read some of the files I have (encoded in a newer x264 codec, I think).
The FFMpeg I get from this has trouble with the commands I give it. E.g it complains about not knowing what todo with the '-title "Movie name"' I was using, tried '-metadata title="my title"' but then all I got was the file name on my PSP (not the title I had given it).
If I change the '--pkgname=ffmpeg' part of the checkinstall command to '--pkgname=ffmpeg2' would it change the command line I use? Would I be able to use the Repository one with 'FFMpeg -i input.avi something.mp4' and the one I get from this guide with 'FFMpeg2 -i input.avi something.mp4'... Would they have some other conflict?
FakeOutdoorsman
September 17th, 2010, 02:38 AM
The FFMpeg from the repository don't read some of the files I have (encoded in a newer x264 codec, I think).
An older FFmpeg could be able to decode video form a newer x264. Can you show your command and the complete output?
The FFMpeg I get from this has trouble with the commands I give it. E.g it complains about not knowing what todo with the '-title "Movie name"'
This option was basically renamed to what you're using below.
I was using, tried '-metadata title="my title"' but then all I got was the file name on my PSP (not the title I had given it).
Can you show your command and the complete output? I don't own a PSP, so I'm not sure why it won't accept the title.
If I change the '--pkgname=ffmpeg' part of the checkinstall command to '--pkgname=ffmpeg2' would it change the command line I use?
Sorry. I don't understand what you are asking.
Would I be able to use the Repository one with 'FFMpeg -i input.avi something.mp4' and the one I get from this guide with 'FFMpeg2 -i input.avi something.mp4'... Would they have some other conflict?
You can probably have both the repository version and a compiled FFmpeg on the same system. Just change the pkgname to something else like ffmpeg-svn (you'll probably want to do the same for x264, as in x264-git). By default, the ffmpeg command in your terminal will use the compiled ffmpeg in /usr/local/bin, but you can use an absolute path if you want to access the repository ffmpeg. Example:
/usr/bin/ffmpeg -i input ...
ron999
September 17th, 2010, 04:23 PM
Hi fakeoutdoorsman
I saw your reply at post #1263 above.
Today when I tried to update ffmpeg from version SVN-r24802 I had the same config error libmp3lame >=3.98 not found.
I went back to the beginning of the thread and installed lame-ffmpeg v3.98.4 following step 5.
This has definitely installed lame-ffmpeg in Synaptic, but I still got the config error.
I don't really understand what good this has done.
Since then I've downloaded and installed libmp3lame0_3.98.4-0.0_i386.deb and libmp3lame-dev_3.98.4-0.0_i386.deb
From here:-http://debian-multimedia.org/pool/main/l/lame/lame.php"]http://debian-multimedia.org/pool/main/l/lame/lame.php
Now ffmpeg has compiled OK.:D
Please will you explain about step 5.:confused:
ron@ubuntu:~$ ffmpeg -h
FFmpeg version SVN-r25140, Copyright (c) 2000-2010 the FFmpeg developers
built on Sep 17 2010 16:11:20 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --disable-encoder=vorbis
mc4man
September 17th, 2010, 05:01 PM
This has definitely installed lame-ffmpeg in Synaptic, but I still got the config error.
Even though /usr/local usually trumps /usr. in this case make sure the you've uninstalled the previous libmp3lame-dev package
ron999
September 17th, 2010, 05:42 PM
OK mc4man
But now I have got installed:-
lame-3.98.4-0
lame-ffmpeg-3.98.4-1
libmp3lame0-3.98.4-0
libmp3lame-dev-3.98.4-0
So is that package lame-ffmpeg-3.98.4-1 now redundant?
If I un-install it will ffmpeg work OK using those other packages instead?
FakeOutdoorsman
September 17th, 2010, 06:30 PM
Please will you explain about step 5.:confused:
I needed to add LAME compilation because a recent FFmpeg revision requires a LAME that is newer than what is available in the repository. Note that I have not tested anything on Karmic yet, but I doubt it would be much different. I'm not sure why it did not work for you, but I'll fire up the Karmic VM and try it there too.
I'd be careful using stuff from debian-multimedia. Just keep in mind that you have packages from there if things go wrong.
Even though /usr/local usually trumps /usr. in this case make sure the you've uninstalled the previous libmp3lame-dev package
For Lucid, I made sure that I left the previous libmp3lame-dev from the repository to see if it would interfere with the installation, but it did not seem to, so I didn't add any note to remove it although it's probably a good idea. I'll add that to the guide.
FakeOutdoorsman
September 17th, 2010, 07:09 PM
Karmic guide updated. There are a few differences with Karmic compared to Lucid:
I had to remove --enable-nasm from the LAME ./configure or I would encounter make errors.
libmp3lame-dev interferes with LAME detection when running ./configure in FFmpeg.
mc4man
September 17th, 2010, 07:14 PM
There are a few differences with Karmic
That's what I also noticed, had tried the lame deal on karmic to match what what Ron was using.
I'd be careful using stuff from debian-multimedia...
Extremely good advice, the lame packages (at current builds) are probably ok, if they're updated I'd be wary.
ron999
September 17th, 2010, 07:25 PM
Right thanks.
I'll stay with these Debian packages for now then.
If I hit any problems I'll revert to the repo versions and lame-ffmpeg.
:D
spacechampion
September 17th, 2010, 09:28 PM
I seemed to install the qt-faststart fine, but I get an error when I try to run it:
sh: qt-faststart: not found
I'm sure it is simple issue, but I don't know what to do about it. Is the installation instructions assuming we know how to make qt-faststart executable from any directory? Or does it assume I am in a particular directory? How do I get it to know where to find it?
FakeOutdoorsman
September 17th, 2010, 09:34 PM
The old libx264 presets have been removed today from FFmpeg SVN which include: default, fastfirstpass, hq, max, normal, and slowfirstpass.
If you were using one of these presets and want to update FFmpeg, then you will need to use one of the newer presets that are modeled after the official x264 presets.
You can see what presets that are available to you in the /usr/local/share/ffmpeg directory.
FakeOutdoorsman
September 17th, 2010, 09:49 PM
I seemed to install the qt-faststart fine, but I get an error when I try to run it:
sh: qt-faststart: not found
I'm sure it is simple issue, but I don't know what to do about it. Is the installation instructions assuming we know how to make qt-faststart executable from any directory? Or does it assume I am in a particular directory? How do I get it to know where to find it?
Are you using Ubuntu? If yes, what version are you using? I would expect to see bash, not sh. qt-faststart should be executable from any directory if it installed correctly.
$ whereis qt-faststart
qt-faststart: /usr/local/bin/qt-faststart
spacechampion
September 18th, 2010, 04:55 AM
Are you using Ubuntu? If yes, what version are you using? I would expect to see bash, not sh. qt-faststart should be executable from any directory if it installed correctly.
$ whereis qt-faststart
qt-faststart: /usr/local/bin/qt-faststart
Yes, Ubuntu 10.04.
I did the whereis command and only received the following
$ whereis qt-faststart
qt-faststart:So I guess it is not installed.
By the way, when I was using your terrific guide at the top of this thread for Lucid, I would get an error saying something like "y is not a valid something something for deldoc" (sorry, I can't remember the exact error and it was several hours ago). I didn't use "--deldoc=y" I used "--deldoc=yes" as you have it, so I don't understand that error.
I tried to install ffmpeg and qt-faststart without the --deldoc=yes switch. ffmpeg works for me, it's just qt-faststart that doesn't.
Edit to add: figured it out -- I cut off the end of the checkinstall line when I pasted it, thinking the "> >" printed needed to be deleted. Same issue with what I did with the qt-faststart below.
spacechampion
September 18th, 2010, 05:30 AM
edited this post to remove my install log since below I figured out what happened.
spacechampion
September 18th, 2010, 05:34 AM
Arg. Now I see what happened. Apparently the file was misnamed somehow -- once just now, and again earlier today.
In /usr/local/bin
-rwxr-xr-x 1 root root 10472 2010-09-18 00:27 qt-fasts
-rwxr-xr-x 1 root root 20310 2010-09-17 15:51 qt-faststa
Dumb mistake, I cut off the end of the line when pasting.
andrew.46
September 18th, 2010, 12:33 PM
Hi FakeOutdoorsman,
Congratulations on your work again appearing in the FFmpeg source:
andrew@skamandros~$ svn log -r 25142 svn://svn.mplayerhq.hu/ffmpeg/trunk
------------------------------------------------------------------------
r25142 | darkshikari | 2010-09-18 06:14:24 +1000 (Sat, 18 Sep 2010) | 7 lines
Remove legacy x264 presets
Since we now have the official x264 presets in ffmpeg, there's no reason to
keep around the old ones.
Patch by Lou Logan <lou AT fakeoutdoorsman DOT com>.
------------------------------------------------------------------------
All the best,
Andrew
FakeOutdoorsman
September 18th, 2010, 06:14 PM
Thanks, but my patches are incredibly simple. This one deleted some files. You can always find something interesting when trawling the logs.
Henrikx
September 19th, 2010, 01:53 PM
FFmpeg version SVN-r25146 needs > lame-3.98.2
deinstall - libmp3lame0-dev_3.98.2+debian-0ubuntu3_i386.deb
Download Lame ( (http://lame.sourceforge.net/)lame-3.98.4.tar.gz)
Unpack lame-3.98.4.tar.gz
edit /lame-3.98.4/debian/changlog
first line
lame (3.98.4+debian-0ubuntu3) unstable; urgency=low
save changelog
Open Terminal
cd /lame-3.98.4
dpkg-buildpackage -b
After compiling the three packages are to be installed.
libmp3lame0_3.98.4+debian-0ubuntu3_i386.deb
lame_3.98.4+debian-0ubuntu3_i386.deb
libmp3lame0-dev_3.98.4+debian-0ubuntu3_i386.deb
Install with sudo dpkg -i *.deb
ron999
September 19th, 2010, 03:01 PM
Hi Hendrikx
I followed your instructions.
When I tried to compile there was an error:-
ron@ubuntu:~$ cd /home/ron/Downloads/lame-3.98.4
ron@ubuntu:~/Downloads/lame-3.98.4$ dpkg-buildpackage -b
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: source package lame
dpkg-buildpackage: source version 3.98.4+debian-0ubuntu3
dpkg-buildpackage: source changed by Rogério Brito <rbrito@users.sf.net>
dpkg-buildpackage: host architecture i386
dpkg-checkbuilddeps: Unmet build dependencies: libsndfile1-dev
dpkg-buildpackage: warning: Build dependencies/conflicts unsatisfied; aborting.
So I went into Synaptic and installed libsndfile1-dev.
After that, everything went OK.
Thanks
:guitar:
karmila
September 20th, 2010, 08:27 AM
Is this guide applicable to maverick?
FakeOutdoorsman
September 20th, 2010, 06:11 PM
This guide has moved to the official FFmpeg wiki:
How to Compile FFmpeg and x264 on Ubuntu Lucid Lynx 10.04 (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideLucid)
FakeOutdoorsman
September 20th, 2010, 06:26 PM
Is this guide applicable to maverick?
Yes. Fortunately Maverick is easier and has fewer steps than Lucid because it has newer packages in the repository. The first page of this thread has been changed to Maverick and Lucid has been "archived".
I suppose I'll continue to create a page for each Ubuntu release, but I can't guarantee support for all of them...but the rolling release model is still tempting (just like the distros).
karmila
September 20th, 2010, 08:14 PM
Yes. Fortunately Maverick is easier and has fewer steps than Lucid because it has newer packages in the repository. The first page of this thread has been changed to Maverick and Lucid has been "archived".
I suppose I'll continue to create a page for each Ubuntu release, but I can't guarantee support for all of them...but the rolling release model is still tempting (just like the distros).
Thanks :P
Yes, I hope ubuntu has rolling release too. No need to hassle every 6 months to get newer features.
karmila
September 20th, 2010, 11:00 PM
OOOps.. :P
Installing it on Maverick, and done with no error.
It's a really handy guide!
Cavsfan
September 20th, 2010, 11:06 PM
I probably should have left well enough alone, but I tried re-installing it and am getting this error:
cavsfan@cavsfan-desktop:~$ cd ffmpeg
cavsfan@cavsfan-desktop:~/ffmpeg$ ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
> --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
> --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
> --enable-x11grab --enable-libmp3lame --enable-libvpx
ERROR: libmp3lame >= 3.98.3 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.log" produced by configure as this will help
solving the problem.
cavsfan@cavsfan-desktop:~/ffmpeg$
And I cannot figure out Henrikx's way of fixing it. It doesn't work for me.
Much appreciation!
FakeOutdoorsman
September 20th, 2010, 11:42 PM
Are you using Lucid? I just moved the Lucid version of the guide to it's own page here:
Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04 (http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289)
The first page of this guide is now for Ubuntu Maverick Meerkat 10.10.
Henrikx
September 21st, 2010, 07:25 AM
sudo apt-get remove libmp3lame-dev sudo apt-get install nasm 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 --enable-nasm --disable-shared make sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --default \ --deldoc=yesBut for mplayer you need the dev again, the same with x264.
Why not dpkg-buildpackage -b
libmp3lame0_3.98.4+debian-0ubuntu3_i386.deb
lame_3.98.4+debian-0ubuntu3_i386.deb
libmp3lame0-dev_3.98.4+debian-0ubuntu3_i386.deb
andrew.46
September 21st, 2010, 08:33 AM
Hi Henrikx,
But for mplayer you need the [lame] dev again, the same with x264.
It is a little aside from your main point but libmp3lame-dev and the x264 -dev files are only required if you plan to build MEncoder as well as MPlayer. My apologies for nitpicking...
Andrew
Henrikx
September 21st, 2010, 08:50 AM
Maybe we could work all together, to find out how to debianize (so written?) ffmpeg, x264, etc...
Cavsfan
September 21st, 2010, 05:54 PM
Are you using Lucid? I just moved the Lucid version of the guide to it's own page here:
Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04 (http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289)
The first page of this guide is now for Ubuntu Maverick Meerkat 10.10.
Yes, I am on Lucid 64 bit, and I did go by the instructions on the Lucid page.
Right now I do not even have ffmpeg or x264 or any of that installed. I think the
process stopped when I hit the above error.
I should probably not have un-installed and tried to reinstall, but now that I did,
I hope I can get it back per your How To. Maybe I can work out any bugs on the
Lucid 64 bit aspect of it.
Thanks for putting out this great How to! :)
And thanks for tolerating my noobishness in this matter!
PS I was also trying to install all options including the 2 optional ones.
FakeOutdoorsman
September 21st, 2010, 07:13 PM
Include the log file "config.log" produced by configure as this will help solving the problem.
Do you see any useful information in "config.log"? Usually the tail end of the file contains the errors.
Cavsfan
September 21st, 2010, 08:45 PM
Do you see any useful information in "config.log"? Usually the tail end of the file contains the errors.
The stuff at the end of /home/cavsfan/ffmpeg/config.log
BEGIN /tmp/ffconf.2bKa1JbZ.c
1
2 #include <stdint.h>
3 #include <faac.h>
4 int main(int argc, char **argv){
5 return (long) faacEncGetVersion;
6 }
END /tmp/ffconf.2bKa1JbZ.c
gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.1n7REKLU.o /tmp/ffconf.2bKa1JbZ.c
gcc -o /tmp/ffconf.MlOnm92N /tmp/ffconf.1n7REKLU.o -lm -pthread -lz -lfaac
check_lib lame/lame.h hip_decode_init -lmp3lame
check_header lame/lame.h
check_cpp
BEGIN /tmp/ffconf.2bKa1JbZ.c
1 #include <lame/lame.h>
2 int x;
END /tmp/ffconf.2bKa1JbZ.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.1n7REKLU.o /tmp/ffconf.2bKa1JbZ.c
/tmp/ffconf.2bKa1JbZ.c:1:23: error: lame/lame.h: No such file or directory
ERROR: libmp3lame >= 3.98.3 not foundAnd the contents of /home/cavsfan/x264/config.log as it was new I believe
x264 configure script
checking whether gcc works... yes
checking for -std=gnu99... yes
checking whether yasm supports lzcnt eax, eax... yes
checking whether gcc supports __asm__("pabsw %xmm0, %xmm0");... yes
checking for pthread.h... yes
checking for return log2f(2); in math.h... yes
checking for sws_getContext(0,0,0,0,0,0,0,0,0,0); in libswscale/swscale.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lswscale -lavutil -lm -lpthread
conftest.c:1:32: error: libswscale/swscale.h: No such file or directory
conftest.c: In function ‘main’:
conftest.c:2: warning: implicit declaration of function ‘sws_getContext’
--------------------------------------------------
checking for -lpostproc... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lpostproc -lm -lpthread
/usr/bin/ld: cannot find -lpostproc
collect2: ld returned 1 exit status
--------------------------------------------------
checking for -lavcodec... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lavcodec -lm -lpthread
/usr/bin/ld: cannot find -lavcodec
collect2: ld returned 1 exit status
--------------------------------------------------
checking for -lavcore... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lavcore -lm -lpthread
/usr/bin/ld: cannot find -lavcore
collect2: ld returned 1 exit status
--------------------------------------------------
checking for -lswscale... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lswscale -lm -lpthread
/usr/bin/ld: cannot find -lswscale
collect2: ld returned 1 exit status
--------------------------------------------------
checking for -lavutil... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lavutil -lm -lpthread
/usr/bin/ld: cannot find -lavutil
collect2: ld returned 1 exit status
--------------------------------------------------
checking for -lm... yes
checking for -lz... yes
checking for -lbz2... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lbz2 -lm -lpthread
/usr/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status
--------------------------------------------------
checking for -lpthread... yes
checking for -lavifil32... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lavifil32 -lm -lpthread
/usr/bin/ld: cannot find -lavifil32
collect2: ld returned 1 exit status
--------------------------------------------------
checking for avcodec_decode_video2(0,0,0,0); in libavformat/avformat.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -L. -lavformat -lm -lz -lpthread -lm -lpthread
conftest.c:1:34: error: libavformat/avformat.h: No such file or directory
conftest.c: In function ‘main’:
conftest.c:2: warning: implicit declaration of function ‘avcodec_decode_video2’
--------------------------------------------------
checking for FFMS_DestroyVideoSource(0); in ffms.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lffms2 -lm -lpthread
conftest.c:1:18: error: ffms.h: No such file or directory
conftest.c: In function ‘main’:
conftest.c:2: warning: implicit declaration of function ‘FFMS_DestroyVideoSource’
--------------------------------------------------
checking for FFMS_DestroyVideoSource(0); in ffms.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lffms2 -lstdc++ -L. -lavformat -lm -lz -lpthread -lm -lpthread
conftest.c:1:18: error: ffms.h: No such file or directory
conftest.c: In function ‘main’:
conftest.c:2: warning: implicit declaration of function ‘FFMS_DestroyVideoSource’
--------------------------------------------------
checking for gpac/isomedia.h... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -Wall -I. -std=gnu99 -lgpac_static -lm -lpthread
conftest.c:1:27: error: gpac/isomedia.h: No such file or directory
--------------------------------------------------
checking for -fno-tree-vectorize... yes
checking for fseeko(stdin,0,0); in stdio.h... yes
checking for -Wshadow... yes
Platform: X86_64
System: LINUX
asm: yes
avs: no
lavf: no
ffms: no
gpac: no
pthread: yes
filters: crop select_every
debug: no
gprof: no
PIC: no
shared: no
visualize: no
bit depth: 8
I think it stopped at this error and nothing got installed "ERROR: libmp3lame >= 3.98.3 not found"
Thanks!
FakeOutdoorsman
September 21st, 2010, 11:21 PM
x264 should install fine without any lame packages. As for FFmpeg, you should make sure lame installed properly. Did the Install LAME (optional) step fail for you?
Also, don't forget to make distclean when performing an update as shown in the Updating FFmpeg and x264 section.
Cavsfan
September 22nd, 2010, 03:00 PM
x264 should install fine without any lame packages. As for FFmpeg, you should make sure lame installed properly. Did the Install LAME (optional) step fail for you?
Also, don't forget to make distclean when performing an update as shown in the Updating FFmpeg and x264 section.
I guess x264 is installed, but not ffmpeg. Let me take a look at what you're suggesting.
Thanks!
Cavsfan
September 22nd, 2010, 03:33 PM
Everything went well that time! Thanks a lot! :guitar:
FakeOutdoorsman
September 23rd, 2010, 01:28 AM
Why not dpkg-buildpackage -b
I've never used this myself. Why do you prefer this over checkinstall? Checkinstall has it's annoyances, but it seems to work fine for packages that aren't going to be re-distributed (like the ones from this guide) and doesn't require editing of a changelog. I suppose sed would be useful in this case, but I don't have much experience there.
mc4man
September 23rd, 2010, 04:41 AM
I've never used this myself. Why do you prefer this over checkinstall? Checkinstall has it's annoyances, but it seems to work fine for packages that aren't going to be re-distributed (like the ones from this guide)
There can be some small advantages though for the most part nothing that would be 'generally' better.
I do a set of certain sources once or twice an install as .debs but again some of the reasons are of low use for most
(like keeping a local repo which again has some advantages and makes a re-install, if needed, quite simple and quick.
Certainly with ffmpeg at some point some users will create issues if continually built as shared.
I'd think things are good as currently done (w/checkinstall
and doesn't require editing of a changelog. I suppose sed would be useful in this case, but I don't have much experience there.
There are some interesting ways there though a manual edit is also quite easy.
(though in this case (current lame), there is actually no need to to have the package named ..4 for karmic or lucid, the .3 will do and the lib is ...4 anyway
Also if there is a suggestion to do as .debs much better to have the user create a build folder, otherwise could be confusing w/ stuff loose in home.
As an ex. - only if one had devscripts installed -
(and installing devscripts may be confusing to some, nothing actually needs to be entered, just navigating thru
(blue can stay as is or be made legit, add. "<whatever>" can be added to debchange when desired, each is new line in changelog
mkdir lame && cd lame && \
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 && \
export DEBEMAIL="noone@nowhere.com" && \
debchange -v 3.98.4+nmu1 "new upstream release" && \
debuild -us -uc && cd .. && \
sudo dpkg -i *.deb
camslaz
September 23rd, 2010, 11:06 PM
Hi all, I am not sure if this is the right place to post this issue but here it is...
Basically I am running a php script that encodes a 250Mb MOV file into 14 videos of different frame sizes and formats. The script takes over 10mins to run and after a period of time FFMPEG crashes with a "av_interleaved_write_frame(): Operation not permitted" error on one of the videos.
From all the investigation I have done with this issue, the error is normally accompanied with a reason of something like "error, non monotone timestamps xxxxxx >= yyyyy". In my case it is not... it actually starts to encode the file and then crashes after a period of time with "av_interleaved_write_frame(): Operation not permitted". The other thing to mention is that If I encode the individual file via the command line or even via a php script it does not error and encodes with no problems.
It always crashes around the 10min mark so I don't know if it is related to timestamps, a server config issue or an FFMPEG bug. It will encode 10 videos or more up to the point it crashes with no issue... from there the script will continue through the remaining videos to be encoded but all remaining videos have the 'av_interleaved_write_frame(): Operation not permitted' error.
Has anyone experienced an issue similar to this or have any idea why I might be experiencing it. Thanks in advance.
0 => 'FFmpeg version SVN-r24545, Copyright (c) 2000-2010 the FFmpeg developers',
1 => ' built on Aug 20 2010 23:32:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)',
2 => ' configuration: --enable-shared --enable-gpl --enable-pthreads --enable-nonfree --cpu=opteron --extra-cflags=\'-O3 -march=opteron -mtune=opteron\' --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-avfilter --enable-filter=movie --enable-avfilter-lavf --enable-swscale',
3 => ' libavutil 50.23. 0 / 50.23. 0',
4 => ' libavcore 0. 1. 0 / 0. 1. 0',
5 => ' libavcodec 52.84. 1 / 52.84. 1',
6 => ' libavformat 52.77. 0 / 52.77. 0',
7 => ' libavdevice 52. 2. 0 / 52. 2. 0',
8 => ' libavfilter 1.26. 1 / 1.26. 1',
9 => ' libswscale 0.11. 0 / 0.11. 0',
10 => 'Input #0, mov,mp4,m4a,3gp,3g2,mj2, from \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL.mov\':',
11 => ' Metadata:',
12 => ' major_brand : qt',
13 => ' minor_version : 537199360',
14 => ' compatible_brands: qt',
15 => ' Duration: 00:00:20.00, start: 0.000000, bitrate: 110802 kb/s',
16 => ' Stream #0.0(eng): Video: mjpeg, yuvj422p, 1920x1080 [PAR 72:72 DAR 16:9], 109386 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc',
17 => ' Stream #0.1(eng): Audio: pcm_s16be, 44100 Hz, 2 channels, s16, 1411 kb/s',
18 => '[buffer @ 0x1db8ed0] w:1920 h:1080 pixfmt:yuvj422p',
19 => '[unsharp @ 0x1de63e0] auto-inserting filter \'auto-inserted scaler 0\' between the filter \'src\' and the filter \'Filter 0 unsharp\'',
20 => '[scale @ 0x1de3860] w:1920 h:1080 fmt:yuvj422p -> w:1920 h:1080 fmt:yuv420p flags:0xa0000004',
21 => '[unsharp @ 0x1de63e0] effect:sharpen type:luma msize_x:5 msize_y:5 amount:1.00',
22 => '[unsharp @ 0x1de63e0] effect:none type:chroma msize_x:0 msize_y:0 amount:0.00',
23 => 'Output #0, mp4, to \'/home/hdfootage/public_html/process/VideoEncode/_tmpfiles/GVowbt3vsrXL/GVowbt3vsrXL_4.mp4\':',
24 => ' Metadata:',
25 => ' encoder : Lavf52.77.0',
26 => ' Stream #0.0(eng): Video: mpeg4, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc',
27 => ' Stream #0.1(eng): Audio: aac, 44100 Hz, 2 channels, s16, 64 kb/s',
28 => 'Stream mapping:',
29 => ' Stream #0.0 -> #0.0',
30 => ' Stream #0.1 -> #0.1',
31 => 'Press [q] to stop encoding',
32 => 'frame= 3 fps= 0 q=1.0 size= 595kB time=0.12 bitrate=40602.0kbits'
33 => 'frame= 6 fps= 6 q=1.0 size= 1060kB time=0.24 bitrate=36190.5kbits'
34 => 'frame= 9 fps= 6 q=1.0 size= 1554kB time=0.36 bitrate=35354.9kbits'
35 => 'frame= 12 fps= 6 q=1.0 size= 2071kB time=0.48 bitrate=35349.8kbits'
36 => 'frame= 15 fps= 6 q=1.0 size= 2721kB time=0.60 bitrate=37149.7kbits'
37 => 'frame= 18 fps= 6 q=1.0 size= 3224kB time=0.72 bitrate=36683.2kbits'
38 => 'frame= 21 fps= 6 q=1.0 size= 3722kB time=0.84 bitrate=36298.9kbits'
39 => 'frame= 24 fps= 6 q=1.0 size= 4219kB time=0.96 bitrate=36004.3kbits'
40 => 'frame= 27 fps= 6 q=1.0 size= 4882kB time=1.08 bitrate=37033.4kbits'
41 => 'frame= 30 fps= 6 q=1.0 size= 5342kB time=1.20 bitrate=36467.2kbits'
42 => 'frame= 33 fps= 6 q=1.0 size= 5803kB time=1.32 bitrate=36015.0kbits'
43 => 'frame= 36 fps= 6 q=1.0 size= 6294kB time=1.44 bitrate=35804.1kbits'
croped
210 => 'frame= 452 fps= 6 q=1.0 size= 77197kB time=18.08 bitrate=34977.8kbits'
211 => 'frame= 455 fps= 6 q=1.0 size= 77690kB time=18.20 bitrate=34969.3kbits'
212 => 'frame= 458 fps= 6 q=1.0 size= 78328kB time=18.32 bitrate=35025.3kbits'
213 => 'frame= 461 fps= 6 q=1.0 size= 78832kB time=18.44 bitrate=35021.1kbits'
214 => 'frame= 464 fps= 6 q=1.0 size= 79348kB time=18.56 bitrate=35022.7kbits'
215 => 'frame= 467 fps= 6 q=1.0 size= 79802kB time=18.68 bitrate=34996.6kbits'
216 => 'frame= 470 fps= 6 q=1.0 size= 80424kB time=18.80 bitrate=35044.4kbits'
217 => 'frame= 473 fps= 6 q=1.0 size= 80944kB time=18.92 bitrate=35047.2kbits'
218 => 'frame= 476 fps= 6 q=1.0 size= 81534kB time=19.04 bitrate=35080.0kbits'
219 => 'frame= 479 fps= 6 q=1.0 size= 82078kB time=19.16 bitrate=35093.2kbits'
220 => 'av_interleaved_write_frame(): Operation not permitted'
FakeOutdoorsman
September 24th, 2010, 12:15 AM
It appears to me that FFmpeg is not the culprit, but it will be easier to guess what is going on if you provide the PHP script or a sample command at the very least. Does the error occur consistently? Have you tried it on another machine? Do you encounter the error with certain input/output formats?
You can increase the output verbosity of FFmpeg with:
ffmpeg -v 9 -loglevel 99 -i foo ...
This may provide additional clues.
camslaz
September 24th, 2010, 08:05 AM
Sorry about that... I thought I had included the command. This is an example of one of the commands. It just loops through the script for 4 different frame sizes with 3 different output formats (mov, mp4 and wmv). This is an example of the mp4 version, the others just have different frame sizes and output type.
/usr/local/bin/ffmpeg -i GVowbt3vsrXL.mov -s 1920x1080 -sameq -vf "unsharp" -y GVowbt3vsrXL_4.mp4
Yes it consistently fails on the same encoding video when running the script but not always on exactly the same frame... although always fairly close. It also depends on the size of the input video as to which encoding video it will fail on. But regardless if I run the script again using the same input file it was always fails at almost the same point each time for that input video. Note that this only happens for larger files... I do not have a problem when encoding < 200mb files. If I try with larger files it consistently fails.
I haven't tried it on another machine... I have numerous RS cloud servers all set up with centos so I would assume they would react the same. It is something I can try though.
I encounter the error at any point in the encoding... so it will be mp4, wmv, thumbnails or flv files... it just seems to be when ever the script hits a certain limit it crashes.
Increasing the verbosity of FFMPEG command didn't really point to any real issue... maybe you will see differently. This is an extract of the output just before the crash
15675 => '[mjpeg @ 0x1d86950] qscale[0]: 1',
15676 => '[mjpeg @ 0x1d86950] index=1',
15677 => '[mjpeg @ 0x1d86950] qscale[1]: 1',
15678 => '[mjpeg @ 0x1d86950] marker parser used 132 bytes (1056 bits)',
15679 => '[mjpeg @ 0x1d86950] marker=c4 avail_size_in_buf=536289',
15680 => '[mjpeg @ 0x1d86950] class=0 index=0 nb_codes=12',
15681 => '[mjpeg @ 0x1d86950] class=0 index=1 nb_codes=12',
15682 => '[mjpeg @ 0x1d86950] class=1 index=0 nb_codes=251',
15683 => '[mjpeg @ 0x1d86950] class=1 index=1 nb_codes=251',
15684 => '[mjpeg @ 0x1d86950] marker parser used 418 bytes (3344 bits)',
15685 => '[mjpeg @ 0x1d86950] marker=c0 avail_size_in_buf=535869',
15686 => '[mjpeg @ 0x1d86950] sof0: picture: 1920x1080',
15687 => '[mjpeg @ 0x1d86950] component 0 2:1 id: 0 quant:0',
15688 => '[mjpeg @ 0x1d86950] component 1 1:1 id: 1 quant:1',
15689 => '[mjpeg @ 0x1d86950] component 2 1:1 id: 2 quant:1',
15690 => '[mjpeg @ 0x1d86950] pix fmt id 21111100',
15691 => '[mjpeg @ 0x1d86950] marker parser used 17 bytes (136 bits)',
15692 => '[mjpeg @ 0x1d86950] marker=da avail_size_in_buf=535850',
15693 => '[mjpeg @ 0x1d86950] escaping removed 2482 bytes',
15694 => '[mjpeg @ 0x1d86950] component: 0',
15695 => '[mjpeg @ 0x1d86950] component: 1',
15696 => '[mjpeg @ 0x1d86950] component: 2',
15697 => '[mjpeg @ 0x1d86950] marker parser used 533367 bytes (4266935 bits)',
15698 => '[mjpeg @ 0x1d86950] marker=d9 avail_size_in_buf=0',
15699 => '[mjpeg @ 0x1d86950] mjpeg decode frame unused 0 bytes',
15700 => '[mjpeg @ 0x1d86950] marker=d8 avail_size_in_buf=535298',
15701 => '[mjpeg @ 0x1d86950] marker parser used 0 bytes (0 bits)',
15702 => '[mjpeg @ 0x1d86950] marker=e0 avail_size_in_buf=535296',
15703 => '[mjpeg @ 0x1d86950] marker parser used 16 bytes (128 bits)',
15704 => '[mjpeg @ 0x1d86950] marker=fe avail_size_in_buf=535278',
15705 => '[mjpeg @ 0x1d86950] marker parser used 12 bytes (96 bits)',
15706 => '[mjpeg @ 0x1d86950] marker=db avail_size_in_buf=535264',
15707 => '[mjpeg @ 0x1d86950] index=0',
15708 => '[mjpeg @ 0x1d86950] qscale[0]: 1',
15709 => '[mjpeg @ 0x1d86950] index=1',
15710 => '[mjpeg @ 0x1d86950] qscale[1]: 1',
15711 => '[mjpeg @ 0x1d86950] marker parser used 132 bytes (1056 bits)',
15712 => '[mjpeg @ 0x1d86950] marker=c4 avail_size_in_buf=535130',
15713 => '[mjpeg @ 0x1d86950] class=0 index=0 nb_codes=12',
15714 => '[mjpeg @ 0x1d86950] class=0 index=1 nb_codes=12',
15715 => '[mjpeg @ 0x1d86950] class=1 index=0 nb_codes=251',
15716 => '[mjpeg @ 0x1d86950] class=1 index=1 nb_codes=251',
15717 => '[mjpeg @ 0x1d86950] marker parser used 418 bytes (3344 bits)',
15718 => '[mjpeg @ 0x1d86950] marker=c0 avail_size_in_buf=534710',
15719 => '[mjpeg @ 0x1d86950] sof0: picture: 1920x1080',
15720 => '[mjpeg @ 0x1d86950] component 0 2:1 id: 0 quant:0',
15721 => '[mjpeg @ 0x1d86950] component 1 1:1 id: 1 quant:1',
15722 => '[mjpeg @ 0x1d86950] component 2 1:1 id: 2 quant:1',
15723 => '[mjpeg @ 0x1d86950] pix fmt id 21111100',
15724 => '[mjpeg @ 0x1d86950] marker parser used 17 bytes (136 bits)',
15725 => '[mjpeg @ 0x1d86950] marker=da avail_size_in_buf=534691',
15726 => '[mjpeg @ 0x1d86950] escaping removed 2530 bytes',
15727 => '[mjpeg @ 0x1d86950] component: 0',
15728 => '[mjpeg @ 0x1d86950] component: 1',
15729 => '[mjpeg @ 0x1d86950] component: 2',
15730 => '[mjpeg @ 0x1d86950] marker parser used 532160 bytes (4257280 bits)',
15731 => '[mjpeg @ 0x1d86950] marker=d9 avail_size_in_buf=0',
15732 => '[mjpeg @ 0x1d86950] mjpeg decode frame unused 0 bytes',
15733 => 'av_interleaved_write_frame(): Operation not permitted',Interestingly, the script is run via cron which is when I get the issues. If I run the script via a browser there is no error and it will complete with no problem. Cron logs don't log anything suspicious. So that leads me to think that you are correct in saying that FFMPEG is not the culprit... although the error returned leads you to think otherwise. It is like some limits are reached or some setting causes it to crash after a certain period.
Are there any limits to cron or running FFMPEG via cron?
qyot27
September 24th, 2010, 08:56 AM
Have you tried compiling ffmpeg with a newer version of GCC? I say this because, I'm not sure about GCC 4.1.2 (as the log post indicated), but 3.4.5 would do something with ffmpeg that caused it to throw errors over MJPEG (also in the logs) and say it was miscompiled. Perhaps that issue - or something like it - was still present in 4.1.x, which would mean you need to use a more recent version of GCC.
camslaz
September 24th, 2010, 10:55 PM
Thanks for the responses guys... I have solved the problem. I was running the cron under the owner of the domain rather then root... when I switch it to root, voila, it ran all the way through with no issues.
I still don't know why it would fail for larger videos when run under the owner of the domain... probably some limitation or configuration. Something to keep in mind if you are experiencing similar issues.
vishant7
September 25th, 2010, 06:47 AM
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.1-1ubuntu1 --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-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 1 / 52.20. 1
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 4 2010 12:35:30, gcc: 4.4.3
Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 25.00 (25/1)
Input #0, matroska, from '/home/vishant/Videos/Movies/Ong Bak 3 .mkv':
Duration: 01:29:01.05, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 720x304, PAR 1:1 DAR 45:19, 25 tbr, 1k tbn, 50 tbc
Stream #0.1: Audio: aac, 24000 Hz, 5.1, s16
Stream #0.2(eng): Subtitle: 0x0000
File '/home/vishant/Ong Bak 3 .mpg' already exists. Overwrite ? [y/N] y
Output #0, dvd, to '/home/vishant/Ong Bak 3 .mpg':
Stream #0.0: Video: mpeg2video (hq), yuv420p, 352x576 [PAR 24:11 DAR 4:3], q=2-31, 4000 kb/s, 90k tbn, 25 tbc
Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[aac @ 0x95c31b0]SBR not implemented. Update your FFmpeg version to the newest one from SVN. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x95c31b0]SBR not implemented. Update your FFmpeg version to the newest one from SVN. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x95c31b0]SBR not implemented. Update your FFmpeg version to the newest one from SVN. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x95c31b0]SBR not implemented. Update your FFmpeg version to the newest one from SVN. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x95c31b0]SBR not implemented. Update your FFmpeg version to the newest one from SVN. If the problem still occurs, it means that your file has a feature which has not been implemented.
[aac @ 0x95c31b0]SBR not implemented. Update your FFmpeg version to the newest one from SVN. If the problem still occurs, it means that your file has a feature which has not been implemented.
Resampling with input channels greater than 2 unsupported.
Can not resample 6 channels @ 24000 Hz to 2 channels @ 48000 Hz
Press Enter to Continue
ron999
September 25th, 2010, 03:50 PM
...
FakeOutdoorsman
September 25th, 2010, 06:53 PM
The yadif deinterlacing filter has been added to FFmpeg (http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=76503274bc38962453e0760bb2cb4 ee308b8985f). This is good news for me because I was using yadif via MPlayer for a project and can now simplify the script.
verb3k
September 25th, 2010, 08:11 PM
Frei0r filters integration has also been added. To enable it, you need to install the packages frei0r-plugins and frei0r-plugins-dev and build ffmpeg with --enable-frei0r.
andrew.46
September 26th, 2010, 08:15 AM
In yet another welcome to the filter system is this a small change in the syntax of the crop filter (http://git.ffmpeg.org/?p=ffmpeg;a=commit;h=37f0253489b2c96699ed554e036b5 ceafab4c870) which means it now matches exactly the syntax produced by the MPlayer cropdetect and rectangle filters. It is a small change but it has made my life a little easier :).
Andrew
omkrasu
September 26th, 2010, 08:31 PM
Hi!
Thanks for the x264 how to's. On my laptop everything went fine.
Unfortunatly i missed a few steps o my desktop because i wanted really badly those frei0r-plugins right out of the repos.
The conclusion to make them work was -- though i'm uncertain, so that's why i'm writing:
Uninstalled the Reinhard ppa's packages and Kdenlive.
Then uninstalled all the connected stuff.
And if something was left out, i checked in Synaptic to remove some other dependencies.
Then did how to form source (everything removed of course first).
Then added Mediubuntu and installed mencoder.
That step fixed the libfaad0 thing.
Melt got reinstalled, like frei0r-plugins.
Reinstalled (because they all lost dependencies) Vlc, Blender, Openshot etc.
On the laptop i was luckier, thinking that was because i had Mediubuntu already enabled and mplayer installed, and prior removed other sources.
The Lame and Vpx install went alright everywhere.
And there was one more thing: gstreamer-ffmpeg install for thumnailing nautilus.
So had to ran a few circles on the desktop.
It fixed the Openshot freezing too.
The Reinhard ppa originally was a kind of solution, but frei0r didn't work.
Cleanse my brain! Please. What was the original problem? It works now, but i'm lost.
Is mediubuntu's mencoder and mplayer necessary?
arrrghhh
September 27th, 2010, 03:53 AM
Hey, this is an amazing guide... can you do one favor to us mutli-core guys and add some caveats of basically what is needed to get ffmpeg to be compiled with multicore support? That would be awesome, thanks!
FakeOutdoorsman
September 27th, 2010, 07:14 AM
Cleanse my brain! Please. What was the original problem? It works now, but i'm lost.
I'm sorry, but I'm not sure what the original problem was and I've never used (or heard of) the Reinhard PPA, but it's good that you seemed to have figured things out. I'll add instructions to enable frei0r video filtering for FFmpeg within a few days.
Is mediubuntu's mencoder and mplayer necessary?
These are not necessary to get the frei0r filter working in FFmpeg.
Hey, this is an amazing guide... can you do one favor to us mutli-core guys and add some caveats of basically what is needed to get ffmpeg to be compiled with multicore support? That would be awesome, thanks!
FFmpeg already supports multithreading for some encoders. If you are interested in multithreaded decoding you can try ffmpeg-mt (http://gitorious.org/ffmpeg/ffmpeg-mt). I have no experience with it and probably won't try it out because FFmpeg supports some hardware GPU decoding accelerators.
arrrghhh
September 27th, 2010, 02:11 PM
FFmpeg already supports multithreading for some encoders. If you are interested in multithreaded decoding you can try ffmpeg-mt (http://gitorious.org/ffmpeg/ffmpeg-mt). I have no experience with it and probably won't try it out because FFmpeg supports some hardware GPU decoding accelerators.
Yes, that's the exact package I'm trying to get installed/compiled. I'd like to be able to transcode on-the-fly 1080p video. 720p works fine, but 1080p doesn't work so well - and I found that it only maxes out one core at a time, so I know that it's not setup correctly.
You just made such a complete guide, I was hoping you could add what needs to be changed to get multi-threaded decoding working, but I understand if you've never done it before that you can't really document it... Just struggling with it myself. Not sure why this isn't the default!
FakeOutdoorsman
September 27th, 2010, 07:47 PM
Yes, that's the exact package I'm trying to get installed/compiled. I'd like to be able to transcode on-the-fly 1080p video. 720p works fine, but 1080p doesn't work so well - and I found that it only maxes out one core at a time, so I know that it's not setup correctly.
Can you show an example command and the complete FFmpeg output? Perhaps you should ask the #ffmpeg IRC channel (have your command and output ready with pastebin.com). There are some people there who are more familiar with CPU capabilities and limitations and will know if your hardware can handle what you are attempting to do.
FakeOutdoorsman
September 27th, 2010, 08:27 PM
Frei0r filters integration has also been added. To enable it, you need to install the packages frei0r-plugins and frei0r-plugins-dev and build ffmpeg with --enable-frei0r.
Anyone wanting to use the frei0r filters can just follow verbek's instructions to get it working. Unfortunately figuring out the right parameters seem somewhat cryptic to me after reading the frei0r section of man ffmpeg. Perhaps there is an easier way, but I looked at the source code of a few frei0r filters:
glow filter (http://frei0r.dyne.org/gallery?filter=glow):
switch ( param_index ) {
case 0:
info->name = "Blur";
info->type = F0R_PARAM_DOUBLE;
info->explanation = "Blur of the glow";
break;
}
So it appears to take a double as a value:
ffmpeg -i input.foo -an -vcodec libx264 -vpre medium -crf 22 -threads 0 \
-vf scale=640:-1,frei0r=glow:0.5 output.mp4
I added scale to show that there can be multiple filters. The order matters and the first filter will be applied first.
You can see your available filters in /usr/lib/frei0r-1.
qyot27
September 27th, 2010, 09:14 PM
Yes, that's the exact package I'm trying to get installed/compiled. I'd like to be able to transcode on-the-fly 1080p video. 720p works fine, but 1080p doesn't work so well - and I found that it only maxes out one core at a time, so I know that it's not setup correctly.
You just made such a complete guide, I was hoping you could add what needs to be changed to get multi-threaded decoding working, but I understand if you've never done it before that you can't really document it... Just struggling with it myself. Not sure why this isn't the default!
Can you show an example command and the complete FFmpeg output? Perhaps you should ask the #ffmpeg IRC channel (have your command and output ready with pastebin.com). There are some people there who are more familiar with CPU capabilities and limitations and will know if your hardware can handle what you are attempting to do.
Yeah, posting the command will help. Do be aware that ffmpeg organizes the options for any input or output video before the actual video itself is called. In other words,
ffmpeg -i [input video] [output options] [output video]
There was nothing in ffmpeg-mt's configure to make it 'different' to compile than standard ffmpeg. So more than likely the issue being seen is perhaps a lack of using the -threads X parameter (where X is the # of cores) prior to the input. Of course, I would think that it should be intelligent enough to automatically use the proper number of threads for the detected cores, but since the -threads parameter still - AFAIK - needs to be used on the [i]encoder side to work, it probably needs it on the decoding side as well, like so:
ffmpeg -threads 4 -i example_h264_1080p.mkv -vcodec ffvhuff -context 1 -strict -1 -pred 2 -threads 4 output.avi
Notes:
I used ffvhuff in the example because I don't bother encoding with libx264 through ffmpeg, and I remember those commands offhand. Neither do I know for sure if ffvhuff is a multithreaded encoder, but whatever.
And furthermore, I have nearly zero experience with ffmpeg-mt because the only time I've ever used it is through ffdshow on my mom's laptop (in which case, it seems to handle 1080p just fine) - I'm just guessing at what seems to be the most logical syntactical reason for it restricting itself to a single core.
cthlhu1987
September 28th, 2010, 06:19 PM
All goes well until step 7:
baruch@baruch-laptop:~/progs/webm/ffmpeg$ sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
> grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=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@baruch-laptop ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ ffmpeg ]
3 - Version: [ 4:SVN-r25249 ]
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 ===========================
INSTALL libavdevice/libavdevice.a
INSTALL libavfilter/libavfilter.a
INSTALL libavformat/libavformat.a
INSTALL libavcodec/libavcodec.a
INSTALL libpostproc/libpostproc.a
INSTALL libswscale/libswscale.a
INSTALL libavcore/libavcore.a
INSTALL libavutil/libavutil.a
INSTALL libavdevice/avdevice.h
INSTALL libavdevice/libavdevice.pc
INSTALL libavfilter/avfilter.h
INSTALL libavfilter/libavfilter.pc
INSTALL libavformat/avformat.h
INSTALL libavformat/avio.h
INSTALL libavformat/libavformat.pc
INSTALL libavcodec/avcodec.h
INSTALL libavcodec/avfft.h
INSTALL libavcodec/dxva2.h
INSTALL libavcodec/opt.h
INSTALL libavcodec/vaapi.h
INSTALL libavcodec/vdpau.h
INSTALL libavcodec/xvmc.h
INSTALL libavcodec/libavcodec.pc
INSTALL libpostproc/postprocess.h
INSTALL libpostproc/libpostproc.pc
INSTALL libswscale/swscale.h
INSTALL libswscale/libswscale.pc
INSTALL libavcore/avcore.h
INSTALL libavcore/imgutils.h
INSTALL libavcore/parseutils.h
INSTALL libavcore/libavcore.pc
INSTALL libavutil/adler32.h
INSTALL libavutil/attributes.h
INSTALL libavutil/avstring.h
INSTALL libavutil/avutil.h
INSTALL libavutil/base64.h
INSTALL libavutil/bswap.h
INSTALL libavutil/common.h
INSTALL libavutil/cpu.h
INSTALL libavutil/crc.h
INSTALL libavutil/error.h
INSTALL libavutil/eval.h
INSTALL libavutil/fifo.h
INSTALL libavutil/intfloat_readwrite.h
INSTALL libavutil/intreadwrite.h
INSTALL libavutil/lfg.h
INSTALL libavutil/log.h
INSTALL libavutil/lzo.h
INSTALL libavutil/mathematics.h
INSTALL libavutil/md5.h
INSTALL libavutil/mem.h
INSTALL libavutil/pixdesc.h
INSTALL libavutil/pixfmt.h
INSTALL libavutil/random_seed.h
INSTALL libavutil/rational.h
INSTALL libavutil/sha1.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/libavutil.pc
INSTALL ffmpeg
INSTALL ffplay
INSTALL ffprobe
INSTALL ffserver
INSTALL ffpresets/libx264-baseline.ffpreset
INSTALL ffpresets/libx264-faster.ffpreset
INSTALL ffpresets/libx264-faster_firstpass.ffpreset
INSTALL ffpresets/libx264-fast.ffpreset
INSTALL ffpresets/libx264-fast_firstpass.ffpreset
INSTALL ffpresets/libx264-ipod320.ffpreset
INSTALL ffpresets/libx264-ipod640.ffpreset
INSTALL ffpresets/libx264-lossless_fast.ffpreset
INSTALL ffpresets/libx264-lossless_max.ffpreset
INSTALL ffpresets/libx264-lossless_medium.ffpreset
INSTALL ffpresets/libx264-lossless_slower.ffpreset
INSTALL ffpresets/libx264-lossless_slow.ffpreset
INSTALL ffpresets/libx264-lossless_ultrafast.ffpreset
INSTALL ffpresets/libx264-main.ffpreset
INSTALL ffpresets/libx264-medium.ffpreset
INSTALL ffpresets/libx264-medium_firstpass.ffpreset
INSTALL ffpresets/libx264-placebo.ffpreset
INSTALL ffpresets/libx264-placebo_firstpass.ffpreset
INSTALL ffpresets/libx264-slower.ffpreset
INSTALL ffpresets/libx264-slower_firstpass.ffpreset
INSTALL ffpresets/libx264-slow.ffpreset
INSTALL ffpresets/libx264-slow_firstpass.ffpreset
INSTALL ffpresets/libx264-superfast.ffpreset
INSTALL ffpresets/libx264-superfast_firstpass.ffpreset
INSTALL ffpresets/libx264-ultrafast.ffpreset
INSTALL ffpresets/libx264-ultrafast_firstpass.ffpreset
INSTALL ffpresets/libx264-veryfast.ffpreset
INSTALL ffpresets/libx264-veryfast_firstpass.ffpreset
INSTALL ffpresets/libx264-veryslow.ffpreset
INSTALL ffpresets/libx264-veryslow_firstpass.ffpreset
mkdir: cannot create directory `/usr/local/share/man/man1': File exists
make: *** [install-man] Error 1
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
Does anyone know how to solve this problem?
dannyboy79
September 28th, 2010, 07:22 PM
well the error stats, "mkdir: cannot create directory `/usr/local/share/man/man1': File exists"
i would say temporarily rename that man1 file located where it says and see if you can compile it then. not sure why that file is already there but if it's on for a man entry can't imagine is super important. good luck
FakeOutdoorsman
September 28th, 2010, 07:36 PM
Does anyone know how to solve this problem?
I've never experienced this issue before and have been unsuccessful in attempting to duplicate it in Ubuntu Lucid Lynx. What version of Ubuntu are you using? Can you show the output of:
ls -alh /usr/local/share/man/man1
cthlhu1987
September 28th, 2010, 08:02 PM
I've never experienced this issue before and have been unsuccessful in attempting to duplicate it in Ubuntu Lucid Lynx. What version of Ubuntu are you using?
baruch@baruch-laptop:~$ cat /proc/version
Linux version 2.6.32-25-generic (buildd@rothera) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #44-Ubuntu SMP Fri Sep 17 20:26:08 UTC 2010
baruch@baruch-laptop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Can you show the output of:
ls -alh /usr/local/share/man/man1
baruch@baruch-laptop:~$ ls -alh /usr/local/share/man/man1
-rw-r--r-- 1 root root 2.7K 2010-05-23 23:09 /usr/local/share/man/man1
Thx in advance :)
FakeOutdoorsman
September 28th, 2010, 08:34 PM
It appears that /usr/local/share/man/man1 is a file instead of a directory. Mine shows:
$ ls -alh /usr/local/share/man/man1
total 84K
drwxr-xr-x 2 root root 4.0K 2010-09-28 10:29 .
drwxr-xr-x 3 root root 4.0K 2010-09-13 10:02 ..
-rw-r--r-- 1 root root 1.2K 2010-09-13 10:02 faac.1.gz
-rw-r--r-- 1 root root 23K 2010-09-28 10:28 ffmpeg.1.gz
-rw-r--r-- 1 root root 14K 2010-09-28 10:28 ffplay.1.gz
-rw-r--r-- 1 root root 8.3K 2010-09-28 10:28 ffprobe.1.gz
-rw-r--r-- 1 root root 6.9K 2010-09-28 10:28 ffserver.1.gz
-rw-r--r-- 1 root root 9.5K 2010-09-24 10:07 lame.1.gz
Let's see what package claims ownership to this oddball:
dpkg -S /usr/local/share/man/man1
Mine shows:
$ dpkg -S /usr/local/share/man/man1
faac, ffmpeg, lame-ffmpeg: /usr/local/share/man/man1
If nothing useful comes from that command, then I would probably rename the file as dannyboy79 has suggessted and then re-run the FFmpeg checkinstall command.
cthlhu1987
September 28th, 2010, 08:39 PM
It appears that /usr/local/share/man/man1 is a file instead of a directory. Mine shows:
$ ls -alh /usr/local/share/man/man1
total 84K
drwxr-xr-x 2 root root 4.0K 2010-09-28 10:29 .
drwxr-xr-x 3 root root 4.0K 2010-09-13 10:02 ..
-rw-r--r-- 1 root root 1.2K 2010-09-13 10:02 faac.1.gz
-rw-r--r-- 1 root root 23K 2010-09-28 10:28 ffmpeg.1.gz
-rw-r--r-- 1 root root 14K 2010-09-28 10:28 ffplay.1.gz
-rw-r--r-- 1 root root 8.3K 2010-09-28 10:28 ffprobe.1.gz
-rw-r--r-- 1 root root 6.9K 2010-09-28 10:28 ffserver.1.gz
-rw-r--r-- 1 root root 9.5K 2010-09-24 10:07 lame.1.gz
Let's see what package claims ownership to this oddball:
dpkg -S /usr/local/share/man/man1
Mine shows:
$ dpkg -S /usr/local/share/man/man1
faac, ffmpeg, lame-ffmpeg: /usr/local/share/man/man1
If nothing useful comes from that command, then I would probably rename the file as dannyboy79 has suggessted and then re-run the FFmpeg checkinstall command.
Holy skit, IT WORKED!!!1 THANKS FakeOutdoorsman and THANKS dannyboy79!!!!:guitar::guitar::guitar::guitar::gui tar::guitar::guitar:
omkrasu
September 29th, 2010, 12:30 PM
Thanks for all the infos.
Well, the PPA's name was siretart which i used. Had to remove that one, because that one had problems with the frei0r stuff.
The orginal idea was to get h264 and frei0r working in kdenlive, and the steps i took - thanks for the explanation - at the end sorted the whole thing out.
After i wrote to the forum, still things were broken, and was patching it up, clean installing multimedia applications, like kdenlive, blender, frei0r (now working from the repos straight away).
So it works.
In Kdenlive i had to run the config wizard a few times to get everything in order.
Bye!
excetara2
October 2nd, 2010, 06:55 AM
Differences between lossless_medium and medium in the profile settings??
I had previously never really had to convert videos but most people have issues with .mts and the interlacing is really bad from my Canon HG-21. I was testing different parameters to check which format I think is better.
I'm trying to figure out what is the difference between the preset lossless and medium codecs. I notice from mediainfo that when the lossless codec is run that it uses the Main instead of high profile. Also, the reframes is only 1. Otherwise appears to be very similar so before converting heaps of videos I want to find out so I make the right selection. I'm assuming it turns off some sort of compression schemes in the high profile and then doesn't reframe multiple times to try for further compression.
Cheers,
Jeff
rifter
October 2nd, 2010, 07:08 AM
well the error stats, "mkdir: cannot create directory `/usr/local/share/man/man1': File exists"
i would say temporarily rename that man1 file located where it says and see if you can compile it then. not sure why that file is already there but if it's on for a man entry can't imagine is super important. good luck
Uh, I would definitely not muck with that directory and it is indeed super important. That's the whole section 1 of the man pages!
The bigger question is why the install process would want to even create that directory. It should be present on basically every system (unless you are strange enough to somehow not install man pages .. which is probably nearly impossible in ubuntu). What it should be doing is adding a file there for the man pages for the packages.
It's been awhile since I went through this process, but I definitely don't remember anything like that happening.
**Edit** oh.. /usr/local/share/man .. so not the main section 1 of the man pages. However, other programs installed in /usr/local will definitely want to use that, so..
ron999
October 2nd, 2010, 09:34 AM
@ excetera2
The presets are stored in the folder /usr/local/share/ffmpeg.
They can be viewed with a text editor.
qyot27
October 2nd, 2010, 11:50 AM
Differences between lossless_medium and medium in the profile settings??
I had previously never really had to convert videos but most people have issues with .mts and the interlacing is really bad from my Canon HG-21. I was testing different parameters to check which format I think is better.
I'm trying to figure out what is the difference between the preset lossless and medium codecs. I notice from mediainfo that when the lossless codec is run that it uses the Main instead of high profile. Also, the reframes is only 1. Otherwise appears to be very similar so before converting heaps of videos I want to find out so I make the right selection. I'm assuming it turns off some sort of compression schemes in the high profile and then doesn't reframe multiple times to try for further compression.
Cheers,
Jeff
'Medium' is the medium efficiency distribution setting. As with nearly all configurations of H.264, it is lossy. So 'medium' in this case can refer either to quality (dependent on filesize targets) or filesize (if determined on quality targets). Speed is also a factor.
'Lossless Medium' is the medium time/space efficiency setting for lossless H.264. There is no 'quality' factor here, since it's lossless. But 'medium' refers to the type of settings involved to help maximize the compression ratio, and how they affect the filesize and speed of the compression. If you want a better comparison of the lossless modes, use, for instance, 'lossless slower' or 'lossless max' instead, and compare that to 'lossless medium'.
In short, 'medium' and 'lossless medium' can't be compared to each other because they're intended for entirely different uses.
The lossless stuff is meant for editing or archiving (this is why the frame options are set to make sure that the lossless modes only use intra-frame, not inter-frame), which is what lossless formats are most often used for. For something to just casually watch, you don't want to use a lossless preset. Especially since lossless filesizes are much larger. To draw an analogy with audio, comparing 'medium' to 'lossless medium' would be like comparing MP3 at 128kbps to FLAC at compression level 4. The settings are intended for completely different things, and the formats themselves are intended for completely different things.
cthlhu1987
October 3rd, 2010, 11:32 AM
Damn, i tried to play a webm file with the mplayer and it gives me this:
baruch@baruch-laptop:/media/DATA/my_docs/downloads/rammstein_-_kokain_-_n_pogodi$ mplayer Rammstein\ -\ Kokain\ -\ Nu\ Pogodi\ Ну\ Погоди\(360p_VP8-Vorbis\).webm
MPlayer SVN-r31042-Ubuntu-RVM (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing Rammstein - Kokain - Nu Pogodi Ну Погоди(360p_VP8-Vorbis).webm.
Seek failed
libavformat file format detected.
[mp3 @ 0xabbee60]Header missing
Last message repeated 324 times
[mp3 @ 0xabbee60]big_values too big
[mp3 @ 0xabbee60]Header missing
Last message repeated 687 times
[mp3 @ 0xabbdc50]MAX_READ_SIZE:5000000 reached
[mp3 @ 0xabbdc50]Estimating duration from bitrate, this may be inaccurate
[lavf] Audio stream found, -aid 0
================================================== ========================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
ADecoder init failed :(
ADecoder init failed :(
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Unknown/missing audio format -> no sound
ADecoder init failed :(
Opening audio decoder: [libmad] libmad mpeg audio decoder
Cannot sync MAD frame
ADecoder init failed :(
ADecoder init failed :(
Opening audio decoder: [hwmpa] MPEG audio pass-through (fake decoder)
Cannot sync MPA frame: 0
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x50.
Audio: no sound
Video: no video
Exiting... (End of file)
andrew.46
October 3rd, 2010, 12:56 PM
Hi cthlhu,
Damn, i tried to play a webm file with the mplayer and it gives me this....
You have perhaps used the wrong thread as well :). I am not sure about rvm's MPlayer but a recent build should have webm / vp8 support courtesy of libavcodec. Perhaps the sample is broken? I have created a nice enough webm file here that you might want to try:
wget http://www.andrews-corner.org/samples/legend_guardians.webm
which plays well enough on the svn MPlayer, screenshot attached. First decent shot I have had at producing a webm file, used 2 pass and set bitrate and also the -level 100 setting, not sure if this is necessary?
Andrew
Andrew
excetara2
October 3rd, 2010, 01:56 PM
I think it's because I was encoding from already lossy data. It's from a camcorder that output avchd at 24MBPS so when I ran lossless_medium or medium I got similar file sizes. That is why I was confused and assumed lossless wasn't working.
Does anyone know the typical max reference frame rate on portable devices?? I may just recode the videos I was planning on putting on my blackberry but just curious. Currently I use the slow preset but manually set refs at 4.
Cheers for the help
cthlhu1987
October 3rd, 2010, 06:14 PM
Hi cthlhu,
You have perhaps used the wrong thread as well :).
OK, i posted there, 2.
I am not sure about rvm's MPlayer but a recent build should have webm / vp8 support courtesy of libavcodec.
Could be, you know a ppa with the MOST recent mplayer bins? Would be nice :)
Perhaps the sample is broken? I have created a nice enough webm file here that you might want to try:
wget http://www.andrews-corner.org/samples/legend_guardians.webm
This webm file even crashed the mplayer, i got my test files from youtube.
andrew.46
October 3rd, 2010, 11:19 PM
Hi cthlhu,
Could be, you know a ppa with the MOST recent mplayer bins? Would be nice :)
I tend to avoid PPAs myself so I cannot give much advice here, my own MPlayer is built from source and I run a guide (http://ubuntuforums.org/showthread.php?t=1542240) on these forums to show how to do this. Perhaps give this a try? Mind you that error from RVM's build is not what you would expect from an inability to play webm material...
This webm file even crashed the mplayer, i got my test files from youtube.
Hmmm.... well I created this one myself from a reasonably high definition trailer and it runs well here, in fact I was a little proud of my efforts with this one :(. Perhaps others on this thread could test it, I will leave it in place for a week or so.
Andrew
mc4man
October 4th, 2010, 12:28 AM
thread could test it,
Works fine with all the usual suspects and looks pretty good as well.
andrew.46
October 4th, 2010, 01:02 AM
Hi mc4man,
Works fine with all the usual suspects and looks pretty good as well.
Thanks mc4man, and congrats btw for cracking 6000 posts on these forums :). Always useful and well thought out posts I might mention.
It does raise the question mind you of transcoding syntax for FFmpeg and libvpx, to make this paticular effort I appropriated the syntax suggested by Fakeoutdoorsman in this guide and made a few tweaks. The original file is here:
wget http://trailers.apple.com/movies/wb/legendoftheguardians/legendoftheguardians-tlr3_h480p.mov
and my crudely reworked syntax was as follows, using the most recent FFmpeg and libvpx:
ffmpeg -i legendoftheguardians_trlr_02_480p_dl.mov \
-pass 1 -vcodec libvpx -level 100 -b 512k -bt 512k \
-vf scale=640:-1 -threads 0 -f rawvideo -an -y /dev/null && \
ffmpeg -i legendoftheguardians_trlr_02_480p_dl.mov \
-pass 2 -acodec libvorbis -ab 128k -ac 2 \
-vcodec libvpx -level 100 -b 512k -bt 512k \
-vf scale=640:-1 -threads 0 \
legend_guardians.webm
but I could find little guidance online about producing quality webm files with FFmpeg and I would be interested to see any improvements that could be suggested to this method of encoding. Of some interest is this document (https://spreadsheets.google.com/ccc?key=0AvWxUS1XGCPAdGNtNW10a2p4c1VwdG1VZk1uMl9MU EE&hl=en#gid=0) which attempts to map ivfenc settings to FFmpeg settings but as far as I could see there was little definitive material available online as yet. This drifts a little from FFmpeg and x264 for which my apologies :(.
Andrew
FakeOutdoorsman
October 4th, 2010, 01:07 AM
The de-interlacing filter yadif recently added to FFmpeg isn't working as I expected. It seems to be adding artifacts to dvvideo inputs. Is anyone else noticing this? One developer said he did not.
wget http://samples.mplayerhq.hu/DV-raw/small_test2.dv
ffmpeg -i small_test2.dv -vf yadif -qscale 3 -an yadif.mp4
Watch the top row of pixels. I haven't tried any other input formats and regular, old -deinterlace doesn't introduce the artifacts.
However, if I change the output to .mpg, and play the video with ffplay, I get a different behavior:
mpeg1video @ 0x265c820] aspect ratio has forbidden 0 value
How about this one? Anyone else get that? This is FFmpeg version SVN-r25329 on Arch Linux x86_64.
mc4man
October 4th, 2010, 01:25 AM
Don't see any artifacts at top (screen vlc, but same with other players
(r25329 - 10.10, nvidia
mc4man
October 4th, 2010, 01:39 AM
syntax was as follows...
Thanks for that, will have to fool around a bit there,
(just noticed I built ffmpeg off of a tuned vorbis, didn't complain, though don't know what advantage, if any, is there.
Well OT
I did see how vlc handled transcoding to webm (vp8 ) a ways back, seemed to have some real issues if you raised the br above it's default
andrew.46
October 4th, 2010, 02:01 AM
I cannot see the problem on r25321 on 32 bit Slackware 13.0, I got a little excited when I saw some flickering at the base of the clip but then noticed that this is in the original as well :(. This can only really be seen if you remove the borders:
mplayer -noborder small_test2.dv
and I am not sure if this has any significance at all...
Andrew
mc4man
October 4th, 2010, 02:30 AM
Anyone else get that...
moving to a 64 bit install and the artifacts do show up at the top as in your screen.
So 32 bit is fine, 64 not so.
andrew.46
October 4th, 2010, 04:42 AM
Hi mc4man,
Thanks for that, will have to fool around a bit there,
(just noticed I built ffmpeg off of a tuned vorbis, didn't complain, though don't know what advantage, if any, is there.
To borrow the work of alienBOB again I note that his slackware script for FFmpeg incorporates some libvpx presets:
http://slackware.org.uk/people/alien/restricted_slackbuilds/ffmpeg/build/ffpresets-libvpx.diff
Something like this would be usefully incorporated into the FFmpeg source?
Andrew
mysoogal
October 4th, 2010, 05:11 AM
Requesting Help, in building all ffmpeg profiles, please if your interested in helping me with the profiles pm me or visit this page, i just need compatible ffmpeg commands
for adobe flash , ipod,itouch,etc you get the idea i want everything all the profiles
http://www.expertcore.org/viewtopic.php?f=41&p=4345#p4345
this is how it looks like my open source transcoder
http://i53.tinypic.com/3127cp1.png
help me with the profiles anybody ?
thanks for reading
FakeOutdoorsman
October 4th, 2010, 08:58 PM
I cannot see the problem on r25321 on 32 bit Slackware 13.0...
Thanks for taking a look at this.
So 32 bit is fine, 64 not so.
Yes, 32 bit is fine for me as well. Good catch.
Something like this would be usefully incorporated into the FFmpeg source?
I'm sure more preset files would be appreciated contributions. I'm probably missing something obvious and I only took a quick look, but this patch contains some options, such as lag, that don't seem to be present in my FFmpeg.
dannyboy79
October 4th, 2010, 09:32 PM
does anyone else have an issue with screencasting in linux by using ffmpeg and it cutting off the audio prior to hitting the q button to stop ffmpeg from capturing? THis is the command i run
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 29.97 -s 1024x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
and like I said it cuts off the audio prior to me even hitting the "q" button to stop ffmpeg. kind of weird and not really critical as I can just let it capture a few seconds after I am done talking but still annoying.
I am using ffmpeg SVN-r25112 with the following compile configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
playback in vlc or totem results in same missing audio towards the end. ive already posted this in the screencasting thread but thought maybe you guys could be helpful here as well. sorry if i should'nt have double posted it.
mc4man
October 5th, 2010, 02:01 AM
It seems to be adding artifacts...
In a way it reminds me of on my son's hd tv - sometimes you see that once and a while on certain channels. It's like the picture isn't quite filling the screen.
(if you increase the height by 2 lines the effect isn't seen on the sample encode
andrew.46
October 7th, 2010, 09:25 AM
Hi mocha,
Fakeoutdoorsman's guide lured me to FFmpeg a long time ago but it might be of interest for some to hear that it is now possible to use presets to transcode with x264 in the latest svn MEncoder...
As my Russian computer science professor used to say, "how to do?" Please enlighten us Andrew.46.
I must apologise for this epic necropost, this slipped my mind until I ran into the same issue on Doom 9 :(. For standard 'film' transcoding the x264 options can be set with some variation on the following:
-ovc x264 -x264encopts preset=slow:tune=film:crf=22
FFmpeg still the far superior tool though...
Andrew
radiobuzzer
October 11th, 2010, 10:13 AM
It can be tricky to use ffmpeg and ffplay with some other applications in Ubuntu. This is because many applications look for these two executables at /usr/bin, though, after the installation as instructed above, mine were landed at /usr/local/bin .
Therefore, Winff convertor for example was giving me the error: Cannot find ffplay. The solution for Winff is simple: just go to the menu Edit > Preferences > Linux and change the path of ffmpeg and ffplay by browsing into the folder /usr/local/bin .
Weird why this happens. Dunno if there will be any problems with other preset apps, or if there is any other easy way to bypass this (e.g. install directly on /usr/bin, as the original debian package does.
FakeOutdoorsman
October 11th, 2010, 07:24 PM
This is a known bug in WinFF. Bug status is "fixed": Issue 56: Add /usr/local/bin for FFplay executable search (http://code.google.com/p/winff/issues/detail?id=56)
It's not recommended to install user compiled packages into /usr/bin due to a chance of interfering with important system files and/or packages from the repository.
prupert
October 11th, 2010, 10:58 PM
Just a little note for those interested, now that Meerkat is out, I have updated my little script for Meerkat / Maverick support:
http://code.google.com/p/x264-ffmpeg-up-to-date/
Though, Ubuntu's servers are still very slow, so it runs slowly at the moment (due to apt-get update taking an age).
andrew.46
October 13th, 2010, 12:33 AM
I see yet another reason to run the subversion FFmpeg, the MPlayer cropdetect filter finally arrived in FFmpeg this morning my time :). Syntax that has worked for me is:
ffmpeg -y -ss 00:10:00 -i <input_file> \
-vf cropdetect=24:16:0 -vframes 200 \
-f rawvideo -an /dev/null
The cropdetect options I have given are the defaults and the filter works beautifully!!!
Andrew
Padakwaak
October 17th, 2010, 10:35 PM
I've now managed to compile ffmpeg with x264 library on Ubuntu 10.10 x64 as shared libraries, since ZoneMinder requires shared libraries.
I ran into problems where it said that I needed to recompile with -fPIC, and when I looked in the x264's config.mak file, it was included in the list of arguments.
Please note that these changes to the original guide by FakeOutdoorsman would only be necessary for x64 Linux installations!
Here's how I did it, with steps 1 - 2 given in the original post.
Install x264
3. Get the current source files, compile, and install.
cd
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-shared
Important part:
In config.mak, I moved -fPIC to the front.
eg.: 'CFLAGS=-Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -fPIC -s -fomit-frame-pointer -fno-tree-vectorize'
became: 'CFLAGS=-fPIC -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -s -fomit-frame-pointer -fno-tree-vectorize'.
make -j `grep -c ^processor /proc/cpuinfo`
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | \
cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | \
head -c 7`" --backup=no --deldoc=yes --fstrans=no --default
Install FFmpeg
4. Get the most current source files, compile, and install. Run "./configure --help" to see what other features you can enable/disable. Nightly FFmpeg snapshots (http://ffmpeg.mplayerhq.hu/releases/ffmpeg-checkout-snapshot.tar.bz2) are also available.
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \
--enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab \
--enable-shared --enable-pthreads
make -j `grep -c ^processor /proc/cpuinfo`
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no \
--default
hash x264 ffmpeg ffplay
Thanks for FakeOutdoorsman for his great guide that I used as a foundation and for prupert's script that had the cool 'make `grep -c ^processor /proc/cpuinfo`' argument :)
andrew.46
November 1st, 2010, 07:08 AM
Not sure how many people will be interested in an upcoming guide I am in the early stages of writing which shows how to compile x264 and FFmpeg on Windows 7? I am inspired not a little by FakeOutdoorsman's efforts in this guide of course and the aim of the Windows 7 guide is identical to FakeOutdoorsman's guide: to enable encoding with faac, the latest x264 from git and the svn FFmpeg under the clunky console of Win 7, aided and abetted by MinGW and MSYS.
I have seen a ton of misinformation available online on how to accomplish this so hopefully I can make things a little clearer. First step is in place now:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\andrew>x264 --version
x264 0.107.1745 4785e8e
built on Nov 1 2010, gcc: 4.5.0
configuration: --bit-depth=8
x264 license: GPL version 2 or later
C:\Users\andrew>
Next for FFmpeg itself :).
Andrew
FakeOutdoorsman
November 1st, 2010, 09:21 PM
The few times I attempted to use FFmpeg on Windows I just used the Automated FFmpeg Builds (http://ffmpeg.arrozcru.org/autobuilds/), but I would guess a Windows 7 guide would be appreciated by Windows users. This is an area that I am totally ignorant in.
theteju
November 1st, 2010, 11:14 PM
I am sorry to post these stupid question. actually this thread is 136 page long and I could not search my answer. on very first page I found this link
http://code.google.com/p/x264-ffmpeg-up-to-date/ where there is a ready-made script to install the codecs. the script ran fine and it showed all is done message at the end.
I can see ffmpeg codec options under my Kdenlive rendering option under admin account.
My stupid questions are :
1). How can I make sure the the codecs are installed for sure?
2). Kdenlive from one of the user account does not see those codecs, Are we suppose to install for each users?
Hope someone will answer the question.
Thanks in advance.
qyot27
November 2nd, 2010, 03:04 AM
Not sure how many people will be interested in an upcoming guide I am in the early stages of writing which shows how to compile x264 and FFmpeg on Windows 7? I am inspired not a little by FakeOutdoorsman's efforts in this guide of course and the aim of the Windows 7 guide is identical to FakeOutdoorsman's guide: to enable encoding with faac, the latest x264 from git and the svn FFmpeg under the clunky console of Win 7, aided and abetted by MinGW and MSYS.
I have seen a ton of misinformation available online on how to accomplish this so hopefully I can make things a little clearer. First step is in place now:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\andrew>x264 --version
x264 0.107.1745 4785e8e
built on Nov 1 2010, gcc: 4.5.0
configuration: --bit-depth=8
x264 license: GPL version 2 or later
C:\Users\andrew>
Next for FFmpeg itself :).
Andrew
The most arduous part of getting things set up on Windows (at least XP, but Vista and Win7 would be included in that as well) isn't the compile instructions part - the instructions really are virtually the same under MSys/MinGW as the main instructions this thread caters to, for both x264 and ffmpeg. Except for ffmpeg needing the --enable-memalign-hack option, anyway.
EDIT: Oh yeah, and the U_STRICT_ANSI flag too. I always seem to forget that.
The difference is mainly in setting up the environment properly to do it, as it's not integrated into a repository system like Ubuntu (and while Cygwin has its repositories, I have no idea how anyone could call its repo manager 'easy to use'...but anything compiled with Cygwin needs extra DLLs residing in your PATH or the same folder as the program, unless you use Cygwin to cross-compile to MinGW). The arrozcru.org wiki used to have a guide to walk users through setting up the environment, and it was such a mess and so often outdated they actually now advocate using Ubuntu and going through the gcc-mingw32 package instead (which is what I've generally taken to doing, since the MSys prompt is so slow compared to Gnome Terminal). The other 'easy' option are the premade environments that are available through the CCCP wiki. Those seem to be pretty solid in regard to things working correctly*.
*although I believe you do have to snag the arrozcru.org autostatic pthreads to enable ffmpeg to use them.
The idea of it being under the native console sounds interesting. I presume you mean cmd.exe, not PowerShell, nor just using the cmd.exe window to run sh like recent MSys guides advocate...I prefer rxvt over the sh-in-cmd.exe thing.
One thing to also note, since it's a Windows guide - using the L-SMASH patch will allow x264 to use Quicktime's AAC engine to produce files with AAC audio (and I think it's a fairly safe bet that the percentage of Windows users with iTunes installed is pretty high). The only downside is that the user has to sign up for a free Apple Developer account and download the Quicktime SDK so that x264 can link to it at configure time. But it does work. I know it also allows for some other formats (like LAME for MP3), but I don't know the current working state of it beyond knowing the qtaac interface part is fine.
andrew.46
November 2nd, 2010, 06:37 AM
Hi FakeOutdoorsman,
The few times I attempted to use FFmpeg on Windows I just used the Automated FFmpeg Builds (http://ffmpeg.arrozcru.org/autobuilds/), but I would guess a Windows 7 guide would be appreciated by Windows users. This is an area that I am totally ignorant in.
I had a good look at this site previously and it is directed exclusively at cross-compiling. In fact the technique I am using with MinGW and MSYS, comping directly on Win 7 cops a bit of a pasting :). I have managed a barebones compile of x264 and FFmpeg, just compiling faac and lame and stage one is complete. The guide will be a while I suspect as there are a number of difficulties, the first being POSIX threading on win32 with x264/FFmpeg and a number of other issues. All good fun sorting it out though :).
Andrew
andrew.46
November 2nd, 2010, 07:18 AM
Hi quyot,
*although I believe you do have to snag the arrozcru.org autostatic pthreads to enable ffmpeg to use them.
Thanks for your comments about my small project, in fact win32 pthreads + x264 + FFmpeg have been an issue that I have been wrestling with, I have temporarily compiled without pthreads just to get a functioning FFmpeg. I have looked at patches but not seen this (http://ffmpeg.arrozcru.org/autobuilds/blog/2009/07/17/pthreads-win32-updated-important/) until you mentioned it. I will recompile everything against this tomorrow and hopefully this will be the end of it all...
Edit: Unfortunately neither x264 or FFmpeg build against the 'autostatic' win32 pthreads, back to the drawing board...
Edit (again): All fixed :). I cannot believe how absurdly happy I am to have accomplished my first encoding session with a self-built FFmpeg, x264 and faac on windows 7:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\andrew>cd Desktop
C:\Users\andrew\Desktop>ffmpeg -i test.mkv -acodec libfaac -ab 128k -vcodec libx264 -vpre slower -crf 22 -threads 0 test.mp4
FFmpeg version SVN-r25644, Copyright (c) 2000-2010 the FFmpeg developers
built on Nov 2 2010 20:35:04 with gcc 4.5.0
configuration: --prefix=/MinGW --extra-cflags=-U__STRICT_ANSI__ --enable-memalign-hack --enable-pt
hreads --enable-libx264 --extra-libs='-lx264 -lpthread' --enable-libfaac --enable-libmp3lame --enabl
e-gpl --disable-ffserver --disable-ffplay --disable-ffprobe --enable-nonfree
libavutil 50.32. 5 / 50.32. 5
libavcore 0. 9. 1 / 0. 9. 1
libavcodec 52.94. 0 / 52.94. 0
libavformat 52.84. 0 / 52.84. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.53. 0 / 1.53. 0
libswscale 0.12. 0 / 0.12. 0
[matroska,webm @ 011dbbb0] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 2397.00 (2397/1) -> 23.98 (24000/
1001)
Input #0, matroska,webm, from 'test.mkv':
Metadata:
ENCODER : Lavf52.84.0
Duration: 00:02:19.77, start: 0.000000, bitrate: 128 kb/s
Stream #0.0(eng): Video: mpeg4, yuv420p, 848x358 [PAR 1:1 DAR 424:179], 23.97 fps, 23.98 tbr, 1k
tbn, 2397 tbc
Stream #0.1(eng): Audio: mp3, 48000 Hz, 2 channels, s16, 128 kb/s
[buffer @ 02257ba0] w:848 h:358 pixfmt:yuv420p
[libx264 @ 02276880] using SAR=1/1
[libx264 @ 02276880] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 02276880] profile High, level 3.1
[libx264 @ 02276880] 264 - core 107 r1745 4785e8e - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - ht
tp://www.videolan.org/x264.html - options: cabac=1 ref=8 deblock=1:0:0 analyse=0x3:0x133 me=umh subm
e=9 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,
11 fast_pskip=1 chroma_qp_offset=-2 threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrai
ned_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=
250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qp
min=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'test.mp4':
Metadata:
encoder : Lavf52.84.0
Stream #0.0(eng): Video: libx264, yuv420p, 848x358 [PAR 1:1 DAR 424:179], q=10-51, 200 kb/s, 24k
tbn, 23.98 tbc
Stream #0.1(eng): Audio: libfaac, 48000 Hz, 2 channels, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 3348 fps= 3 q=-1.0 Lsize= 16672kB time=139.60 bitrate= 978.4kbits/s
video:14400kB audio:2183kB global headers:0kB muxing overhead 0.535929%
frame I:51 Avg QP:16.82 size: 13026
[libx264 @ 02276880] frame P:2626 Avg QP:21.67 size: 4645
[libx264 @ 02276880] frame B:671 Avg QP:23.15 size: 2807
[libx264 @ 02276880] consecutive B-frames: 68.0% 9.7% 14.9% 7.4%
[libx264 @ 02276880] mb I I16..4: 37.0% 59.7% 3.3%
[libx264 @ 02276880] mb P I16..4: 9.4% 14.4% 0.6% P16..4: 40.2% 5.3% 0.8% 0.0% 0.0% skip:
29.2%
[libx264 @ 02276880] mb B I16..4: 6.2% 7.7% 0.2% B16..8: 35.7% 4.1% 0.7% direct: 3.6% skip:
41.8% L0:70.9% L1:21.9% BI: 7.1%
[libx264 @ 02276880] 8x8 transform intra:58.5% inter:81.8%
[libx264 @ 02276880] direct mvs spatial:99.9% temporal:0.1%
[libx264 @ 02276880] coded y,uvDC,uvAC intra: 38.6% 56.8% 8.2% inter: 12.8% 17.1% 1.4%
[libx264 @ 02276880] i16 v,h,dc,p: 46% 30% 21% 4%
[libx264 @ 02276880] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 19% 50% 4% 1% 1% 1% 2% 5%
[libx264 @ 02276880] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 21% 17% 3% 3% 4% 4% 4% 4%
[libx264 @ 02276880] i8c dc,h,v,p: 35% 37% 24% 4%
[libx264 @ 02276880] Weighted P-Frames: Y:5.7%
[libx264 @ 02276880] ref P L0: 70.4% 9.0% 11.5% 3.5% 2.1% 1.3% 1.0% 0.6% 0.5% 0.0%
[libx264 @ 02276880] ref B L0: 79.5% 9.6% 5.1% 2.1% 1.7% 1.4% 0.6%
[libx264 @ 02276880] ref B L1: 95.0% 5.0%
[libx264 @ 02276880] kb/s:844.50
C:\Users\andrew\Desktop>
Now just a little tidying up to do...
Andrew
jackachan
November 2nd, 2010, 10:30 AM
Great guide. Thank you.
Although you may have retired the installation guide for Ubuntu 9.04, the steps are same as those for Ubuntu 8.04. I have followed the guide for 8.04 and successfully compiled and installed FFmpeg and X264 on my 9.04. Only one thing has to be noticed is that in the guide for 8.04 the package liblame-dev should be replaced by libmp3lame-dev, as liblame-dev seems no longer available. Maybe that's just the case for 9.04.
FakeOutdoorsman
November 2nd, 2010, 08:59 PM
Great guide. Thank you.
Although you may have retired the installation guide for Ubuntu 9.04, the steps are same as those for Ubuntu 8.04. I have followed the guide for 8.04 and successfully compiled and installed FFmpeg and X264 on my 9.04. Only one thing has to be noticed is that in the guide for 8.04 the package liblame-dev should be replaced by libmp3lame-dev, as liblame-dev seems no longer available. Maybe that's just the case for 9.04.
There are some slight differences between 9.04 and 8.04. Not much though. Anyway, I re-listed the 9.04 guide on the first page of this thread and also updated the 9.04 and 8.04 guides to include LAME compilation. LAME from their repositories is too old so it must be compiled.
FakeOutdoorsman
November 2nd, 2010, 09:06 PM
I am sorry to post these stupid question. actually this thread is 136 page long and I could not search my answer. on very first page I found this link
http://code.google.com/p/x264-ffmpeg-up-to-date/ where there is a ready-made script to install the codecs. the script ran fine and it showed all is done message at the end.
I can see ffmpeg codec options under my Kdenlive rendering option under admin account.
My stupid questions are :
1). How can I make sure the the codecs are installed for sure?
2). Kdenlive from one of the user account does not see those codecs, Are we suppose to install for each users?
Hope someone will answer the question.
Thanks in advance.
Not stupid questions, but unfortunately I've never used Kdenlive. I think some other users who frequent this thread have been able to get it working with a compiled FFmpeg (I think Kdenlive was compiled as well, but I can't remember) and hopefully they can provide a useful answer.
dannyboy79
November 3rd, 2010, 06:53 PM
I am sorry to post these stupid question. actually this thread is 136 page long and I could not search my answer. on very first page I found this link
http://code.google.com/p/x264-ffmpeg-up-to-date/ where there is a ready-made script to install the codecs. the script ran fine and it showed all is done message at the end.
I can see ffmpeg codec options under my Kdenlive rendering option under admin account.
My stupid questions are :
1). How can I make sure the the codecs are installed for sure?
2). Kdenlive from one of the user account does not see those codecs, Are we suppose to install for each users?
Hope someone will answer the question.
Thanks in advance.actually a PPA provider of kdenlive 0.7.8 and melt 5.10 has said that due to frequent API changes that it's not a good idea to try to use the latest and greatest ffmpeg due to ffmpeg and melt working together. I am using his PPA and use kdenlive all the time in my Lucid Lynx install. He also states it works in Maverick also. I can encode to x264 and aac audio using the default ffmpeg from ubuntu repo's but with medibuntu repos enabled for the -extra ffmpeg libraries. the info you seek can be found here: http://www.kdenlive.org/forum/kdenkive-078-packaged-ubuntu-maverick-lucid-karmic-jaunty
good luck
tvkpz
November 4th, 2010, 01:13 PM
Hi
I installed ffmpeg as given in the guide except that I used git.
So I think the checkinstall does not work for me. Any idea what is the command for checkinstall when I install from git.
Thanks!
FakeOutdoorsman
November 4th, 2010, 08:38 PM
Hi
I installed ffmpeg as given in the guide except that I used git.
So I think the checkinstall does not work for me. Any idea what is the command for checkinstall when I install from git.
Thanks!
How about this?
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:git-$(date +%Y%m%d)" --backup=no \
--deldoc=yes --fstrans=no --default
tapas_mishra
November 8th, 2010, 03:03 PM
I get this error
E: Couldn't find package libjack-jackd2-dev
FakeOutdoorsman
November 8th, 2010, 08:41 PM
I get this error
E: Couldn't find package libjack-jackd2-dev
See my reply to you in Re: mp4 to flv using ffmpeg on Ubuntu server 10.04 (http://ubuntuforums.org/showpost.php?p=10089932&postcount=8).
tapas_mishra
November 9th, 2010, 07:23 AM
sudo apt-get remove ffmpeg x264 libx264-dev
sudo apt-get update
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
cd
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-libmp3lame
Gives me error
Unknown option --enable-libmp3lame, ignored
DaSilva_Ireland
November 9th, 2010, 04:57 PM
Hey, I am new to this and wondering about something. I did as the directions instructed and everything seemed to work alright.
However when I now try to build something with the ffmpeg libs I get errors. Code that previously compiled now gives tons of errors, I could understand if the errors were in my source but they seem to be in ffmpegs source.
gcc ffmpeg_test.c -o ffmpeg_test -lavutil -lavformat -lswscaleResults in many undefined references.
ffmpeg_test.c: In function ‘main’:
ffmpeg_test.c:85: warning: assignment makes pointer from integer without a cast
ffmpeg_test.c:88: warning: assignment makes pointer from integer without a cast
/usr/local/lib/libavformat.a(concat.o): In function `concat_close':
/home/******/ffmpeg/libavformat/concat.c:51: undefined reference to `av_freep'
/home/******/ffmpeg/libavformat/concat.c:52: undefined reference to `av_freep'
/usr/local/lib/libavformat.a(concat.o): In function `concat_open':
/home/******/ffmpeg/libavformat/concat.c:67: undefined reference to `av_strstart'
/home/******/ffmpeg/libavformat/concat.c:70: undefined reference to `av_mallocz'
/home/******/ffmpeg/libavformat/concat.c:78: undefined reference to `av_freep'
/home/******/ffmpeg/libavformat/concat.c:82: undefined reference to `av_malloc'
/home/******/ffmpeg/libavformat/concat.c:83: undefined reference to `av_freep'
/home/******/ffmpeg/libavformat/concat.c:94: undefined reference to `av_realloc'
/home/******/ffmpeg/libavformat/concat.c:99: undefined reference to `av_strlcpy'
/home/******/ffmpeg/libavformat/concat.c:117: undefined reference to `av_free'
/home/******/ffmpeg/libavformat/concat.c:122: undefined reference to `av_realloc'
...
many more
...
/usr/local/lib/libavformat.a(rtpenc_chain.o): In function `ff_rtp_chain_mux_open':
/home/******/ffmpeg/libavformat/rtpenc_chain.c:56: undefined reference to `av_free'
/home/******/ffmpeg/libavformat/rtpenc_chain.c:73: undefined reference to `av_free'
/home/******/ffmpeg/libavformat/rtpenc_chain.c:74: undefined reference to `av_free'
/home/******/ffmpeg/libavformat/rtpenc_chain.c:71: undefined reference to `av_free'
/usr/local/lib/libavformat.a(sauce.o): In function `ff_sauce_read':
/home/******/ffmpeg/libavformat/sauce.c:88: undefined reference to `av_malloc'
collect2: ld returned 1 exit status
make: *** [all] Error 1
jackachan
November 9th, 2010, 06:32 PM
Thank you for putting back the retired guides.
I have followed the guides for 10.04 to build the X264 and ffmpeg on a 10.04. Maybe it is just my problem, in the second step, I could not install libsdl1.2-dev. As it has the dependencies on older versions of some packages. I solved the problem by using "aptitude" instead of "apt-get". For "aptitude" it will ask me if I want to downgrade the dependencies to some older versions, then it works when I agree to downgrade.
FakeOutdoorsman
November 9th, 2010, 08:49 PM
Gives me error
Unknown option --enable-libmp3lame, ignored
No need to ask the same question in two (http://ubuntuforums.org/showpost.php?p=10092309&postcount=118) additional (http://ubuntuforums.org/showpost.php?p=10092273&postcount=9) threads. It appears that you followed the guide out of order and attempted to apply --enable-libmp3lame to x264.
You may be interested in using the repository FFmpeg instead. You may find it easier to install:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
... However when I now try to build something with the ffmpeg libs I get errors. Code that previously compiled now gives tons of errors, I could understand if the errors were in my source but they seem to be in ffmpegs source.
Sorry, I'm not sure of the answer, and I don't think I can help you much here. I recommend asking for help at the #ffmpeg IRC channel or the ffmpeg-user (http://ffmpeg.org/contact.html) mailing list.
Thank you for putting back the retired guides.
I have followed the guides for 10.04 to build the X264 and ffmpeg on a 10.04. Maybe it is just my problem, in the second step, I could not install libsdl1.2-dev. As it has the dependencies on older versions of some packages. I solved the problem by using "aptitude" instead of "apt-get". For "aptitude" it will ask me if I want to downgrade the dependencies to some older versions, then it works when I agree to downgrade.
I'm not sure what happened. Maybe an interfering PPA?
undercash
November 10th, 2010, 07:32 PM
Hello
I am having the following issue : I want to update my ffmpeg and here is the output:
http://pastebin.com/ZvM6qzrG
I previously tried on a test server where a fresher copy of ffmpeg was compiled (the same way as my live server btw) and I don't have any problems at all, neither when I try manually or using the updater script that you link too in the first post.
Can I just rename the actual ffmpeg source folder to ffmpeg_old and download a new one from where I will recompile ffmpeg? Even without having been able to apt-get remove neither make distclean?
Should I try to install ffmpeg using the apt-get manager to have a clean install and then remove/purge it. Then once uninstalled, I would compile from source again?
Thanks
FakeOutdoorsman
November 10th, 2010, 07:52 PM
Hello
I am having the following issue : I want to update my ffmpeg and here is the output:
http://pastebin.com/ZvM6qzrG
It looks like you're running make distclean in a directory where you never ran make in it so there is nothing to clean. You can just continue and not worry about these messages.
Can I just rename the actual ffmpeg source folder to ffmpeg_old and download a new one from where I will recompile ffmpeg?
Yes, you can do that if you want to, but I don't see many reasons to do that.
Even without having been able to apt-get remove neither make distclean?
Sorry, but I don't understand this question.
Should I try to install ffmpeg using the apt-get manager to have a clean install and then remove/purge it. Then once uninstalled, I would compile from source again?
Performing "apt-get install ffmpeg" would install the version from the repository. See the Updating FFmpeg and x264 section of the guide for an example of how to update FFmpeg.
undercash
November 10th, 2010, 08:01 PM
Hi, thanks a lot for this (very fast) answer.
I m using your tutorial for compiling and obviously I looked at it to update.
so you saw the result of the make distclean. Then I do
root@server:/root/ffmpeg# svn update
Fetching external item into 'libswscale'
External at revision 32618.
At revision 25716.
But it doesn't fetch any files (btw , this is probably the reason why the auto updater script fails as well).
You say I probably never made "make" on this directory but this is not possible since this is the directory from where I actually compiled ffmpeg some months ago
Thinking about ideas to be able to perform "apt-get remove ffmpeg" , since it is not possible right now, I thought I could install the package from repos, and then uninstall it so it would clean properly ffmpeg before recompiling from source. It's the only think that come to my mind right now: I didn't find almost any docs about that issue on googling it.
It's a live server of a streaming site so looks like a big risk for me, reason I trying to gather infos before any attempts on my own.
Thanks
FakeOutdoorsman
November 10th, 2010, 08:07 PM
Hi, thanks a lot for this (very fast) answer.
I m using your tutorial for compiling and obviously I looked at it to update.
so you saw the result of the make distclean. Then I do
root@server:/root/ffmpeg# svn update
Fetching external item into 'libswscale'
External at revision 32618.
At revision 25716.
But it doesn't fetch any files (btw , this is probably the reason why the auto updater script fails as well).
It doesn't fetch any files because there are no new files to fetch. You are up-to-date with the latest revision.
You say I probably never made "make" on this directory but this is not possible since this is the directory from where I actually compiled ffmpeg some months ago
I'm not sure then, but you can duplicate the behavior by grabbing a clean copy of the source and then running make distclean.
Cavsfan
November 10th, 2010, 08:48 PM
Thanks for that reminder to keep it up to date FakeOutdoorsman! After the update on Page 1:
27 files changed, 350 insertions(+), 298 deletions(-)
prupert
November 10th, 2010, 10:27 PM
Hello
I am having the following issue : I want to update my ffmpeg and here is the output:
http://pastebin.com/ZvM6qzrG
I previously tried on a test server where a fresher copy of ffmpeg was compiled (the same way as my live server btw) and I don't have any problems at all, neither when I try manually or using the updater script that you link too in the first post.
Can I just rename the actual ffmpeg source folder to ffmpeg_old and download a new one from where I will recompile ffmpeg? Even without having been able to apt-get remove neither make distclean?
Should I try to install ffmpeg using the apt-get manager to have a clean install and then remove/purge it. Then once uninstalled, I would compile from source again?
Thanks
Also, would "sudo dpkg -r ffmpeg" work better?
wheniwork
November 15th, 2010, 03:32 AM
Hi. When I run make i'm getting this error.
make: *** No rule to make target `libavcodec/x86/dsputil_h264_template_mmx.c', needed by `libavcodec/x86/dsputil_mmx.o'. Stop.
Any ideas?
FakeOutdoorsman
November 15th, 2010, 03:54 AM
I can't duplicate this error and everything compiled without issue for me on Ubuntu 10.10 64-bit. I need more information:
What Ubuntu version are you using?
Are you installing FFmpeg from a clean source, or are you attempting to upgrade a previous compiled FFmpeg?
Did you follow the guide word-for-word, or did you modify anything?
Do you know what FFmpeg revision you were attempting to compile?
You can find out the revision of your source with:
cd ~/ffmpeg
LANG=C svn info | grep Revision | awk '{ print $NF }'
Mark Rose
November 15th, 2010, 05:52 PM
I recently had problems converting flv files after following these instructions. If you have any troubles when using the --enable-shared options, try running `sudo ldconfig` which will make sure the proper libraries get loaded.
maxbear
November 15th, 2010, 08:09 PM
Thanks for the guide. When I run:
sudo checkinstall --pkgname=qt-faststart --pkgversion "4:SVN-r`LANG=C svn info | \
grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no \
--default install -D -m755 tools/qt-faststart /usr/local/bin/qt-faststart
I got the following error:
Installing with ...
========================= Installation results ===========================
/var/tmp/tmp.FJOuykVcii/installscript.sh: 4: : not found
**** Installation failed. Aborting package creation.
Cleaning up...OK
Any idea what's going wrong? :confused:
Bye.
mc4man
November 15th, 2010, 08:49 PM
I got the following error: .....
Try it like this, it appears the code box in post one has an errant space
sudo checkinstall --pkgname=qt-faststart --pkgversion "4:SVN-r`LANG=C svn info | \
grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no \
--default install -D -m755 tools/qt-faststart /usr/local/bin/qt-faststart
(otherwise you don't particularly need to 'install' qt-faststart, make executable and place in a bin in path (~/bin would be fine
FakeOutdoorsman
November 16th, 2010, 12:05 AM
Try it like this, it appears the code box in post one has an errant space
Thanks for noticing. Command updated.
Cavsfan
November 16th, 2010, 05:17 PM
Thanks for noticing. Command updated.
Thanks! I was able to get faststart installed without errors! :)
powersaver
November 19th, 2010, 12:21 PM
Hi FakeOutdoorsman.
I have almost completed the installation of ffmpeg and x264 following your instruction for Ubuntu 10.04, as my machine is running Ubuntu 10.04.1.
However, in the final stage of installing ffmpeg, the command line "hash x264 ffmpeg ffplay" failed, since "hash" command is not installed in my ubuntu. I double checked with "which hash" and "whereis hash". This hash process is not vital, I believe. But problem is ffmpeg is not installed. "whereis ffmpeg" returns nothing. The rest of the products, lame qt-faststart vpxdec vpxenc x264 have been installed in /usr/local/bin.
------------- the process I followed for ffmpeg ------------------
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
--enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
grep Revision | awk '{ print $NF }'`" --backup=no --default --deldoc=yes
hash x264 ffmpeg ffplay
--------------------------------------------------------------------
Should I execute "make install" in the ffmpeg source directory?
I wonder I have done something strange, as no one seems to have this problem.
Also how can I get "hash" command for Ubuntu? Do you have any idea why my Ubuntu does not have one? I am running the default shell, which is I think bash.
Thank you for your detailed guide.
FakeOutdoorsman
November 24th, 2010, 11:51 PM
Sorry for the late reply. I was out of town for a week with no computer access.
However, in the final stage of installing ffmpeg, the command line "hash x264 ffmpeg ffplay" failed, since "hash" command is not installed in my ubuntu. I double checked with "which hash" and "whereis hash". This hash process is not vital, I believe.
hash shouldn't require any additional tasks by the user to enable it because it is included in the bash shell, and by default, Ubuntu should be using the bash shell. Can you make sure you're using bash?
$ echo $SHELL
/bin/bash
But problem is ffmpeg is not installed. "whereis ffmpeg" returns nothing. The rest of the products, lame qt-faststart vpxdec vpxenc x264 have been installed in /usr/local/bin.
Did you encounter any errors or useful messages during installation?
Jose Catre-Vandis
November 28th, 2010, 01:57 AM
Here's a handy tip - if you haven't followed this howto and just have good old ordinary ffmpeg, and need to extract 5.1 (6) channel AAC audio to 2 channel audio from an mkv file. Most howtos about doing this expect compilation from source!
Install faad from the repositories
Identify the track number of the audio you want:
mkvmerge -i input.mkv
(in this case "2")
then extract the audio using mkvextract:
mkvextract tracks input.mkv 2:input.aac (was ac3)
then run it on the aac (was ac3) file as follows:
faad -d -o output.wav input.aac (was ac3)
You can now encode the resultant wav file to you desired format, and then stick it back into the mkv if you want: e.g.
mkvmerge -o output.mkv input.mkv stereo.mp3
qyot27
November 28th, 2010, 04:29 PM
Here's a handy tip - if you haven't followed this howto and just have good old ordinary ffmpeg, and need to extract 5.1 (6) channel AAC audio to 2 channel audio from an mkv file. Most howtos about doing this expect compilation from source!
Install faad from the repositories
Identify the track number of the audio you want:
mkvmerge -i input.mkv
(in this case "2")
then extract the audio using mkvextract:
mkvextract tracks input.mkv 2:input.ac3
then run it on the ac3 file as follows:
faad -d -o output.wav input.ac3
You can now encode the resultant wav file to you desired format, and then stick it back into the mkv if you want: e.g.
mkvmerge -o output.mkv input.mkv stereo.mp3
If the audio stream is AAC, there's no need - and rather bewildering, really - to give it an .ac3 extension. The extension being different means nothing; it's not suddenly an AC3 file (if it were really an AC3, then faad couldn't do jack with it), it's just a mis-named AAC file.
ron999
November 28th, 2010, 04:48 PM
Yes, I agree with you qyot27.
It just needs the command changing to:-
mkvextract tracks input.mkv 2:input.aac
And this command becomes:-
faad -d -o output.wav input.aac
I have done some work using faad to decode the 5.1 aac (using faad-2.7).
I found that I could pipe the output from faad straight into another encoder without creating a wav file.
It seems to be OK using a command like this:-
faad -d -w foo_6.aac | faac -q 120 -X -P - -o foo_2.aac
(foo_6.aac is the original 5.1 aac and foo_2.aac is the new stereo aac)
mika91
November 29th, 2010, 10:55 AM
Hi,
Just installed latest ffmpeg SVN, but I can't play WMA lossless audio files !
Stream mapping:
Stream #0.0 -> #0.0
Decoder (codec id 86057) not found for input stream #0.0
I don't understand
andrew.46
November 29th, 2010, 11:54 AM
Hi mika,
Just installed latest ffmpeg SVN, but I can't play WMA lossless audio files !
For wma lossless you need MPlayer + an external codec:
andrew@skamandros~/samples$ mplayer -ac wma9dmo luckynight.wma
MPlayer SVN-r32648-4.3.3 (C) 2000-2010 MPlayer Team
Playing luckynight.wma.
ASF file format detected.
[asfheader] Audio stream found, -aid 1
Clip info:
title: Lucky Night
author: Jody Marie Gnant
copyright: 1995 Sirius Publishing
comments: 1-minute song sample demonstrating Windows Media lossless audio compression
================================================== ========================
Forced audio codec: wma9dmo
Opening audio decoder: [dmo] Win32/DMO decoders
AUDIO: 44100 Hz, 2 ch, s16le, 868.7 kbit/61.55% (ratio: 108583->176400)
Selected audio codec: [wma9dmo] afm: dmo (Windows Media Audio 9 DMO)
================================================== ========================
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 63.1 (01:03.0) of 60.5 (01:00.4) 5.5%
Exiting... (End of file)
Andrew
lovinglinux
December 3rd, 2010, 12:44 PM
Great tutorial. Thanks. Working like a charm.
undercash
December 12th, 2010, 04:55 PM
I have been upgrading yesterday and I am now meeting a strange issue.
Whenever I try to convert a big size video, after a good while, ffmpeg start a new conversion on top of the unfinished first conversion, that is still running. Obviously the output results in a corrupt file.
it's very easy to observe with htop since the number of ffmpeg process duplicate as well as the cpu load. If I use 2 pass command , then they will be mixed (when new conversion starts) with the second pass process
I tried several command, 1 pass or 2 pass, same result.
Note that I have been using ffmpeg with my script for over a year and it never happened such thing. I was able to convert files up to one giga without any similar issue.
Any ideas? thanks
FakeOutdoorsman
December 13th, 2010, 02:07 AM
If you post your complete script I can attempt to duplicate the behavior. What Ubuntu version are you using?
undercash
December 13th, 2010, 02:12 AM
Hello thanks for your answer
here is the script (part of it)
http://pastebin.com/Y2U4b8Xv
I m using hardy. As I said, I have been using this script for long time now and I get this problem with big file size (over 500mb or so)
Ps: i forgot to mention but this is a cms so i guess it's impossible to post the complete script
Mesreth
December 22nd, 2010, 08:15 PM
I apologize if this has been covered before. I am trying to grab an h.323 stream and rebroadcast it live for use in a webpage as an embedded video. I'm not sure how to grab the h.323 stream (h.264 video and g711/g722 audio). I'd prefer to actually grab the stream and not try to grab the screen. Any ideas?
FakeOutdoorsman
December 22nd, 2010, 08:50 PM
I apologize if this has been covered before. I am trying to grab an h.323 stream and rebroadcast it live for use in a webpage as an embedded video. I'm not sure how to grab the h.323 stream (h.264 video and g711/g722 audio). I'd prefer to actually grab the stream and not try to grab the screen. Any ideas?
I've never tried anything like that. You might get a better answer at the #ffmpeg IRC channel, or the ffmpeg-user (http://ffmpeg.org/contact.html) mailing list.
Mesreth
December 22nd, 2010, 09:02 PM
I've never tried anything like that. You might get a better answer at the #ffmpeg IRC channel, or the ffmpeg-user (http://ffmpeg.org/contact.html) mailing list.
Thanks, I'll do that, though one thought came to me that you might know. If you know the ports the audio and video are coming in from (standard RTP) can you grab it from the ports, and if so, how?
FakeOutdoorsman
December 22nd, 2010, 10:45 PM
If you're using FFmpeg directly, maybe something like:
ffmpeg -i rtmp://192.168.1.1:29823/stream.foo ...
Perhaps you can just use JW Player or Flowplayer to handle the stream. It's worth investigating. These are Flash based players that allow a viewer to watch a video in a browser.
Mesreth
December 23rd, 2010, 12:05 AM
If you're using FFmpeg directly, maybe something like:
ffmpeg -i rtmp://192.168.1.1:29823/stream.foo ...
Perhaps you can just use JW Player or Flowplayer to handle the stream. It's worth investigating. These are Flash based players that allow a viewer to watch a video in a browser.
I'm not so concerned about how to display the feed in the browser (going to avoid flash if at all possible). Mostly concerned about how to grab the stream. We will have to "bridge the call" to get the feed to the computer to begin with, there is also the possibility of grabbing the stream from the variable in the program that does the bridging (assuming open source).
qyot27
December 24th, 2010, 02:11 AM
There's no guarantee it'll work, but get-flash-videos has the ability to grab stuff off RTMP streams from various sites (youtube-dl and nicovideo-dl are similar in purpose as well - those are in the repositories, but gfv isn't). It's based around rtmpdump (http://packages.ubuntu.com/maverick/rtmpdump), which IIRC has its project page hosted on mplayer's servers.
You may also need to install the gfv-plugins extension, since that adds lots of other sites to the script's capabilities (the extension advertises its use for Hulu, but I never got that to work; the plugin does work for other sites, though).
Drenriza
December 26th, 2010, 09:44 AM
does this guide work with ubuntu 10.10?
FakeOutdoorsman
December 26th, 2010, 06:21 PM
does this guide work with ubuntu 10.10?
Yes. See the first page (http://ubuntuforums.org/showthread.php?t=786095) of this guide for 10.10 instructions.
Drenriza
December 28th, 2010, 09:43 AM
Thanks. I royalty missed that.
But can you tell me what source to add, since i cannot find all the necessary packages. I dont see this described in your guide. Besides activating multisource.
If you can give the exact line to add to my /etc/apt/sources.list that would be great.
Thanks
edit
E: Kunne ikke lokalisere pakken libfaac-dev
E: Kunne ikke lokalisere pakken libopencore-amrwb-dev
E: Kunne ikke lokalisere pakken libx11-dev
qyot27
December 28th, 2010, 05:02 PM
After you activated Universe and Multiverse, did you reload the repositories? sudo apt-get update or the Reload button in Synaptic.
Drenriza
December 29th, 2010, 09:34 AM
After you activated Universe and Multiverse, did you reload the repositories? sudo apt-get update or the Reload button in Synaptic.
Did both after activated the repositories.
qyot27
December 29th, 2010, 04:40 PM
It should find them, then. packages.ubuntu.com reports libfaac-dev in multiverse, libopencore-amrwb-dev in universe, and libx11-dev in one of the main repositories (I would assume Main, not Restricted).
http://packages.ubuntu.com/maverick/libx11-dev
http://packages.ubuntu.com/maverick/libopencore-amrwb-dev
http://packages.ubuntu.com/maverick/libfaac-dev
If all else fails, you can download them through there and install them with dpkg -i pkgname.deb or Gdebi or Software Center. Just make sure the other dependencies are filled, though. The pages show what those packages depend on.
Which server are you using? The local (Denmark, I would assume) server, or the Main one? It may be related to not using Main, or - and someone else would have to answer this - something in the instructions screwing up because of the language settings. As I recall, this was a problem for some users in the checkinstall step some time ago.
smtkr
December 29th, 2010, 06:09 PM
All:
I have followed the directions given in the post "Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04" ( http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289 ) to the letter and have failed to get a fully functional build of ffmpeg. If anyone has the time, can you review my issue and shoot a few ideas my way.
History:
1. Not knowing that ffmpeg was stripped, I installed the ffmpeg package and the libavcodec-extra-52 package (possibly a few more; I was liberal with the package manager on day one of the install). This failed to produce a version of ffmpeg that could transcode audio with libfaac.
2. I removed those packages and added the medibuntu repository and installed the same packages but ran into some sort of error when trying to convert an mkv (sorry, I can't remember the error)
3. [Currently hung on this one] Building components from source, as noted in the introduction, has provided a copy of ffmpeg that doesn't encode with the libx264 codec
Issue:
I compiled and installed all of the packages (including optional lame and vpx). There weren't any issues, save for the apparently innocuous warnings which inexorably appear during a compile.
To test the build, I ran a basic test command that works on my mac (installed with macports):
ffmpeg -i ./pp.mkv -vcodec libx264 -acodec libfaac -t 15 ./a.mp4
The job fails immediately with the following error:
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Google... and I came across this mail indicating a similar issue ( http://mailman.videolan.org/pipermail/x264-devel/2009-August/006123.html ), which says "This error *CANNOT APPEAR* unless ffmpeg has been miscompiled."
OK. I had an issue with the compile. I tried the suggestion of comparing the header build spec (turns out to be 122) with the shared library linked in the ffmpeg binary (given by ldd). But, when I issued the ldd command on the ffmpeg binary, there was no reference, at all, to x264.
Now, I wanted to see if my libx264 files really were placed when I built the x264 package. So, I ran mlocate to see what exists:
mlocate 264
/home/brucew/.mozilla/firefox/83cf7lv6.default/Cache/2644ADC7d01
/usr/lib/libx264.so.85
/usr/lib/gstreamer-0.10/libgsth264parse.so
/usr/lib/i686/sse2/libx264.so.85
/usr/local/bin/x264
/usr/local/include/x264.h
/usr/local/include/x264_config.h
/usr/local/lib/libx264.a
/usr/local/lib/pkgconfig/x264.pc
...
So, a little problem there--I built 122, but I have an 85 module out there, for some reason. "No problem," I thought. "I will just specify the include and lib paths with the CFLAGS and LDFLAGS environment variables:
export CFLAGS=-I/usr/local/include:$CFLAGS
export LDFLAGS=-L/usr/local/lib:$LDFLAGS
So, I removed the old checkinstall package and did the ffmpeg build again by
make distclean, ./configure..., make... The outcome was identical.
My impression was that it ignored the CFLAGS and LDFLAGS that I set (or the default paths superseded). My next attempt involved renaming the /usr/lib/libx264.so.85 module to aaaaaa.so.85 and then creating the following symlinks in /usr/lib pointing to /usr/local/lib/libx264.a
libx264.a
libx264.so
libx264.so.122
I repeated the ffmpeg rebuild procedure and ran into the same issue AGAIN!
ARRRRGGGHGHHHH!
Does anyone have a firm understanding of what is happening here, what is interfering with my build, or where I could have made a mistake? What is the best way for me to get an ffmpeg build that is pretty well loaded with prominent codecs (like my macports version).
I'm willing to try just about anything.
Thanks.
mc4man
December 29th, 2010, 07:15 PM
. But, when I issued the ldd command on the ffmpeg binary, there was no reference, at all, to x264.
If you followed this guide. which it appears you did, then you've statically linked x264 w/ ffmpeg - so there should be no reference in ldd
(if you had built x264 as shared there would be
Your orig. issue most likely was your ffmpeg command, (and at this point possibly any of the things you've done to 'fix' something that wasn't 'broke' to begin with
FakeOutdoorsman
December 29th, 2010, 08:54 PM
To test the build, I ran a basic test command that works on my mac (installed with macports):
ffmpeg -i ./pp.mkv -vcodec libx264 -acodec libfaac -t 15 ./a.mp4
The job fails immediately with the following error:
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
You simply need to use a preset (with the -vpre option) when using -vcodec libx264. See the Using FFmpeg and x264 section of the guide for examples. Also see the FFmpeg x264 encoding guide (http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/).
khughitt
December 30th, 2010, 11:17 PM
Is there any advantage (in terms of performance or compatibility) for choosing MKV over MP4 for generating lossless H.264?
Thanks for the excellent guide FakeOutdoorsman :)
Cheers,
FakeOutdoorsman
December 31st, 2010, 12:24 AM
I doubt there is much of a performance difference when encoding. I also doubt decoding would be much different, but I'm not totally sure because I don't have much experience with hardware accelerated decoding such as with VDPAU.
I tend to use MKV on the rare occasion that I do use lossless H.264 simply because it can handle more audio formats.
perspectoff
December 31st, 2010, 01:27 AM
Oh good. Does FFMPEG finally have audio and video synch'd?
I've been with mencoder for some time due to the synch problems.
FakeOutdoorsman
December 31st, 2010, 01:56 AM
Sorry, but I'm not exactly sure of what you're asking without any context. If you post your MEncoder command or tell me what output format(s) you are interested in I can give you a FFmpeg equivalent for you to try.
khughitt
December 31st, 2010, 12:04 PM
I doubt there is much of a performance difference when encoding. I also doubt decoding would be much different, but I'm not totally sure because I don't have much experience with hardware accelerated decoding such as with VDPAU.
I tend to use MKV on the rare occasion that I do use lossless H.264 simply because it can handle more audio formats.
Sounds good. Thanks for the clarification :)
FakeOutdoorsman
December 31st, 2010, 09:56 PM
Sounds good. Thanks for the clarification :)
Of course it all depends on what you're doing, and I don't really know what that is. I've used lossless on a few occasions:
Capturing the screen as shown here: HOWTO: Proper Screencasting on Linux (http://ubuntuforums.org/showthread.php?t=1392026).
Creating an intermediate format (such as above). This would also be a nice alternative to huffyuv when using Adobe Premiere or some other editors, but I haven't tried to get that working yet.
Messing around with lossless for the hell of it.
A good lossy encode with a proper crf value usually gets the job done though.
khughitt
January 1st, 2011, 02:32 PM
Of course it all depends on what you're doing, and I don't really know what that is. I've used lossless on a few occasions:
I'm using it for something a bit non-standard: on-the-fly generation of relatively small (~100-300 frame) videos of solar images (http://helioviewer.org/blog/2010/12/29/helioviewer-org-update-improved-movie-quality/). Since the videos are short, and since they need to be created on the fly, I am optimizing for speed and quality.
The approach I've taken up until now has been to generate two different versions of each video: one for in-browser viewing (which should be around ~10M or less for decent streaming) and another "high-quality" download version which could be much larger. Recently I began experimenting with lossless encoding for the downloadable version (with files from ~50-300M), but as I'm doing some more testing it looks like it is really not all the necessary; simply choosing a low enough CRF results in a very high-quality video with a smaller filesize. Further, it seems like Quicktime doesn't support the lossless H.264 out-of-the-box, and since a large number of our users are likely to be using that, it's not really a good option. I'm still doing some testing with different presets and CRF values but it looks like what I may end up doing is something like -crf 18 for the in-browser videos and -crf 10 or 15 for the high-quality download version.
dave-buntu
January 5th, 2011, 12:12 AM
I tried installing the dependencies and apt displayed this message below.
E: Couldn't find package libjack-jackd2-dev
Did I type it in wrong, or is there anywhere else I can find it?
FakeOutdoorsman
January 5th, 2011, 12:51 AM
The libjack-jackd2-dev package is for Ubuntu Maverick Meerkat 10.10 and newer. Are you following the correct guide for your Ubuntu version?
noleks
January 6th, 2011, 12:58 AM
Hi:I'm running Lucid. On step #7 I get this:
noleks-ub:~/ffmpeg> sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \ grep Revision | awk '{ print $NF }'`" --backup=no --default --deldoc=yes
NF: Undefined variable.
Where is NF defined?
Thanks
FakeOutdoorsman
January 6th, 2011, 02:27 AM
Works for me. It appears that your checkinstall command was copied incorrectly. Did you modify it? You can just copy and paste the command into your terminal and it should work fine.
noleks
January 6th, 2011, 02:45 AM
Yes I've been cutting and pasting directly from the how-to.
Can you just try echo $NF and see what it gives you?
Maybe I need to be using a shell other than tcsh?
FakeOutdoorsman
January 6th, 2011, 03:22 AM
I am unfamiliar with tcsh and these guides were written for bash. Looks like tcsh also chokes on LANG=C too. I can't investigate this very throughly right now, but if you want a quick and dirty solution:
ubuntu:~/ffmpeg> svn info | grep Revision
Revision: 26239
ubuntu:~/ffmpeg> sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r26239" --backup=no --default --deldoc=yes
noleks
January 6th, 2011, 05:52 PM
Hi:
I've gone back through the whole process and confirmed that by using bash, I have no issues.
Thanks
Scott O'Nanski
January 8th, 2011, 01:22 PM
When I
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
> --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
> --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \
> --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
I get the following message bounced back;
ERROR: libx264 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.log" produced by configure as this will help
solving the problem.
.
Anyone know why this is, or how to circumvent it?
Pablo_F
January 8th, 2011, 07:17 PM
Thanks a lot for this howto. It is the second time I just copy-paste the commands to a terminal as I read the rest of the post while the terminal is throwing "human"-readable lines. (I have followed the lucid version)
:popcorn:
FakeOutdoorsman
January 8th, 2011, 09:06 PM
...
I get the following message bounced back;
ERROR: libx264 not found.
Anyone know why this is, or how to circumvent it?
Are you using Ubuntu Nattty Narwhal 11.04? The guide doesn't work for that yet, and I can confirm that FFmpeg is having trouble finding x264 in that Ubuntu version.
Edit: I forgot to mention that current latest (FFmpeg version SVN-r26269) worked for me on 10.10.
Thanks a lot for this howto. It is the second time I just copy-paste the commands to a terminal as I read the rest of the post while the terminal is throwing "human"-readable lines. (I have followed the lucid version)
Glad it worked for you.
qyot27
January 9th, 2011, 01:37 AM
Are you using Ubuntu Nattty Narwhal 11.04? The guide doesn't work for that yet, and I can confirm that FFmpeg is having trouble finding x264 in that Ubuntu version.
Does it work on Natty if ffmpeg is forced to look at /usr/local/include and /usr/local/lib?
This assuming, of course, that the real problem was Natty, not that x264 hadn't been installed.
Anyone know why this is, or how to circumvent it?
Either
A) remove --enable-libx264 from the command, or
B) as the error message said to do, post the contents of the config.log file that was created when you told ffmpeg to ./configure - that'll show more or less exactly what happened.
mc4man
January 9th, 2011, 05:52 AM
I can confirm that FFmpeg is having trouble finding x264 in that Ubuntu version.
It is actually finding but failing on a number of undefined ref.'s
Doesn't matter where x264 is installed (tried /usr, /usr/local and $HOME
If x264 is built shared then no problem, but that presents other possible issues.
What does work is to use gcc-4.4, whether just on one or the other not sure, didn't break down.
Was fine though building both with 4.4
( for x264 export in terminal, for ffmpeg a configure option
edit:
just finished building, ect. - all seems well
uname -a && ffmpeg
Linux doug-alienware 2.6.37-12-generic #26-Ubuntu SMP Wed Jan 5 18:42:49 UTC 2011 i686 GNU/Linux
FFmpeg version SVN-r26278, Copyright (c) 2000-2011 the FFmpeg developers
built on Jan 8 2011 23:57:05 with gcc 4.4.5
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --cc=gcc-4.4
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.108. 0 / 52.108. 0
libavformat 52.92. 0 / 52.92. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
(ffmpeg definitely needs 4.4, (atm), didn't ck. on x264 though wouldn't hurt to use 4.4 also, ie.
export CC=gcc-4.4 && ./configure
FakeOutdoorsman
January 9th, 2011, 07:22 AM
I haven't had much of a chance to investigate this lately, but I also found that --enable-shared on x264 works as far as I can tell with my limited meddling.
Works fine with gcc 4.5.2 on Arch Linux.
mc4man
January 9th, 2011, 08:12 AM
Works fine with gcc 4.5.2 on Arch Linux.
i know it worked fine 3 - 4 wks ago, don't recall if it was 4.5.1 or .2, just did a fresh install so can't ck. (natty is now 4.5.2 + svn <whatever>
Certainly premature anyway, if it doesn't resolve down the road then there is always shared or 4.4.X
Argosse
January 9th, 2011, 09:37 AM
Thank you so so much for this guide, now Im finally able to convert all my dvd backup avi's to mp4 for my Ipod touch and stream them with apache.
andrew.46
January 9th, 2011, 10:20 AM
Hi mc4man,
uname -a [...]
Linux doug-alienware 2.6.37-12-generic #26-Ubuntu SMP Wed Jan 5 18:42:49 UTC 2011 i686 GNU/Linux
A little aside from the main discussion, is that the default kernel for natty? I am a little amazed that it is in use so quickly as it was only released a few days ago! A little peeved as well since I have compiled my own copy with a degree of pain:
andrew@skamandros~$ uname -rv
2.6.37-ads #1 SMP Sat Jan 8 17:18:36 EST 2011
(ads = my initials)
Andrew
Scott O'Nanski
January 9th, 2011, 10:25 AM
Are you using Ubuntu Nattty Narwhal 11.04? The guide doesn't work for that yet, and I can confirm that FFmpeg is having trouble finding x264 in that Ubuntu version.
Edit: I forgot to mention that current latest (FFmpeg version SVN-r26269) worked for me on 10.10.
Glad it worked for you.
Sorry I didn't respond sooner. I'm currently using Ubuntu 10.10.
I'll check the rest of the posts and try again.
Thanks for your efforts.
Scott O'Nanski
January 9th, 2011, 10:25 AM
Does it work on Natty if ffmpeg is forced to look at /usr/local/include and /usr/local/lib?
This assuming, of course, that the real problem was Natty, not that x264 hadn't been installed.
Either
A) remove --enable-libx264 from the command, or
B) as the error message said to do, post the contents of the config.log file that was created when you told ffmpeg to ./configure - that'll show more or less exactly what happened.
Don't know how to do that.
qyot27
January 9th, 2011, 11:04 AM
Don't know how to do that.
Which part? All removing --enable-libx264 means is to go to that part of the command, and Backspace (or Delete) it from the line before going further. Or remove it from the command in your own personal copy of the instructions, if you keep one around.
For config.log, it's in the ffmpeg source directory - so, assuming you're in that directory:
gedit config.log
Copy and paste the contents into your post.
But since we're talking about 10.10 here, have you installed x264 as described by the guide?
LauraKBurt
January 9th, 2011, 11:42 AM
Really its a good news.This site has lots of advantage. I found many interesting things from this site. I like it very much. Its so interesting.I want to sharing this topic with some of my close friends. So thanks this post.
mc4man
January 9th, 2011, 05:56 PM
Hi mc4man,
A little aside from the main discussion, is that the default kernel for natty
As of the other day, I gather it will use 2.38 eventually.
Overall I'm not too sure i'll have any use for 11.04 on my recent laptop, though I do like it for a much older p4 desktop with 23" display (where i have it now.
Probably will redo the eventual 2.38 when and if a bfs patch becomes avail., I have seen a bit of overall improvement with that on the p4 in 10.10 (2.36
ch3rryc0ke
January 14th, 2011, 08:26 AM
EDIT: Fixed my own problem
I had inadvertently entered the svc command twice, which created another ffmpeg src folder nested in my ffmpeg source folder, causing the problem. Deleted everything and recompiled and all is well.
------
Thanks a lot for the guide..
I'm getting the following error on Ubuntu 10.10 when running the make command for ffmpeg. This seemed to happen towards the tail end of compilation as it took a good 10 minutes of compiling before I hit this error.
Also, there were no problems with the configure step.
I believe the version of ffmpeg is 26326.
Any idea what it could be? What should I do now to get it working?
AR libavutil/libavutil.a
CC ffmpeg.o
ffmpeg.c: In function ‘term_exit’:
ffmpeg.c:424: warning: zero-length gnu_printf format string
ffmpeg.c: In function ‘opt_audio_sample_fmt’:
ffmpeg.c:2891: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type
cmdutils.h:165: note: expected ‘void (*)(char *, int, int)’ but argument is of type ‘char * (*)(char *, int, enum AVSampleFormat)’
ffmpeg.c: At top level:
ffmpeg.c:247: warning: ‘sws_flags’ defined but not used
ffmpeg.c: In function ‘output_packet’:
ffmpeg.c:1045: warning: dereferencing pointer ‘picture2’ does break strict-aliasing rules
ffmpeg.c:1603: note: initialized from here
CC cmdutils.o
cmdutils.c: In function ‘init_opts’:
cmdutils.c:67: warning: ‘sws_getContext’ is deprecated (declared at libswscale/swscale.h:191)
cmdutils.c: In function ‘read_file’:
cmdutils.c:735: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result
LD ffmpeg_g
CP ffmpeg
STRIP ffmpeg
strip: Warning: 'ffmpeg' is not an ordinary file
make: *** [ffmpeg] Error 1
FakeOutdoorsman
January 19th, 2011, 04:45 AM
Yesterday I updated the Meerkat guide to Git because that's what FFmpeg is now using, but the Git repository location changed since then. If you followed this guide yesterday and plan to use the ffmpeg directory to update FFmpeg then issue the following command:
cd ~/ffmpeg && git remote set-url origin git://git.ffmpeg.org/ffmpeg.git
Amefurashi
January 19th, 2011, 10:07 AM
Hello,
sorry for the very n00b question: I succeded in compiling x264 on my Maverick Merkaat 64-bit using the guide in the first post, but I only get the 64-bit build. Is there a quick method to obtain the 32-bit build too?
Also, are there any differences between "make" and "make fprofiled"? Does the second option provide a more optimized code?
Thank you!
Regards,
Ame
qyot27
January 19th, 2011, 08:40 PM
Hello,
sorry for the very n00b question: I succeded in compiling x264 on my Maverick Merkaat 64-bit using the guide in the first post, but I only get the 64-bit build. Is there a quick method to obtain the 32-bit build too?
Also, are there any differences between "make" and "make fprofiled"? Does the second option provide a more optimized code?
Thank you!
Regards,
Ame
Personally I think doing a 32-bit build on 64-bit Linux is a bit useless*, but it should be a simple matter of using --cross-prefix and --host, specifying the 32-bit architecture (what is it, i686-linux-gnu or something like that? check in /usr).
*as the relevant tools on Linux are all usable in 64-bit for a proper toolchain. The only exception would be if you were using a more powerful 64-bit-running machine to compile software for an older 32-bit-running machine. Then you'd need to use --prefix so as not to end up installing in an inconvenient spot in the file hierarchy.
If you want to build ffmpeg as 32-bit, you'd need to use --cross-prefix, --target-os, and --arch (or maybe just --arch, but it may complain about not having the other two).
I usually do cross-compiles for Windows using mingw, but it's the same basic principle to do it for any other given system, provided the right cross-compiler is installed (and on a 64-bit system, the 32-bit compiler is a cross-compiler). In my case, x264 looks like this:
PKG_CONFIG_PATH=$HOME/win32_build/lib/pkgconfig ./configure --prefix=$HOME/win32_build --cross-prefix=i586-mingw32msvc- --extra-cflags="-I$HOME/win32_build/include -march=pentium3" --extra-ldflags="-L$HOME/win32_build/lib" --qtsdk=$HOME/qtsdk --host=i586-mingw32msvc
Some of that extra stuff is because I include LAVF, FFMS2, and Audio support; look at how I specified --cross-prefix and --host. The hyphen at the end of the cross-prefix command is necessary, because it will try to look for the regular compiling toolchain with i586-mingw32msvc- attached to the front of it. So instead of looking for gcc, it looks for i586-mingw32msvc-gcc. Without the hyphen, the needed calls would be misspelled.
So in the case of 32-bit Linux, it might look like this instead:
./configure --cross-prefix=i686-linux-gnu- --host=i686-linux-gnu
Amefurashi
January 20th, 2011, 06:34 PM
The only exception would be if you were using a more powerful 64-bit-running machine to compile software for an older 32-bit-running machine. Then you'd need to use --prefix so as not to end up installing in an inconvenient spot in the file hierarchy.
Indeed, that's exactly my purpose: providing 32-bit builds (not for personal use), but compiling them on my 64-bit maverick.
Also, I'd love to implement LAVF and FFMS2 support in my builds: is it possible under linux?
Thanks again,
Ame
andrew.46
January 20th, 2011, 10:40 PM
Hi Ame,
x264 should automagically enable lavf input for you in the presence of FFmpeg header. This should be seen with ./configure as follows:
andrew@skamandros~/Desktop/x264$ ./configure
Platform: X86
System: LINUX
asm: yes
avs: no
lavf: yes
ffms: no
gpac: no
gpl: yes
thread: posix
filters: resize crop select_every
debug: no
gprof: no
PIC: no
shared: no
visualize: no
bit depth: 8
You can run 'make' or 'make fprofiled' now.
and after compilation should show:
andrew@skamandros~/Desktop/x264$ x264 --help | head -n 14
x264 core:112 r156 22bfd31
Syntax: x264 [options] -o outfile infile
Infile can be raw (in which case resolution is required),
or YUV4MPEG (*.y4m),
or Avisynth if compiled with support (no).
or libav* formats if compiled with lavf support (yes) or ffms support (no).
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC support (no)
Output bit depth: 8 (configured at compile time)
Andrew
LyingB
January 21st, 2011, 05:46 AM
I think you should remove subversion from Updating FFmpeg and x264 section.
FakeOutdoorsman
January 21st, 2011, 05:51 AM
You're right. I missed it when I git-ized the guide. Thanks.
qyot27
January 21st, 2011, 07:12 AM
Also, I'd love to implement LAVF and FFMS2 support in my builds: is it possible under linux?
To trim it down to size, the basic outline looks like this:
FFmpeg (stripped down), installed to custom prefix
FFMS2, installed to custom prefix
x264, LAVF and FFMS2 should be detected and used
(if you want a fully-featured FFmpeg you'll then need to build it again as this thread's main guide details)
Just copy-and-pasting from my most recent reference file, with some adjustments:
git clone git://git.ffmpeg.org/ffmpeg.git
svn checkout http://ffmpegsource.googlecode.com/svn/trunk/ ffms2
git clone git://git.videolan.org/x264.git
FFmpeg (basic):
cd ffmpeg
./configure --prefix=$HOME/ffms2_build --enable-gpl --enable-version3 --enable-postproc --disable-encoders \
--disable-muxers --disable-debug --disable-network --disable-hwaccels --disable-indevs --disable-outdevs \
--extra-cflags="-march=native"
make
make install
FFMS2:
cd ../ffms2
./configure --prefix=$HOME/ffms2_build PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig
make
make install
x264:
cd ../x264
PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig ./configure --prefix=$HOME/x264_build --extra-cflags="-march=native"
make
make install
make distclean
PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig ./configure --prefix=$HOME/x264_build/x264-10bit \
--extra-cflags="-march=native" --bit-depth=10
make
make install
Of course, adding in the proper options for cross-compiling (the --extra-cflags="-march=native" parameter should be changed to whatever processor the target machine uses*; if that's not known, leave the option out entirely). The 10-bit step for x264, starting with the 'make distclean', can be omitted if you don't find it necessary.
*actually using 'native' will set it to the processor of the computer doing the compiling. The reference file actually has pentium3 specified since I'm using a Coppermine-based Celeron.
qyot27
January 21st, 2011, 07:23 AM
Speaking of FFmpeg's recent change to git, how do you get git to show the last X commits to a given repo without having it stored locally? Basically an analogue to svn log -l X url, where X is an actual number. I don't even care if it requires multiple commands, just as long as it doesn't require actually downloading the source code. A multi-command way of doing it can be shell scripted if need be.
ron999
January 21st, 2011, 02:18 PM
...when I git-ized the guide...
Hi
I see that you've updated to git for ffmpeg source when compiling for Maverick.
Should we also use git instead of svn for Karmic and the other Ubuntus?
qyot27
January 21st, 2011, 08:33 PM
Hi
I see that you've updated to git for ffmpeg source when compiling for Maverick.
Should we also use git instead of svn for Karmic and the other Ubuntus?
You have to. The guide wasn't changed on a whim, it changed because FFmpeg has moved completely to git (as per http://ffmpeg.org/download.html). The SVN repo is still up, but is frozen at r26402. If the note given is any indication, it stands a chance of eventually being taken down entirely, so using SVN would cease to work for anybody. Distro version or choice has nothing to do with it.
FakeOutdoorsman
January 21st, 2011, 08:37 PM
Speaking of FFmpeg's recent change to git, how do you get git to show the last X commits to a given repo without having it stored locally? Basically an analogue to svn log -l X url, where X is an actual number. I don't even care if it requires multiple commands, just as long as it doesn't require actually downloading the source code. A multi-command way of doing it can be shell scripted if need be.
Doesn't seem to be possible according to spaam in #ffmpeg.
Hi
I see that you've updated to git for ffmpeg source when compiling for Maverick.
Should we also use git instead of svn for Karmic and the other Ubuntus?
SVN will still work for now, but the repository is supposedly not updated anymore and may be removed "in a near future". I'll update the other guides in a few days. I haven't totally been keeping up with recent developments in FFmpeg and right now I'm not sure what's going on between the two git repositories (git://git.videolan.org/ffmpeg.git and git://git.ffmpeg.org/ffmpeg.git).
andrew.46
January 23rd, 2011, 10:12 AM
I haven't totally been keeping up with recent developments in FFmpeg and right now I'm not sure what's going on between the two git repositories (git://git.videolan.org/ffmpeg.git and git://git.ffmpeg.org/ffmpeg.git).
Looks like a leadership spill, hopefully everything will settle down. Some of the gory details on FFmpeg-devel....
tarasu
January 27th, 2011, 03:06 AM
I have problem while installing ffmpeg on Linux Mint 10 Julia i686
uname -a
Linux some1-pc 2.6.37-0.dmz.5-liquorix-686 #1 ZEN SMP PREEMPT Sun Jan 23 03:53:56 UTC 2011 i686 GNU/Linux
ppa's:
ppa:tiheum/equinox
ppa:am-monkeyd/nautilus-elementary-ppa
ppa:alexey-smirnov/deadbeef
ppa:synapse-core/ppa
logs:
./configure: http://pastebin.com/Pa2JEwpf
make: http://pastebin.com/ByUCwL5g
p.s.: never had problems with ffmpeg on mint before
FakeOutdoorsman
January 27th, 2011, 03:35 AM
I can confirm this on Ubuntu 10.10 x86_64. It appears that the following commit is to blame: Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf (http://git.ffmpeg.org/?p=ffmpeg.git;a=commit;h=d36beb3f6902b1217beda576a a18abf7eb72b03c).
You can wait for this to be fixed by FFmpeg, or you can compile without VAAPI support by either adding --disable-vaapi to the FFmpeg ./configure, or by removing libva-dev. After choosing one of those methods be sure to make distclean in ~/ffmpeg before running make.
There might be a better method to resolve this.
Update: I pinged (pung?) the devs. This should be fixed soon, so you can just wait a day or less and then:
cd ~/ffmpeg
make distclean
git pull
Then continue with the ffmpeg ./configure line.
mc4man
January 27th, 2011, 04:40 AM
Will be interested on how it's fixed, built here w/ vaapi by removing the ff_## from the define, though clearly it was added for a reason.(I guess
(though again here don't see much value to vaapi anyway in ffmpeg
FakeOutdoorsman
January 27th, 2011, 05:22 AM
Will be interested on how it's fixed
With these probably:
[FFmpeg-devel] [PATCH] Add missing ff_ prefix to vaapi_hwaccel objects (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2011-January/104530.html)
[FFmpeg-devel] [PATCH] Add ff_ to AVHWAccel decoders (http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2011-January/104531.html)
mc4man
January 27th, 2011, 05:47 AM
That makes sense - next time I'll think to look deeper rather than just at the offending item and source file.
As a side note = on natty there still is an issue with static linking w/ gcc-4.5.X, it's actually not just x264, had a static vorbis build that showed the same behavior, was fine w/ gcc-4.4
Amefurashi
January 27th, 2011, 06:56 PM
CUT
Thanks, it worked like a charm!
Quick question: generating the executable is fine (I copied it into usr/local/bin), but is it possible to obtain a .deb package too? I need it for some friends...
Regards,
Ame
qyot27
January 28th, 2011, 05:40 AM
Thanks, it worked like a charm!
Quick question: generating the executable is fine (I copied it into usr/local/bin), but is it possible to obtain a .deb package too? I need it for some friends...
Regards,
Ame
If you want a .deb package, just use the checkinstall step from the official guide rather than the regular 'make install' one. I'm not sure if checkinstall still makes the packages install to /usr/local when they have a custom prefix used on them during the configure process, though. You'd have to test that.
As a general note, you can run the x264 executable from absolutely any directory if you use ./ in front of it. This is because Linux (and probably most other *nixen) denies execution rights to executables not located in directories specified on the system's $PATH. Using ./ overrides that restriction on a run-by-run basis. Same goes for executable shell scripts, thus why ./configure is ./configure, and not just a plain configure.
So basically, if the way you normally use x264 looks like:
x264 --preset ultrafast --tune zerolatency -o output.mp4 input.y4m
but you're in /home/user/x264_build/bin, meaning that it won't run if you try to use the above, then the override command would look like:
./x264 --preset ultrafast --tune zerolatency -o output.mp4 input.y4m
The alternate method would be to add any custom install locations to the $PATH, but that's cumbersome and apt to change with whatever you name the directories, making for extra hassle.
mocha
January 28th, 2011, 08:29 AM
I just did a fresh pull of x264 and ffmpeg and compiled x264 with lavf and ffms2 support. So what advantage exactly is this giving me?
I use ffmpeg on a regular basis to encode "any" to libx264 and MPEG2. The ffms2 documentation seems to elude that it's only useful when encoding files directly via the x264 binary and not using ffmpeg? Any clarification on this in plain english would be appreciated. Thanks.
FakeOutdoorsman
January 28th, 2011, 08:42 AM
I've only tried lavf support in x264 myself. It allows you use any video file input that FFmpeg can support instead of using a named pipe or some other method of input to x264. One advantage is that you gain access to some of the features that are lacking if you use FFmpeg to encode with x264, such as --tune (see x264 --fullhelp).
andrew.46
January 28th, 2011, 10:25 AM
Since there is some talk of x264 as a standalone encoder I was going to suggest that it might be helpful to add the gpac dev libraries to this guide? This of course would allow direct encoding by the cli x264 encoder into an mp4 container. Mind you I struggled a little on my current system as Gpac has moved home (http://gpac.wp.institut-telecom.fr/) and deleted its old tarball, the currently required svn version reports itself as:
andrew@skamandros~$ mp4box -version | head -n 1
MP4Box - GPAC version 0.4.6-DEV (internal rev. 8)
but is picked up with no problems by x264. The old tarball (0.4.5) did not compile with gcc 4.5.2 :(.
Andrew
Henrikx
January 28th, 2011, 10:50 AM
Why?
MP4Box -version | head -n 1MP4Box - GPAC version 0.4.5 (build 33) (Ubuntu)
x264 --help
x264 core:112 Ubuntu_2:0.112.1867-1ubuntu1
Syntax: x264 [options] -o outfile infile
Infile can be raw (in which case resolution is required),
or YUV4MPEG (*.y4m),
or Avisynth if compiled with support (no).
or libav* formats if compiled with lavf support (yes) or ffms support (no).
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC support (yes)
Output bit depth: 8 (configured at compile time)
andrew.46
January 28th, 2011, 12:27 PM
Hi Henrikx,
Why?
Well, as it stands FO's guide does not actually include the gpac -dev file required to allow x264 to use an mp4 container, hence my suggestion. My disjointed ramblings about the svn gpac were more to do with my inability, on another distro, to successfully compile gpac 0.4.5 :).
Andrew
qyot27
January 28th, 2011, 01:23 PM
I just did a fresh pull of x264 and ffmpeg and compiled x264 with lavf and ffms2 support. So what advantage exactly is this giving me?
I use ffmpeg on a regular basis to encode "any" to libx264 and MPEG2. The ffms2 documentation seems to elude that it's only useful when encoding files directly via the x264 binary and not using ffmpeg? Any clarification on this in plain english would be appreciated. Thanks.
Correct. FFMS2 (FFmpegSource2) does nothing in FFmpeg itself.
It helps to understand FFMS2's original purpose to distinguish it from either x264's LAVF support or main FFmpeg, and that is that FFMS2 is primarily an AviSynth source plugin - it's meant to provide AviSynth with a method of frame accurate decoding of virtually any video file that FFmpeg supports. It later grew into a cross-platform library which performs essentially the same function for the programs linked against it (such as x264 and Aegisub). LAVF is x264 linking directly against FFmpeg's libraries to open and decode video files, but without the assurance it'll necessarily be frame accurate.
qyot27
January 28th, 2011, 01:49 PM
Hi Henrikx,
Well, as it stands FO's guide does not actually include the gpac -dev file required to allow x264 to use an mp4 container, hence my suggestion. My disjointed ramblings about the svn gpac were more to do with my inability, on another distro, to successfully compile gpac 0.4.5 :).
Andrew
The last GPAC discussion I can remember:
http://ubuntuforums.org/showpost.php?p=6841491&postcount=330
There was a trick to compiling 0.4.5 that involved copying config.h to include/gpac/internal after configure had been run and then going on with the compile. Supposedly the SVN dev branch makes it much simpler than the terror to build that GPAC has historically been, but I'd still recommend going with L-SMASH for MP4 output support. Especially as there was some nasty mux breakage between non-current SVN GPAC versions and x264 back last October. I honestly have no idea if it is completely resolved now (on GPAC's side; old versions are problematic on this, period - it had to do with the atoms that were being written screwing up because x264 properly implemented a feature on the bitstream level and the older builds of GPAC couldn't handle it correctly; it'd mux, but the resulting files were unplayable or went out of sync or had other types of issues) or if there's lingering issues with even a current SVN version of GPAC. No such problems have been reported with L-SMASH, though, or at least not that I can recall.
It's available either as a patch (which periodically needs updating because x264's development outpaces it at times), or as a standalone git branch which also needs periodic updating, but since it is an actual x264 branch, there's no need to worry about it failing to patch.
http://vfrmaniac.fushizen.eu/OtherStuff/L-SMASH/ (patch)
https://github.com/silverfilain/x264_L-SMASH (branch)
Both the patch and branch contain the audio encoding features of the x264-audio (https://github.com/Kovensky/x264-audio) branch.
mocha
January 28th, 2011, 03:06 PM
Thanks for all the clarification. I'll have to give it a try now that I went through all that trouble to get it compiled. There are some great usage examples here (http://www.x264bluray.com/home) if anyone is interested.
andrew.46
January 28th, 2011, 09:57 PM
Thanks for that qyot27, I will admit that I had not heard of L-SMASH before. Nice if this work was integrated into x264 so there could be native output to mp4.
qyot27
January 29th, 2011, 12:28 PM
Thanks for that qyot27, I will admit that I had not heard of L-SMASH before. Nice if this work was integrated into x264 so there could be native output to mp4.
From what I gather, L-SMASH originated as a GSoC project in 2010. It's intended to adhere very strictly to the MP4 specifications, and thereby cut out a lot of the cruft that GPAC has built up over the years. The dev website seems to imply that consideration of L-SMASH being officially accepted into x264 hinges on whenever the audio encoding features are committed.
It's also a fraction of a fraction of GPAC's size, and already has most or all of the same x264-relevant functionality (L-SMASH source code: less than 1MB as cloned from the muxer-only git repo, GPAC source code: I'm not entirely sure, but I prematurely stopped the SVN checkout at around 44MBs) and has the necessary qt-faststart reordering already built in.
ron999
February 1st, 2011, 10:13 PM
@ hi FakeOutdoorsman
If I re-build ffmpeg with Karmic from the GIT.
Should I change the first command
from this:-
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
into this:-
git clone git://git.ffmpeg.org/ffmpeg.git
Is that correct?
And in the last line, what should I use instead of --pkgversion "4:0.5+svn`date +%Y%m%d`"?
;)
jjheap
February 1st, 2011, 10:39 PM
Installing ffmpeg, the guide(s) are fantastic, but...
I have found that the checkinstall step (see below) for 10.04 does not hold quite true for 10.04.1 ??? It seems to work if the appropraiet step is used from the 10.10 guide, perhaps somebody with a better understanding then mine could publish the exact correct steps?
7. Get the most current source files, compile, and install. Run "./configure --help" to see what other features you can enable/disable. Nightly FFmpeg snapshots (http://ffmpeg.mplayerhq.hu/releases/ffmpeg-checkout-snapshot.tar.bz2) are also available.
[CODE]
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
--enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | \
grep Revision | awk '{ print $NF }'`" --backup=no --default --deldoc=yes
hash x264 ffmpeg ffplay
FakeOutdoorsman
February 1st, 2011, 11:27 PM
@ hi FakeOutdoorsman
If I re-build ffmpeg with Karmic from the GIT.
Should I change the first command
from this:-
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
into this:-
git clone git://git.ffmpeg.org/ffmpeg.git
Is that correct?
Yes, that is correct, but I would first remove the old ~/ffmpeg directory before running the git command. I've been waiting for things to settle down on the FFmpeg end, but I'll update the older guides on Monday.
And in the last line, what should I use instead of --pkgversion "4:0.5+svn`date +%Y%m%d`"?
This should do it:
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
--deldoc=yes --default
I have found that the checkinstall step (see below) for 10.04 does not hold quite true for 10.04.1 ???
Is checkinstall giving you any errors?
ron999
February 1st, 2011, 11:50 PM
Thanks.:guitar:
ron999
February 2nd, 2011, 02:31 AM
Hi
ffmpeg has compiled OK.
But when installed it said:- bash: hash: ffplay: not found
And when I enter ffplay :-
The program 'ffplay' is currently not installed. You can install it by typing:
sudo apt-get install ffmpeg
ffplay: command not found
When I look in usr/local/bin I can see ffmpeg ffprobe and ffserver - but no ffplay.
So maybe ffplay isn't included in the package any more.:confused:
ron@ubuntu:~$ ffmpeg
FFmpeg version git-ea7f080, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 2 2011 01:14:24 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --disable-encoder=vorbis
libavutil 50. 36. 0 / 50. 36. 0
libavcore 0. 16. 1 / 0. 16. 1
libavcodec 52.108. 0 / 52.108. 0
libavformat 52. 94. 0 / 52. 94. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1. 74. 0 / 1. 74. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0
FakeOutdoorsman
February 2nd, 2011, 04:10 AM
Does it work after you enter hash -r?
ron999
February 2nd, 2011, 04:19 AM
I don't understand hash -r.
Do you mean I should use hash -r in my last command:-
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no --deldoc=yes --default && hash x264 ffmpeg ffplay
FakeOutdoorsman
February 2nd, 2011, 04:36 AM
If, in the same session, you use the repository FFmpeg and then remove it, compile, and then attempt to use your compiled version you can get a "ffplay: command not found" message. The hash -r command purges remembered locations.
What I meant was to simpy run the hash command and then try running ffplay, but since you already mentioned that you don't see the binary anywhere then I suspect it isn't actually installed.
I just tested Karmic and ffplay installed fine:
$ dpkg -L ffmpeg | grep ffplay
/usr/share/doc/ffmpeg/doc/ffplay.html
/usr/share/doc/ffmpeg/doc/ffplay.pod.d
/usr/share/doc/ffmpeg/doc/ffplay.html.d
/usr/share/doc/ffmpeg/doc/ffplay.1
/usr/share/doc/ffmpeg/doc/ffplay.texi
/usr/share/doc/ffmpeg/doc/ffplay.pod
/usr/local/share/man/man1/ffplay.1.gz
/usr/local/bin/ffplay
Maybe you were missing libsdl1.2-dev before compiling? It's a required dependency for ffplay, but you won't get a message if it's missing. FFplay will simply not be built.
ron999
February 2nd, 2011, 04:44 AM
You're spot on!
libsdl1.2-dev isn't installed.
I don't know how that's happened.
Maybe I uninstalled it with some other stuff since I last compiled.
I don't use ffplay very often, so it could have been missing for a while.
For now, I can live without ffplay, till next time.
Thanks.
FakeOutdoorsman
February 2nd, 2011, 04:54 AM
Glad you found the culprit. Running Step 2 after uninstalling and before compiling x264 and FFmpeg is probably a good idea to make sure everything you need is still there and up to date.
Edit: I updated the Karmic guide.
Daerun
February 5th, 2011, 11:50 AM
Hello, I've found an issue that I think is not been discussed here, or at least couldn't find it searching backwards in this thread.
I'm trying to install ffmpeg with this tutorial, but first I installed libvpx. Downloaded it from here
http://code.google.com/p/webm/downloads/list
That's version 0.9.5. Then did the process
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="`date +%Y%m%d%H%M`-git" --backup=no --default --deldoc=yesSo, when installing ffmpeg I was told to use this code:
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libvpx --enable-libmp3lameAnd it returned this message:
ERROR: libvpx decoder version must be >=0.9.1
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.log" produced by configure as this will help
solving the problem.
So, what should I do now, please?
FakeOutdoorsman
February 5th, 2011, 07:13 PM
What Ubuntu version are you using?
Daerun
February 5th, 2011, 10:13 PM
Sorry, I'm using Lucid.
FakeOutdoorsman
February 5th, 2011, 10:35 PM
I tried this on Lucid and FFmepg found libvpx with no problem. However, I used git instead of svn for FFmpeg. I just updated the Lucid guide with new instructions for FFmpeg.
Can you double-check to make sure that libvpx even got installed?
I recommend doing this:
rm -rf ~/ffmpeg
...and then continuing on step 7.
Daerun
February 6th, 2011, 01:50 AM
Alright, the problem was libvpx not properly installed for some reason. Repeated using git and everything work, although I saw errors showing during the process, like:
libavcodec/h264_direct.c:263: warning: assignment from incompatible pointer type
libavcodec/h264_direct.c:264: warning: assignment from incompatible pointer type
libavcodec/imgconvert.c:715: warning: passing argument 3 of ‘av_image_copy’ from incompatible pointer type
./libavcore/imgutils.h:112: note: expected ‘const uint8_t **’ but argument is of type ‘uint8_t **’
libavcodec/imgconvert.c: In function ‘av_picture_copy’:
libavcodec/ivi_dsp.c:41: warning: ‘b3_5’ may be used uninitialized in this function
libavcodec/ivi_dsp.c:41: warning: ‘b3_6’ may be used uninitialized in this function
What is the meaning of this?
qyot27
February 6th, 2011, 02:06 AM
Alright, the problem was libvpx not properly installed for some reason. Repeated using git and everything work, although I saw errors showing during the process, like:
libavcodec/h264_direct.c:263: warning: assignment from incompatible pointer type
libavcodec/h264_direct.c:264: warning: assignment from incompatible pointer type
libavcodec/imgconvert.c:715: warning: passing argument 3 of ‘av_image_copy’ from incompatible pointer type
./libavcore/imgutils.h:112: note: expected ‘const uint8_t **’ but argument is of type ‘uint8_t **’
libavcodec/imgconvert.c: In function ‘av_picture_copy’:
libavcodec/ivi_dsp.c:41: warning: ‘b3_5’ may be used uninitialized in this function
libavcodec/ivi_dsp.c:41: warning: ‘b3_6’ may be used uninitialized in this function
What is the meaning of this?
Those aren't really 'errors'. If they were errors, compiling would fail and you would see something like this at the end:
collect2: ld returned 1 exit status
make[1]: *** [directory] Error 1
make[1]: Leaving directory `directory'
make: *** [all] Error 2
(with [directory] and `directory' meaning actual directory paths)
The warnings could be related to the version of GCC used to compile the build, or simply things that the ffmpeg devs either haven't tweaked or that they don't prioritize. I think it was the ffmpeg mailing list where I saw a comment to the effect that making the GCC output absolutely free from inconsequential warnings was not important, thus any cleaning up that happens probably is done at the behest of making sure it doesn't break anything else, or because it's part of a bigger fix/optimization that needed to be done anyway. The warnings being rooted in the version of GCC would be a good reason for this to be unimportant - they'd spend more time focusing on fixing GCC version inconsistencies than they would actual productive development. As long as it's not a case of breakage, it may eventually resolve itself on GCC's end.
undercash
February 7th, 2011, 02:15 AM
hello,
I m trying to compile ffmpeg on 10.0.4 (x86) for the first time. I have this error message, google didn't really help
ffmpeg: relocation error: /usr/local/lib/libavfilter.so.1: symbol sws_isSupportedInput, version LIBSWSCALE_0 not defined in file libswscale.so.0 with link time reference
I found this http://wieshka.pastebin.com/2u1XFx6B but it didn't solve this issue.
at first it worked via command line, then I checked if my script could use ffmpeg and I had the typical ffmpeg error:
error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory
which I fixed inserting /usr/local/lib in ld.config.conf
any ideas?
undercash
February 7th, 2011, 05:14 PM
hmm I think I found the cause of the problem.
I am using the option --enable-shared in the ffmpeg configuration line because I want to install ffmpeg-php.
How to make this works on ubuntu 10.0.4, since this always worked fine for me on hardy
FakeOutdoorsman
February 7th, 2011, 07:40 PM
I just did a test compile on 10.04 and it worked. Note that first I deleted the old ~/ffmpeg directory because it was using SVN and FFmpeg has moved to Git.
If you --enable-shared on FFmpeg, then you should do the same for the external libraries. Add it to x264 and libvpx. For LAME just remove --disable-shared.
Then after you install everything you should run "sudo ldconfig". If you don't run that command you'll receive something like the following:
$ ffmpeg
ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory
undercash
February 7th, 2011, 07:42 PM
thanks for the feedback, again. I am gonna test with -enable-shared for x264 now
Amefurashi
February 7th, 2011, 08:44 PM
// Whoa, my bad. Forget it //
Also, as a sidenote... is there a quick way to compile x264 with L-SMASH mp4 output? :oops:
As always, thanks!
Regards,
Ame
Edit: I just recalled that the "checkinstall" step for creating a deb. package doesn't work... it creates a dummy package (16kb in size).
undercash
February 7th, 2011, 10:57 PM
well no luck for me after recompiling with libx264 --enable-shared
output in terminal is:
FFmpeg version git-48545a8, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 7 2011 23:39:29 with gcc 4.4.3
configuration: --enable-gpl --enable-pthreads --enable-libvorbis --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab --disable-debug --enable-shared
libavutil 50. 37. 0 / 50. 37. 0
libavcore 0. 16. 1 / 0. 16. 1
libavcodec 52.109. 0 / 52.109. 0
libavformat 52. 97. 0 / 52. 97. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1. 74. 0 / 1. 74. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
output using php is:
http://pokercast.dyndns.org/ffmpeg.php
andrew.46
February 8th, 2011, 10:21 AM
Also, as a sidenote... is there a quick way to compile x264 with L-SMASH mp4 output?
I have just been looking at this courtesy of qyot's recent post and I settled on patching, and quite a large patch it is. Change to the directory containing your x264 source and run the following:
$ wget http://vfrmaniac.fushizen.eu/OtherStuff/L-SMASH/x264_lsmash.diff
$ patch -p1 < x264_lsmash.diff
$ ./configure --enable-nonfree
and then run the usual make and checkinstall commands from Fakeoutdoorsman's guide. Nice having the audio track encoded as well with the patched x264 :)
FakeOutdoorsman
February 9th, 2011, 03:23 AM
The x264 checkinstall pkgversion is mental. I want a simpler, cleaner way of getting the same output. We get signal:
$ ./version.sh
#define X264_VERSION " r1900 60ef1f8"
#define X264_POINTVER "0.114.1900 60ef1f8"
I want 0.114.1900+git60ef1f8. Unfortunately, my text wrangling skills are lacking. I can get this with:
$ ./version.sh | awk '/POINT/{print $3,$4}' | sed 's/"//g;s/ /+git/'
0.114.1900+git60ef1f8
It's less verbose, but I know it can be more efficient. Any suggestions?
qyot27
February 9th, 2011, 03:41 AM
I have just been looking at this courtesy of qyot's recent post and I settled on patching, and quite a large patch it is. Change to the directory containing your x264 source and run the following:
$ wget http://vfrmaniac.fushizen.eu/OtherStuff/L-SMASH/x264_lsmash.diff
$ patch -p1 < x264_lsmash.diff
$ ./configure --enable-nonfree
and then run the usual make and checkinstall commands from Fakeoutdoorsman's guide. Nice having the audio track encoded as well with the patched x264 :)
As a sidenote, when doing compiles for Windows, the audio support allows using Quicktime to act as the AAC encoder*, so long as the SDK is given to x264 at ./configure. The downside to that is needing to sign up for a free ADC account and download the SDK yourself, though. For cross-compiles it's also a bit trickier because some case-sensitivity comes into play with the filenames, but under a native Windows environment that isn't a problem.
*Although it only works if one has Quicktime installed. It doesn't even have to be Quicktime Pro; the standard version that ships with iTunes is enough. And IMO iTunes is ubiquitous enough now that that shouldn't be a concern.
Personally I think the advantage of being able to use the Quicktime encoder far outweighs the extra work needed to get the necessary libs/includes. That advantage being, Quicktime's has historically been one of the best AAC encoders, whether that's first place, tied for first with Nero, or a very close second behind Nero. You would think that this functionality would also be possible on OSX builds, but apparently not (although I've not tried compiling x264 on OSX for almost a year, well before the L-SMASH and audio support stuff was being tossed around publicly; it very well could have been added by now).
andrew.46
February 9th, 2011, 10:46 AM
$ ./version.sh | awk '/POINTVER/ { print $3,$4 }' | sed 's/"//g' | sed 's/ /+git/'
0.114.1900+git60ef1f8
Hmmmm..... this is not much of an improvement I guess:
$ ./version.sh | grep 'POINT' | cut -d '"' -f 2 | sed 's/ /+git/'
0.114.189+git60ef1f8
Big advantage for me is that I don't understand awk :)
claracc
February 11th, 2011, 07:54 AM
Hello, great guide for ffmpeg, congratulations.
I have compiled and installed ffmpeg and x264 in my hp compaq 6720 s laptop dual boot vista/lucid lynx as it is recommended in this guide.
I try to pass this audio file from bbc (real player coded) http://www.bbc.co.uk/worldservice/learningenglish/multimedia/btp/ram_files/winchester_audio1.ram to wav. I download the file and then try the command : ffmpeg -i winchester_audio1.ram winchester_audio1.wav
as I was adviced by JC Cheloven in this thread: http://ubuntuforums.org/showthread.php?t=1678278 but I obtain the following error:
ffmpeg -i winchester_audio1.ram winchester_audio1.wav
FFmpeg version git-b466827, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 10 2011 16:29:10 with gcc 4.4.3
configuration: --enable-libmp3lame --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50. 37. 0 / 50. 37. 0
libavcore 0. 16. 1 / 0. 16. 1
libavcodec 52.112. 0 / 52.112. 0
libavformat 52. 98. 0 / 52. 98. 0
libavdevice 52. 2. 3 / 52. 2. 3
libavfilter 1. 75. 0 / 1. 75. 0
libswscale 0. 12. 0 / 0. 12. 0
libpostproc 51. 2. 0 / 51. 2. 0
winchester_audio1.ram: Invalid data found when processing input
What can be the problem?, Have I missed some codec?
Thanks in advance
ron999
February 11th, 2011, 08:09 AM
Hi claracc
ffmpeg can't convert the link as it is.
Right-click on that link http://www.bbc.co.uk/worldservice/learningenglish/multimedia/btp/ram_files/winchester_audio1.ram
And 'Save link as...'.
You'll get a file named winchester_audio1.ram in your home folder.
Open that file with gedit text editor or similar.
You'll see that it says:-
rtsp://rmv8.bbc.net.uk/worldservice/learningenglish/beyondthepostcard/winchester1.ra?BBC-UID=144d2571dee4faed59a5a50dd10e5c0aa1f1b2cb709051 9424bff4f638d05eda&SSO2-UID=
You only need the part up till the question mark (?).
Which is
rtsp://rmv8.bbc.net.uk/worldservice/learningenglish/beyondthepostcard/winchester1.ra
Now you can use that with ffmpeg.
Like this:-
ffmpeg -i rtsp://rmv8.bbc.net.uk/worldservice/learningenglish/beyondthepostcard/winchester1.ra winchester_audio1.wav
claracc
February 11th, 2011, 03:32 PM
Hello ron999,
Thankyou very much, I have followed your recommendation, and yes, I could, at last, to convert the real audio file to a wav one, and now I can listen to it with rhythmbox.:P
It is clear, I need to read more about ffmpeg in ordert to use it properly.
Regards
ron999
February 11th, 2011, 03:42 PM
@claracc
ffmpeg is a great program.
But if you want to use those ram links then mplayer is much better.
Try mplayer, you'll find it's much quicker than ffmpeg for this job.
The 37 second clip takes exactly 37 seconds to download with ffmpeg.
With mplayer it downloads in a twinkle.
Just try it please.
mplayer -bandwidth 9999999 -playlist http://www.bbc.co.uk/worldservice/learningenglish/multimedia/btp/ram_files/winchester_audio1.ram -vc null -vo null -ao pcm:fast:waveheader:file=winchester_audio2.wav
claracc
February 11th, 2011, 03:58 PM
Hello ron999, I have tried the coneversion with mplayer as you have adviced, and it is as fast as a ray, much more than ffmpeg.
So I will use mplayer to do the format conversion for .ram files.
I see that I have to learn more about mplayer too.
Thanks and regards
FakeOutdoorsman
February 11th, 2011, 10:41 PM
Hmmmm..... this is not much of an improvement I guess:
$ ./version.sh | grep 'POINT' | cut -d '"' -f 2 | sed 's/ /+git/'
0.114.189+git60ef1f8
Big advantage for me is that I don't understand awk :)
Thanks for the alternate command. I don't understand awk very well and every time I use it I have to re-learn by fumbling around with it. I've shortened my command by combining the seds. I guess I just have to decide which one should replace the ubercommand in the pkgversion.
andrew.46
February 12th, 2011, 10:02 PM
I've shortened my command by combining the seds.
I see you have used this:
$ ./version.sh | awk '/POINT/{print $3,$4}' | sed 's/"//g;s/ /+git/'
which certainly works, although I am more used to seeing the following:
$ ./version.sh | awk '/POINT/{print $3,$4}' | sed -e 's/"//g' -e 's/ /+git/'
I read some discussion concerning use of either the semicolon or the -e option and was none the wiser as to which was the better, or more correct option :(.
undercash
February 13th, 2011, 02:41 PM
well no luck for me trying to compile ffmpeg as a shared library. But it seems I don't need ffmpeg-php anyway so I ll just use as it.
Before you had a link for the http://code.google.com/p/x264-ffmpeg-up-to-date/ script on your tutorial. Is this in a sort of standbye because ffmpeg moved to git?
FakeOutdoorsman
February 13th, 2011, 06:55 PM
Before you had a link for the http://code.google.com/p/x264-ffmpeg-up-to-date/ script on your tutorial. Is this in a sort of standbye because ffmpeg moved to git?
I removed the link to that script because the author has failed to keep it reasonably up to date.
undercash
February 13th, 2011, 07:04 PM
ah I see. it's a pity even though it' s not really hard to update manually
andrew.46
February 13th, 2011, 11:00 PM
I see you have used this:
$ ./version.sh | awk '/POINT/{print $3,$4}' | sed 's/"//g;s/ /+git/'
I consulted the experts on comp.unix.shell and the following syntax might be what you are after:
$ ./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}'
It is nicely done and probably hints to me that I really need to drag that awk book down from the shelf :)
FakeOutdoorsman
February 14th, 2011, 01:39 AM
Yes, that's perfect. Thanks Andrew. I'll add this to the guide soon.
I'll admit that I've never posted on a Usenet group before.
andrew.46
February 14th, 2011, 04:21 AM
Yes, that's perfect. Thanks Andrew. I'll add this to the guide soon.
I'll admit that I've never posted on a Usenet group before.
Courtesy of Janis Papana :). comp.unix.shell is a great newsgroup with some very knowledgeable people, if you ever decide to indulge in Usenet the magic news server is individual.net, best usenet client is slrn and best proxy server is leafnode 2 IMHO!
LinuxPhreak
February 15th, 2011, 12:07 AM
After compiling FFMPEG by following this tutorial I no longer can play DVD movies. I was able to play them before by installing the ubntu-restricted-extras and sudo /usr/share/doc/libdvdread4/install-css.sh. However after compiling the FFMPEG I no longer can play my DVD movies. Any idea why?
qyot27
February 16th, 2011, 01:03 AM
After compiling FFMPEG by following this tutorial I no longer can play DVD movies. I was able to play them before by installing the ubntu-restricted-extras and sudo /usr/share/doc/libdvdread4/install-css.sh. However after compiling the FFMPEG I no longer can play my DVD movies. Any idea why?
I don't see why it would break, as libdvdcss should be separate from all of that. FFmpeg doesn't incorporate that library, but if you're using mplayer (which does use it) then you may be running into shared library issues - recompiling FFmpeg might have played a bit of havoc on mplayer. It may be fixable by just grabbing libdvdcss from Medibuntu.
You could try to recompile mplayer and see if that fixes it. http://repo.or.cz/w/mplayer-build.git makes the process near-totally painless:
git clone git://repo.or.cz/mplayer-build.git
cd mplayer-build
./init
./enable-mt or ./disable-mt (as needed; enable-mt is the default behavior now, but on single-core processors I'd disable it)
make
sudo make install (or a suitable checkinstall command)
You could further customize the FFmpeg, libass, or mplayer specific options before the 'make' step, but I don't think that's really necessary on Linux. It may be necessary to install libdvdcss-dev as well beforehand so it could find it.
akemzo
February 16th, 2011, 12:37 PM
tried the above, it installed but still my vidoes don't play, something about ffmpeg version r19000 or above required, any idea?
FakeOutdoorsman
February 16th, 2011, 07:29 PM
tried the above, it installed but still my vidoes don't play, something about ffmpeg version r19000 or above required, any idea?
That's not much to work with so I'm going to need more information before I can even make a guess:
What version of Ubuntu are you using?
What are you using to play the videos?
Are there any error messages?
What's telling you that r19000 or above required?
kicker4546
February 17th, 2011, 07:50 PM
Hi,
this is my first post here at Ubuntu forums.
I'm running Ubuntu 10.10 64-bit version. I have tried updating my x264. I followed the instructions on page 1 and I get an error.
andy@g:~/x264$ make
gcc -o x264 x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o filters/video/depth.o input/thread.o input/lavf.o output/mp4.o libx264.a -lgpac_static -L. -pthread -L/usr/local/lib -lavformat -lavcodec -ldl -lX11 -lXext -lXfixes -ljack -lasound -lxvidcore -lx264 -lvpx -lvorbisenc -lvorbis -ltheoraenc -ltheoradec -logg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lva -lm -lbz2 -lz -lavcore -lswscale -lavutil -L/usr/local/lib -lswscale -lavutil -lm -lpthread -s
/usr/local/lib/libavcodec.a(libx264.o): In function `X264_init':
/home/andy/ffmpeg/libavcodec/libx264.c:308: undefined reference to `x264_encoder_open_113'
collect2: ld returned 1 exit status
make: *** [x264] error 1
What's that? Does any of you have an idea what's wrong here?
Nom du Clavier
February 18th, 2011, 01:11 AM
Hi,
this is my first post here at Ubuntu forums.
I'm running Ubuntu 10.10 64-bit version. I have tried updating my x264. I followed the instructions on page 1 and I get an error.
andy@g:~/x264$ make
gcc -o x264 x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o filters/video/depth.o input/thread.o input/lavf.o output/mp4.o libx264.a -lgpac_static -L. -pthread -L/usr/local/lib -lavformat -lavcodec -ldl -lX11 -lXext -lXfixes -ljack -lasound -lxvidcore -lx264 -lvpx -lvorbisenc -lvorbis -ltheoraenc -ltheoradec -logg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lva -lm -lbz2 -lz -lavcore -lswscale -lavutil -L/usr/local/lib -lswscale -lavutil -lm -lpthread -s
/usr/local/lib/libavcodec.a(libx264.o): In function `X264_init':
/home/andy/ffmpeg/libavcodec/libx264.c:308: undefined reference to `x264_encoder_open_113'
collect2: ld returned 1 exit status
make: *** [x264] error 1
What's that? Does any of you have an idea what's wrong here?
It might be - and I'm not saying this is definitely the case - that this latest and greatest version which you're trying to compile had a patch applied which left it with this error. Usually care is taken so that each distinct version can be compiled, but things do slip through from time to time - the contributors to x264 are only human, after all.
You could try issuing the following commands:
git checkout HEAD~2
make
which will rewind a few change sets, thus hopefully bypassing this error - if that's what it's caused by. Then it tries again to build to see if this helped.
You'd then resume your usual commands from the HowTo where you left off, after the 'make' command, if indeed this error was now solved.
I hope this helps!
kicker4546
February 18th, 2011, 01:17 AM
It might be - and I'm not saying this is definitely the case - that this latest and greatest version which you're trying to compile had a patch applied which left it with this error. Usually care is taken so that each distinct version can be compiled, but things do slip through from time to time - the contributors to x264 are only human, after all.
You could try issuing the following commands:
git checkout HEAD~2
makewhich will rewind a few change sets, thus hopefully bypassing this error - if that's what it's caused by. Then it tries again to build to see if this helped.
You'd then resume your usual commands from the HowTo where you left off, after the 'make' command, if indeed this error was now solved.
I hope this helps!
First of all I wanna thank you for your reply. Hopefully this is going to work for me. I'll try later and let you know whether the issue is resolved that way.
Thanks again,
kicker
FakeOutdoorsman
February 18th, 2011, 01:28 AM
Does any of you have an idea what's wrong here?
You probably have old x264 files interfering with the installation. Did you make sure to remove any x264 and libx264 packages first?
Edit: I bet it will work if you add --disable-lavf to your x264 ./configure. If that is the case then you need to also remove FFmpeg before updating x264. See the Updating FFmpeg and x264 section of the guide.
kicker4546
February 18th, 2011, 04:09 PM
You probably have old x264 files interfering with the installation. Did you make sure to remove any x264 and libx264 packages first?
Edit: I bet it will work if you add --disable-lavf to your x264 ./configure. If that is the case then you need to also remove FFmpeg before updating x264. See the Updating FFmpeg and x264 section of the guide.
Yeah, exactly as you said. When I set --disable-lavf it worked pretty well. It seems I had to update ffmpeg too instead of only my x264.
I was able to successfully build it now. Thanks for your help!
LuizCB
February 21st, 2011, 05:46 PM
Hello
Did anyone tried already the guide from post #1 on Natty? If so, it goes/works with the same steps?
looking back I see this posts:
1431 (http://ubuntuforums.org/showpost.php?p=10333180&postcount=1431) through
1441 (http://ubuntuforums.org/showpost.php?p=10335429&postcount=1441)
Is this a final and effective way of doing it?
Regards
FakeOutdoorsman
February 21st, 2011, 06:35 PM
I haven't tried since those posts so I'm not sure what the current status is. You can try adding --enable-shared to both x264 and FFmpeg, and then running sudo ldconfig after everything installs.
LuizCB
February 21st, 2011, 06:47 PM
Thanks FakeOutdoorsman (http://ubuntuforums.org/member.php?u=162846)
I'm installing it following your guide and logging all CLI. I'll post it here as soon as i finish it, for good or for .... bad :)
Wastrelway
February 21st, 2011, 11:25 PM
I'd suggest alternate and (perhaps for us old-school guys) simpler instructions that do not use git. I am behind a firewall and proxy server and could not get the totally BOGUS "git clone git://git.videolan.org/x264.git" command to do anything except create an error. (I did try. I reconfigured the proxy etc.) You don't NEED git. Get the latest source and compile, unless your paycheck depends on your use of git.
Eric
FakeOutdoorsman
February 22nd, 2011, 12:46 AM
Git makes it easy to keep up with upstream changes. It's also useful for viewing the commit log and for making patches. It would be less efficient to download a full tarball each time I wanted to update. This guide is about using the latest x264 and FFmpeg and both of these projects use Git.
I had daily tarball links until recently. I removed them during FFmpeg's turmoiled transition from SVN to Git but perhaps I'll re-introduce them.
mc4man
February 22nd, 2011, 01:05 AM
You can try adding --enable-shared to both x264 and FFmpeg, and then running sudo ldconfig after everything installs.
assuming this refers to 11.04
You can probably just build x264 as shared, then ffmpeg as static
(if not inclined to introduce new shared ffmpeg libs
Otherwise building a static x264 as normal, (w/ the current default gcc-4.5+), then ffmpeg w/ gcc-4.4 will also work fine
(or both w/ gcc-4.4
Or figure out what the issue is, has been mentioned the default gcc flag of --as-needed may be a factor
qyot27
February 22nd, 2011, 04:54 PM
I'd suggest alternate and (perhaps for us old-school guys) simpler instructions that do not use git. I am behind a firewall and proxy server and could not get the totally BOGUS "git clone git://git.videolan.org/x264.git" command to do anything except create an error. (I did try. I reconfigured the proxy etc.) You don't NEED git. Get the latest source and compile, unless your paycheck depends on your use of git.
Eric
Git may not be 'necessary', but it is far more convenient from a Terminal-only situation - wget-snagged tarballs are only as updated as the auto-package system is set to make them (in x264's case, that's once-daily; I can't see any links to such code on FFmpeg's download page, only their periodic release tarballs), whereas Git is always the absolute latest code because you're tapping into the direct development pipeline. The proxy/firewall thing is a known issue, and probably screws up other source management systems like CVS and SVN too, like the note on FFmpeg's download page says.
I'd think it rather safe to assume that those who cannot access Git because of a proxy or firewall interfering are in the relative minority compared to those who can access it with no problems. It would be a good idea to provide relevant links to tarballs, but you aren't guaranteed to have the latest code that way. Direct 'latest' tarball links from the git repository aren't possible, because the name changes constantly with the git hash.
The alternate solution is to add x264's and FFmpeg's git commit log RSS feeds and manually snag the latest commit snapshot through the web browser. The only caveat is that the RSS commit links drop you to a page with no snapshot link - you have to click the header bar with the commit message in bold or the 'commit' link to get the page with the actual tarball.
http://git.videolan.org/?p=x264.git;a=summary
http://git.ffmpeg.org/?p=ffmpeg.git;a=summary
As a relative aside, I've always considered git.ffmpeg.org the official Git repo, since it was kept in sync with SVN and was the only one listed on ffmpeg.org/download.html for years until things blew up last month (now all 5 'major' - I guess - repos are listed there).
FakeOutdoorsman
February 22nd, 2011, 08:26 PM
Git snapshots for FFmpeg are available, but it isn't very obvious on the Gitweb interface. Not particularly wget friendly, but it works fine like this:
wget "http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=HEAD;sf=tgz" -O ffmpeg-latest-$(date +%Y%m%d%H%M%S).tar.gz
As a relative aside, I've always considered git.ffmpeg.org the official Git repo, since it was kept in sync with SVN and was the only one listed on ffmpeg.org/download.html for years until things blew up last month (now all 5 'major' - I guess - repos are listed there).
The whole series of events is unfortunate. During SVN usage the official Git mirror was git.ffmpeg.org, but I don't consider any of them to be "official" yet. I'm actually using the videolan repository lately because of a certain useful commit that may never make it into git.ffmpeg.org.
LuizCB
February 22nd, 2011, 08:32 PM
FakeOutdoorsman (http://ubuntuforums.org/member.php?u=162846)
There we go...
http://paste.ubuntu.com/570730/
All steps on 11.04
lcb@srvr:~$ uname -a
Linux srvr.kcasa.lan 2.6.38-4-generic-pae #31-Ubuntu SMP Thu Feb 17 01:24:59 UTC 2011 i686 i686 i386 GNU/Linux
lcb@srvr:~$ cat /proc/version
Linux version 2.6.38-4-generic-pae (buildd@vernadsky) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-2ubuntu3) ) #31-Ubuntu SMP Thu Feb 17 01:24:59 UTC 2011
*x264* *git x264* *configure x264* *make x264* *checkinstall x264* *ffmpeg* *git ffmpeg* *configure ffmpeg* *make ffmpeg* *checkinstall ffmpeg* *hash* *qt-faststart*
Tell me if anything's wrong, missing things, errors, etc...
(I had a hard time to put putty log together - some sections messed up, don't know why - but it looks better now)
Glad to help you. Keep it up ;)
Regards,
Luiz
qyot27
February 22nd, 2011, 09:42 PM
I'm actually using the videolan repository lately because of a certain useful commit that may never make it into git.ffmpeg.org.
The expanded list of video filters in libavfilter/libmpcodecs, I presume? Or something else?
FakeOutdoorsman
February 23rd, 2011, 01:31 AM
Change yadif to not use out of picture lines (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=bad82d3d7d98c1cf0d6790cc2 e1d6b2ea60fcadd). Nothing too important, but it fixes issue2272 which was annoying me and now I don't need to pad,yadif,crop.
I'm curious how issues will be dealt with in Roundup with the multiple repos. issue2272 is "fixed", but I assume only on the videolan repo.
qyot27
February 23rd, 2011, 02:22 AM
Ah, I see. Makes me wonder if - and how many - other things separate them. I suppose it depends on what sort of things one does. If you don't plan on doing any deinterlacing then it wouldn't really matter, but for coverage's sake that would do better.
Of course, the three things I'd most like to see incorporated into FFmpeg are completely not addressed at all. Two of them are outdated patches/branch versions (the MLP encoder and MKV Ordered Chapters support), and the last I have no clue if there has been any effort to resolve (hardcoding of subtitles, without demuxing, and with embedded font support for libass).
Piping the output from mplayer* to ffmpeg accomplishes the ordered chapters and embedded fonts tasks, but it really shouldn't have to. Using mencoder for hardcoding subtitles is borked in several ways, and the patch that allowed mencoder to use embedded fonts with ASS subtitles has been broken since January of 2010 (which also means that MKVs using header removal compression don't work with it at all).
*the branch version hosted on repo.or.cz. Now officially 'MPlayer2' (http://www.mplayer2.org/mplayer1_comparison.html) (I bet that's gonna be somewhat confusing for some Windows XP users: WMP6.4's filename is mplayer2.exe). It's the result of Uoti Urpala's split with the main mplayer devs due to politics over coding practices, apparently.
andrew.46
February 23rd, 2011, 06:57 AM
*the branch version hosted on repo.or.cz. Now officially 'MPlayer2' (http://www.mplayer2.org/mplayer1_comparison.html) (I bet that's gonna be somewhat confusing for some Windows XP users: WMP6.4's filename is mplayer2.exe). It's the result of Uoti Urpala's split with the main mplayer devs due to politics over coding practices, apparently.
There is an added cleanup in this fork that is well overdue in the MPlayer code:
MEncoder is no longer available
The MEncoder codebase was thoroughly rotten and has been deleted. A different solution to provide some encoding functionality will be added in a future version.
Internal GUI has been removed
The bad internal GUI (gmplayer) has been deleted. Future work will concentrate on improving the interface for external GUI implementations instead.
But I am sure we all wish that the developers could heal their differences and work together :(.
Andrew
qyot27
February 23rd, 2011, 07:53 PM
There is an added cleanup in this fork that is well overdue in the MPlayer code:
But I am sure we all wish that the developers could heal their differences and work together :(.
Andrew
True. My main draw is that compilation is much more streamlined. On Linux I can just leave everything at the defaults if I wanted, although on Windows there's some things that need to be adjusted (on Windows it's also pretty much mandatory to use Cygwin unless you do some code adjustments).
I do have particular uses for mencoder that make it more attractive than ffmpeg (the way the template system works*, and some of the syntactical differences), which is why I end up feeling the rub sometimes. The point about a future encoding platform for the fork is good, though. At least it would overcome mencoder's deficiencies.
*or rather, the fact that mencoder can be set to user defaults very easily - I have my mencoder installs set to always output ffvhuff if I declare input and output only. ffmpeg can't do that, and some of the encoding parameter syntax is confusing.
jwcalla
February 23rd, 2011, 08:19 PM
Of course, the three things I'd most like to see incorporated into FFmpeg are completely not addressed at all. Two of them are outdated patches/branch versions (the MLP encoder and MKV Ordered Chapters support), and the last I have no clue if there has been any effort to resolve (hardcoding of subtitles, without demuxing, and with embedded font support for libass).
I've been frustrated about the various branches out there. I built a multi-threaded mplayer / ffmpeg a few months ago but I still like the convenience of having synaptic tell me when there are updates available. The whole thing seems disorganized and ununified, even though we're talking about an application domain that must be cutting-edge and forward-thinking to be widely accepted.
Thanks for the heads-up on mplayer2 though... that appears to fit the bill.
qyot27
February 24th, 2011, 02:13 AM
Branches and forks are simply a fact of life when it comes to open source development.
Or rather, I should say that variant functionality contained in branches is often not meant to supplant the main project (and thus, I wouldn't treat them with disdain), but to sandbox experimental features until it's matured enough for inclusion in the main branch. The MKV Ordered Chapters and Lagarith branches are/were two such instances - Lagarith finally got committed a little over a month ago. Neither one had been updated since 2009, although it was trivial to fix the Lagarith branch to work with fresh checkouts from git...but ordered chapters have been a no-go since January 2010. Too much stuff conflicts with the main source to make it a simple fix that even non-programmers could do.
It's actually very routine for Summer of Code projects to be worked on in side branches and only committed after the work has completed. It keeps the main branch cleaner that way.
The pain comes when there are disputes over the suitability of code or the maturity of it. The average user may be totally fine with the state of development of X feature, and not really have problems with it, but if it doesn't meet the criteria for inclusion the main devs have set, one's hands are pretty unceremoniously tied.
I wouldn't really expect the package team to include the branched versions, to be honest (at this point, I'm not sure if it's really accurate to portray MPlayer2 as a 'branch' anymore - there's enough distancing it from the original to do so, IMO; sort of like the relationship between the old Beep Media Player and Audacious). Even having fairly recent builds available is a pipe dream in some cases because of noted resistance to doing development compiles and going strictly with 'official' releases (in ffmpeg's case, such as 0.5 or 0.6, not a weekly git build or something). It's happened with Firefox before too, somewhat infamously - no major version upgrades after distro version release. Which, namely, is why Ubuntuzilla exists.
francish
February 26th, 2011, 11:59 PM
:D
FFmpeg is a versatile tool to encode and decode a multitude of video and audio formats. x264 encodes high-quality H.264 video....
snip rest of original post
Thank you so much for this timely posting! It works wonderfully for me ( a new member in Ubuntu 10.10)!!!
doxed
February 28th, 2011, 04:58 AM
Thanks for these guides. I used the one for Lucid(http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289) and it worked nicely.
It looks like there is a typo in step 8, it shows '--pkgname=ffmpeg' instead of '--pkgname=qt-faststart'. I ran steps 7 and 8 a few times wondering why installing qt-faststart would remove ffmpeg and vice versa:confused:, before noticing the pkgname.
I just wanted to point this out in case anyone else was having this issue.
Thanks again.
FakeOutdoorsman
February 28th, 2011, 09:08 AM
Thanks. You're right. It should be "qt-faststart" and not "ffmpeg". I'll update that.
qyot27
March 4th, 2011, 09:09 AM
As a note, I've not been able to access the L-SMASH patch for some time now, as it seems the whole domain has gone down. So really the only option is the git branch.
For those who don't much care for the '0.114.0+revlist githash' notation that doesn't let you see the core x264 revision number, there is a bit of a roundabout solution:
git clone git://git.videolan.org/x264.git
cd x264
cp version.sh version.sh.bak
git pull git://github.com/silverfilain/x264_L-SMASH.git lsmash
cp version.sh.bak version.sh
[compile as usual]
The result? '0.114.1913+439M 6deb612'. Not exactly like the output from the patch, but at least it does show what the core x264 revision is. The git hash displayed is the one from the branch, and is the same as if you had the 0+revlist version number.
andrew.46
March 5th, 2011, 10:26 AM
As a note, I've not been able to access the L-SMASH patch for some time now, as it seems the whole domain has gone down. So really the only option is the git branch.
Could be a temporary network glitch, it is there for me:
http://vfrmaniac.fushizen.eu/OtherStuff/L-SMASH/
and appears to have been updated just yesterday.
qyot27
March 6th, 2011, 12:14 AM
Could be a temporary network glitch, it is there for me:
http://vfrmaniac.fushizen.eu/OtherStuff/L-SMASH/
and appears to have been updated just yesterday.
Ok, it's back for me now too. That's good. But I wasn't able to access anything on fushizen.eu for 2 or 3 weeks.
Well, at least it allowed me to figure out how to get the branch to show x264's revision - that had been bugging me.
sidorivan
March 7th, 2011, 02:05 AM
Help me on centos:
remove ffmpeg x264 libx264-dev
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-shared
make
make install
gcc -o x264 x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o filters/video/depth.o input/thread.o input/lavf.o libx264.a -L. -lavformat -lavcodec -lavcore -lswscale -lavutil -lm -lz -lpthread -lswscale -lavutil -lm -lpthread -s
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libavcodec.a(libfaac.o): In function `Faac_encode_close':
/opt/libavfilter/ffmpeg/libavcodec/libfaac.c:144: undefined reference to `faacEncClose'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libavcodec.a(libfaac.o): In function `Faac_encode_init':
/opt/libavfilter/ffmpeg/libavcodec/libfaac.c:46: undefined reference to `faacEncOpen'
/opt/libavfilter/ffmpeg/libavcodec/libfaac.c:51: undefined reference to `faacEncGetCurrentConfiguration'
/opt/libavfilter/ffmpeg/libavcodec/libfaac.c:75: undefined reference to `faacEncClose'
/opt/libavfilter/ffmpeg/libavcodec/libfaac.c:114: undefined reference to `faacEncSetConfiguration'
/opt/libavfilter/ffmpeg/libavcodec/libfaac.c:102: undefined reference to `faacEncGetDecoderSpecificInfo'
/opt/libavfilter/ffmpeg/libavcodec/libfaac.c:54: undefined reference to `faacEncClose'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libavcodec.a(libfaac.o): In function `Faac_encode_frame':
/opt/libavfilter/ffmpeg/libavcodec/libfaac.c:128: undefined reference to `faacEncEncode'
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libavcodec.a(libx264.o): In function `X264_init':
/opt/libavfilter/ffmpeg/libavcodec/libx264.c:305: undefined reference to `x264_encoder_open_110'
collect2: ld returned 1 exit status
make: *** [x264] Error 1
FakeOutdoorsman
March 7th, 2011, 08:37 PM
Help me on centos:
remove ffmpeg x264 libx264-dev
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-shared
Why did you add --enable-shared?
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libavcodec.a(libx264.o): In function `X264_init':
/opt/libavfilter/ffmpeg/libavcodec/libx264.c:305: undefined reference to `x264_encoder_open_110'
collect2: ld returned 1 exit status
make: *** [x264] Error 1
Remove your old FFmpeg before attempting to compile x264 or add --disable-lavf to your x264 ./configure.
sideshowmel
March 8th, 2011, 09:31 PM
I'm trying to use a software package that depends on ffmpeg 0.5.1 or earlier.
I'm unable to compile ffmpeg 0.5.1 with the latest x264, is there a version that is known to work with ffmpeg 0.5.1?
FakeOutdoorsman
March 8th, 2011, 09:47 PM
What depends on <= FFmpeg 0.5.1? I'm not sure about 0.5.1, but 0.5.3 has a minimum requirement of libx264 0.65. I don't know the latest version it could handle.
$ grep "libx264 version" ffmpeg-0.5.3/configure
die "ERROR: libx264 version must be >= 0.65."; }
Now you can use Git to use an older x264 commit:
cd ~/x264
make distclean
git checkout 79bfb039de253c986986fbd99935c0d4a95ad503
Then continue with ./configure.
Dobyabywal
March 10th, 2011, 08:43 PM
I tried methods A, B, and C. On method C, after completing it I entered this line I got the message that follows.
sudo apt-get install ffmpeg libavcodec-extra-52
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libavcodec-extra-52: Depends: libfaac0 (>= 1.26) but it is not installable
E: Broken packages
Encoding using VLC gives me great audio but no video. Prior to entering the A, B, and C codes I got video, but no audio.
I'm using 10.04 on a Asus netbook.
FakeOutdoorsman, I know you wrote the A, B, and C solutions to the forum in 2006 and things may have changed. I also see that you are still on the forum.
Please help, I'm very new at this.
FakeOutdoorsman
March 11th, 2011, 01:13 AM
You must be referring to:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
I'm guessing that you have a PPA or third-party repository interfering with your package management system. I'm not very useful when it comes to this sort of thing but I can make a few guesses. Show the output of:
apt-cache policy
Perhaps you could also root around in Synaptic and use the "Origin" button to see if there is anything weird going on.
Kepesk
March 11th, 2011, 09:02 PM
Just thought I'd people know my experience and possibly save some time by putting out the solution to the problem I had.
When compiling ffmpeg, I got the error:
undefined reference to `x264_encoder_open_114'
I solved it by starting over and configuring the x264 with this line:
./configure --enable-shared --prefix=/usr
Cheers!
FakeOutdoorsman
March 11th, 2011, 09:42 PM
Just thought I'd people know my experience and possibly save some time by putting out the solution to the problem I had.
When compiling ffmpeg, I got the error:
undefined reference to `x264_encoder_open_114'
This is caused by old, interfering x264 files (libx264-dev and old compiled x264 for example) causing you to have mismatched x264 versions. This can be solved by removing or uninstalling the old x264 files/packages.
You can get a similar message when compiling x264 too, but that's a different issue. A few posts back is an example.
I solved it by starting over and configuring the x264 with this line:
./configure --enable-shared --prefix=/usr
Cheers!
I don't recommend using --enable-shared unless you know you need it or know what it does. The use of --prefix=/usr is discouraged in Ubuntu. Compiled packages should go into /usr/local (which is implied when using this guide) so they don't interfere with packages from the repository.
mysoogal
March 12th, 2011, 08:23 PM
would like to let everybody know i built a web based video encoder, to be used with IPad, based on latest ffmpeg
check into it,
http://code.google.com/p/ipado-web-media-encoder/
andrew.46
March 14th, 2011, 09:05 AM
Hmmmm.... I am no longer following the FFmpeg wars but the FFmpeg download page:
http://www.ffmpeg.org/download.html
seems to indicate that the videolan git repository is now the 'official' one, or perhaps this will change??
FakeOutdoorsman
March 14th, 2011, 10:46 AM
More silliness from the developer rift. The group of developers that was until recently using git.ffmpeg.org (which was previously the official Git mirror to the SVN repository) has created a fork called libav (http://libav.org/). Those who want to use that should use git.libav.org.
Those who want to use FFmpeg will probably want to use git.videolan.org. I'll update the guide tomorrow after switching repos and running a test compile.
andrew.46
March 14th, 2011, 10:55 AM
More silliness from the developer rift.
OIC, will this business never end.... :(
qyot27
March 14th, 2011, 06:09 PM
This is just getting absurd (it was already rather childish). I'm not even sure if what happened was an active breaking off of the libav group, or if the ffmpeg.org domain got usurped by the videolan group. The mailing list postings don't seem to clarify that any, either. And now there's this business over trademark and logo flying into it.
It does, however, *kind* of look as if the videolan repository will accept changes from libav, so I'm not sure what's going on.
I'm as sick of these politics as I am of what the culture around some of the mplayer, x264, and parts of AviSynth development, and fansubbing scene succumbing to jargonism/elitism/4chan leakage, has become (especially as the last is tainting one of my other hobbies through still other abuses). The worst part is that all of these things seem to be interconnected because of groups of developers or followers they all share. To say I'm pissed from simply having to encounter it is a gross understatement. I've been watching it all slide down the tubes for two and a half to three years or so.
verb3k
March 14th, 2011, 07:34 PM
Well, Michael said he was willing to step down and people voted him to stay (no one had the courage to step up). Few days later, a group of self-appointed maintainers take over the project without the slightest discussion with the developer community. Now, they are cracking the project apart. Well done, guys.
There was no C option, you could have voted for the stepping down of Michael from the beginning.
FakeOutdoorsman
March 14th, 2011, 09:02 PM
OIC, will this business never end.... :(
Apparently not. Now there is an announcement from one of the libav guys stating that the ffmpeg mailing-lists will be shutdown in 24 hours with a message welcoming people to the libav mailing-lists. Maybe it's just a troll.
I don't pay close attention to the fflames, but now I'm even less impressed with the behavior. Things are too volatile and confusing right now for me to keep this guide updated with the constant flux.
FakeOutdoorsman
March 15th, 2011, 08:37 PM
I updated all active guides to use the git.videolan.org FFmpeg Git repository due to the recent squabbling at the FFmpeg project. If you update FFmpeg once in a while you can switch to this Git repository:
cd ~/ffmpeg && git remote set-url origin git://git.videolan.org/ffmpeg
You only need to do this once.
Update: Hardy's Git seems to be too old to use the above command, so maybe this would work instead:
sed -i 's/git.ffmpeg.org/git.videolan.org/g' ~/ffmpeg/.git/config
Of course you could just remove ~/ffmpeg and then run:
git clone git://git.videolan.org/ffmpeg
ron999
March 15th, 2011, 09:51 PM
FFmpeg has built OK from the videolan git with Karmic Koala.
FFmpeg version git-N-28456-g1c31b26, Copyright (c) 2000-2011 the FFmpeg developers
built on Mar 15 2011 20:38:57 with gcc 4.4.1
:D
FakeOutdoorsman
March 15th, 2011, 11:04 PM
Thanks for the update. I only did a quick test on Maverick.
mysoogal
March 17th, 2011, 10:39 PM
guys here is the presets from winFF
you would use it like normal
ffmpeg version
FFmpeg version SVN-r18709, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-ming
w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --e
nable-avisynth --enable-gpl --enable-zlib --enable-bzlib --enable-libgsm --enabl
e-libfaac --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheo
ra --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid -
-enable-libschroedinger --enable-libx264
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.27. 0 / 52.27. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Apr 28 2009 04:04:42, gcc: 4.2.4
Unable to find a suitable output format for 'pipe:'
ffmpeg -i input.avi -f mp4 -vcodec mpeg4 -b 400k -r 24 -s 320x240 -aspect 4:3 -acodec libfaac -ar 22050 -ac 2 -ab 48k output.mp4
:KS
<?xml version="1.0"?>
<presets>
<BlackberryCurvefs>
<label>Blackberry Curve Fullscreen</label>
<params>-f mp4 -vcodec mpeg4 -b 400k -r 24 -s 320x240 -aspect 4:3 -acodec libfaac -ar 22050 -ac 2 -ab 48k</params>
<extension>mp4</extension>
<category>Blackberry</category>
</BlackberryCurvefs>
<BlackberryCurvews>
<label>Blackberry Curve Widescreen</label>
<params>-f mp4 -vcodec mpeg4 -b 400k -r 24 -s 320x180 -aspect 16:9 -acodec libfaac -ar 22050 -ac 2 -ab 48k</params>
<extension>mp4</extension>
<category>Blackberry</category>
</BlackberryCurvews>
<CDWavStereo>
<label>Wav for CD</label>
<params>-vn -ar 44100</params>
<extension>wav</extension>
<category>Audio</category>
</CDWavStereo>
<GigabeatFS>
<label>RB Toshiba Gigabeat F/X Fullscreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x240 -b 600k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</GigabeatFS>
<GigabeatWS>
<label>RB Toshiba Gigabeat F/X Widescreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x176 -b 600k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</GigabeatWS>
<H1020FS>
<label>RB iRiver H10 20GB Fullscreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x128 -b 224k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</H1020FS>
<H1020WS>
<label>RB iRiver H10 20GB Widescreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x96 -b 224k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</H1020WS>
<H105FS>
<label>RB iRiver H10 5/6GB Fullscreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 128x96 -b 224k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</H105FS>
<H105WS>
<label>RB iRiver H10 5/6GB Widescreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 128x80 -b 224k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</H105WS>
<H300FS>
<label>RB iRiver H300 Fullscreen</label>
<params>-acodec libmp3lame -ab 96k -ar 44100 -vcodec mpeg2video -s 224x176 -b 224k -r 10 -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</H300FS>
<H300WS>
<label>RB iRiver H300 Widescreen</label>
<params>-acodec libmp3lame -ab 96k -ar 44100 -vcodec mpeg2video -s 224x128 -b 256k -r 15 -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</H300WS>
<I5GFS>
<label>RB Apple iPod Video Fullscreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x240 -b 400k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</I5GFS>
<I5GWS>
<label>RB Apple iPod Video Widescreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 320x176 -b 400k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</I5GWS>
<M4a>
<label>MPEG4 Audio</label>
<params>-vn -acodec libfaac -ab 112k -ac 2 -ar 48000</params>
<extension>m4a</extension>
<category>Audio</category>
</M4a>
<NeurosOSDTVHQNTSC>
<label>Neuros HQ NTSC Fullscreen</label>
<params>-f mp4 -r 29.97 -vcodec libxvid -s 640x480 -aspect 4:3 -maxrate 2500kb -b 2000k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
<extension>mp4</extension>
<category>Neuros OSD</category>
</NeurosOSDTVHQNTSC>
<NeurosOSDTVHQPAL>
<label>Neuros HQ PAL Fullscreen</label>
<params>-f mp4 -r 25 -vcodec libxvid -s 640x480 -aspect 4:3 -maxrate 2500kb -b 2000k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
<extension>mp4</extension>
<category>Neuros OSD</category>
</NeurosOSDTVHQPAL>
<NeurosOSDTVSFNTSC>
<label>Neuros Small File NTSC Fullscreen</label>
<params>-f mp4 -b 800k -r 29.97 -s 320x240 -aspect 4:3 -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
<extension>mp4</extension>
<category>Neuros OSD</category>
</NeurosOSDTVSFNTSC>
<NeurosOSDTVSFPAL>
<label>Neuros Small File PAL Fullscreen</label>
<params>-f mp4 -b 800k -r 25 -s 320x240 -aspect 4:3 -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
<extension>mp4</extension>
<category>Neuros OSD</category>
</NeurosOSDTVSFPAL>
<NeurosOSDTVWSHQNTSC>
<label>Neuros HQ NTSC Widescreen</label>
<params>-f mp4 -r 29.97 -vcodec libxvid -s 704x384 -aspect 16:9 -maxrate 3000kb -b 2500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
<extension>mp4</extension>
<category>Neuros OSD</category>
</NeurosOSDTVWSHQNTSC>
<NeurosOSDTVWSHQPAL>
<label>Neuros HQ PAL Widescreen</label>
<params>-f mp4 -r 25 -vcodec libxvid -s 704x384 -aspect 16:9 -maxrate 3000kb -b 2500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 48000 -ab 128k -ac 2</params>
<extension>mp4</extension>
<category>Neuros OSD</category>
</NeurosOSDTVWSHQPAL>
<NeurosOSDTVWSSFNTSC>
<label>Neuros Small File NTSC Widescreen</label>
<params>-f mp4 -b 800k -r 29.97 -s 352x240 -aspect 16:9 -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
<extension>mp4</extension>
<category>Neuros OSD</category>
</NeurosOSDTVWSSFNTSC>
<NeurosOSDTVWSSFPAL>
<label>Neuros Small File PAL Widescreen</label>
<params>-f mp4 -b 800k -r 25 -s 352x240 -aspect 16:9 -vcodec libxvid -ar 48000 -ab 80k -ac 2 -acodec libfaac</params>
<extension>mp4</extension>
<category>Neuros OSD</category>
</NeurosOSDTVWSSFPAL>
<PalmXviDFS>
<label>Palm Fullscreen</label>
<params>-f mp4 -r 29.97 -vcodec libxvid -s 428x320 -aspect 4:3 -maxrate 550kb -b 500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
<extension>mp4</extension>
<category>Palm</category>
</PalmXviDFS>
<PalmXviDWS>
<label>Palm Widescreen</label>
<params>-f mp4 -r 29.97 -vcodec libxvid -s 480x320 -aspect 3:2 -maxrate 450kb -b 430k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
<extension>mp4</extension>
<category>Palm</category>
</PalmXviDWS>
<PhotoFS>
<label>RB Apple iPod Photo/Color Fullscreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x176 -b 320k -r 15 -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</PhotoFS>
<PhotoWS>
<label>RB Apple iPod Photo/Color Widescreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x128 -b 320k -r 24 -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</PhotoWS>
<X5FS>
<label>RB Cowon iAudio X5 Fullscreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x128 -b 176k -r 15 -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</X5FS>
<X5WS>
<label>RB Cowon iAudio X5 Widescreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 160x96 -b 224k -r 24 -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</X5WS>
<XviDAVIFS>
<label>XviD FullScreen</label>
<params>-f avi -r 29.97 -vcodec libxvid -vtag XVID -s 640x480 -aspect 4:3 -maxrate 1800kb -b 1500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
<extension>avi</extension>
<category>AVI</category>
</XviDAVIFS>
<XviDAVIWS>
<label>XviD Widescreen</label>
<params>-f avi -r 29.97 -vcodec libxvid -vtag XVID -s 704x384 -aspect 16:9 -maxrate 1800k -b 1500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
<extension>avi</extension>
<category>AVI</category>
</XviDAVIWS>
<XviDAVIWSAna>
<label>XviD Widescreen Anamorphic</label>
<params>-f avi -r 29.97 -croptop 58 -cropbottom 62 -vcodec libxvid -vtag XVID -s 640x272 -aspect 2.35 -maxrate 1800kb -b 1500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
<extension>avi</extension>
<category>AVI</category>
</XviDAVIWSAna>
<XviDAVIZENFS>
<label>Zen Fullscreen</label>
<params>-f avi -r 29.97 -vcodec libxvid -vtag XVID -s 320x240 -aspect 4:3 -maxrate 1800kb -b 1500k -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
<extension>avi</extension>
<category>Creative Zen</category>
</XviDAVIZENFS>
<XviDAVIZENWS>
<label>Zen Widescreen</label>
<params>-f avi -r 29.97 -vcodec libxvid -vtag XVID -s 320x240 -aspect 16:9 -maxrate 1800kb -b 1500k -acodec libmp3lame -ar 48000 -ab 128k -ac 2</params>
<extension>avi</extension>
<category>Creative Zen</category>
</XviDAVIZENWS>
<ac3dvd192>
<label>Ac3 DVD - 192kbps Stereo</label>
<params>-f ac3 -acodec ac3 -ab 192k -ar 48000 -ac 2</params>
<extension>ac3</extension>
<category>Audio</category>
</ac3dvd192>
<ac3dvd384>
<label>Ac3 DVD - 384kbps Stereo</label>
<params>-f ac3 -acodec ac3 -ab 384k -ar 48000 -ac 2</params>
<extension>ac3</extension>
<category>Audio</category>
</ac3dvd384>
<blackberryfs>
<label>Blackberry Video Fullscreen</label>
<params>-f mp4 -r 24 -vcodec libx264 -s 240x180 -aspect 4:3 -maxrate 800kb -bufsize 80k -b 400k -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
<extension>mp4</extension>
<category>Blackberry</category>
</blackberryfs>
<blackberrymp3>
<label>Blackberry Music</label>
<params>-acodec libmp3lame -ab 160k -ac 2 -ar 44100</params>
<extension>mp3</extension>
<category>Blackberry</category>
</blackberrymp3>
<blackberryws>
<label>Blackberry Video Widescreen</label>
<params>-f mp4 -r 24 -vcodec libx264 -s 320x180 -aspect 16:9 -maxrate 800kb -bufsize 80k -b 400k -acodec libfaac -ar 44100 -ab 80k -ac 2</params>
<extension>mp4</extension>
<category>Blackberry</category>
</blackberryws>
<cdma3g>
<label>CDMA Phone Audio (3g2)</label>
<params>-f 3g2 -ar 22050 -ab 128k -acodec libfaac -s qcif -r 14.985 -vn</params>
<extension>3g2</extension>
<category>Mobile Phones</category>
</cdma3g>
<divx>
<label>MS Compatible AVI</label>
<params>-acodec libmp3lame -vcodec msmpeg4 -ab 192k -b 1000k -s 640x480 -ar 44100</params>
<extension>avi</extension>
<category>AVI</category>
</divx>
<dvntsc>
<label>Raw DV for NTSC Fullscreen</label>
<params>-target ntsc-dv -aspect 4:3 -f dv</params>
<extension>dv</extension>
<category>DV</category>
</dvntsc>
<dvpal>
<label>Raw DV for PAL Fullscreen</label>
<params>-target pal-dv -aspect 4:3 -f dv</params>
<extension>dv</extension>
<category>DV</category>
</dvpal>
<e200FS>
<label>RB Sandisk Sansa e200 Fullscreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x176 -b 320k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</e200FS>
<e200WS>
<label>RB Sandisk Sansa e200 Widescreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 224x128 -b 320k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</e200WS>
<flvwebFS>
<label>Flash Video (flv) for Web use Fullscreen</label>
<params>-vcodec flv -f flv -r 29.97 -s 320x240 -aspect 4:3 -b 300k -g 160 -cmp dct -subcmp dct -mbd 2 -flags +aic+cbp+mv0+mv4 -trellis 1 -ac 1 -ar 22050 -ab 56k</params>
<extension>flv</extension>
<category>Websites</category>
</flvwebFS>
<flvwebWS>
<label>Flash: Video (flv) for Web use Widescreen</label>
<params>-vcodec flv -f flv -r 29.97 -s 320x180 -aspect 16:9 -b 300k -g 160 -cmp dct -subcmp dct -mbd 2 -flags +aic+cbp+mv0+mv4 -trellis 1 -ac 1 -ar 22050 -ab 56k</params>
<extension>flv</extension>
<category>Websites</category>
</flvwebWS>
<iPodiTunesSmallCRF21FS>
<label>iPod Small Fullscreen</label>
<params>-r 29.97 -vcodec libx264 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 320x240 -aspect 4:3 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>m4v</extension>
<category>iPod-iTunes</category>
</iPodiTunesSmallCRF21FS>
<iPodiTunesSmallCRF21WS>
<label>iPod Small WideScreen</label>
<params>-r 29.97 -vcodec libx264 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 320x176 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>m4v</extension>
<category>iPod-iTunes</category>
</iPodiTunesSmallCRF21WS>
<iPodiTunesSmallCRF21WSAna>
<label>iPod Small WideScreen Anamorphic</label>
<params>-r 29.97 -croptop 60 -cropbottom 60 -vcodec libx264 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 320x144 -aspect 2.35 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>m4v</extension>
<category>iPod-iTunes</category>
</iPodiTunesSmallCRF21WSAna>
<iPodiTunesSmallCRF21WSLBFix>
<label>iPod Small Converted to WideScreen</label>
<params>-r 29.97 -croptop 64 -cropbottom 64 -vcodec libx264 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 320x176 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>m4v</extension>
<category>iPod-iTunes</category>
</iPodiTunesSmallCRF21WSLBFix>
<iPodiTunesTVOutCRF21FS>
<label>iPod TV Out Fullscreen</label>
<params>-r 29.97 -vcodec libx264 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 512x384 -aspect 4:3 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>m4v</extension>
<category>iPod-iTunes</category>
</iPodiTunesTVOutCRF21FS>
<iPodiTunesTVOutCRF21WS>
<label>iPod TV Out Widescreen</label>
<params>-r 29.97 -vcodec libx264 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 624x352 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>m4v</extension>
<category>iPod-iTunes</category>
</iPodiTunesTVOutCRF21WS>
<iPodiTunesTVOutCRF21WSAna>
<label>iPod TV Out Widescreen Anamorphic</label>
<params>-r 29.97 -croptop 60 -cropbottom 60 -vcodec libx264 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 640x272 -aspect 2.35 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>m4v</extension>
<category>iPod-iTunes</category>
</iPodiTunesTVOutCRF21WSAna>
<iPodiTunesTVOutCRF21WSLBFix>
<label>iPod TV Out Converted to Widescreen</label>
<params>-r 29.97 -croptop 64 -cropbottom 64 -vcodec libx264 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 640x352 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>m4v</extension>
<category>iPod-iTunes</category>
</iPodiTunesTVOutCRF21WSLBFix>
<iPodiTunesIphoneWS>
<label>iPhone WideScreen</label>
<params>-r 29.97 -vcodec libx264 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -crf 21 -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -level 30 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -s 480x320 -aspect 16:9 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>m4v</extension>
<category>iPod-iTunes</category>
</iPodiTunesIphoneWS>
<lgchocolate>
<label>LG Chocolate</label>
<params>-f mp4 -s 240x192 -r 11.988 -b 192k -ab 56k -vcodec libxvid -acodec libfaac -ar 22050</params>
<extension>mp4</extension>
<category>LG</category>
</lgchocolate>
<lgdare>
<label>LG Dare</label>
<params>-f mp4 -s 320x240 -r 11.988 -b 160k -ab 56k -vcodec libxvid -acodec libfaac</params>
<extension>mp4</extension>
<category>LG</category>
</lgdare>
<mp3>
<label>MP3</label>
<params>-acodec libmp3lame -ab 160k -ac 2 -ar 44100</params>
<extension>mp3</extension>
<category>Audio</category>
</mp3>
<mp3m>
<label>MP3 (Mono)</label>
<params>-acodec libmp3lame -ab 32k -ac 1 -ar 22050</params>
<extension>mp3</extension>
<category>Mobile Phones</category>
</mp3m>
<nanoFS>
<label>RB Apple iPod Nano Fullscreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 176x128 -b 256k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</nanoFS>
<nanoWS>
<label>RB Apple iPod Nano Widescreen</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg2video -s 176x128 -b 256k -strict -1</params>
<extension>mpg</extension>
<category>Rockbox</category>
</nanoWS>
<ntscdvdgoodqFS>
<label>NTSC DVD Fullscreen</label>
<params>-f dvd -vcodec mpeg2video -r 29.97 -s 352x480 -aspect 4:3 -b 4000k -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
<extension>mpg</extension>
<category>DVD</category>
</ntscdvdgoodqFS>
<ntscdvdgoodqWS>
<label>NTSC DVD Widescreen</label>
<params>-f dvd -vcodec mpeg2video -r 29.97 -s 352x480 -aspect 16:9 -b 4000k -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
<extension>mpg</extension>
<category>DVD</category>
</ntscdvdgoodqWS>
<ntscdvdhqFS>
<label>NTSC DVD HQ Fullscreen</label>
<params>-f dvd -target ntsc-dvd -r 29.97 -s 720x480 -aspect 4:3 -b 8000k -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
<extension>mpg</extension>
<category>DVD</category>
</ntscdvdhqFS>
<ntscdvdhqWS>
<label>NTSC DVD HQ Widescreen</label>
<params>-f dvd -target ntsc-dvd -r 29.97 -s 720x480 -aspect 16:9 -b 8000k -g 12 -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
<extension>mpg</extension>
<category>DVD</category>
</ntscdvdhqWS>
<ntscdvdlq>
<label>NTSC DVD Fast (LQ)</label>
<params>-f dvd -target ntsc-dvd -b 5000k -r 29.97 -s 720x480 -ar 48000 -ab 384k</params>
<extension>mpg</extension>
<category>DVD</category>
</ntscdvdlq>
<ntscvcdhq>
<label>NTSC VCD (HQ)</label>
<params>-f vcd -target ntsc-vcd -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
<extension>mpg</extension>
<category>VCD</category>
</ntscvcdhq>
<ogg1>
<label>OGG</label>
<params>-acodec vorbis -aq 60 -vn -ac 2</params>
<extension>OGG</extension>
<category>Audio</category>
</ogg1>
<paldvdgoodqFS>
<label>PAL DVD Fullscreen</label>
<params>-f dvd -vcodec mpeg2video -r 25.00 -s 352x576 -aspect 4:3 -b 4000k -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
<extension>mpg</extension>
<category>DVD</category>
</paldvdgoodqFS>
<paldvdgoodqWS>
<label>PAL DVD Widescreen</label>
<params>-f dvd -vcodec mpeg2video -r 25.00 -s 352x576 -aspect 16:9 -b 4000k -mbd rd -trellis -mv0 -cmp 2 -subcmp 2 -acodec mp2 -ab 192k -ar 48000 -ac 2</params>
<extension>mpg</extension>
<category>DVD</category>
</paldvdgoodqWS>
<paldvdhqFS>
<label>PAL DVD HQ Fullscreen</label>
<params>-f dvd -target pal-dvd -aspect 4:3 -b 8000k -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
<extension>mpg</extension>
<category>DVD</category>
</paldvdhqFS>
<paldvdhqWS>
<label>PAL DVD HQ Widescreen</label>
<params>-f dvd -target pal-dvd -aspect 16:9 -b 8000k -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
<extension>mpg</extension>
<category>DVD</category>
</paldvdhqWS>
<paldvdlq>
<label>PAL DVD Fast (LQ)</label>
<params>-f dvd -target pal-dvd -b 5000k -r 25 -s 720x576 -ar 48000 -ab 384k</params>
<extension>mpg</extension>
<category>DVD</category>
</paldvdlq>
<palvcdhq>
<label>PAL VCD (HQ)</label>
<params>-f vcd -target pal-vcd -mbd rd -trellis -mv0 -cmp 0 -subcmp 2</params>
<extension>mpg</extension>
<category>VCD</category>
</palvcdhq>
<ps3720p>
<label>PS3 720p Widescreen</label>
<params>-f mp4 -r 23.976 -vcodec libx264 -s 1280x720 -b 3000k -aspect 16:9 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -maxrate 3500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 384k -ar 48000 -ac 2</params>
<extension>mp4</extension>
<category>PS3</category>
</ps3720p>
<ps3720pfs>
<label>PS3 720p Fullscreen</label>
<params>-f mp4 -r 23.976 -vcodec libx264 -s 1280x720 -b 3000k -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -maxrate 3500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 384k -ar 48000 -ac 2</params>
<extension>mp4</extension>
<category>PS3</category>
</ps3720pfs>
<qmov>
<label>Quicktime MOV</label>
<params>-f mov -acodec libfaac -b 1250k -r 25 -ab 128k -s 640x480 -ac 2 -ar 48000</params>
<extension>mov</extension>
<category>QuickTime</category>
</qmov>
<wma>
<label>WMA</label>
<params>-vn -acodec wmav2 -ab 160k</params>
<extension>wma</extension>
<category>Audio</category>
</wma>
<wmv>
<label>WMV2 Generic</label>
<params>-vcodec wmv2 -acodec wmav2 -b 1000k -ab 160k -r 25</params>
<extension>wmv</extension>
<category>WMV</category>
</wmv>
<wmv2broadband>
<label>WMV for Web Use</label>
<params>-vcodec wmv2 -acodec wmav2 -b 640k -ab 128k -r 29.97 -s 320x240</params>
<extension>wmv</extension>
<category>WMV</category>
</wmv2broadband>
<wmv2xbox360>
<label>Xbox 360</label>
<params>-vcodec wmv2 -acodec wmav2 -b 1200k -ab 160k -r 25 -s 720x480</params>
<extension>wmv</extension>
<category>WMV</category>
</wmv2xbox360>
<wmv2zune>
<label>Zune</label>
<params>-vcodec wmv2 -acodec wmav2 -b 640k -ab 128k -r 23.97 -s 320x240</params>
<extension>wmv</extension>
<category>WMV</category>
</wmv2zune>
<wmv4powerpoint>
<label>Power Point</label>
<params>-vcodec wmv2 -acodec wmav2 -aspect 4:3 -b 500k -ab 32k -ac 1 -ar 22050 -s 320x240</params>
<extension>wmv</extension>
<category>WMV</category>
</wmv4powerpoint>
<x264HQFS>
<label>MP4 Fullscreen</label>
<params>-f mp4 -r 29.97 -vcodec libx264 -s 640x480 -b 1000k -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 1250k -maxrate 1500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>mp4</extension>
<category>MPEG-4</category>
</x264HQFS>
<x264HQPSP169robertswain>
<label>PSP Widescreen</label>
<params>-f mp4 -r 29.97 -vcodec libx264 -s 480x272 -aspect 16:9 -b 1250k -maxrate 4M -bufsize 4M -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method umh -subq 6 -trellis 1 -refs 2 -bf 1 -coder 1 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 1250k -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 21 -acodec libfaac -ab 128k -ar 48000 -ac 2</params>
<extension>mp4</extension>
<category>PSP</category>
</x264HQPSP169robertswain>
<x264HQPSP43>
<label>PSP Fullscreen</label>
<params>-f mp4 -r 29.97 -vcodec libx264 -s 640x480 -aspect 4:3 -b 1250k -maxrate 4M -bufsize 4M -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method umh -subq 6 -trellis 1 -refs 2 -bf 1 -coder 1 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 1250k -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 21 -acodec libfaac -ab 128k -ar 48000 -ac 2</params>
<extension>mp4</extension>
<category>PSP</category>
</x264HQPSP43>
<x264HQWS>
<label>MP4 Widescreen</label>
<params>-f mp4 -r 29.97 -vcodec libx264 -s 704x384 -b 1000k -aspect 16:9 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 1250k -maxrate 1500k -bufsize 4M -bt 256k -refs 1 -bf 3 -coder 1 -me_method umh -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -g 250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 112k -ar 48000 -ac 2</params>
<extension>mp4</extension>
<category>MPEG-4</category>
</x264HQWS>
<android1>
<label>Google Android compatible video</label>
<params>-s 480x320 -vcodec mpeg4 -acodec libfaac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2</params>
<extension>mp4</extension>
<category>Google Android</category>
</android1>
<android2>
<label>Google Android compatible video. Video bitrate: 480 kb/s</label>
<params>-s 480x320 -vcodec mpeg4 -b 480k -acodec libfaac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2</params>
<extension>mp4</extension>
<category>Google Android</category>
</android2>
<android3>
<label>Google Android video. VHQ 16:9 widescreen</label>
<params>-s 480x272 -vcodec libx264 -b 500k -threads 0 -acodec libfaac -ab 96k</params>
<extension>mp4</extension>
<category>Google Android</category>
</android3>
<android4>
<label>Google Android video. VHQ 4:3 fullscreen</label>
<params>-s 432x320 -vcodec libx264 -b 500k -threads 0 -acodec libfaac -ab 96k</params>
<extension>mp4</extension>
<category>Google Android</category>
</android4>
<walkmanXviDFS>
<label>Xvid walkman (4:3)</label>
<params>-r 29.97 -vcodec libxvid -s 320x240 -aspect 4:3 -maxrate 1500k -b 1250k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -cmp 2 -subcmp 2 -g 300 -acodec libfaac -ar 48000 -ab 80k -ac 2</params>
<extension>mp4</extension>
<category>walkman</category>
</walkmanXviDFS>
<N810FS>
<label>Nokia N810 mplayer 4:3</label>
<params>-r 29.97 -vcodec libxvid -vtag XVID -s 400x240 -aspect 4:3 -maxrate 1200k -b 1200k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 44100 -ab 160k -ac 2 -async 1</params>
<extension>avi</extension>
<category>Nokia</category>
</N810FS>
<N810WS>
<label>Nokia N810 mplayer 16:9</label>
<params>-r 29.97 -vcodec libxvid -vtag XVID -s 400x240 -aspect 16:9 -maxrate 1200k -b 1200k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 44100 -ab 160k -ac 2 -async 1</params>
<extension>avi</extension>
<category>Nokia</category>
</N810WS>
<N810WS2>
<label>Nokia N810 mplayer CinemaScope 24:10</label>
<params>-r 29.97 -vcodec libxvid -vtag XVID -s 400x240 -aspect 24:10 -maxrate 1200k -b 1200k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis -aic -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 44100 -ab 160k -ac 2 -async 1</params>
<extension>avi</extension>
<category>Nokia</category>
</N810WS2>
<NokiaN73N81N95WS>
<label>Nokia Nxx Video WideScreen</label>
<params>-f mp4 -r 15 -vcodec mpeg4 -s 320x240 -b 320k -aspect 16:9 -acodec libfaac -ab 96k -ar 44100 -ac 2</params>
<extension>mp4</extension>
<category>Nokia</category>
</NokiaN73N81N95WS>
<NokiaN73N81N95FS>
<label>Nokia Nxx Video FullScreen</label>
<params>-f mp4 -r 15 -vcodec mpeg4 -s 320x240 -b 320k -aspect 4:3 -acodec libfaac -ab 96k -ar 44100 -ac 2</params>
<extension>mp4</extension>
<category>Nokia</category>
</NokiaN73N81N95FS>
<MP3GP128x96mono43>
<label>3GPP H.263 128x96 4:3 AAC mono</label>
<params>-r 15 -b 64k -ac 1 -s 128x96 -ar 16000 -ab 32k -acodec libfaac -vcodec h263</params>
<extension>3gp</extension>
<category>Mobile Phones</category>
</MP3GP128x96mono43>
<MP3GP176x144mono43>
<label>3GPP H.263 176x144 4:3 AAC mono</label>
<params>-r 15 -b 64k -ac 1 -s 176x132 -padtop 6 -padbottom 6 -ar 16000 -ab 32k -acodec libfaac -vcodec h263</params>
<extension>3gp</extension>
<category>Mobile Phones</category>
</MP3GP176x144mono43>
<MP3GP176x144mono169C>
<label>3GPP H.263 176x144 16:9 crop AAC mono</label>
<params>-r 15 -b 64k -ac 1 -s 256x144 -cropleft 40 -cropright 40 -ar 16000 -ab 32k -acodec libfaac -vcodec h263</params>
<extension>3gp</extension>
<category>Mobile Phones</category>
</MP3GP176x144mono169C>
<MP3GP176x144mono169L>
<label>3GPP H.263 176x144 16:9 letterbox AAC mono</label>
<params>-r 15 -b 64k -ac 1 -s 176x100 -padtop 22 -padbottom 22 -ar 16000 -ab 32k -acodec libfaac -vcodec h263</params>
<extension>3gp</extension>
<category>Mobile Phones</category>
</MP3GP176x144mono169L>
<MP3GP320x240stereo43>
<label>3GPP H.264 320x240 4:3 AAC stereo</label>
<params>-r 15 -b 128k -s 320x240 -ar 22050 -ab 64k -acodec libfaac -vcodec libx264 -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0</params>
<extension>3gp</extension>
<category>Mobile Phones</category>
</MP3GP320x240stereo43>
<MP3GP320x240stereo169C>
<label>3GPP H.264 320x240 16:9 crop AAC stereo</label>
<params>-r 15 -b 128k -s 426x240 -cropleft 52 -cropright 54 -ar 22050 -ab 64k -acodec libfaac -vcodec libx264 -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0</params>
<extension>3gp</extension>
<category>Mobile Phones</category>
</MP3GP320x240stereo169C>
<MP3GP320x240stereo169L>
<label>3GPP H.264 320x240 16:9 letterbox AAC stereo</label>
<params>-r 15 -b 128k -s 320x180 -padtop 30 -padbottom 30 -ar 22050 -ab 64k -acodec libfaac -vcodec libx264 -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0</params>
<extension>3gp</extension>
<category>Mobile Phones</category>
</MP3GP320x240stereo169L>
<MPEG4VideoHQ>
<label>MPEG-4 H.264 video (high quality)</label>
<params>-crf 35.0 -vcodec libx264 -acodec libfaac -ar 48000 -ab 128k -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0</params>
<extension>mp4</extension>
<category>MPEG-4</category>
</MPEG4VideoHQ>
<MPEG4VideoVHQ>
<label>MPEG-4 H.264 video (very high quality)</label>
<params>-crf 25.0 -vcodec libx264 -acodec libfaac -ar 48000 -ab 160k -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0</params>
<extension>mp4</extension>
<category>MPEG-4</category>
</MPEG4VideoVHQ>
<MPEG4VideoSHQ>
<label>MPEG-4 H.264 video (super high quality)</label>
<params>-crf 15.0 -vcodec libx264 -acodec libfaac -ar 48000 -ab 192k -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0</params>
<extension>mp4</extension>
<category>MPEG-4</category>
</MPEG4VideoSHQ>
<qmovhq>
<label>QuickTime H.264 video (high quality)</label>
<params>-crf 35.0 -vcodec libx264 -acodec libfaac -ar 48000 -ab 128k -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0</params>
<extension>mov</extension>
<category>QuickTime</category>
</qmovhq>
<qmovvhq>
<label>QuickTime H.264 video (very high quality)</label>
<params>-crf 25.0 -vcodec libx264 -acodec libfaac -ar 48000 -ab 160k -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0</params>
<extension>mov</extension>
<category>QuickTime</category>
</qmovvhq>
<qmovshq>
<label>QuickTime H.264 video (super high quality)</label>
<params>-crf 15.0 -vcodec libx264 -acodec libfaac -ar 48000 -ab 192k -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -threads 0</params>
<extension>mov</extension>
<category>QuickTime</category>
</qmovshq>
<tuna-Vids>
<label>Tuna-vIDS</label>
<params>-f avi -r 10 -s 256x192 -b 192k -bt 64k -vcodec libxvid -deinterlace -acodec libmp3lame -ar 32000 -ab 96k -ac 2</params>
<extension>avi</extension>
<category>Tuna-Vids</category>
</tuna-Vids>
<BRAVIAvga>
<label>Sony Bravia mpeg1 640x480</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg1video -s vga -b 640k -strict -1</params>
<extension>mpg</extension>
<category>Bravia</category>
</BRAVIAvga>
<BRAVIAwide>
<label>Sony Bravia mpeg1 640x360</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg1video -s 640x360 -b 640k -strict -1</params>
<extension>mpg</extension>
<category>Bravia</category>
</BRAVIAwide>
<BRAVIAsmall>
<label>Sony Bravia mpeg1 320x240</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg1video -s 320x240 -b 480k -strict -1</params>
<extension>mpg</extension>
<category>Bravia</category>
</BRAVIAsmall>
<BRAVIAsmWide>
<label>Sony Bravia mpeg1 320x180</label>
<params>-acodec libmp3lame -ab 128k -ar 44100 -vcodec mpeg1video -s 320x180 -b 480k -strict -1</params>
<extension>mpg</extension>
<category>Bravia</category>
</BRAVIAsmWide>
</presets>
bodhi.zazen
March 17th, 2011, 10:55 PM
In the future, please post long output like that as an attachment (in a text file).
mysoogal
March 17th, 2011, 11:04 PM
In the future, please post long output like that as an attachment (in a text file).
what is the tag for long posts ? sorry to ask i only see quote and code i wasn't sure if I'm allowed to use text as my Firefox kept closing browser down
bodhi.zazen
March 17th, 2011, 11:07 PM
When posting a reply, scroll down, see the "manage attachments" dialog ?
Add it as a text attachment (you need to save it as a text file first).
heyup
March 17th, 2011, 11:14 PM
I got problem on the FFmpeg install (Hardy Heron 8.04) at step 8 at the Debian package creation stage. It failed to build the package.
I got this after completing step 8:
dpkg-deb - error: (upstream) version (`UNKNOWN') doesn't contain any digits
dpkg-deb: 1 errors in control file
Hit q key to quit. That gave Debian package creation results in 'Installation successful'. But then I got this at the end:
grep: /var/tmp/CGSfQpQcEYOUYAJTqYmmW/newfile: No such file or directory
Copying files to the temporary directory...OK
Stripping ELF binaries and libraries...OK
Compressing man pages...OK
Building file list...OK
Building Debian package... FAILED!
*** Failed to build the package
Do you want to see the log file? [y]: y
Erasing temporary files...OK
Deleting doc-pak directory...OK
Deleting temp dir...OK
richard@base-desktop:~/ffmpeg$
FFmpeg does not appear in Synaptic. How do I fix this?
FakeOutdoorsman
March 18th, 2011, 01:08 AM
FFmpeg does not appear in Synaptic. How do I fix this?
It appears that Hardy's Git client is too old. I thought I tested Hardy after I changed the pkgversion for all of the guides but I must have forgotten to actually test it. Try this instead:
cd ~/ffmpeg
sudo checkinstall --pkgname=ffmpeg --pkgversion="4:git-$(date +%Y%m%d)" --backup=no --deldoc=yes --default
I did test this one. Doesn't retrieve any Git hashes for pkgversion, but I doubt it really matters to most people.
bitrin
March 18th, 2011, 01:25 AM
Thanks for the guide; helped me a lot!
heyup
March 18th, 2011, 10:28 AM
cd ~/ffmpeg
sudo checkinstall --pkgname=ffmpeg --pkgversion="4:git-$(date +%Y%m%d)" --backup=no --deldoc=yes --default
I did test this one. Doesn't retrieve any Git hashes for pkgversion, but I doubt it really matters to most people.
That worked for me. Debian package now installed. Thank you.
FakeOutdoorsman
March 21st, 2011, 10:10 PM
Interesting news: FFmpeg-mt (http://gitorious.org/ffmpeg/ffmpeg-mt), the multithreaded decoding branch, has been merged into FFmpeg today.
jwcalla
March 21st, 2011, 10:14 PM
Interesting news: FFmpeg-mt (http://gitorious.org/ffmpeg/ffmpeg-mt), the multithreaded decoding branch, has been merged into FFmpeg today.
Holy crap I just soiled my drawers. This means theoretically when the next build comes out I can undo all of my hacked-up ffmpeg / mplayer / smplayer stuff and go back to getting the latest stuff from repos.
A possible consequence of this is that mkv ordered chapters will be coming to XBMC soon?
ron999
March 21st, 2011, 10:44 PM
Interesting news: FFmpeg-mt (http://gitorious.org/ffmpeg/ffmpeg-mt), the multithreaded decoding branch, has been merged into FFmpeg today.
Hi
When I compile mplayer2 from their git it allows use of ffmpeg-mt.
But because my CPU isn't multithread I can opt out by using ./disable-mt.
When I next build ffmpeg from the videolan git, will I be able to opt out?
And if so, how?
qyot27
March 21st, 2011, 10:52 PM
A possible consequence of this is that mkv ordered chapters will be coming to XBMC soon?
I wouldn't bet on it. The ordered chapters branch of ffmpeg is outdated* (and had nothing to do with MT anyway), and from what I can remember there was/is resistance to the concept from the ffmpeg devs because of the way the files have to be accessed - the argument is that it constitutes a security hazard, but I don't know if this has been hashed out further since then. The support for them in MPlayer2 is internal, not through ffmpeg.
*and when I say 'outdated', I mean that it breaks in all sorts of ways after January 30, 2010 - it actually cannot be cleanly merged upstream to the current master. The branch code itself hasn't been updated since September 12th, 2009.
If anything on the ordered chapters front changes, expect there to be posts on ffmpeg's mailing list about it. Currently, there are none, and haven't been since early 2009 (insofar as gmane's ffmpeg-devel search results show).
jwcalla
March 21st, 2011, 11:23 PM
I wouldn't bet on it. The ordered chapters branch of ffmpeg is outdated* (and had nothing to do with MT anyway), and from what I can remember there was/is resistance to the concept from the ffmpeg devs because of the way the files have to be accessed - the argument is that it constitutes a security hazard, but I don't know if this has been hashed out further since then. The support for them in MPlayer2 is internal, not through ffmpeg.
*and when I say 'outdated', I mean that it breaks in all sorts of ways after January 30, 2010 - it actually cannot be cleanly merged upstream to the current master. The branch code itself hasn't been updated since September 12th, 2009.
If anything on the ordered chapters front changes, expect there to be posts on ffmpeg's mailing list about it. Currently, there are none, and haven't been since early 2009 (insofar as gmane's ffmpeg-devel search results show).
Cripes.
I haven't heard yet if XBMC is going to stay with ffmpeg or go with the new libav spin-off. Though if I had to guess I would expect that the spin-off isn't going to actually contribute anything positive to the efforts; rather, it'll just add to the confusion of having 3 million different versions of sub-par playback solutions on linux.
I hadn't realized there was an MPlayer2. Maybe I'll use that instead.
ron999
March 21st, 2011, 11:36 PM
I hadn't realized there was an MPlayer2. Maybe I'll use that instead.
Here it is:- http://www.mplayer2.org/
qyot27
March 22nd, 2011, 08:31 AM
Cripes.
I haven't heard yet if XBMC is going to stay with ffmpeg or go with the new libav spin-off. Though if I had to guess I would expect that the spin-off isn't going to actually contribute anything positive to the efforts; rather, it'll just add to the confusion of having 3 million different versions of sub-par playback solutions on linux.
Thing is, 'libav' wasn't the one to commit -mt; the videolan repo was. And from my understanding of it, the videolan repo does rely pretty heavily on the work done in 'libav' - just compare the commit times for changes they share. The commits to the videolan repo are practically always later than the ones to 'libav'. There will of course be divergences, but whether they'll accumulate to the level of project speciation is anybody's guess.
I hadn't realized there was an MPlayer2. Maybe I'll use that instead.
You had commented on it here:
http://ubuntuforums.org/showpost.php?p=10487463&postcount=1535
On the upside, it seems some of that encoding functionality has started to coalesce. I'm going to have to try that and see how I like it compared to mencoder.
jwcalla
March 22nd, 2011, 04:21 PM
You had commented on it here:
http://ubuntuforums.org/showpost.php?p=10487463&postcount=1535
Wow. I really am losing my mind.
sbmmm
March 24th, 2011, 03:18 PM
Install qt-faststart (optional)
8. This is a useful tool included with FFmpeg that rearranges a file with H.264 video, "such that the moov atom is in front of the data, thus facilitating network streaming". Basically, it allows web movies to start playing before they are completely downloaded. Usage: qt-faststart input.foo output.foo.
cd ~/ffmpeg
make tools/qt-faststart
sudo checkinstall --pkgname=qt-faststart --pkgversion="$(./version.sh)" --backup=no \
--deldoc=yes --default install -D -m755 tools/qt-faststart /usr/local/bin/qt-faststart
My previous sysadmin installed ffmpeg, x264, etc, and was supposed to install qt-faststart, but it looks like my install is not correct. I'm not sure...
Under ffmpeg/tools/ there is a qt-faststart.c file, but the actual file in /usr/local/bin/qt-faststart is not there. I wondered if he installed it anywhere else, so, in root I used the ssh "find" command for -iname "qt-faststart*" and it only returned the qt-faststart.c location.
What to do now? Do I need to remove and re-install? Or just install a "piece?"
Any suggestions? Thanks.
Thund3rstruck
March 24th, 2011, 03:54 PM
This guide is friggin outstanding! I was pulling my hair out trying to figure out why my zenity MP4->MP3 conversion script that I wrote on Fedora 14 worked perfectly but crashes on Linux Mint 9 and it turned out that MP3 support doesn't come with the ubuntu version of FFMPEG.
Thanks!
FakeOutdoorsman
March 24th, 2011, 08:13 PM
My previous sysadmin installed ffmpeg, x264, etc, and was supposed to install qt-faststart, but it looks like my install is not correct. I'm not sure...
What to do now? Do I need to remove and re-install? Or just install a "piece?"
Any suggestions? Thanks.
qt-faststart can be installed by itself without having to mess with your FFmpeg install. Just follow the Install qt-faststart section of the guide.
Thanks!
I'm glad it helped you out.
MrPotter
March 25th, 2011, 07:34 PM
Hello,
i got the following error during configuration of ffmpeg:
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
> --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
> --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \
> --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
ERROR: libx264 not found
libx264 was in the previous step successfully compiled and installed as desscribed in the tutorial. I use Ubuntu 10.10 with Kernel 2.6.35-28-generic. Here is the config.log produced by ffmpeg: http://pastebin.com/kSiEQeYf
MrPotter
FakeOutdoorsman
March 25th, 2011, 08:02 PM
This is a known issue from a recent commit and will hopefully be resolved by the developers soon.
Benjy1979
April 1st, 2011, 09:28 PM
Hi thanks for writing this, it was a great help.
At first I forgot to add teh vpx libraries, but I went back and remove to compile again with teh --enable-libvpx in the ./configuration step.
However, I'm getting linker errors on lucid lynx about undefined externals to do with vd-pau... right at the end of the compile at ffmpeg_g.
LD ffmpeg_g
/home/ben/ffmpeg/libavcodec/libavcodec.a(mpeg12.o): In function `decode_chunks':
/home/ben/ffmpeg/libavcodec/mpeg12.c:2335: undefined reference to `ff_vdpau_mpeg_picture_complete'
/home/ben/ffmpeg/libavcodec/libavcodec.a(allcodecs.o): In function `avcodec_register_all':
/home/ben/ffmpeg/libavcodec/allcodecs.c:60: undefined reference to `ff_mpeg1_vdpau_hwaccel'
/home/ben/ffmpeg/libavcodec/allcodecs.c:63: undefined reference to `ff_mpeg2_vdpau_hwaccel'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
ben@ben-desktop:~/ffmpeg$ ^C
ben@ben-desktop:~/ffmpeg$
Any suggestions?
andrew.46
April 1st, 2011, 11:04 PM
Broken here too :(.
FakeOutdoorsman
April 1st, 2011, 11:18 PM
A recent commit (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=9b7a0c5d886223802df54b754 caf75b6e125e76f) broke compilation. It appears that it will fail if libvdpau-dev isn't installed. Also occurs on other distros.
Options to fix this:
Installing libvdpau-dev may allow it to compile normally
Or you can try again tomorrow because it will probably be fixed by then
Or you can sync to an earlier commit
For reference I'll show how to use an earlier commit (you can view commit hashes on the FFmpeg Git (http://git.videolan.org/?p=ffmpeg.git;a=summary) site):
cd ~/ffmpeg
make distclean
git checkout e7c7b0d000e81d24327602e04d8fed400dbb7193
Then do your configure, make, checkinstall. Once FFmpeg is installed you can go back to the "master" Git branch:
cd ~/ffmpeg
make distclean
git checkout master
git pull
I'm not sure if my Git terminology is quite correct as I'm still figuring Git out.
andrew.46
April 2nd, 2011, 05:55 AM
I'm not sure if my Git terminology is quite correct as I'm still figuring Git out.
I share your pain :(. I read a quote about git once that said Linus Torvalds had created a version control system that only he was intelligent enough to understand...
qyot27
April 2nd, 2011, 07:41 AM
If I'm understanding this commit correctly,
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=ecf94986c8ba7c9fb4f674ee9 3e3be5f73d8ccdd
All that's needed is --disable-vdpau. For those that don't have a compatible Nvidia card or just don't want to bother with hardware accel, that's probably the easiest option. Unless normal compilation has already been fixed, too.
Benjy1979
April 2nd, 2011, 05:58 PM
I got this working by actually installing the vdpau library. But disabling it may well work as well.
Thank you for posting in reply to this.
andrew.46
April 2nd, 2011, 10:48 PM
I got this working by actually installing the vdpau library. But disabling it may well work as well.
After the fix I am compiling successfully without the vdpau libraries and without specifying --disable-vdpau.
robdocmagic
April 3rd, 2011, 08:15 PM
Hi,
First of all this thread is awesome, and your instructions were pefect :)
I would like to enable freetype so I can put text watermarks on my final video.
I downloaded freetype2 (it looks like freetype 1 is no longer supported), ran ./configure, make, and make install -- and it appears that everything compiled and installed nicely. I am not sure if I needed to download and build it all, but I think so.
Then I go back to rebuild the ffmpeg, and added --enable-libfreetype to the end so that it appears like this:
./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 --enable-libfreetype
When I run it I get:
/configure: 1: pkg-config: not found
ERROR: libfreetype not found
FWIW, the last few lines of the config.log:
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.TpBNmMQf.o /tmp/ffconf.TtyRey6H.c
In file included from /tmp/ffconf.TtyRey6H.c:1:
/usr/local/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
ERROR: libfreetype not found
Any help would be greatly appreciated :)
-Rob
--- EDITED TO ADD:
I think I solved it, another thread said to add a soft link:
http://ubuntuforums.org/showthread.php?t=1396493&highlight=ftheader.h
And it looks like that solved my problem.
FakeOutdoorsman
April 3rd, 2011, 10:00 PM
I would like to enable freetype so I can put text watermarks on my final video.
I'm not sure what version of Ubuntu you're using, so I'll assume Maverick. To enable freetype support in FFmpeg you need to install the freetype development package:
sudo apt-get install libfreetype6-dev
Then add --enable-libfreetype to your ./configure as you've already done.
Usage example:
ffmpeg -i input -vf drawtext=fontfile=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf:text='Example Text':fontsize=48:fontcolor=green output
--- EDITED TO ADD:
I think I solved it, another thread said to add a soft link:
http://ubuntuforums.org/showthread.php?t=1396493&highlight=ftheader.h
And it looks like that solved my problem.
Unfortunately, this is sort of a messy solution if it works. I recommend deleting the symlink and following my instructions above. FFmpeg didn't have any issues finding libfreetype in my test.
robdocmagic
April 3rd, 2011, 11:15 PM
Thanks for your quick response.. Configured and compiled no problem.. I will try the actual usage tonight but I am sure it will work great :)
robdocmagic
April 4th, 2011, 01:59 AM
Ok, worked great!
I do have one more question, is it possible to add 2 or more text's to the image? I would like to put something in the top left and the bottom right (dynamic text generated at conversion time).
I tried adding two -vf drawtext=<params> -vf drawtext=<params2>, but it appears that my second one "wins" (and my first is lost). I was not sure if I needed 1 drawtext but maybe seperated by a ; or something like that..
Thanks!
FakeOutdoorsman
April 4th, 2011, 02:15 AM
Filters are separated by a comma:
-vf yadif,scale,drawtext,drawtext
See the drawtext section in man ffmpeg for additional options for this filter.
robdocmagic
April 4th, 2011, 03:46 AM
Filters are separated by a comma:
-vf yadif,scale,drawtext,drawtext
See the drawtext section in man ffmpeg for additional options for this filter.
It's working perfectly. I have multiple drawtexts going.
I do have one last question then I am on my way.. In the text I would like to have either comma's or colons but it appears that both of these characters are used for parsing the parameters of the filter. I tried putting a \ in front of them \, or \: and I also have the text in "quotes"
...:text="Day: 1, Group: 1, Team: 1":.....
Is there anything I can do to use these characters in the text of the drawtext?
FakeOutdoorsman
April 4th, 2011, 04:24 AM
Is there anything I can do to use these characters in the text of the drawtext?
Try wrapping all filters in double-quotes and the escaping the (semi-)colons.
-vf "drawtext=...text='Example,\;\: Text'..."
robdocmagic
April 4th, 2011, 05:36 AM
Try wrapping all filters in double-quotes and the escaping the (semi-)colons.
-vf "drawtext=...text='Example,\;\: Text'..."
Yup, worked like a charm. Wow!! Awesome.
Ok, now one more thing and then I am done with this beast.
I am setting the font to be 11 point font, but when it's rendered on the video the result is a lot smaller than an 11 point font. I did some research, looked through the man pages for this feature and my guess is that somehow the fonts are being scaled based on the video resolution (just a guess).
I believe that I need to pass in some combination of the ft_load_flags (the default being render). I pass in no_scale but when I do that, all of my text disappears (e.g it's not rendered). So I am thinking that I need to pass in both no_scale and render -- or some type of combination so it will keep the exact font size.
I need this because I am computing the width of the text within PHP and calculate the X and Y (so the text will be in the correct position)
So my questions are:
1) Do you know the correct flags that would keep the font size what I specify.
2) Do you know the correct syntax to pass in multiple flags. I can try different combinations and see if I can figure it out.
Thanks again for your time and your help.
FakeOutdoorsman
April 4th, 2011, 05:49 AM
Sorry, but this is beyond my experience with drawtext. You could ask in the #ffmpeg IRC channel or the ffmpeg-user (http://ffmpeg.org/contact.html) mailing list, but in general it seems the mailing list is a better place for filter related questions.
FakeOutdoorsman
April 4th, 2011, 07:39 PM
I did a quick test in Natty 11.04 and it appears that FFmpeg is now able to find static x264 with no issues. I'll update the guide before the final release.
verb3k
April 4th, 2011, 08:40 PM
Try wrapping all filters in double-quotes and the escaping the (semi-)colons.
-vf "drawtext=...text='Example,\;\: Text'..."
Also, you can use strong quoting 'filter,filter...'. This way you won't need to escape the colon characters.
heyup
April 5th, 2011, 12:03 PM
I got an error when installing qt-faststart (on Hardy Heron):
dpkg-deb - error: (upstream) version (`UNKNOWN') doesn't contain any digits
dpkg-deb: 1 errors in control file
Installation shown as successful, but debian package failed. When I hit q key to escape got this at end:
Building file list...OK
Building Debian package... FAILED!
*** Failed to build the package
Do you want to see the log file? [y]: y
Erasing temporary files...OK
Deleting doc-pak directory...OK
Deleting temp dir...OK
Seems to be related to unknown version of ffmpeg:
:~/ffmpeg$ ffmpeg
FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
built on Mar 31 2011 12:45:43 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
FakeOutdoorsman
You may recall this from a couple of weeks ago:
http://ubuntuforums.org/showpost.php?p=10571910&postcount=1566
Can a known version of ffmpeg be built using Hardy Heron?
qyot27
April 5th, 2011, 01:11 PM
Seems to be related to unknown version of ffmpeg:
FakeOutdoorsman
You may recall this from a couple of weeks ago:
http://ubuntuforums.org/showpost.php?p=10571910&postcount=1566
Can a known version of ffmpeg be built using Hardy Heron?
The issue is that during the ffmpeg compilation process, Git is used to generate the internal version number that ffmpeg displays and reports to the system. Hardy's version of Git is too old to do this correctly, meaning that the internal versioning will not work, producing a version tag of UNKNOWN. It's not that the version of ffmpeg is 'unknown' (it's the same version everyone else is compiling); it's only 'unknown' since Git is failing to generate the version number. This then seems to create a problem with stuff like qt-faststart that apparently rely on ffmpeg's internal versioning.
The only way to fully fix this issue is to have & use a newer version of Git. Whether by finding a PPA with one (anyone have an idea if Backports has a proper Git?), compiling it yourself, or by ditching Hardy and using a newer version of Ubuntu itself. If you're focused on Long Term Support releases, that's what Lucid (10.04) is.
It would seem that Hardy's version of Git can be upgraded through this PPA:
https://launchpad.net/~git-core/+archive/ppa
Basically, do the following:
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get upgrade
To illustrate the point though, issue the following command when inside ffmpeg's directory:
echo $(./version.sh)
If it gives you 'UNKNOWN', that's the problem. I suppose it could be possible to adjust version.sh to work with older versions of Git, but that's not as elegant a solution as just making sure that Git is properly updated.
I also suppose you could change the pkgversion command for qt-faststart to the same "git-$(date +%Y%m%d)" syntax as the adjusted ffmpeg command uses. I don't know if the package prefix needs to be there, though.
heyup
April 5th, 2011, 04:52 PM
The only way to fully fix this issue is to have & use a newer version of Git.
It would seem that Hardy's version of Git can be upgraded through this PPA:
https://launchpad.net/~git-core/+archive/ppa
That worked for me.
I now have known version of ffmpeg and qt-faststart installed OK.
Thank you for explaining the problem and sorting a fix.
robdocmagic
April 5th, 2011, 05:40 PM
Hi Again :)
I am converting a MTS file to MP4 for use on my iPad.
nice -n 19 /usr/local/bin/ffmpeg -i in.mts -y -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 -s 1280x720 out.mp4
When I do a smaller resolution, it works great. However, when I move to 1280x720 iTunes gives me an error that it cannot be played on this iPad.
In some research it's saying that movies tagged in the MP4 metadata as level 4.1 or higher won't be synced (this is about the limit of what I understand).
Does anyone know how to address this and/or create MP4 files (high def 1280x720) for their iPads?
Thanks!
FakeOutdoorsman
April 5th, 2011, 07:49 PM
I got an error when installing qt-faststart (on Hardy Heron
I added qt-faststart instructions to the Hardy guide. I just added the current date to the pkgversion. A little simpler than a new Git, but that works too.
Another option would be to copy the qt-faststart binary into ~/bin and then add that directory to your $PATH, but I like giving the option of adding it to the package management system.
Does anyone know how to address this and/or create MP4 files (high def 1280x720) for their iPads?
I have little experience with iDevices, but maybe something like this will work:
ffmpeg -i in -y -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -vpre ipod640 -level 31 -crf 22 -threads 0 -s 1280x720 out.mp4
dangmc
April 8th, 2011, 04:24 PM
I would like to share my solution to the problem of installing restricted presets in Winff. After spending about 3 hours with this with no success (used steps 1, 2, 3), seems after adding 'libavcodec-extra-52'it still wasn't recognized by winff even after removing old presets. (presets.xml) in both ./winff and usr/share/winff folders. My solution was to open 'nautilus' as root and rename the new preset files in both folders to: 'presets.xml'. worked! :o
Just want to let everybody know I spoke too soon-even though the extended preset list is present the program now doesn't work.
error: 'playff not found' or something similar. If anybody has an idea I would appreciate it. I compiled ffmpeg from source, tried to download from medibuntu, (doesn't seem to be available for maverick)
Ubuntu 10.10 amd64
andrew.46
April 13th, 2011, 01:28 PM
I see two very interesting encoders have arrived in FFmpeg with very little fanfare: a new aac encoder and finally an amr-wb encoder, both as external libraries. This page shows the location of vo-amrwbenc and vo-aacenc:
http://sourceforge.net/projects/opencore-amr/files/
when compiled and installed FFmpeg, with the appropriate ./configure options, shows for vo-amrwbenc:
andrew@skamandros~$ ffmpeg -codecs | grep 'vo-amrwbenc'
FFmpeg version git-N-29078-gf521746, Copyright (c) 2000-2011 the FFmpeg developers
built on Apr 13 2011 21:52:54 with gcc 4.5.2
configuration: --prefix=/usr --mandir=/usr/man --enable-postproc --enable-avfilter --enable-pthreads --enable-shared --disable-static --disable-ffserver --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvpx --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libvo-aacenc --enable-libfreetype --enable-nonfree --enable-gpl --enable-version3
libavutil 50. 40. 1 / 50. 40. 1
libavcodec 52.119. 0 / 52.119. 0
libavformat 52.106. 0 / 52.106. 0
libavdevice 52. 4. 0 / 52. 4. 0
libavfilter 1. 78. 0 / 1. 78. 0
libswscale 0. 13. 0 / 0. 13. 0
libpostproc 51. 2. 0 / 51. 2. 0
EA libvo_amrwbenc libvo-amrwbenc Adaptive Multi-Rate (AMR) Wide-Band
and for vo-aacenc:
andrew@skamandros~$ ffmpeg -codecs | grep 'vo-aacenc'
FFmpeg version git-N-29078-gf521746, Copyright (c) 2000-2011 the FFmpeg developers
built on Apr 13 2011 21:52:54 with gcc 4.5.2
configuration: --prefix=/usr --mandir=/usr/man --enable-postproc --enable-avfilter --enable-pthreads --enable-shared --disable-static --disable-ffserver --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvpx --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libvo-aacenc --enable-libfreetype --enable-nonfree --enable-gpl --enable-version3
libavutil 50. 40. 1 / 50. 40. 1
libavcodec 52.119. 0 / 52.119. 0
libavformat 52.106. 0 / 52.106. 0
libavdevice 52. 4. 0 / 52. 4. 0
libavfilter 1. 78. 0 / 1. 78. 0
libswscale 0. 13. 0 / 0. 13. 0
libpostproc 51. 2. 0 / 51. 2. 0
EA libvo_aacenc libvo-aacenc AAC
The aac encoder seems at least usable with reasonable sound quality on my humble setup and the amr-wb encoder works well. I have produced and placed a sample amr-wb file (my first!) here for any interested people:
wget http://www.andrews-corner.org/tmp/luckynight.amr
For those not familiar with the fairly rigid constraints of amr-wb a typical commandline is as follows:
ffmpeg -i input.file \
-acodec libvo_amrwbenc \
-ar 16000 -ac 1 -ab 23.85k \
output.amr
Interesting times :)
FakeOutdoorsman
April 13th, 2011, 06:56 PM
Thanks, Andrew. Now there are three AAC encoders to choose from that FFmpeg can utilize. I'm going to make build scripts (like a slackbuild) on my other distro for these external libraries because I feel like procrastinating on a project which I don't want to deal with.
vitorsouza
April 13th, 2011, 09:44 PM
Hello there,
Nice HOWTO. Any tips for Ubuntu 11.04 (Natty)? I'm using the beta and when I try to convert a video like this:
ffmpeg -i video.avi -an -pass 1 -vcodec libx264 -vpre slow_firstpass -b 512k -bt 512k -threads 0 video.mp4
I get an error:
Unknown encoder 'libx264'
Can I follow the same instructions that are given for Maverick?
Thanks,
- Vítor Souza
andrew.46
April 13th, 2011, 09:47 PM
Thanks, Andrew. Now there are three AAC encoders to choose from that FFmpeg can utilize. I'm going to make build scripts (like a slackbuild) on my other distro for these external libraries because I feel like procrastinating on a project which I don't want to deal with.
Great minds think alike, I have a 3000 word assignment due soon on the Partition of India so I spent most of an evening packaging these 2 external libraries and then experimenting with them :).
FakeOutdoorsman
April 13th, 2011, 10:27 PM
Can I follow the same instructions that are given for Maverick?
Yes, the Maverick instructions should work fine on an updated Natty.
searler
April 14th, 2011, 12:25 AM
Hi,
I am using Lucid and trying to follow the steps. I get a problem from checkinstall on the x264 make :
/usr/bin/installwatch: line 322: /var/tmp/tmp.UBgwQpdnfl/installscript.sh: Permission denied
/var/tmp has the usually expected permissions :
drwxrwxrwt 3 root root 80 2011-04-14 11:19 tmp
Any ideas on how to work round this.
Thanks
FakeOutdoorsman
April 14th, 2011, 03:22 AM
I can't duplicate this issue. Did you follow the guide for Lucid?
Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04 (http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289)
What happens if you add --fstrans=no to the checkinstall line?
This might be a dumb question, but are you sure you're using Lucid? You can find out with:
lsb_release -cs
Also, you generally don't need to post the same question twice on the forums.
cor2y
April 14th, 2011, 11:50 PM
whats the deal with this ffmpeg fork libav and how will it affect compiling other software?
FakeOutdoorsman
April 15th, 2011, 12:09 AM
The libav about page (http://libav.org/about.html) has some info on why it was formed from their point of view (although I didn't read the whole thing being tl;dr).
Some projects may claim to support or prefer FFmpeg or libav. Other than that I don't know how it will affect the compiling of stuff that uses FFmpeg or libav. Right now the differences aren't that great for the general user, in my opinion, especially because FFmpeg merges many of libav's commits, and libav cherry-picks stuff they like from FFmpeg.
Personally, I've just been using FFmpeg because at a certain time it had a few bugs fixed that libav didn't and the developers seem friendlier to me. I'm also not convinced that a fork was the only or best solution for both sides.
andrew.46
April 15th, 2011, 01:25 AM
whats the deal with this ffmpeg fork libav and how will it affect compiling other software?
Some implications for MPlayer certainly, not the least being that the dispute has been at least in part responsible for a fracture amongst the MPlayer developers and upcoming loss of the MPlayer server.
d3v1150m471c
April 15th, 2011, 01:34 AM
i'm almost certain all you'd have to do is the following to get ffmpeg with x264 support:
sudo wget –output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get –quiet update && sudo apt-get –yes –quiet –allow-unauthenticated install medibuntu-keyring && sudo apt-get –quiet update
qyot27
April 15th, 2011, 01:38 AM
I've been wondering - is there a way to see only the unique commits on FFmpeg main and libav branches? In other words, omit all the commits shared between them, and display just those which show their differences. That would easily show any strong divergence that might occur without having to dig through the git shortlog.
FakeOutdoorsman
April 15th, 2011, 03:58 AM
i'm almost certain all you'd have to do is the following to get ffmpeg with x264 support:
sudo wget –output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get –quiet update && sudo apt-get –yes –quiet –allow-unauthenticated install medibuntu-keyring && sudo apt-get –quiet update
Looks very similar to Option C in:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
...which works fine for many people, but provides an outdated x264 and FFmpeg. This thread is about compiling x264 and FFmpeg to get the latest features, bug fixes, and to customize these packages to your preference.
I've been wondering - is there a way to see only the unique commits on FFmpeg main and libav branches?
A good question. I will investigate.
vitorsouza
April 15th, 2011, 08:43 AM
Yes, the Maverick instructions should work fine on an updated Natty.
Hi there,
I ran into a problem with ffmpeg's version number. Seems like dpkg is now (on Ubuntu Natty) enforcing that version numbers start with digits. When I try the command:
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no --deldoc=yes --fstrans=no --default
It says: "version number does not start with digit".
I managed to work around this by editing the version.sh file in the ffmpeg folder based on the one that comes with x264, which didn't present the problem. I changed ffmpeg/version.sh to look like this:
#!/bin/sh
git rev-list HEAD | sort > config.git-hash
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
VER="$LOCALVER-$(git rev-list HEAD -n 1 | cut -c 1-7)-git-N"
echo $VER
So instead of outputting version git-N-29123-g256c5b0, it outputs 29124-256c5b0-git-N, thus starting with a digit. Now the checkinstall command worked.
I don't know if this is not the appropriate way to go or if it will bring problems to me in the future, but so far it seems to have solved the dpkg issue...
Thanks again for the great HOWTO! Hopefully now I'll be able to convert AVIs to MP4s again. :)
- Vítor
OpenThinking
April 15th, 2011, 12:33 PM
Thanks for this great post! :D
I had problems compiling ffmpeg because I hadn't the latest libvpx.
ERROR: libvpx encoder version must be >=0.9.6
Solution: Download and compile the libvpx source before compiling ffmpeg:
http://code.google.com/p/webm/downloads/list
cd ~/libvpx-v0.9.6
make && install
andrew.46
April 15th, 2011, 01:25 PM
This was altered 3 days ago (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=8eeed0db05966e94bfff53b20 10b8c7d4e52e3f9); you might be better to us checkinstall for this installation... and perhaps ./configure as well :).
FakeOutdoorsman
April 15th, 2011, 09:06 PM
I had problems compiling ffmpeg because I hadn't the latest libvpx.
ERROR: libvpx encoder version must be >=0.9.6
Thanks for the update. I haven't noticed the new minimum requirement. I've updated the Maverick guide by simply removing all mentions of libvpx since the guide is focused on x264. Does anyone actually encode with libvpx? If so I can add libvpx compile instructions.
See the Lucid guide for instructions to compile recent libvpx:
Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04 (http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289)
mathieg2
April 15th, 2011, 10:04 PM
How do I get some more speed out of my phenom X6 processor (1090T) for ffmpeg?
I'm only getting 95 fps - and I got that with my intel Q6600 which runs at a slower clock
speed! I have 4 gig of memory and I am using 32 bit ubuntu. I am compiling ffmpeg myself. ffmpeg is only using one core - but I can run multiple copies of ffmpeg to utilise
the other cores.
I have an automatic script that processes mpg files one at a time from a given directory and spits them out one by one. I'd like it to be faster...
The command I am typing is:
ffmpeg -i "$i" -vcodec mpeg4 -vtag XVID -acodec libmp3lame -aspect 16:9 -ab 128k -s 640x360 -f avi -b 1200000 -qmax 8 -threads 4 "$j" && mv "$i" ../done2
$i is an mpg file $j is an avi file with the same name. The output below shows
the compile options
FFmpeg version git-N-29131-gf4bc923, Copyright (c) 2000-2011 the FFmpeg developers
built on Apr 15 2011 21:15:49 with gcc 4.5.2
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --arch=i686
libavutil 50. 40. 1 / 50. 40. 1
libavcodec 52.119. 1 / 52.119. 1
libavformat 52.108. 0 / 52.108. 0
libavdevice 52. 4. 0 / 52. 4. 0
libavfilter 1. 78. 0 / 1. 78. 0
libswscale 0. 13. 0 / 0. 13. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mpeg @ 0xa398620] max_analyze_duration reached
Input #0, mpeg, from 'file.mpg':
Duration: 00:58:59.56, start: 0.200000, bitrate: 3336 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [PAR 64:45 DAR 16:9], 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 256 kb/s
[buffer @ 0xa39bba0] w:720 h:576 pixfmt:yuv420p
[setdar @ 0xa3a0ca0] a:16/9
[scale @ 0xa3a08c0] w:720 h:576 fmt:yuv420p -> w:640 h:360 fmt:yuv420p flags:0xa0000004
[setdar @ 0xa3a0ca0] w:640 h:360 -> dar:16/9 sar:1/1
Output #0, avi, to 'file.avi':
Metadata:
ISFT : Lavf52.108.0
Stream #0.0: Video: mpeg4, yuv420p, 640x360 [PAR 1:1 DAR 16:9], q=2-8, 1200 kb/s, 25 tbn, 25 tbc
Stream #0.1: Audio: libmp3lame, 48000 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=88490 fps= 95 q=1.6 Lsize= 579126kB time=3539.60 bitrate=1340.3kbits/s
video:518236kB audio:55306kB global headers:0kB muxing overhead 0.973524%
If I'm in the wrong forum, please point me in the right direction - google isnt helping much - or I'm asking it the wrong questions
verb3k
April 16th, 2011, 03:33 AM
Thanks for the update. I haven't noticed the new minimum requirement. I've updated the Maverick guide by simply removing all mentions of libvpx since the guide is focused on x264. Does anyone actually encode with libvpx? If so I can add libvpx compile instructions.
See the Lucid guide for instructions to compile recent libvpx:
Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04 (http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289)
Yes, please do. I have a WebM example in the screencasting guide that requires libvpx.
andrew.46
April 16th, 2011, 04:12 AM
Does anyone actually encode with libvpx? If so I can add libvpx compile instructions.
I am currently between Ubuntu installations (again!) but I have been using the newest libvpx on my other distro and you might be surprised at how much better the current release is than the previous version. So, a vote here for inclusion in your guide, even though I realise the main thrust of the guide is x264 encoding, and of course the extra work this means for yourself......
qyot27
April 16th, 2011, 04:39 PM
How do I get some more speed out of my phenom X6 processor (1090T) for ffmpeg?
I'm only getting 95 fps - and I got that with my intel Q6600 which runs at a slower clock
speed! I have 4 gig of memory and I am using 32 bit ubuntu. I am compiling ffmpeg myself. ffmpeg is only using one core - but I can run multiple copies of ffmpeg to utilise
the other cores.
I have an automatic script that processes mpg files one at a time from a given directory and spits them out one by one. I'd like it to be faster...
The command I am typing is:
[snip]
Video: mpeg2video (Main)
[snip]
If I'm in the wrong forum, please point me in the right direction - google isnt helping much - or I'm asking it the wrong questions
A) Clock speed isn't everything. It's totally possible to get worse or highly limited performance out of a higher clock if there's a bottleneck in the hardware or software. Memory speed, bus speed (of FSB, QuickPath, or HyperTransport), L2/L3 cache sizes, storage drive read/write speeds (and rpm speeds or IO balanced against the connection bandwidth)...all of these affect performance.
It's probably super-easy to underwhelm a processor in such a way as to make it perform worse than another processor with a lower clock, or handicap your general overall throughput to cripple the ability of the processor to do the work in less time even if it potentially could go much faster than the other processor it's being compared to.
B) Speaking of bottlenecks, there could also be one in software - firstly, because you're only specifying -threads 4 for the encode, but not the decode. So in effect, you're telling ffmpeg to use one thread for decode, and then 4 for encode. If the internal threading mechanism is to set threads automatically as needed (with -threads controlling an upper limit, like the -vbv options can do to balance bitrate), it may not be saturating the process enough to justify using 4 threads, or simply hanging around after the 4 threads do encode their content, waiting for the input thread to catch up. Remember, input options passed to ffmpeg come before the input file, and those for the output are before the output file.
Basically,
ffmpeg -i inputfile.mpg -vcodec mpeg4 -threads 4 outputfile.avi
is not the same as
ffmpeg -threads 4 -i inputfile.mpg -vcodec mpeg4 -threads 4 outputfile.avi
However, at least from some of the talk I've seen bouncing around, ffmpeg's multithreading (or was it mplayer's?) may cause problems on decoding MPEG-2 streams. You can try it and see if it works, but don't be surprised if the output is weird. In the end, it may simply be that you're experiencing a bottleneck somewhere in hardware and need to get *that* sorted out first.
Sneaky edit: Also, it can very well be something about the 32bit vs. 64bit divide in conjunction with general OS performance. I witnessed my grandfather's Athlon64 setup - which is otherwise horrendously bottlenecked - practically double its x264 encoding speed by switching from Windows XP 32-bit to Ubuntu 8.10 64-bit (this was almost three years ago; Intrepid had just been released). I don't think going from Ubuntu 32-bit to Ubuntu 64-bit would result in that kind of performance boost, but it might still show an increase by a fair amount.
FakeOutdoorsman
April 16th, 2011, 08:37 PM
Yes, please do. I have a WebM example in the screencasting guide that requires libvpx.
So, a vote here for inclusion in your guide, even though I realise the main thrust of the guide is x264 encoding, and of course the extra work this means for yourself......
I'll add it. Not much work. I'll just basically copy and paste it from the Lucid guide and run a test compile within a few days.
Sneaky edit: Also, it can very well be something about the 32bit vs. 64bit divide in conjunction with general OS performance.
Quite true. I have two similar encoding machines for a project. One is an Intel i7 860, and the other is 870. The 860 with the 64-bit OS was actually encoding about 10-20% faster (IIRC) with x264 because I accidentally installed the i686 version of the distro on the 870. I knew I should have labeled those discs. Duh.
10-20% may not seem too significant for some, but I had several thousand hours to encode.
FakeOutdoorsman
April 17th, 2011, 04:42 AM
I updated the Maverick guide with the libvpx instructions, but I'm not able to test it at this time.
FFmpeg has some new libx264 options: preset, profile, tune, and fastfirstpass. These options have replaced the old method of using the preset files and most of the preset files have been removed. This now allows access to options that were impossible to approximate with the file based presets (such as most of the tune options). I'll update the guide with some examples soon.
Hogashi
April 17th, 2011, 03:42 PM
This error keeps bugging when I try to convert video with ffmpeg:
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Besides, my ffmpeg is missing some presets such as slow, medium, fast.... for x264
FakeOutdoorsman
April 17th, 2011, 09:43 PM
The syntax has changed for libx264 and now presets are chosen with the -preset option:
ffmpeg -i input -vcodec libx264 -preset medium -crf 22 -threads 0 output
pauljohn32
April 18th, 2011, 02:38 AM
This error keeps bugging when I try to convert video with ffmpeg:
Besides, my ffmpeg is missing some presets such as slow, medium, fast.... for x264
I don't think they are missing. They are re-named. I just built the newest ffmpeg and I have:
/usr/local/share/ffmpeg/libx264-ipod320.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_slow.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_max.ffpreset
/usr/local/share/ffmpeg/libx264-baseline.ffpreset
/usr/local/share/ffmpeg/libx264-ipod640.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_medium.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_slower.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_fast.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_ultrafast.ffpreset
and so the name previously "slow" is "lossless_slow". If you use that on the CLI, it will work.
I just hit same problem...
andrew.46
April 18th, 2011, 04:24 AM
I don't think they are missing. They are re-named. I just built the newest ffmpeg and I have:
/usr/local/share/ffmpeg/libx264-ipod320.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_slow.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_max.ffpreset
/usr/local/share/ffmpeg/libx264-baseline.ffpreset
/usr/local/share/ffmpeg/libx264-ipod640.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_medium.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_slower.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_fast.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_ultrafast.ffpreset
I believe you also have access to these now:
--preset <string> Use a preset to select encoding settings [medium]
Overridden by user settings.
- ultrafast,superfast,veryfast,faster,fast
- medium,slow,slower,veryslow,placebo
--tune <string> Tune the settings for a particular type of source
or situation
Overridden by user settings.
Multiple tunings are separated by commas.
Only one psy tuning can be used at a time.
- psy tunings: film,animation,grain,
stillimage,psnr,ssim
- other tunings: fastdecode,zerolatency
Have a look at x264 --longhelp for these, I have not experimented much so far. No doubt there will be some confusion with the syntax changes :).
FakeOutdoorsman
April 18th, 2011, 06:05 AM
I don't think they are missing. They are re-named. and so the name previously "slow" is "lossless_slow". If you use that on the CLI, it will work.
They were not renamed. The lossless_* presets have been available for quite some time. slow != lossless_slow.
mathieg2
April 18th, 2011, 10:36 PM
B) Speaking of bottlenecks, there could also be one in software - firstly, because you're only specifying -threads 4 for the encode, but not the decode. So in effect, you're telling ffmpeg to use one thread for decode, and then 4 for encode. If the internal threading mechanism is to set threads automatically as needed (with -threads controlling an upper limit, like the -vbv options can do to balance bitrate), it may not be saturating the process enough to justify using 4 threads, or simply hanging around after the 4 threads do encode their content, waiting for the input thread to catch up. Remember, input options passed to ffmpeg come before the input file, and those for the output are before the output file.
Basically,
ffmpeg -i inputfile.mpg -vcodec mpeg4 -threads 4 outputfile.avi
is not the same as
ffmpeg -threads 4 -i inputfile.mpg -vcodec mpeg4 -threads 4 outputfile.avi
However, at least from some of the talk I've seen bouncing around, ffmpeg's multithreading (or was it mplayer's?) may cause problems on decoding MPEG-2 streams. You can try it and see if it works, but don't be surprised if the output is weird. In the end, it may simply be that you're experiencing a bottleneck somewhere in hardware and need to get *that* sorted out first.
Thanks for the advice. I've managed to confuse myself. I tried:
ffmpeg -threads 6 -i inputfile.mpg -vcodec mpeg4 -threads 6 outputfile.avi
and got a speed of 78 frames per second - not the speed up I was hoping for (it slowed down!)
so then I tried:
ffmpeg -i inputfile.mpg -vcodec mpeg4 outputfile.avi
FFmpeg still appears to be using only one core - but it is achieving 130 fps... so I guess the threads were not helping.
Anyway - I am happy with the new speed... I might experiment a bit with 64-bit ubuntu - but I cant face re-building and configuring mythtv again when I switch over to 64 bit - so it could be a while...
Graeme
qyot27
April 19th, 2011, 12:13 AM
Thanks for the advice. I've managed to confuse myself. I tried:
ffmpeg -threads 6 -i inputfile.mpg -vcodec mpeg4 -threads 6 outputfile.avi
and got a speed of 78 frames per second - not the speed up I was hoping for (it slowed down!)
so then I tried:
ffmpeg -i inputfile.mpg -vcodec mpeg4 outputfile.avi
FFmpeg still appears to be using only one core - but it is achieving 130 fps... so I guess the threads were not helping.
Anyway - I am happy with the new speed... I might experiment a bit with 64-bit ubuntu - but I cant face re-building and configuring mythtv again when I switch over to 64 bit - so it could be a while...
Graeme
What I can only surmise:
The slowdown may be more related to the default settings, whereas the settings you were originally using may have been faster.
ffmpeg's MPEG-4 ASP encoder may not even be multithreaded, or like Xvid, could suffer from inoptimal threading support.
There could even be some other third problem as-of-yet unknown, as when I use an old Windows build of mencoder compiled with Xvid 1.2.1 (or maybe 1.2.2) under Wine, I get close to 60fps on my parent's iMac. Using a natively-compiled version of MPlayer2 with the -vo-lavc branch and Xvid 1.3.x, I'm lucky to get 35fps, even though I'm fairly sure I got the options equal. I have no clue if this is in any way related, but it's a possibility.
After doing some Googling, it looks like #2 is the most likely:
http://ffmpeg.arrozcru.org/forum/viewtopic.php?f=1&t=970
Particularly this post:
http://ffmpeg.arrozcru.org/forum/viewtopic.php?f=1&t=970#p3233
Granted, that was from 2009, and the numbers have slightly changed from then 'til now, but the native mpeg4 encoder still is not listed. So as far as I can tell, you have to explicitly use Xvid if you want multithreading. However, note that Xvid is known to not be very good at it either...just apparently better than the native encoder.
It also seems that there's a bit of difference between ffmpeg and libav on this, with libav having divergent numbers for mpeg12 (4 instead of 1), mpegvideo (6 instead of 7), and mpegvideo_enc (13 instead of 5).
FakeOutdoorsman
April 19th, 2011, 07:48 PM
Updated the guide for Natty. dpkg in Natty now requires pkgversion to start with a number which is annoying. I changed the ffmpeg/qt-faststart pkgversion to simply use the current date instead of the git version.
robdocmagic
April 20th, 2011, 01:24 AM
They were not renamed. The lossless_* presets have been available for quite some time. slow != lossless_slow.
Hi,
I am running into the same issue with "slow". I installed (using your great instructions) about 3 weeks ago and I got a bunch of presets, slow being one of them.
I just installed last night (on another box, using the same instructions) and I only get these presets (below). Of course, the CMD line I have for ffmpeg now fails as it says it can't find the "slow" preset.
1) Can I just copy the slow preset from my other box to this one? I would think so.
2) I wonder why they don't have the other presets, unless I need to pass a new flag or something to get the presets.
libx264-baseline.ffpreset
libx264-lossless_fast.ffpreset
libx264-lossless_slower.ffpreset
libx264-ipod320.ffpreset
libx264-lossless_max.ffpreset
libx264-lossless_slow.ffpreset
libx264-ipod640.ffpreset
libx264-lossless_medium.ffpreset
libx264-lossless_ultrafast.ffpreset
FakeOutdoorsman
April 20th, 2011, 02:57 AM
1) Can I just copy the slow preset from my other box to this one? I would think so.
The syntax changed recently, so that won't work on the other machine.
2) I wonder why they don't have the other presets, unless I need to pass a new flag or something to get the presets.
The options have changed for using the presets:
ffmpeg -i input -vcodec libx264 -preset medium -profile baseline -tune film -level 3.0 -crf 22 -threads 0 output
-profile, -tune, and -level are optional. You can see what settings you can use with these options in x264 --help.
You should recompile to latest FFmpeg because after the change some options were broken until today.
robdocmagic
April 20th, 2011, 03:29 AM
Thanks! I am going to investigate them shortly. I am sure you have answered this 100x (or maybe not since it seems brand new).
Do you know what does the preset, profile, and tune do?
In other words, does "slow" mean that it just takes longer to encode, versus ultrafast, and somehow that has a relationship to the quality/size of the output?
What does the profile of baseline mean as compared to main, high, and high10?
What about tune? I would guess that film would be standard for movies?
And, finally level? Not sure about that.
Thanks. :D
qyot27
April 20th, 2011, 06:35 AM
Thanks! I am going to investigate them shortly. I am sure you have answered this 100x (or maybe not since it seems brand new).
Do you know what does the preset, profile, and tune do?
In other words, does "slow" mean that it just takes longer to encode, versus ultrafast, and somehow that has a relationship to the quality/size of the output?
What does the profile of baseline mean as compared to main, high, and high10?
What about tune? I would guess that film would be standard for movies?
And, finally level? Not sure about that.
Thanks. :D
Profile and level refer to the official demarcations given to the H.264 video standard by the MPEG and ITU-T groups. See the Wikipedia article sections:
http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles
In more practical terms, profile and level settings are necessary for choosing what hardware (and sometimes, even software) to target and encode for. Typically, different pieces of hardware have different profile/level requirements (although many of them seem to have coalesced around High Profile@Level 4.1, which IIRC is the highest setting allowed on Blu-ray). Actual video specs may restrict what profile and level is allowed, or it can simply be a question of using or not using options that are incompatible with the profile/level combination being used.
Once x264 finally gets --device support, much of that business should be simplified. However, I don't know how close it is - the patch for it has been mentioned in the last five or six development newsletters, but I've not seen a readily-available version of the patch being referred to.
The preset and tune system is unique to x264, and specify sets of pre-selected settings for the content. Most of the presets are named after their speed performance (ultrafast, medium, veryslow), while the tune settings are the ones more specific to the video content being encoded (film, animation) or needs specific to the output stream (zerolatency, fastdecode).
In other words, does "slow" mean that it just takes longer to encode, versus ultrafast, and somehow that has a relationship to the quality/size of the output?
It depends. If you use --bitrate, 'slow' will more than likely look better/take up less space than ultrafast at the same bitrate, at the expense of speed. If you use a --crf setting instead (usually --crf 18 in my case), it's pretty much just referring to the speed differences and the filesizes.
The ultrafast preset disables pretty much all of the slow, precision-based settings, so if you specify a bitrate you just have to hope the bitrate is high enough to encode it well. --crf is a relative quality setting, and will more or less make sure that it looks the same as another video using the same --crf setting, but because it disables those high precision settings, the bitrate needed to do so is probably higher.
(That's an extremely simple description, but it works for these purposes.)
dusadrian
April 20th, 2011, 07:15 AM
Hi,
Absolutely great tutorial, great thread and for that matter great software this ffmpeg.
My question relates to the syntax for capturing audio along with video. I use this:
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 15 ... ...This does capture sound, but it is the sound from my laptop's speakers that enters back into the mic. What I would really like to do is to capture the sound that is "sent" to the speakers, not the sound from the mic.
EDIT: to be more specific, it is a video running on the screen that I am trying to grab.
EDIT2: sorry to waste your time, I already found the solution, it is pavucontrol.
verb3k
April 20th, 2011, 08:39 AM
@FakeOutdoorsman: If you make an independent Natty guide, you can then drop the libvpx building instructions as Natty has the latest libvpx version in the repositories.
flibustier
April 20th, 2011, 11:25 AM
Hello
Your great guide lacks information that we should uninstall Ubuntu shipped libvpx before compiling ffmpeg, so ffmpeg uses pretty old shipped libvpx version 0.9.5, instead of latest 0.9.6.
Also, it would be great if you mention that it is better to apply google webm patches to ffmpeg to add libvpx presents for encoding
http://code.google.com/p/webm/downloads/list
ffmpeg-HEAD-VP8_param_mapping-5.tar.gz (http://code.google.com/p/webm/downloads/detail?name=ffmpeg-HEAD-VP8_param_mapping-5.tar.gz&can=2&q=)
andrew.46
April 20th, 2011, 12:07 PM
Also, it would be great if you mention that it is better to apply google webm patches to ffmpeg to add libvpx presents for encoding
Very interesting, I wonder if the webm people are going to submit the changes, particularly to libavcodec/libvpxenc.c, to the FFmpeg developers?
FakeOutdoorsman
April 20th, 2011, 06:47 PM
@FakeOutdoorsman: If you make an independent Natty guide, you can then drop the libvpx building instructions as Natty has the latest libvpx version in the repositories.
Thanks, will do. I didn't notice Natty's libvpx version when I rushed myself to get things working for Natty. Too much going on at work and home this week...
Hello
Your great guide lacks information that we should uninstall Ubuntu shipped libvpx before compiling ffmpeg, so ffmpeg uses pretty old shipped libvpx version 0.9.5, instead of latest 0.9.6.
Good point. I will test this and add a removal command.
Also, it would be great if you mention that it is better to apply google webm patches to ffmpeg to add libvpx presents for encoding
I may mention the preset patch, but I don't know if I will add instructions for this since the guide is focused on x264.
Very interesting, I wonder if the webm people are going to submit the changes, particularly to libavcodec/libvpxenc.c, to the FFmpeg developers?
I asked the author in February if it was going to be submitted. He said portions of it will be, but there were some naming and codec specific options to deal with first (IIRC). I know some libvpxenc patches were applied lately, but I haven't been paying much attention to this encoder.
Thormodo
April 20th, 2011, 08:53 PM
Hello,
I followed your guide about two weeks ago, since otherwise I got the dreaded "No accelerated colorspace conversion found from yuv420p to bgr24" error when working with OpenCV.
It worked great to fix the error. But I had to reinstall Ubuntu (formatted everything etc.) today. And I see you changed your guide a bit. Now when trying to 'make' OpenCV 2.2 I get the errors below.
Is there a place I can find the previous version of the guide? Or maybe you know what I can change to fix it?
Thanks a lot in advance.
Link:
http://alexsleat.co.uk/2011/01/09/how-to-fix-no-accelerated-colorspace-conversion-found-from-yuv420p-to-bgr24-opencv-2-2-0-ubuntu-10-10/
Errors:
/home/maarten/OpenCV-2.2.0/modules/highgui/src/cap_ffmpeg.cpp: In member function ‘virtual bool CvCapture_FFMPEG::open(const char*)’:
[...]
/home/maarten/OpenCV-2.2.0/modules/highgui/src/cap_ffmpeg.cpp:1348: warning: ‘int url_fopen(AVIOContext**, const char*, int)’ is deprecated (declared at /usr/local/include/libavformat/avio.h:279)
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
FakeOutdoorsman
April 20th, 2011, 10:04 PM
It worked great to fix the error. But I had to reinstall Ubuntu (formatted everything etc.) today. And I see you changed your guide a bit. Now when trying to 'make' OpenCV 2.2 I get the errors below.
Is there a place I can find the previous version of the guide? Or maybe you know what I can change to fix it?
I've never used OpenCV before, but I doubt any change of this guide caused your compilation error. Most likely a change in the FFmpeg code since there have been many updates to avio.h (http://git.videolan.org/?p=ffmpeg.git;a=history;f=libavformat/avio.h) lately. Maybe it's a change in the API that OpenCV needs to catch up with?
Another option is to use an older FFmpeg. Sync to an older FFmpeg commit (just browse the avio.h link above and get the commit hash) that you think may work and then try again:
sudo apt-get remove ffmpeg
cd ~/ffmpeg
make distclean
git checkout 3c96c64821184247b46052dee74442024098f47f
./configure, make, checkinstall etc
make distclean
git checkout master
git pull
Now recompile OpenCV (you'll probably want to make distclean first, but I'm not familiar with cmake).
andrew.46
April 21st, 2011, 08:07 AM
Hmmmm.... is it just me that is having trouble compiling against the newest FFmpeg? Error is:
input/lavf.c: In function 'open_file':
input/lavf.c:161:81: error: 'CODEC_TYPE_VIDEO' undeclared (first use in this function)
input/lavf.c:161:81: note: each undeclared identifier is reported only once for each function it appears in
make: *** [input/lavf.o] Error 1
and is easily circumvented with:
--disable-lavf
in the x264 ./configure string = loss of the ability to import to x264 with FFmpeg libraries.
qyot27
April 21st, 2011, 10:22 AM
Hmmmm.... is it just me that is having trouble compiling against the newest FFmpeg? Error is:
input/lavf.c: In function 'open_file':
input/lavf.c:161:81: error: 'CODEC_TYPE_VIDEO' undeclared (first use in this function)
input/lavf.c:161:81: note: each undeclared identifier is reported only once for each function it appears in
make: *** [input/lavf.o] Error 1
and is easily circumvented with:
--disable-lavf
in the x264 ./configure string = loss of the ability to import to x264 with FFmpeg libraries.
It was also noted here:
http://doom10.org/index.php?topic=1169.msg7664#msg7664
It seems that there's only one instance of CODEC_TYPE_VIDEO in lavf.c, so it's just as easy to amend the file to use AVMEDIA_TYPE_VIDEO.
What I think may be a fix could be coming down the FFmpeg pipeline in a day or so - if I interpret the commit log on libav correctly. It may already be fixed there, but there's always that time gap between the two branches over stuff like this (at least for those things that get pulled into FFmpeg from libav).
andrew.46
April 21st, 2011, 02:49 PM
It seems that there's only one instance of CODEC_TYPE_VIDEO in lavf.c, so it's just as easy to amend the file to use AVMEDIA_TYPE_VIDEO.
Thanks for that, it fixes the problem nicely :). I attach the world's smallest patch to this post for this problem, but as you say no doubt it will be fixed soon enough...
Edit: I see the upcoming x264 fix (https://github.com/DarkShikari/x264-devel/commit/e8a1257600b26c2efcea0a4ea57b6f7f97d151c1) also contains an updated ./configure test.
andrew.46
April 23rd, 2011, 01:02 AM
Also, it would be great if you mention that it is better to apply google webm patches to ffmpeg to add libvpx presents for encoding
http://code.google.com/p/webm/downloads/list
ffmpeg-HEAD-VP8_param_mapping-5.tar.gz (http://code.google.com/p/webm/downloads/detail?name=ffmpeg-HEAD-VP8_param_mapping-5.tar.gz&can=2&q=)
and a new version of this patch today:
http://webm.googlecode.com/files/ffmpeg-HEAD-VP8_param_mapping-6.tar.gz
FakeOutdoorsman
April 28th, 2011, 09:02 PM
Added another optional step to the Maverick/Natty guide to include lavf support in x264. This lets x264 accept just about any input that FFmpeg can handle. It's a fairly simple step: just recompile x264. Then give it a try:
x264 [options] -o outfile infile
x264 --preset slow --crf 22 -o outfile infile
flibustier
April 29th, 2011, 01:00 PM
And little addon to webm encoding
Installing mkclean (http://www.matroska.org/downloads/mkclean.html) (qt-faststart analog for webm):
cd
wget http://downloads.sourceforge.net/project/matroska/mkclean/mkclean-0.8.2.tar.bz2
tar jxvf mkclean-0.8.2.tar.bz2
cd mkclean-0.8.2
./configure
make
sudo checkinstall --pkgname=mkclean --pkgversion="0.8.2" --backup=no \
--deldoc=yes --fstrans=no --default
Usage:
mkclean --optimize --remux inputFile.webm
rm inputFile.webm
mv clean.inputFile.webm inputFile.webm
andrew.46
April 29th, 2011, 01:10 PM
Looks very interesting flibusiter, you might consider changing --pkgversion="1:$(date +%Y%m%d%H%M)-git" perhaps to 0.8.2 though? Should be very interesting times ahead as webm starts getting the big push...
Ghost_Mazal
April 29th, 2011, 04:29 PM
Lo guys ,
I get to step 3 and at the end of it I get the following error:
make: *** [x264] Error 1
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
And install fails.
Can someone help please ?
FakeOutdoorsman
April 30th, 2011, 01:40 AM
Lo guys ,
I get to step 3 and at the end of it I get the following error:
make: *** [x264] Error 1
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
And install fails.
Can someone help please ?
Is this an error from the checkinstall command? Usually checkinstall will ask you if you want to view a log with more information. Can you show this? I'm assuming you're using Natty. Is this correct?
Ghost_Mazal
April 30th, 2011, 06:35 AM
Is this an error from the checkinstall command? Usually checkinstall will ask you if you want to view a log with more information. Can you show this? I'm assuming you're using Natty. Is this correct?
I got it to work thanx. I found that there were still x264 and ffmpeg folders in my home folder from previous install. Deleted all those , started from scratch and then it worked 100%
flibustier
April 30th, 2011, 08:34 AM
Looks very interesting flibusiter, you might consider changing --pkgversion="1:$(date +%Y%m%d%H%M)-git" perhaps to 0.8.2 though?
Thank you. Changed it.
Ghost_Mazal
May 1st, 2011, 04:06 PM
Will this how-to work on Kubuntu as well ?
FakeOutdoorsman
May 1st, 2011, 07:13 PM
Will this how-to work on Kubuntu as well ?
Yes. It should work on all Ubuntu variants.
Smacker_626
May 1st, 2011, 11:54 PM
Hello
Your great guide lacks information that we should uninstall Ubuntu shipped libvpx before compiling ffmpeg, so ffmpeg uses pretty old shipped libvpx version 0.9.5, instead of latest 0.9.6.
Also, it would be great if you mention that it is better to apply google webm patches to ffmpeg to add libvpx presents for encoding
http://code.google.com/p/webm/downloads/list
ffmpeg-HEAD-VP8_param_mapping-5.tar.gz (http://code.google.com/p/webm/downloads/detail?name=ffmpeg-HEAD-VP8_param_mapping-5.tar.gz&can=2&q=)
And little addon to webm encoding
Installing mkclean (http://www.matroska.org/downloads/mkclean.html) (qt-faststart analog for webm):
cd
wget http://downloads.sourceforge.net/project/matroska/mkclean/mkclean-0.8.2.tar.bz2
tar jxvf mkclean-0.8.2.tar.bz2
cd mkclean-0.8.2
./configure
make
sudo checkinstall --pkgname=mkclean --pkgversion="0.8.2" --backup=no \
--deldoc=yes --fstrans=no --defaultUsage:
mkclean --optimize --remux inputFile.webm
rm inputFile.webm
mv clean.inputFile.webm inputFile.webm
I finally registered on the forums just to post this info :lolflag:. Oh well, I might still be able to give some helpful info :P.
The libvpx patch for ffmpeg gives you some libvpx presets and enables 1-pass and 2-pass CQ (Constrained Quality) encoding via "-crf QUALITY -vb TARGET_MAX_DATARATE". It can be found at http://code.google.com/p/webm/downloads/list, and as of 2011-05-01 the current version is "ffmpeg-HEAD-VP8_param_mapping-6.tar.gz". You can download and apply the patch with the following code, just run it immediately before FFmpeg's "./configure" line:
wget http://webm.googlecode.com/files/ffmpeg-HEAD-VP8_param_mapping-6.tar.gz
tar -xf ffmpeg-HEAD-VP8_param_mapping-6.tar.gz
git apply ffmpeg-HEAD-VP8_param_mapping.diffNote: "git apply PATCH" won't output anything if it was successful, you can use "git apply -v PATCH" if you want to see what it's doing.
As for mkclean, I don't know if it really helps at all, but the "cleaned" videos it produces will be encoded as you upload them to YouTube, and I'd just recommend using it in general :). You can find it at http://www.matroska.org/downloads/mkclean.html and it's at v0.8.2 as of 2011-05-01. Just follow flibustier's instructions above, though I always just copied the binary to /usr/bin since I don't know much about checkinstall :P.
And finally, I think it's worth noting in the guide that removing libvpx0 as per the guide's instructions will of course remove it's dependent packages such as audacity and vlc, so you should make a copy of apt-get's "The following packages are going to be removed:" output. And since the custom libvpx isn't named libvpx0, you have to reinstall libvpx0 after following the guide but before reinstalling vlc and anything else that was removed.
Here's an example cmdline for encoding a 2-pass CQ WebM video using my settings:
ffmpeg -i "INPUT" -an -vlang "eng" -vcodec libvpx -vpre "720p" -crf 23 -vb 4M -pass 1 -threads 2 "OUTPUT.dirty.webm"
rm "OUTPUT.dirty.webm"
ffmpeg -i "INPUT" -alang "eng" -acodec libvorbis -aq 9 -vlang "eng" -vcodec libvpx -vpre "720p" -crf 23 -vb 4M -pass 2 -threads 2 "OUTPUT.dirty.webm"
mkclean --remux --optimize "OUTPUT.dirty.webm" "OUTPUT.webm"
rm "OUTPUT.dirty.webm"I know that a lot of this has probably been posted in this thread before, but I had to learn all of the WebM stuff myself, so I'm hoping it helps someone else out :).
ron999
May 2nd, 2011, 01:08 AM
EDIT
This patch is now obsolete.
See post #1768 here:- http://ubuntuforums.org/showpost.php?p=10967333&postcount=1768
The libvpx patch for ffmpeg gives you some libvpx presets and enables 1-pass and 2-pass CQ (Constrained Quality) encoding via "-crf QUALITY -vb TARGET_MAX_DATARATE". It can be found at http://code.google.com/p/webm/downloads/list, and as of 2011-05-01 the current version is "ffmpeg-HEAD-VP8_param_mapping-6.tar.gz". You can download and apply the patch with the following code, just run it immediately before FFmpeg's "./configure" line:
wget http://webm.googlecode.com/files/ffmpeg-HEAD-VP8_param_mapping-6.tar.gz
tar -xf ffmpeg-HEAD-VP8_param_mapping-6.tar.gz
git apply ffmpeg-HEAD-VP8_param_mapping.diffNote: "git apply PATCH" won't output anything if it was successful, you can use "git apply -v PATCH" if you want to see what it's doing.
.
Thanks for this Smacker :)
FakeOutdoorsman
May 2nd, 2011, 08:35 PM
And finally, I think it's worth noting in the guide that removing libvpx0 as per the guide's instructions will of course remove it's dependent packages such as audacity and vlc...
Thanks for the info. I updated the guide and removed libvpx0...uh...removal since it doesn't actually need to be removed (I did a poor job testing that one when I added it).
I also added some info mentioning the libvpx preset patch and the mkclean tool and linked to your post and flibustier's post.
Smacker_626
May 3rd, 2011, 05:26 AM
Thanks for this Smacker :)
No problem dude, I'm glad it helped someone :).
Thanks for the info. I updated the guide and removed libvpx0...uh...removal since it doesn't actually need to be removed (I did a poor job testing that one when I added it).
I also added some info mentioning the libvpx preset patch and the mkclean tool and linked to your post and flibustier's post.
Awesome :D, thank you, and thank you for writing and maintaining the guide, it's been a huge help since I seriously got into video encoding about a year ago.
Edit: 2 possible corrections:
1. "Updating FFmpeg and x264" has a cmdline that still removes libvpx0. Also I'm assuming that libvpx should be there to stay consistent with removing the custom packages.
2. "Reverting Changes Made by This Guide" removes the custom packages except for libvpx.
darkdragn
May 3rd, 2011, 07:09 AM
This might sound a little stupid, but I was having some issues with resampling from 5.1 surround to stereo so I poked around and found a patch from 2009 that someone put out to resolve the issue. The patch never made it into the main stream, and since it was put out there were some alterations to resample.c which broke it.
For anyone else who would like the resample from 5.1 to stereo attached is essentially a modified version of the patch, fixed to support the latest git.
FakeOutdoorsman
May 3rd, 2011, 07:16 PM
1. "Updating FFmpeg and x264" has a cmdline that still removes libvpx0. Also I'm assuming that libvpx should be there to stay consistent with removing the custom packages.
Good catch. It's now gone.
2. "Reverting Changes Made by This Guide" removes the custom packages except for libvpx.
libvpx is already listed in this code box.
This might sound a little stupid, but I was having some issues with resampling from 5.1 surround to stereo...
This isn't stupid. FFmpeg isn't a good downmixer and it is one of the most obvious things lacking but I don't think it will be like that forever. SoX is one of the tools generally recommended for downmixing.
Smacker_626
May 4th, 2011, 02:49 PM
libvpx is already listed in this code box.
My mistake :P.
sailor420
May 5th, 2011, 08:30 PM
Quick question, and apologies if it's already been answered--I didn't see it.
Why would one use ffmpeg vs just calling x264 directly? Alternatively, why would one chose mencoder vs either of these? Just trying to figure out how it all fits together...
qyot27
May 5th, 2011, 09:26 PM
Quick question, and apologies if it's already been answered--I didn't see it.
Why would one use ffmpeg vs just calling x264 directly? Alternatively, why would one chose mencoder vs either of these? Just trying to figure out how it all fits together...
Force of habit and not wanting several steps to an encode process would be my guess. This was, of course, less true before x264 gained LAVF and FFMS2 input support and discounting the x264-audio branch that enables audio encoding.
For a long time, though, if you wanted to simply transcode file A to file B, FFmpeg was easier because you *usually* didn't have to worry what the input formats were, and you could get an output file that had both video and audio. Getting that same functionality in x264 is a matter of extra, optional dependencies - you don't have to build an x264 that can do those things.
sailor420
May 5th, 2011, 09:38 PM
Hmmm. Fair point. I'm trying to decide whether or not to rewrite my batch encoding script to use ffmpeg vs using mplayer to do resize/crop and then x264 to encode. Hoping ffmpeg might make it a bit easier to deal with deinterlacing...
FakeOutdoorsman
May 5th, 2011, 11:51 PM
Why would one use ffmpeg vs just calling x264 directly?
I will use FFmpeg if I want to use some of the filters that are lacking in x264.
Alternatively, why would one chose mencoder vs either of these?
I've never found much of a need for MEncoder, personally.
I'm trying to decide whether or not to rewrite my batch encoding script to use ffmpeg vs using mplayer to do resize/crop and then x264 to encode. Hoping ffmpeg might make it a bit easier to deal with deinterlacing...
I recommend using yadif to deinterlace, but be sure to test the yadif in both MPlayer and FFmpeg, because their yadif implementations may not be the same and their outputs may look different.
sailor420
May 5th, 2011, 11:55 PM
I recommend using yadif to deinterlace, but be sure to test the yadif in both MPlayer and FFmpeg, because their yadif implementations may not be the same and their outputs may look different.
Yeah, I tried yadif in mplayer and then piping the output from there into x264 via yuv4mpeg. Had a couple of problems with this--speed, some color distortion bands along the top and bottom, and possibly worst, it's somehow dropping frames--I end up with 1:45 of a 2:00 film for example, making everything a bit too fast and getting the audio way out of sync. Driving me nuts. I'm thinking about trying ffmpeg to see if it works better when de-interlacing...
BTW, thanks for the fantastic guide and all the support you've provided after the fact. Very helpful!
qyot27
May 6th, 2011, 12:40 AM
Hmmm. Fair point. I'm trying to decide whether or not to rewrite my batch encoding script to use ffmpeg vs using mplayer to do resize/crop and then x264 to encode. Hoping ffmpeg might make it a bit easier to deal with deinterlacing...
Well, I can't really comment on filtering, as for that I'd actually use AviSynth via Wine and then pipe out of Wine to the encoding program using avs2yuv or the like.
You might want to also take a look at the -vo-lavc branch (https://github.com/divVerent/mplayer/wiki/Mplayer-uau-vo-lavc) of MPlayer2 (http://www.mplayer2.org/). There's still some things mencoder can do that it can't, but those might be relatively minor in comparison.
sailor420
May 6th, 2011, 12:53 AM
Hmmm... OK, I'm getting a problem when trying to get ffmpeg to use multithreading. I set -threads 0, but am getting an error "automatic thread number detection not supported by codec". Thoughts?
Actual command is:
ffmpeg -i input.mkv -acodec libx264 -crf 22 -level 41 -preset slow -vf crop=720:352:0:62 -acodec copy -threads 0 output.mkv
FakeOutdoorsman
May 6th, 2011, 01:06 AM
Change "-acodec libx264" to "-vcodec libx264".
sailor420
May 6th, 2011, 01:31 AM
Change "-acodec libx264" to "-vcodec libx264".
#-o
I feel like a moron now. Many thanks for the help.
sailor420
May 6th, 2011, 05:02 PM
OK, another question... Is there any way to reduce the amount of data that ffmpeg is outputting to the shell? For example, it's printing out all of the chapters to the shell. I've tried -loglevel quiet, but that doesn't seem to be doing the trick.
qyot27
May 6th, 2011, 05:19 PM
OK, another question... Is there any way to reduce the amount of data that ffmpeg is outputting to the shell? For example, it's printing out all of the chapters to the shell. I've tried -loglevel quiet, but that doesn't seem to be doing the trick.
The verbosity level is adjusted with the -v option. It doesn't seem to have an effect on the source file data readout, though, just the output logging.
sailor420
May 6th, 2011, 05:21 PM
The verbosity level is adjusted with the -v option.
Many thanks, that's what I was looking for!
burek021
May 8th, 2011, 07:18 PM
FakeOutdoorsman, is it ok to place the link to this tutorial (with the first post copied, only), to make this tutorial available on our forum too?
We are creating an "official" (if you can even call it like that) FFmpeg forum, so we would like to have your tutorial there if you would allow that.
The link to the copied tutorial would be this: http://forum.ffmpeg.org/viewtopic.php?f=1&t=4
If you don't agree to such thing, we will delete that copy.
EDIT: forum.ffmpeg.org is not yet in the function, you can use this instead: http://ffmpeg.test-lab.ch/viewtopic.php?f=1&t=4
You can always find me at: irc://irc.freenode.net/ffmpeg if you need.
wim.glenn
May 9th, 2011, 09:13 AM
hi there :D i'm trying to do live streaming video for an interactive application so i need as low latency as i can get, i have found this thread to be EXTREMELY helpful. following the guide in the first post, i was able to build all the stuff from source with lavf enabled. the x264 encoder works beautifully. but ffserver segfaults, even just printing the usage message. is this a known problem? is anyone still using ffserver? if not what is a good free alternative?
thanks !!
Dudu_N7
May 9th, 2011, 03:38 PM
Hi !
Same problem here when trying to launch ffserver.
Sometimes I have a message "Deleting file '/tmp/feed1.ffm' as it appears to be corrupt" before the segfault.
I re-installed ffmpeg many time and once, ffserver did not segfault at the start but as soon as I did "ffmpeg http://localhost:8090/feed1.ffm" with any kind of input. I got this case only once.
My ffserver.conf file is the basic one found on http://www.ffmpeg.org/sample.html
I guess the versions on the git repository has a few bugs...
FakeOutdoorsman
May 9th, 2011, 07:03 PM
Unfortunately, I have almost no experience with FFserver, but I do know that this is a known bug:
Ticket #178: ffserver segfault (https://ffmpeg.org/trac/ffmpeg/ticket/178)
If you register (https://ffmpeg.org/trac/ffmpeg/register) you can CC yourself to the bug report to get e-mail nofitications of any updates to the report.
flibustier
May 12th, 2011, 12:58 PM
Got problem compiling ffmpeg on Ubuntu 11.04. On configure stage says "ERROR: libx264 not found". Building on Compaq Mini with Intel Atom CPU.
check_header x264.h
check_cpp
BEGIN /tmp/ffconf.peU2ku7I.c
1 #include <x264.h>
2 int x;
END /tmp/ffconf.peU2ku7I.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.slP988xH.o /tmp/ffconf.peU2ku7I.c
/tmp/ffconf.peU2ku7I.c:1:18: fatal error: x264.h: No such file or directory
compilation terminated.
ERROR: libx264 not found
Could it be problem with ./configure options of x264 on certain CPU?
andrew.46
May 12th, 2011, 01:05 PM
Can you post the results of the following command:
sudo find /usr -iname 'x264.h'
Andrew
flibustier
May 12th, 2011, 01:08 PM
Outputs this:
/usr/local/include/x264.h
UPD. Seems that I solved the problem.
with new x264 configure string
./configure --extra-cflags="-march=atom" --enable-pic --enable-shared
dualistic
May 12th, 2011, 03:54 PM
Hi,
I followed these great instructions on 11.04 and they work great!
However, I am now having trouble installing the ffmpeg-php extension. I tried recompiling x264 and ffmpeg with --enable-shared instead but it still was not finding my installation. Could someone please help with some instructions on how I can install ffmpeg-php?
Thanks!
andrew.46
May 12th, 2011, 10:12 PM
However, I am now having trouble installing the ffmpeg-php extension. I tried recompiling x264 and ffmpeg with --enable-shared instead but it still was not finding my installation. Could someone please help with some instructions on how I can install ffmpeg-php?
I have not really used FFmpeg-php myself but I had a quick look purely from curiosity (admittedly using a non-Ubuntu distro) and although phpize seemed to run ok:
andrew@skamandros~/Desktop/ffmpeg-php-0.6.0$ phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
and ./configure ran ok, picking up the FFmpeg libraries:
andrew@skamandros~/Desktop/ffmpeg-php-0.6.0$ ./configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/extensions
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for ffmpeg support... yes, shared
checking whether to force gd support in ffmpeg-php... no
checking for ffmpeg headers... ...found in /usr/include/libavcodec
checking for ffmpeg libavcodec.so... ...found in /usr/lib
checking for ffmpeg swscale support... yes
checking for ld used by cc... /usr/i486-slackware-linux/bin/ld
checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes
checking for /usr/i486-slackware-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
make crashed out with multiple errors in ffmpeg_movie.c, I demonstrate some of these here:
VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_pixelformat’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:850:57: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_codec_name’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:963:40: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getVideoCodec’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:989:58: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioCodec’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1009:58: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getVideoStreamId’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1029:60: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioStreamId’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051:60: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioChannels’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1089:53: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioSampleRate’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1125:59: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioBitRate’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1161:53: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getVideoBitRate’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1181:53: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_read_av_frame’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1204:13: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1215:13: warning: implicit declaration of function ‘avcodec_decode_video’
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1219:48: error: ‘PKT_FLAG_KEY’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_av_frame’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1246:57: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1282:24: error: ‘AVCodecContext’ has no member named ‘hurry_up’
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1284:24: error: ‘AVCodecContext’ has no member named ‘hurry_up’
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_sample_aspect_ratio’:
/home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1443:57: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
make: *** [ffmpeg_movie.lo] Error 1
Are these the errors that stopped your compilation? I shall crank up my Natty Narwhal installation and have a proper look later and hopefully an FFmpeg-php guru will also see your post :).
Edit: Mind you I picked up the latest FFmpeg-php from svn and saw this in the changelog:
version 0.6.3 (3/30/2009)
Bug Fixes
* Fixed compatibility with ffmpeg 0.5.0 release. ffmpeg-php is only
supporting offical releases from here on.
So I don't like your chances if the last supported FFmpeg build is so ancient :(.
dualistic
May 13th, 2011, 04:07 PM
Thanks for the reply Andrew!
Are these the errors that stopped your compilation?
Yes, those are the errors exactly (my phpize also worked fine). I think there is an ubuntu distribution that installs just fine (using apt-get) if you also install ffmpeg with apt-get, at least back with 9.04. Unfortunately installing ffmpeg with apt-get won't enable aac encoding and libx264.
However, following the instructions in the original post in this (awesome) thread, I can't get it to work.
andrew.46
May 13th, 2011, 10:02 PM
Yes, those are the errors exactly (my phpize also worked fine). I think there is an ubuntu distribution that installs just fine (using apt-get) if you also install ffmpeg with apt-get, at least back with 9.04. Unfortunately installing ffmpeg with apt-get won't enable aac encoding and libx264.
I guess it depends on how keen you are to get FFmpeg-php going. One possibility is to remove the FFmpeg installed in this guide and install the standard Ubuntu FFmpeg as well as FFmpeg-php and then consult Fakeutdoorsman's other guide:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg
http://ubuntuforums.org/showthread.php?t=1117283
to enable aac and libx264 encoding. Hopefully this will work although I have not tested it myself as I have no great use for FFmpeg-php. But then you lose all the great benefits of running the cutting edge FFmpeg :(.
qyot27
May 14th, 2011, 05:09 AM
I have zero experience with PHP or what ffmpeg-php does under the hood, so I can't say whether what I'm about to suggest is viable, but...
It just looks as though ffmpeg-php is outdated and unlikely to be picked up again in its (that one's) current form.
In looking on Google, though, I found this:
https://github.com/char0n/ffmpeg-php
A) I don't know if ffmpeg-php and the FFmpegPHP they're talking about are the same;
B) I don't know, if A is true, if that github project is a pure drop-in replacement;
C) If A and B are true, at least the github project is being maintained. The latest commit was from three days ago. Chances of it supporting current versions of ffmpeg are probably much greater.
Something to consider, at any rate.
WhatEverMD
May 14th, 2011, 10:51 AM
Thank You for this awsome thread. Used it many time searching for solutions :).
On Ubuntu 10.04, 10.10 everything went fine. But now can't configure
ffmpeg on linux mint 9 isadora 64-bit.
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
ERROR: libx264 not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
andrew.46
May 14th, 2011, 12:19 PM
Hi WhatEverMD,
There can be a few reasons, perhaps the most basic being your system does not have x264 installed, the version is too old, you have a mix of old and new x264 libraries or it is in a location that FFmpeg cannot see. Can you run the following command in red:
andrew@skamandros~$ sudo find /usr -iname '*libx264*'
/usr/lib/vlc/plugins/codec/libx264_plugin.la
/usr/lib/vlc/plugins/codec/libx264_plugin.so
/usr/lib/libx264.so.115
/usr/lib/libx264.a
/usr/lib/libx264.so
/usr/share/ffmpeg/libx264-lossless_slow.ffpreset
/usr/share/ffmpeg/libx264-baseline.ffpreset
/usr/share/ffmpeg/libx264-lossless_slower.ffpreset
/usr/share/ffmpeg/libx264-lossless_fast.ffpreset
/usr/share/ffmpeg/libx264-lossless_max.ffpreset
/usr/share/ffmpeg/libx264-lossless_ultrafast.ffpreset
/usr/share/ffmpeg/libx264-ipod320.ffpreset
/usr/share/ffmpeg/libx264-ipod640.ffpreset
/usr/share/ffmpeg/libx264-lossless_medium.ffpreset
The blue shows what you should see on your system + a few extras, plus demonstrates the common location although /usr/local/lib is another possibility. If you post the results of this command this will be a starting point :). Could you hunt out the config.log as well and post the relevant section?
Edit: Mind you a better search would be:
$ sudo find /usr -iname '*x264*'
/usr/doc/x264-15052011
/usr/doc/x264-15052011/x264.SlackBuild
/usr/lib/pkgconfig/x264.pc
/usr/lib/vlc/plugins/codec/libx264_plugin.la
/usr/lib/vlc/plugins/codec/libx264_plugin.so
/usr/lib/libx264.so.115
/usr/lib/libx264.so
/usr/bin/x264
/usr/include/x264_config.h
/usr/include/x264.h
/usr/share/ffmpeg/libx264-lossless_slow.ffpreset
/usr/share/ffmpeg/libx264-baseline.ffpreset
/usr/share/ffmpeg/libx264-lossless_slower.ffpreset
/usr/share/ffmpeg/libx264-lossless_fast.ffpreset
/usr/share/ffmpeg/libx264-lossless_max.ffpreset
/usr/share/ffmpeg/libx264-lossless_ultrafast.ffpreset
/usr/share/ffmpeg/libx264-ipod320.ffpreset
/usr/share/ffmpeg/libx264-ipod640.ffpreset
/usr/share/ffmpeg/libx264-lossless_medium.ffpreset
vagrale13
May 14th, 2011, 02:29 PM
Same problem on Natty
:~$ sudo find /usr -iname '*libx264*'
/usr/local/share/ffmpeg/libx264-lossless_slow.ffpreset
/usr/local/share/ffmpeg/libx264-ipod640.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_max.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_medium.ffpreset
/usr/local/share/ffmpeg/libx264-ipod320.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_ultrafast.ffpreset
/usr/local/share/ffmpeg/libx264-baseline.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_slower.ffpreset
/usr/local/share/ffmpeg/libx264-lossless_fast.ffpreset
/usr/share/doc/libx264-106
/usr/lib/i686/sse2/libx264.so.106
/usr/lib/libx264.so.106
/usr/lib/vlc/plugins/codec/libx264_plugin.soand the log
# ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
ACODEC_TESTS='ac3_fixed_test
adpcm_ima_qt_test
adpcm_ima_wav_test
adpcm_ms_test
adpcm_swf_test
adpcm_yam_test
alac_test
flac_test
g726_test
mp2_test
pcm_test
wmav1_test
wmav2_test'
ARCH_EXT_LIST='
altivec
amd3dnow
amd3dnowext
armv5te
armv6
armv6t2
armvfp
avx
iwmmxt
mmi
mmx
mmx2
neon
ppc4xx
sse
ssse3
vis
'
ARCH_LIST='
alpha
arm
avr32
avr32_ap
avr32_uc
bfin
ia64
m68k
mips
mips64
parisc
ppc
ppc64
s390
sh4
sparc
sparc64
tomi
x86
x86_32
x86_64
'
BSF_LIST='aac_adtstoasc_bsf
chomp_bsf
dump_extradata_bsf
h264_mp4toannexb_bsf
imx_dump_header_bsf
mjpeg2jpeg_bsf
mjpega_dump_header_bsf
mp3_header_compress_bsf
mp3_header_decompress_bsf
mov2textsub_bsf
noise_bsf
remove_extradata_bsf
text2movsub_bsf'
CC_O='-o $@'
CMDLINE_APPEND='
extra_cflags
'
CMDLINE_SELECT='
altivec
amd3dnow
amd3dnowext
armv5te
armv6
armv6t2
armvfp
avx
iwmmxt
mmi
mmx
mmx2
neon
ppc4xx
sse
ssse3
vis
bsfs
decoders
demuxers
encoders
filters
hwaccels
indevs
muxers
outdevs
parsers
protocols
aandct
ac3dsp
avcodec
avdevice
avfilter
avformat
avisynth
bzlib
crystalhd
dct
doc
dwt
dxva2
fastdiv
ffmpeg
ffplay
ffprobe
ffserver
fft
frei0r
golomb
gpl
gray
h264dsp
h264pred
hardcoded_tables
huffman
libcelt
libdc1394
libdirac
libfaac
libfreetype
libgsm
libmp3lame
libnut
libopencore_amrnb
libopencore_amrwb
libopencv
libopenjpeg
librtmp
libschroedinger
libspeex
libtheora
libvo_aacenc
libvo_amrwbenc
libvorbis
libvpx
libx264
libxavs
libxvid
lpc
lsp
mdct
memalign_hack
mlib
network
nonfree
pic
postproc
rdft
rtpdec
runtime_cpudetect
shared
sinewin
small
sram
static
swscale
swscale_alpha
vaapi
vdpau
version3
x11grab
zlib
pthreads
w32threads
asm
cross_compile
debug
extra_warnings
logging
optimizations
stripping
symver
yasm
'
CMDLINE_SET='
bindir
datadir
incdir
libdir
mandir
prefix
shlibdir
ar
arch
as
build_suffix
cc
cpu
cross_prefix
dep_cc
extra_version
host_cc
host_cflags
host_ldflags
host_libs
host_os
ld
logfile
malloc_prefix
nm
pkg_config
samples
source_path
strip
sysinclude
sysroot
target_exec
target_os
target_path
'
COLORTERM='gnome-terminal'
COMPONENT_LIST='
bsfs
decoders
demuxers
encoders
filters
hwaccels
indevs
muxers
outdevs
parsers
protocols
'
CONFIG_EXTRA='
avutil
gplv3
lgplv3
'
CONFIG_LIST='
bsfs
decoders
demuxers
encoders
filters
hwaccels
indevs
muxers
outdevs
parsers
protocols
aandct
ac3dsp
avcodec
avdevice
avfilter
avformat
avisynth
bzlib
crystalhd
dct
doc
dwt
dxva2
fastdiv
ffmpeg
ffplay
ffprobe
ffserver
fft
frei0r
golomb
gpl
gray
h264dsp
h264pred
hardcoded_tables
huffman
libcelt
libdc1394
libdirac
libfaac
libfreetype
libgsm
libmp3lame
libnut
libopencore_amrnb
libopencore_amrwb
libopencv
libopenjpeg
librtmp
libschroedinger
libspeex
libtheora
libvo_aacenc
libvo_amrwbenc
libvorbis
libvpx
libx264
libxavs
libxvid
lpc
lsp
mdct
memalign_hack
mlib
network
nonfree
pic
postproc
rdft
rtpdec
runtime_cpudetect
shared
sinewin
small
sram
static
swscale
swscale_alpha
vaapi
vdpau
version3
x11grab
zlib
'
DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-oi55klkVqZ,guid=7a09a73d284db08ac442f0fb0000002f'
DECODER_LIST='aasc_decoder
amv_decoder
anm_decoder
ansi_decoder
asv1_decoder
asv2_decoder
aura_decoder
aura2_decoder
avs_decoder
bethsoftvid_decoder
bfi_decoder
bink_decoder
bmp_decoder
c93_decoder
cavs_decoder
cdgraphics_decoder
cinepak_decoder
cljr_decoder
cscd_decoder
cyuv_decoder
dfa_decoder
dnxhd_decoder
dpx_decoder
dsicinvideo_decoder
dvvideo_decoder
dxa_decoder
eacmv_decoder
eamad_decoder
eatgq_decoder
eatgv_decoder
eatqi_decoder
eightbps_decoder
eightsvx_exp_decoder
eightsvx_fib_decoder
escape124_decoder
ffv1_decoder
ffvhuff_decoder
flashsv_decoder
flic_decoder
flv_decoder
fourxm_decoder
fraps_decoder
frwu_decoder
gif_decoder
h261_decoder
h263_decoder
h263i_decoder
h264_decoder
h264_crystalhd_decoder
h264_vdpau_decoder
huffyuv_decoder
idcin_decoder
iff_byterun1_decoder
iff_ilbm_decoder
indeo2_decoder
indeo3_decoder
indeo5_decoder
interplay_video_decoder
jpegls_decoder
jv_decoder
kgv1_decoder
kmvc_decoder
lagarith_decoder
loco_decoder
mdec_decoder
mimic_decoder
mjpeg_decoder
mjpegb_decoder
mmvideo_decoder
motionpixels_decoder
mpeg_xvmc_decoder
mpeg1video_decoder
mpeg2video_decoder
mpeg4_decoder
mpeg4_crystalhd_decoder
mpeg4_vdpau_decoder
mpegvideo_decoder
mpeg_vdpau_decoder
mpeg1_vdpau_decoder
mpeg2_crystalhd_decoder
msmpeg4_crystalhd_decoder
msmpeg4v1_decoder
msmpeg4v2_decoder
msmpeg4v3_decoder
msrle_decoder
msvideo1_decoder
mszh_decoder
mxpeg_decoder
nuv_decoder
pam_decoder
pbm_decoder
pcx_decoder
pgm_decoder
pgmyuv_decoder
pictor_decoder
png_decoder
ppm_decoder
ptx_decoder
qdraw_decoder
qpeg_decoder
qtrle_decoder
r10k_decoder
r210_decoder
rawvideo_decoder
rl2_decoder
roq_decoder
rpza_decoder
rv10_decoder
rv20_decoder
rv30_decoder
rv40_decoder
s302m_decoder
sgi_decoder
smacker_decoder
smc_decoder
snow_decoder
sp5x_decoder
sunrast_decoder
svq1_decoder
svq3_decoder
targa_decoder
theora_decoder
thp_decoder
tiertexseqvideo_decoder
tiff_decoder
tmv_decoder
truemotion1_decoder
truemotion2_decoder
tscc_decoder
txd_decoder
ulti_decoder
v210_decoder
v210x_decoder
vb_decoder
vc1_decoder
vc1_crystalhd_decoder
vc1_vdpau_decoder
vcr1_decoder
vmdvideo_decoder
vmnc_decoder
vp3_decoder
vp5_decoder
vp6_decoder
vp6a_decoder
vp6f_decoder
vp8_decoder
vqa_decoder
wmv1_decoder
wmv2_decoder
wmv3_decoder
wmv3_crystalhd_decoder
wmv3_vdpau_decoder
wnv1_decoder
xan_wc3_decoder
xan_wc4_decoder
xl_decoder
yop_decoder
zlib_decoder
zmbv_decoder
aac_decoder
aac_latm_decoder
ac3_decoder
alac_decoder
als_decoder
amrnb_decoder
amrwb_decoder
ape_decoder
atrac1_decoder
atrac3_decoder
binkaudio_dct_decoder
binkaudio_rdft_decoder
cook_decoder
dca_decoder
dsicinaudio_decoder
eac3_decoder
flac_decoder
gsm_decoder
gsm_ms_decoder
imc_decoder
mace3_decoder
mace6_decoder
mlp_decoder
mp1_decoder
mp1float_decoder
mp2_decoder
mp2float_decoder
mp3_decoder
mp3float_decoder
mp3adu_decoder
mp3adufloat_decoder
mp3on4_decoder
mp3on4float_decoder
mpc7_decoder
mpc8_decoder
nellymoser_decoder
qcelp_decoder
qdm2_decoder
ra_144_decoder
ra_288_decoder
shorten_decoder
sipr_decoder
smackaud_decoder
sonic_decoder
truehd_decoder
truespeech_decoder
tta_decoder
twinvq_decoder
vmdaudio_decoder
vorbis_decoder
wavpack_decoder
wmapro_decoder
wmav1_decoder
wmav2_decoder
wmavoice_decoder
ws_snd1_decoder
pcm_alaw_decoder
pcm_bluray_decoder
pcm_dvd_decoder
pcm_f32be_decoder
pcm_f32le_decoder
pcm_f64be_decoder
pcm_f64le_decoder
pcm_lxf_decoder
pcm_mulaw_decoder
pcm_s8_decoder
pcm_s16be_decoder
pcm_s16le_decoder
pcm_s16le_planar_decoder
pcm_s24be_decoder
pcm_s24daud_decoder
pcm_s24le_decoder
pcm_s32be_decoder
pcm_s32le_decoder
pcm_u8_decoder
pcm_u16be_decoder
pcm_u16le_decoder
pcm_u24be_decoder
pcm_u24le_decoder
pcm_u32be_decoder
pcm_u32le_decoder
pcm_zork_decoder
interplay_dpcm_decoder
roq_dpcm_decoder
sol_dpcm_decoder
xan_dpcm_decoder
adpcm_4xm_decoder
adpcm_adx_decoder
adpcm_ct_decoder
adpcm_ea_decoder
adpcm_ea_maxis_xa_decoder
adpcm_ea_r1_decoder
adpcm_ea_r2_decoder
adpcm_ea_r3_decoder
adpcm_ea_xas_decoder
adpcm_g722_decoder
adpcm_g726_decoder
adpcm_ima_amv_decoder
adpcm_ima_dk3_decoder
adpcm_ima_dk4_decoder
adpcm_ima_ea_eacs_decoder
adpcm_ima_ea_sead_decoder
adpcm_ima_iss_decoder
adpcm_ima_qt_decoder
adpcm_ima_smjpeg_decoder
adpcm_ima_wav_decoder
adpcm_ima_ws_decoder
adpcm_ms_decoder
adpcm_sbpro_2_decoder
adpcm_sbpro_3_decoder
adpcm_sbpro_4_decoder
adpcm_swf_decoder
adpcm_thp_decoder
adpcm_xa_decoder
adpcm_yamaha_decoder
***_decoder
dvbsub_decoder
dvdsub_decoder
pgssub_decoder
srt_decoder
xsub_decoder
libcelt_decoder
libdirac_decoder
libgsm_decoder
libgsm_ms_decoder
libopencore_amrnb_decoder
libopencore_amrwb_decoder
libopenjpeg_decoder
libschroedinger_decoder
libspeex_decoder
libvpx_decoder'
DEFAULTS_PATH='/usr/share/gconf/gnome-classic.default.path'
DEMUXER_LIST='aac_demuxer
ac3_demuxer
aea_demuxer
aiff_demuxer
amr_demuxer
anm_demuxer
apc_demuxer
ape_demuxer
applehttp_demuxer
asf_demuxer
***_demuxer
au_demuxer
avi_demuxer
avisynth_demuxer
avs_demuxer
bethsoftvid_demuxer
bfi_demuxer
bink_demuxer
c93_demuxer
caf_demuxer
cavsvideo_demuxer
cdg_demuxer
daud_demuxer
dfa_demuxer
dirac_demuxer
dnxhd_demuxer
dsicin_demuxer
dts_demuxer
dv_demuxer
dxa_demuxer
ea_demuxer
ea_cdata_demuxer
eac3_demuxer
ffm_demuxer
ffmetadata_demuxer
filmstrip_demuxer
flac_demuxer
flic_demuxer
flv_demuxer
fourxm_demuxer
g722_demuxer
gsm_demuxer
gxf_demuxer
h261_demuxer
h263_demuxer
h264_demuxer
idcin_demuxer
iff_demuxer
image2_demuxer
image2pipe_demuxer
ingenient_demuxer
ipmovie_demuxer
iss_demuxer
iv8_demuxer
ivf_demuxer
jv_demuxer
lmlm4_demuxer
lxf_demuxer
m4v_demuxer
matroska_demuxer
microdvd_demuxer
mjpeg_demuxer
mlp_demuxer
mm_demuxer
mmf_demuxer
mov_demuxer
mp3_demuxer
mpc_demuxer
mpc8_demuxer
mpegps_demuxer
mpegts_demuxer
mpegtsraw_demuxer
mpegvideo_demuxer
msnwc_tcp_demuxer
mtv_demuxer
mvi_demuxer
mxf_demuxer
mxg_demuxer
nc_demuxer
nsv_demuxer
nut_demuxer
nuv_demuxer
ogg_demuxer
oma_demuxer
pcm_alaw_demuxer
pcm_mulaw_demuxer
pcm_f64be_demuxer
pcm_f64le_demuxer
pcm_f32be_demuxer
pcm_f32le_demuxer
pcm_s32be_demuxer
pcm_s32le_demuxer
pcm_s24be_demuxer
pcm_s24le_demuxer
pcm_s16be_demuxer
pcm_s16le_demuxer
pcm_s8_demuxer
pcm_u32be_demuxer
pcm_u32le_demuxer
pcm_u24be_demuxer
pcm_u24le_demuxer
pcm_u16be_demuxer
pcm_u16le_demuxer
pcm_u8_demuxer
pmp_demuxer
pva_demuxer
qcp_demuxer
r3d_demuxer
rawvideo_demuxer
rl2_demuxer
rm_demuxer
roq_demuxer
rpl_demuxer
rso_demuxer
rtp_demuxer
rtsp_demuxer
sap_demuxer
sdp_demuxer
segafilm_demuxer
shorten_demuxer
siff_demuxer
smacker_demuxer
sol_demuxer
sox_demuxer
spdif_demuxer
srt_demuxer
str_demuxer
swf_demuxer
thp_demuxer
tiertexseq_demuxer
tmv_demuxer
truehd_demuxer
tta_demuxer
txd_demuxer
tty_demuxer
vc1_demuxer
vc1t_demuxer
vmd_demuxer
voc_demuxer
vqf_demuxer
w64_demuxer
wav_demuxer
wc3_demuxer
wsaud_demuxer
wsvqa_demuxer
wtv_demuxer
wv_demuxer
xa_demuxer
xwma_demuxer
yop_demuxer
yuv4mpegpipe_demuxer
libnut_demuxer'
DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)'
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
DESKTOP_SESSION='gnome-classic'
DISPLAY=':0.0'
E1='0'
E2='2'
ENCODER_LIST='a64multi_encoder
a64multi5_encoder
asv1_encoder
asv2_encoder
bmp_encoder
dnxhd_encoder
dpx_encoder
dvvideo_encoder
ffv1_encoder
ffvhuff_encoder
flashsv_encoder
flashsv2_encoder
flv_encoder
gif_encoder
h261_encoder
h263_encoder
h263p_encoder
huffyuv_encoder
jpegls_encoder
ljpeg_encoder
mjpeg_encoder
mpeg1video_encoder
mpeg2video_encoder
mpeg4_encoder
msmpeg4v1_encoder
msmpeg4v2_encoder
msmpeg4v3_encoder
msvideo1_encoder
pam_encoder
pbm_encoder
pcx_encoder
pgm_encoder
pgmyuv_encoder
png_encoder
ppm_encoder
qtrle_encoder
rawvideo_encoder
roq_encoder
rv10_encoder
rv20_encoder
sgi_encoder
snow_encoder
svq1_encoder
targa_encoder
tiff_encoder
v210_encoder
wmv1_encoder
wmv2_encoder
zlib_encoder
zmbv_encoder
aac_encoder
ac3_encoder
ac3_fixed_encoder
ac3_float_encoder
alac_encoder
dca_encoder
flac_encoder
mp2_encoder
nellymoser_encoder
ra_144_encoder
sonic_encoder
sonic_ls_encoder
vorbis_encoder
wmav1_encoder
wmav2_encoder
pcm_alaw_encoder
pcm_f32be_encoder
pcm_f32le_encoder
pcm_f64be_encoder
pcm_f64le_encoder
pcm_mulaw_encoder
pcm_s8_encoder
pcm_s16be_encoder
pcm_s16le_encoder
pcm_s24be_encoder
pcm_s24daud_encoder
pcm_s24le_encoder
pcm_s32be_encoder
pcm_s32le_encoder
pcm_u8_encoder
pcm_u16be_encoder
pcm_u16le_encoder
pcm_u24be_encoder
pcm_u24le_encoder
pcm_u32be_encoder
pcm_u32le_encoder
pcm_zork_encoder
roq_dpcm_encoder
adpcm_adx_encoder
adpcm_g722_encoder
adpcm_g726_encoder
adpcm_ima_qt_encoder
adpcm_ima_wav_encoder
adpcm_ms_encoder
adpcm_swf_encoder
adpcm_yamaha_encoder
***_encoder
dvbsub_encoder
dvdsub_encoder
srt_encoder
xsub_encoder
libdirac_encoder
libfaac_encoder
libgsm_encoder
libgsm_ms_encoder
libmp3lame_encoder
libopencore_amrnb_encoder
libschroedinger_encoder
libtheora_encoder
libvo_aacenc_encoder
libvo_amrwbenc_encoder
libvorbis_encoder
libvpx_encoder
libx264_encoder
libxavs_encoder
libxvid_encoder'
FFMPEG_CONFIGURATION='--enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab'
FFSERVERLDFLAGS='-Wl,-E'
FILTER_LIST='anull_filter
anullsrc_filter
anullsink_filter
blackframe_filter
copy_filter
crop_filter
cropdetect_filter
drawbox_filter
drawtext_filter
fade_filter
fieldorder_filter
fifo_filter
format_filter
frei0r_filter
gradfun_filter
hflip_filter
hqdn3d_filter
mp_filter
noformat_filter
null_filter
ocv_filter
overlay_filter
pad_filter
pixdesctest_filter
scale_filter
setdar_filter
setpts_filter
setsar_filter
settb_filter
showinfo_filter
slicify_filter
transpose_filter
unsharp_filter
vflip_filter
yadif_filter
buffer_filter
color_filter
frei0r_src_filter
movie_filter
nullsrc_filter
nullsink_filter'
FULLNAME='$(NAME)$(BUILDSUF)'
GDMSESSION='gnome-classic'
GDM_KEYBOARD_LAYOUT='us'
GDM_LANG='el_GR.utf8'
GNOME_DESKTOP_SESSION_ID='this-is-deprecated'
GNOME_KEYRING_CONTROL='/tmp/keyring-T84EQ4'
GNOME_KEYRING_PID='1569'
GTK_MODULES='canberra-gtk-module:canberra-gtk-module'
HAVE_LIST='
altivec
amd3dnow
amd3dnowext
armv5te
armv6
armv6t2
armvfp
avx
iwmmxt
mmi
mmx
mmx2
neon
ppc4xx
sse
ssse3
vis
bigendian
fast_unaligned
pthreads
w32threads
aligned_stack
alsa_asoundlib_h
altivec_h
arpa_inet_h
attribute_may_alias
attribute_packed
bswap
closesocket
cmov
dcbzl
dev_bktr_ioctl_bt848_h
dev_bktr_ioctl_meteor_h
dev_ic_bt8xx_h
dev_video_meteor_ioctl_meteor_h
dev_video_bktr_ioctl_bt848_h
dlfcn_h
dlopen
dos_paths
ebp_available
ebx_available
exp2
exp2f
fast_64bit
fast_clz
fast_cmov
fcntl
fork
getaddrinfo
gethrtime
GetProcessMemoryInfo
GetProcessTimes
getrusage
gnu_as
struct_rusage_ru_maxrss
ibm_asm
inet_aton
inline_asm
isatty
kbhit
ldbrx
libdc1394_1
libdc1394_2
llrint
llrintf
local_aligned_16
local_aligned_8
localtime_r
log2
log2f
loongson
lrint
lrintf
lzo1x_999_compress
machine_ioctl_bt848_h
machine_ioctl_meteor_h
malloc_h
MapViewOfFile
memalign
mkstemp
mmap
pld
posix_memalign
round
roundf
sdl
sdl_video_size
setmode
sndio_h
socklen_t
soundcard_h
poll_h
setrlimit
strerror_r
strtok_r
struct_addrinfo
struct_ipv6_mreq
struct_sockaddr_in6
struct_sockaddr_sa_len
struct_sockaddr_storage
symver
symver_gnu_asm
symver_asm_label
sys_mman_h
sys_resource_h
sys_select_h
sys_soundcard_h
sys_videoio_h
ten_operands
termios_h
threads
trunc
truncf
vfp_args
VirtualAlloc
winsock2_h
xform_asm
xmm_clobbers
yasm
'
HAVE_LIST_PUB='
bigendian
fast_unaligned
'
HOME='/home/vagelis'
HWACCEL_LIST='h263_vaapi_hwaccel
h264_dxva2_hwaccel
h264_vaapi_hwaccel
mpeg1_vdpau_hwaccel
mpeg2_dxva2_hwaccel
mpeg2_vaapi_hwaccel
mpeg2_vdpau_hwaccel
mpeg4_vaapi_hwaccel
vc1_dxva2_hwaccel
vc1_vaapi_hwaccel
wmv3_dxva2_hwaccel
wmv3_vaapi_hwaccel'
IFS='
'
INDEV_LIST='alsa_indev
bktr_indev
dv1394_indev
fbdev_indev
jack_indev
oss_indev
sndio_indev
v4l2_indev
v4l_indev
vfwcap_indev
x11_grab_device_indev
libdc1394_indev'
LANG='el_GR.UTF-8'
LANGUAGE='el_GR:en'
LAVFI_TESTS='crop_test
crop_scale_test
crop_scale_vflip_test
crop_vflip_test
null_test
pixdesc_be_test
pixdesc_le_test
pixfmts_copy_le_test
pixfmts_crop_le_test
pixfmts_hflip_le_test
pixfmts_null_le_test
pixfmts_pad_le_test
pixfmts_scale_le_test
pixfmts_vflip_le_test
scale200_test
scale500_test
vflip_test
vflip_crop_test
vflip_vflip_test'
LAVF_TESTS='aiff_test
alaw_test
asf_test
au_test
avi_test
bmp_test
dv_fmt_test
ffm_test
flv_fmt_test
gif_test
gxf_test
jpg_test
mkv_test
mmf_test
mov_test
mpg_test
mulaw_test
mxf_test
nut_test
ogg_test
pbmpipe_test
pcx_test
pgm_test
pgmpipe_test
pixfmt_test
png_test
ppm_test
ppmpipe_test
rm_test
sgi_test
swf_test
tga_test
tiff_test
ts_test
voc_test
voc_s16_test
wav_test
yuv4mpeg_test'
LC_ALL='C'
LESSCLOSE='/usr/bin/lesspipe %s %s'
LESSOPEN='| /usr/bin/lesspipe %s'
LIBNAME='$(LIBPREF)$(FULLNAME)$(LIBSUF)'
LIBPREF='lib'
LIBSUF='.a'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
LOGNAME='vagelis'
LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:s o=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31; 01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st =37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;3 1:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31 :*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz= 01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31 :*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*. deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ac e=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=0 1;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01 ;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;3 5:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35 :*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35: *.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:* .m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m 4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv =01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=0 1;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01; 35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:* .yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.a nx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au= 00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka= 00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00; 36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36 :*.xspf=00;36:'
MANDATORY_PATH='/usr/share/gconf/gnome-classic.mandatory.path'
MUXER_LIST='a64_muxer
ac3_muxer
adts_muxer
aiff_muxer
amr_muxer
asf_muxer
***_muxer
asf_stream_muxer
au_muxer
avi_muxer
avm2_muxer
cavsvideo_muxer
crc_muxer
daud_muxer
dirac_muxer
dnxhd_muxer
dts_muxer
dv_muxer
eac3_muxer
ffm_muxer
ffmetadata_muxer
filmstrip_muxer
flac_muxer
flv_muxer
framecrc_muxer
framemd5_muxer
g722_muxer
gif_muxer
gxf_muxer
h261_muxer
h263_muxer
h264_muxer
image2_muxer
image2pipe_muxer
ipod_muxer
ivf_muxer
m4v_muxer
md5_muxer
matroska_muxer
matroska_audio_muxer
microdvd_muxer
mjpeg_muxer
mlp_muxer
mmf_muxer
mov_muxer
mp2_muxer
mp3_muxer
mp4_muxer
mpeg1system_muxer
mpeg1vcd_muxer
mpeg1video_muxer
mpeg2dvd_muxer
mpeg2svcd_muxer
mpeg2video_muxer
mpeg2vob_muxer
mpegts_muxer
mpjpeg_muxer
mxf_muxer
mxf_d10_muxer
null_muxer
nut_muxer
ogg_muxer
pcm_alaw_muxer
pcm_mulaw_muxer
pcm_f64be_muxer
pcm_f64le_muxer
pcm_f32be_muxer
pcm_f32le_muxer
pcm_s32be_muxer
pcm_s32le_muxer
pcm_s24be_muxer
pcm_s24le_muxer
pcm_s16be_muxer
pcm_s16le_muxer
pcm_s8_muxer
pcm_u32be_muxer
pcm_u32le_muxer
pcm_u24be_muxer
pcm_u24le_muxer
pcm_u16be_muxer
pcm_u16le_muxer
pcm_u8_muxer
psp_muxer
rawvideo_muxer
rm_muxer
roq_muxer
rso_muxer
rtp_muxer
rtsp_muxer
sap_muxer
sox_muxer
spdif_muxer
srt_muxer
swf_muxer
tg2_muxer
tgp_muxer
truehd_muxer
vc1t_muxer
voc_muxer
wav_muxer
webm_muxer
yuv4mpegpipe_muxer
libnut_muxer'
OLDPWD='/home/vagelis/codec'
OPTIND='1'
ORBIT_SOCKETDIR='/tmp/orbit-vagelis'
OUTDEV_LIST='alsa_outdev
oss_outdev
sndio_outdev'
PARSER_LIST='aac_parser
aac_latm_parser
ac3_parser
cavsvideo_parser
dca_parser
dirac_parser
dnxhd_parser
dvbsub_parser
dvdsub_parser
flac_parser
h261_parser
h263_parser
h264_parser
mjpeg_parser
mlp_parser
mpeg4video_parser
mpegaudio_parser
mpegvideo_parser
pnm_parser
vc1_parser
vp3_parser
vp8_parser'
PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/real/RealPlayer'
PATHS_LIST='
bindir
datadir
incdir
libdir
mandir
prefix
shlibdir
'
PPID='3805'
PROTOCOL_LIST='applehttp_protocol
concat_protocol
crypto_protocol
file_protocol
gopher_protocol
http_protocol
mmsh_protocol
mmst_protocol
md5_protocol
pipe_protocol
rtmp_protocol
rtmpt_protocol
rtmpe_protocol
rtmpte_protocol
rtmps_protocol
rtp_protocol
tcp_protocol
udp_protocol'
PS1='$ '
PS2='> '
PS4='+ '
PWD='/home/vagelis/codec/ffmpeg'
SEEK_TESTS='seek_ac3_rm_test
seek_adpcm_ima_wav_test
seek_adpcm_ms_wav_test
seek_adpcm_qt_aiff_test
seek_adpcm_swf_flv_test
seek_adpcm_yam_wav_test
seek_alac_m4a_test
seek_asv1_avi_test
seek_asv2_avi_test
seek_dnxhd_1080i_mov_test
seek_dnxhd_720p_dnxhd_test
seek_dnxhd_720p_rd_dnxhd_test
seek_dv411_dv_test
seek_dv50_dv_test
seek_dv_dv_test
seek_error_mpeg4_adv_avi_test
seek_ffv1_avi_test
seek_flac_flac_test
seek_flashsv_flv_test
seek_flv_flv_test
seek_g726_wav_test
seek_h261_avi_test
seek_h263_avi_test
seek_h263p_avi_test
seek_huffyuv_avi_test
seek_image_bmp_test
seek_image_jpg_test
seek_image_pcx_test
seek_image_pgm_test
seek_image_ppm_test
seek_image_sgi_test
seek_image_tga_test
seek_image_tiff_test
seek_jpegls_avi_test
seek_lavf_aif_test
seek_lavf_al_test
seek_lavf_asf_test
seek_lavf_au_test
seek_lavf_avi_test
seek_lavf_dv_test
seek_lavf_ffm_test
seek_lavf_flv_test
seek_lavf_gif_test
seek_lavf_gxf_test
seek_lavf_mkv_test
seek_lavf_mmf_test
seek_lavf_mov_test
seek_lavf_mpg_test
seek_lavf_mxf_test
seek_lavf_mxf_d10_test
seek_lavf_nut_test
seek_lavf_ogg_test
seek_lavf_rm_test
seek_lavf_swf_test
seek_lavf_ts_test
seek_lavf_ul_test
seek_lavf_voc_test
seek_lavf_wav_test
seek_lavf_y4m_test
seek_ljpeg_avi_test
seek_mjpeg_avi_test
seek_mp2_mp2_test
seek_mpeg1_mpg_test
seek_mpeg1b_mpg_test
seek_mpeg2_422_mpg_test
seek_mpeg2_mpg_test
seek_mpeg2i_mpg_test
seek_mpeg2ivlc_qprd_mpg_test
seek_mpeg2reuse_mpg_test
seek_mpeg2thread_mpg_test
seek_mpeg2threadivlc_mpg_test
seek_mpeg4_adap_avi_test
seek_mpeg4_adv_avi_test
seek_mpeg4_nr_avi_test
seek_mpeg4_qprd_avi_test
seek_mpeg4_rc_avi_test
seek_mpeg4_thread_avi_test
seek_msmpeg4_avi_test
seek_msmpeg4v2_avi_test
seek_odivx_mp4_test
seek_pbmpipe_pbm_test
seek_pcm_alaw_wav_test
seek_pcm_f32be_au_test
seek_pcm_f32le_wav_test
seek_pcm_f64be_au_test
seek_pcm_f64le_wav_test
seek_pcm_mulaw_wav_test
seek_pcm_s16be_mkv_test
seek_pcm_s16be_mov_test
seek_pcm_s16le_mkv_test
seek_pcm_s16le_wav_test
seek_pcm_s24be_mov_test
seek_pcm_s24daud_302_test
seek_pcm_s24le_wav_test
seek_pcm_s32be_mov_test
seek_pcm_s32le_wav_test
seek_pcm_s8_mov_test
seek_pcm_u8_wav_test
seek_pcm_zork_wav_test
seek_pgmpipe_pgm_test
seek_ppmpipe_ppm_test
seek_rgb_avi_test
seek_roqav_roq_test
seek_rv10_rm_test
seek_rv20_rm_test
seek_snow53_avi_test
seek_snow_avi_test
seek_svq1_mov_test
seek_wmav1_asf_test
seek_wmav2_asf_test
seek_wmv1_avi_test
seek_wmv2_avi_test
seek_yuv_avi_test'
SESSION_MANAGER='local/vagrale-laptop:@/tmp/.ICE-unix/1588,unix/vagrale-laptop:/tmp/.ICE-unix/1588'
SHELL='/bin/bash'
SHFLAGS='-shared -Wl,-soname,$$(@F)'
SHLVL='1'
SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
SLIBPREF='lib'
SLIBSUF='.so'
SPEECHD_PORT='7562'
SSH_AGENT_PID='1626'
SSH_AUTH_SOCK='/tmp/keyring-T84EQ4/ssh'
TERM='xterm'
THREADS_LIST='
pthreads
w32threads
'
UBUNTU_MENUPROXY='libappmenu.so'
USER='vagelis'
USERNAME='vagelis'
VCODEC_TESTS='asv1_test
asv2_test
dnxhd_1080i_test
dnxhd_720p_test
dnxhd_720p_rd_test
dv_test
dv50_test
error_test
ffv1_test
flashsv_test
flashsv2_test
flv_test
h261_test
h263_test
h263p_test
huffyuv_test
jpegls_test
ljpeg_test
mjpeg_test
mpeg_test
mpeg1b_test
mpeg2_test
mpeg2thread_test
mpeg4_test
mpeg4adv_test
mpeg4nr_test
mpeg4thread_test
msmpeg4_test
msmpeg4v2_test
msvideo1_test
qtrle_test
qtrlegray_test
rc_test
rgb_test
roq_test
rv10_test
rv20_test
snow_test
snowll_test
svq1_test
wmv1_test
wmv2_test
yuv_test'
WINDOWID='92274708'
WINDOWPATH='7'
XAUTHORITY='/var/run/gdm/auth-for-vagelis-00N8D1/database'
XDG_CONFIG_DIRS='/etc/xdg/xdg-gnome-classic:/etc/xdg'
XDG_DATA_DIRS='/usr/share/gnome-classic:/usr/share/gnome:/usr/local/share/:/usr/share/'
XDG_SESSION_COOKIE='d0c0eeb38696b1956e1c6c6e4ae9bc 0a-1305377370.894473-1409501221'
_='./configure'
a64_muxer='yes'
a64multi5_encoder='yes'
a64multi_encoder='yes'
aac_adtstoasc_bsf='yes'
aac_decoder='yes'
aac_decoder_select='mdct sinewin'
aac_demuxer='yes'
aac_encoder='yes'
aac_encoder_select='mdct sinewin'
aac_latm_decoder='yes'
aac_latm_decoder_select='aac_decoder aac_latm_parser'
aac_latm_parser='yes'
aac_parser='yes'
aasc_decoder='yes'
ac3_decoder='yes'
ac3_decoder_select='mdct ac3dsp ac3_parser'
ac3_demuxer='yes'
ac3_demuxer_select='ac3_parser'
ac3_encoder='yes'
ac3_encoder_select='mdct ac3dsp'
ac3_fixed_encoder='yes'
ac3_fixed_encoder_select='mdct ac3dsp'
ac3_fixed_test='yes'
ac3_fixed_test_deps='ac3_fixed_encoder ac3_decoder rm_muxer rm_demuxer'
ac3_float_encoder='yes'
ac3_muxer='yes'
ac3_parser='yes'
action='enable'
adpcm_4xm_decoder='yes'
adpcm_adx_decoder='yes'
adpcm_adx_encoder='yes'
adpcm_ct_decoder='yes'
adpcm_ea_decoder='yes'
adpcm_ea_maxis_xa_decoder='yes'
adpcm_ea_r1_decoder='yes'
adpcm_ea_r2_decoder='yes'
adpcm_ea_r3_decoder='yes'
adpcm_ea_xas_decoder='yes'
adpcm_g722_decoder='yes'
adpcm_g722_encoder='yes'
adpcm_g726_decoder='yes'
adpcm_g726_encoder='yes'
adpcm_ima_amv_decoder='yes'
adpcm_ima_dk3_decoder='yes'
adpcm_ima_dk4_decoder='yes'
adpcm_ima_ea_eacs_decoder='yes'
adpcm_ima_ea_sead_decoder='yes'
adpcm_ima_iss_decoder='yes'
adpcm_ima_qt_decoder='yes'
adpcm_ima_qt_encoder='yes'
adpcm_ima_qt_test='yes'
adpcm_ima_qt_test_deps='adpcm_ima_qt_encoder adpcm_ima_qt_decoder'
adpcm_ima_smjpeg_decoder='yes'
adpcm_ima_wav_decoder='yes'
adpcm_ima_wav_encoder='yes'
adpcm_ima_wav_test='yes'
adpcm_ima_wav_test_deps='adpcm_ima_wav_encoder adpcm_ima_wav_decoder'
adpcm_ima_ws_decoder='yes'
adpcm_ms_decoder='yes'
adpcm_ms_encoder='yes'
adpcm_ms_test='yes'
adpcm_ms_test_deps='adpcm_ms_encoder adpcm_ms_decoder'
adpcm_sbpro_2_decoder='yes'
adpcm_sbpro_3_decoder='yes'
adpcm_sbpro_4_decoder='yes'
adpcm_swf_decoder='yes'
adpcm_swf_encoder='yes'
adpcm_swf_test='yes'
adpcm_swf_test_deps='adpcm_swf_encoder adpcm_swf_decoder'
adpcm_thp_decoder='yes'
adpcm_xa_decoder='yes'
adpcm_yam_test='yes'
adpcm_yam_test_deps='adpcm_yamaha_encoder adpcm_yamaha_decoder'
adpcm_yamaha_decoder='yes'
adpcm_yamaha_encoder='yes'
adts_muxer='yes'
aea_demuxer='yes'
aiff_demuxer='yes'
aiff_muxer='yes'
aiff_test='yes'
aiff_test_deps='aiff_muxer aiff_demuxer'
alac_decoder='yes'
alac_encoder='yes'
alac_encoder_select='lpc'
alac_test='yes'
alac_test_deps='alac_encoder alac_decoder'
alaw_test='yes'
alaw_test_deps='pcm_alaw_muxer pcm_alaw_demuxer'
aligned_stack_if_any='ppc x86'
als_decoder='yes'
alsa_indev='yes'
alsa_indev_deps='alsa_asoundlib_h snd_pcm_htimestamp'
alsa_outdev='yes'
alsa_outdev_deps='alsa_asoundlib_h'
altivec='yes'
altivec_deps='ppc'
amd3dnow='yes'
amd3dnow_deps='mmx'
amd3dnowext='yes'
amd3dnowext_deps='amd3dnow'
amr_demuxer='yes'
amr_muxer='yes'
amrnb_decoder='yes'
amrnb_decoder_select='lsp'
amrwb_decoder='yes'
amrwb_decoder_select='lsp'
amv_decoder='yes'
anm_decoder='yes'
anm_demuxer='yes'
ansi_decoder='yes'
anull_filter='yes'
anullsink_filter='yes'
anullsrc_filter='yes'
apc_demuxer='yes'
ape_decoder='yes'
ape_demuxer='yes'
applehttp_demuxer='yes'
applehttp_protocol='yes'
ar_default='ar'
arch_default='i686'
armv5te='yes'
armv5te_deps='arm'
armv6='yes'
armv6_deps='arm'
armv6t2='yes'
armv6t2_deps='arm'
armvfp='yes'
armvfp_deps='arm'
asf_demuxer='yes'
asf_muxer='yes'
asf_stream_muxer='yes'
asf_stream_muxer_select='asf_muxer'
asf_test='yes'
asf_test_deps='asf_muxer asf_demuxer'
asm='yes'
***_decoder='yes'
***_demuxer='yes'
***_encoder='yes'
***_muxer='yes'
asv1_decoder='yes'
asv1_encoder='yes'
asv1_test='yes'
asv1_test_deps='asv1_encoder asv1_decoder'
asv2_decoder='yes'
asv2_encoder='yes'
asv2_test='yes'
asv2_test_deps='asv2_encoder asv2_decoder'
atrac1_decoder='yes'
atrac1_decoder_select='mdct sinewin'
atrac3_decoder='yes'
atrac3_decoder_select='mdct'
au_demuxer='yes'
au_muxer='yes'
au_test='yes'
au_test_deps='au_muxer au_demuxer'
aura2_decoder='yes'
aura_decoder='yes'
avcodec='yes'
avdevice='yes'
avdevice_deps='avcodec avformat'
avfilter='yes'
avformat='yes'
avformat_deps='avcodec'
avi_demuxer='yes'
avi_muxer='yes'
avi_test='yes'
avi_test_deps='avi_muxer avi_demuxer'
avisynth_demuxer='yes'
avisynth_demuxer_deps='avisynth'
avm2_muxer='yes'
avs_decoder='yes'
avs_demuxer='yes'
avutil='yes'
avx='yes'
avx_deps='ssse3'
bethsoftvid_decoder='yes'
bethsoftvid_demuxer='yes'
bfi_decoder='yes'
bfi_demuxer='yes'
bindir_default='${prefix}/bin'
bink_decoder='yes'
bink_demuxer='yes'
binkaudio_dct_decoder='yes'
binkaudio_dct_decoder_select='mdct rdft dct sinewin'
binkaudio_rdft_decoder='yes'
binkaudio_rdft_decoder_select='mdct rdft sinewin'
bktr_indev='yes'
bktr_indev_deps_any='dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h'
blackframe_filter='yes'
blackframe_filter_deps='gpl'
bmp_decoder='yes'
bmp_encoder='yes'
bmp_test='yes'
bmp_test_deps='bmp_encoder bmp_decoder'
bsfs_if_any='aac_adtstoasc_bsf
chomp_bsf
dump_extradata_bsf
h264_mp4toannexb_bsf
imx_dump_header_bsf
mjpeg2jpeg_bsf
mjpega_dump_header_bsf
mp3_header_compress_bsf
mp3_header_decompress_bsf
mov2textsub_bsf
noise_bsf
remove_extradata_bsf
text2movsub_bsf'
buffer_filter='yes'
c93_decoder='yes'
c93_demuxer='yes'
caf_demuxer='yes'
cavs_decoder='yes'
cavs_decoder_select='golomb'
cavsvideo_demuxer='yes'
cavsvideo_muxer='yes'
cavsvideo_parser='yes'
cc_default='gcc'
cc_version='"unknown"'
cdg_demuxer='yes'
cdgraphics_decoder='yes'
chomp_bsf='yes'
cinepak_decoder='yes'
cljr_decoder='yes'
color_filter='yes'
concat_protocol='yes'
cook_decoder='yes'
cook_decoder_select='mdct sinewin'
copy_filter='yes'
cpu='generic'
crc_muxer='yes'
crop_filter='yes'
crop_scale_test='yes'
crop_scale_vflip_test='yes'
crop_test='yes'
crop_vflip_test='yes'
cropdetect_filter='yes'
cropdetect_filter_deps='gpl'
crypto_protocol='yes'
crystalhd_deps='libcrystalhd_libcrystalhd_if_h'
cscd_decoder='yes'
cscd_decoder_suggest='zlib'
cyuv_decoder='yes'
datadir_default='${prefix}/share/ffmpeg'
daud_demuxer='yes'
daud_muxer='yes'
dca_decoder='yes'
dca_decoder_select='mdct'
dca_encoder='yes'
dca_parser='yes'
dct_select='rdft'
debug='yes'
decoders_if_any='aasc_decoder
amv_decoder
anm_decoder
ansi_decoder
asv1_decoder
asv2_decoder
aura_decoder
aura2_decoder
avs_decoder
bethsoftvid_decoder
bfi_decoder
bink_decoder
bmp_decoder
c93_decoder
cavs_decoder
cdgraphics_decoder
cinepak_decoder
cljr_decoder
cscd_decoder
cyuv_decoder
dfa_decoder
dnxhd_decoder
dpx_decoder
dsicinvideo_decoder
dvvideo_decoder
dxa_decoder
eacmv_decoder
eamad_decoder
eatgq_decoder
eatgv_decoder
eatqi_decoder
eightbps_decoder
eightsvx_exp_decoder
eightsvx_fib_decoder
escape124_decoder
ffv1_decoder
ffvhuff_decoder
flashsv_decoder
flic_decoder
flv_decoder
fourxm_decoder
fraps_decoder
frwu_decoder
gif_decoder
h261_decoder
h263_decoder
h263i_decoder
h264_decoder
h264_crystalhd_decoder
h264_vdpau_decoder
huffyuv_decoder
idcin_decoder
iff_byterun1_decoder
iff_ilbm_decoder
indeo2_decoder
indeo3_decoder
indeo5_decoder
interplay_video_decoder
jpegls_decoder
jv_decoder
kgv1_decoder
kmvc_decoder
lagarith_decoder
loco_decoder
mdec_decoder
mimic_decoder
mjpeg_decoder
mjpegb_decoder
mmvideo_decoder
motionpixels_decoder
mpeg_xvmc_decoder
mpeg1video_decoder
mpeg2video_decoder
mpeg4_decoder
mpeg4_crystalhd_decoder
mpeg4_vdpau_decoder
mpegvideo_decoder
mpeg_vdpau_decoder
mpeg1_vdpau_decoder
mpeg2_crystalhd_decoder
msmpeg4_crystalhd_decoder
msmpeg4v1_decoder
msmpeg4v2_decoder
msmpeg4v3_decoder
msrle_decoder
msvideo1_decoder
mszh_decoder
mxpeg_decoder
nuv_decoder
pam_decoder
pbm_decoder
pcx_decoder
pgm_decoder
pgmyuv_decoder
pictor_decoder
png_decoder
ppm_decoder
ptx_decoder
qdraw_decoder
qpeg_decoder
qtrle_decoder
r10k_decoder
r210_decoder
rawvideo_decoder
rl2_decoder
roq_decoder
rpza_decoder
rv10_decoder
rv20_decoder
rv30_decoder
rv40_decoder
s302m_decoder
sgi_decoder
smacker_decoder
smc_decoder
snow_decoder
sp5x_decoder
sunrast_decoder
svq1_decoder
svq3_decoder
targa_decoder
theora_decoder
thp_decoder
tiertexseqvideo_decoder
tiff_decoder
tmv_decoder
truemotion1_decoder
truemotion2_decoder
tscc_decoder
txd_decoder
ulti_decoder
v210_decoder
v210x_decoder
vb_decoder
vc1_decoder
vc1_crystalhd_decoder
vc1_vdpau_decoder
vcr1_decoder
vmdvideo_decoder
vmnc_decoder
vp3_decoder
vp5_decoder
vp6_decoder
vp6a_decoder
vp6f_decoder
vp8_decoder
vqa_decoder
wmv1_decoder
wmv2_decoder
wmv3_decoder
wmv3_crystalhd_decoder
wmv3_vdpau_decoder
wnv1_decoder
xan_wc3_decoder
xan_wc4_decoder
xl_decoder
yop_decoder
zlib_decoder
zmbv_decoder
aac_decoder
aac_latm_decoder
ac3_decoder
alac_decoder
als_decoder
amrnb_decoder
amrwb_decoder
ape_decoder
atrac1_decoder
atrac3_decoder
binkaudio_dct_decoder
binkaudio_rdft_decoder
cook_decoder
dca_decoder
dsicinaudio_decoder
eac3_decoder
flac_decoder
gsm_decoder
gsm_ms_decoder
imc_decoder
mace3_decoder
mace6_decoder
mlp_decoder
mp1_decoder
mp1float_decoder
mp2_decoder
mp2float_decoder
mp3_decoder
mp3float_decoder
mp3adu_decoder
mp3adufloat_decoder
mp3on4_decoder
mp3on4float_decoder
mpc7_decoder
mpc8_decoder
nellymoser_decoder
qcelp_decoder
qdm2_decoder
ra_144_decoder
ra_288_decoder
shorten_decoder
sipr_decoder
smackaud_decoder
sonic_decoder
truehd_decoder
truespeech_decoder
tta_decoder
twinvq_decoder
vmdaudio_decoder
vorbis_decoder
wavpack_decoder
wmapro_decoder
wmav1_decoder
wmav2_decoder
wmavoice_decoder
ws_snd1_decoder
pcm_alaw_decoder
pcm_bluray_decoder
pcm_dvd_decoder
pcm_f32be_decoder
pcm_f32le_decoder
pcm_f64be_decoder
pcm_f64le_decoder
pcm_lxf_decoder
pcm_mulaw_decoder
pcm_s8_decoder
pcm_s16be_decoder
pcm_s16le_decoder
pcm_s16le_planar_decoder
pcm_s24be_decoder
pcm_s24daud_decoder
pcm_s24le_decoder
pcm_s32be_decoder
pcm_s32le_decoder
pcm_u8_decoder
pcm_u16be_decoder
pcm_u16le_decoder
pcm_u24be_decoder
pcm_u24le_decoder
pcm_u32be_decoder
pcm_u32le_decoder
pcm_zork_decoder
interplay_dpcm_decoder
roq_dpcm_decoder
sol_dpcm_decoder
xan_dpcm_decoder
adpcm_4xm_decoder
adpcm_adx_decoder
adpcm_ct_decoder
adpcm_ea_decoder
adpcm_ea_maxis_xa_decoder
adpcm_ea_r1_decoder
adpcm_ea_r2_decoder
adpcm_ea_r3_decoder
adpcm_ea_xas_decoder
adpcm_g722_decoder
adpcm_g726_decoder
adpcm_ima_amv_decoder
adpcm_ima_dk3_decoder
adpcm_ima_dk4_decoder
adpcm_ima_ea_eacs_decoder
adpcm_ima_ea_sead_decoder
adpcm_ima_iss_decoder
adpcm_ima_qt_decoder
adpcm_ima_smjpeg_decoder
adpcm_ima_wav_decoder
adpcm_ima_ws_decoder
adpcm_ms_decoder
adpcm_sbpro_2_decoder
adpcm_sbpro_3_decoder
adpcm_sbpro_4_decoder
adpcm_swf_decoder
adpcm_thp_decoder
adpcm_xa_decoder
adpcm_yamaha_decoder
***_decoder
dvbsub_decoder
dvdsub_decoder
pgssub_decoder
srt_decoder
xsub_decoder
libcelt_decoder
libdirac_decoder
libgsm_decoder
libgsm_ms_decoder
libopencore_amrnb_decoder
libopencore_amrwb_decoder
libopenjpeg_decoder
libschroedinger_decoder
libspeex_decoder
libvpx_decoder'
demuxers_if_any='aac_demuxer
ac3_demuxer
aea_demuxer
aiff_demuxer
amr_demuxer
anm_demuxer
apc_demuxer
ape_demuxer
applehttp_demuxer
asf_demuxer
***_demuxer
au_demuxer
avi_demuxer
avisynth_demuxer
avs_demuxer
bethsoftvid_demuxer
bfi_demuxer
bink_demuxer
c93_demuxer
caf_demuxer
cavsvideo_demuxer
cdg_demuxer
daud_demuxer
dfa_demuxer
dirac_demuxer
dnxhd_demuxer
dsicin_demuxer
dts_demuxer
dv_demuxer
dxa_demuxer
ea_demuxer
ea_cdata_demuxer
eac3_demuxer
ffm_demuxer
ffmetadata_demuxer
filmstrip_demuxer
flac_demuxer
flic_demuxer
flv_demuxer
fourxm_demuxer
g722_demuxer
gsm_demuxer
gxf_demuxer
h261_demuxer
h263_demuxer
h264_demuxer
idcin_demuxer
iff_demuxer
image2_demuxer
image2pipe_demuxer
ingenient_demuxer
ipmovie_demuxer
iss_demuxer
iv8_demuxer
ivf_demuxer
jv_demuxer
lmlm4_demuxer
lxf_demuxer
m4v_demuxer
matroska_demuxer
microdvd_demuxer
mjpeg_demuxer
mlp_demuxer
mm_demuxer
mmf_demuxer
mov_demuxer
mp3_demuxer
mpc_demuxer
mpc8_demuxer
mpegps_demuxer
mpegts_demuxer
mpegtsraw_demuxer
mpegvideo_demuxer
msnwc_tcp_demuxer
mtv_demuxer
mvi_demuxer
mxf_demuxer
mxg_demuxer
nc_demuxer
nsv_demuxer
nut_demuxer
nuv_demuxer
ogg_demuxer
oma_demuxer
pcm_alaw_demuxer
pcm_mulaw_demuxer
pcm_f64be_demuxer
pcm_f64le_demuxer
pcm_f32be_demuxer
pcm_f32le_demuxer
pcm_s32be_demuxer
pcm_s32le_demuxer
pcm_s24be_demuxer
pcm_s24le_demuxer
pcm_s16be_demuxer
pcm_s16le_demuxer
pcm_s8_demuxer
pcm_u32be_demuxer
pcm_u32le_demuxer
pcm_u24be_demuxer
pcm_u24le_demuxer
pcm_u16be_demuxer
pcm_u16le_demuxer
pcm_u8_demuxer
pmp_demuxer
pva_demuxer
qcp_demuxer
r3d_demuxer
rawvideo_demuxer
rl2_demuxer
rm_demuxer
roq_demuxer
rpl_demuxer
rso_demuxer
rtp_demuxer
rtsp_demuxer
sap_demuxer
sdp_demuxer
segafilm_demuxer
shorten_demuxer
siff_demuxer
smacker_demuxer
sol_demuxer
sox_demuxer
spdif_demuxer
srt_demuxer
str_demuxer
swf_demuxer
thp_demuxer
tiertexseq_demuxer
tmv_demuxer
truehd_demuxer
tta_demuxer
txd_demuxer
tty_demuxer
vc1_demuxer
vc1t_demuxer
vmd_demuxer
voc_demuxer
vqf_demuxer
w64_demuxer
wav_demuxer
wc3_demuxer
wsaud_demuxer
wsvqa_demuxer
wtv_demuxer
wv_demuxer
xa_demuxer
xwma_demuxer
yop_demuxer
yuv4mpegpipe_demuxer
libnut_demuxer'
dep='yuv4mpegpipe'
dfa_decoder='yes'
dfa_demuxer='yes'
dirac_demuxer='yes'
dirac_demuxer_select='dirac_parser'
dirac_muxer='yes'
dirac_parser='yes'
dnxhd_1080i_test='yes'
dnxhd_1080i_test_deps='dnxhd_encoder dnxhd_decoder'
dnxhd_720p_rd_test='yes'
dnxhd_720p_rd_test_deps='dnxhd_encoder dnxhd_decoder'
dnxhd_720p_test='yes'
dnxhd_720p_test_deps='dnxhd_encoder dnxhd_decoder'
dnxhd_decoder='yes'
dnxhd_demuxer='yes'
dnxhd_encoder='yes'
dnxhd_encoder_select='aandct'
dnxhd_muxer='yes'
dnxhd_parser='yes'
doc='yes'
doc_deps='texi2html'
dpx_decoder='yes'
dpx_encoder='yes'
drawbox_filter='yes'
drawtext_filter='yes'
drawtext_filter_deps='libfreetype'
dsicin_demuxer='yes'
dsicinaudio_decoder='yes'
dsicinvideo_decoder='yes'
dts_demuxer='yes'
dts_muxer='yes'
dump_extradata_bsf='yes'
dv1394_indev='yes'
dv1394_indev_deps='dv1394 dv_demuxer'
dv50_test='yes'
dv50_test_deps='dvvideo_encoder dvvideo_decoder'
dv_demuxer='yes'
dv_fmt_test='yes'
dv_fmt_test_deps='dv_muxer dv_demuxer'
dv_muxer='yes'
dv_test='yes'
dv_test_deps='dvvideo_encoder dvvideo_decoder'
dvbsub_decoder='yes'
dvbsub_encoder='yes'
dvbsub_parser='yes'
dvdsub_decoder='yes'
dvdsub_encoder='yes'
dvdsub_parser='yes'
dvvideo_decoder='yes'
dvvideo_encoder='yes'
dxa_decoder='yes'
dxa_decoder_select='zlib'
dxa_demuxer='yes'
ea_cdata_demuxer='yes'
ea_demuxer='yes'
eac3_decoder='yes'
eac3_decoder_select='ac3_decoder'
eac3_demuxer='yes'
eac3_demuxer_select='ac3_parser'
eac3_muxer='yes'
eacmv_decoder='yes'
eamad_decoder='yes'
eamad_decoder_select='aandct'
eatgq_decoder='yes'
eatgq_decoder_select='aandct'
eatgv_decoder='yes'
eatqi_decoder='yes'
eatqi_decoder_select='aandct'
eightbps_decoder='yes'
eightsvx_exp_decoder='yes'
eightsvx_fib_decoder='yes'
encoders_if_any='a64multi_encoder
a64multi5_encoder
asv1_encoder
asv2_encoder
bmp_encoder
dnxhd_encoder
dpx_encoder
dvvideo_encoder
ffv1_encoder
ffvhuff_encoder
flashsv_encoder
flashsv2_encoder
flv_encoder
gif_encoder
h261_encoder
h263_encoder
h263p_encoder
huffyuv_encoder
jpegls_encoder
ljpeg_encoder
mjpeg_encoder
mpeg1video_encoder
mpeg2video_encoder
mpeg4_encoder
msmpeg4v1_encoder
msmpeg4v2_encoder
msmpeg4v3_encoder
msvideo1_encoder
pam_encoder
pbm_encoder
pcx_encoder
pgm_encoder
pgmyuv_encoder
png_encoder
ppm_encoder
qtrle_encoder
rawvideo_encoder
roq_encoder
rv10_encoder
rv20_encoder
sgi_encoder
snow_encoder
svq1_encoder
targa_encoder
tiff_encoder
v210_encoder
wmv1_encoder
wmv2_encoder
zlib_encoder
zmbv_encoder
aac_encoder
ac3_encoder
ac3_fixed_encoder
ac3_float_encoder
alac_encoder
dca_encoder
flac_encoder
mp2_encoder
nellymoser_encoder
ra_144_encoder
sonic_encoder
sonic_ls_encoder
vorbis_encoder
wmav1_encoder
wmav2_encoder
pcm_alaw_encoder
pcm_f32be_encoder
pcm_f32le_encoder
pcm_f64be_encoder
pcm_f64le_encoder
pcm_mulaw_encoder
pcm_s8_encoder
pcm_s16be_encoder
pcm_s16le_encoder
pcm_s24be_encoder
pcm_s24daud_encoder
pcm_s24le_encoder
pcm_s32be_encoder
pcm_s32le_encoder
pcm_u8_encoder
pcm_u16be_encoder
pcm_u16le_encoder
pcm_u24be_encoder
pcm_u24le_encoder
pcm_u32be_encoder
pcm_u32le_encoder
pcm_zork_encoder
roq_dpcm_encoder
adpcm_adx_encoder
adpcm_g722_encoder
adpcm_g726_encoder
adpcm_ima_qt_encoder
adpcm_ima_wav_encoder
adpcm_ms_encoder
adpcm_swf_encoder
adpcm_yamaha_encoder
***_encoder
dvbsub_encoder
dvdsub_encoder
srt_encoder
xsub_encoder
libdirac_encoder
libfaac_encoder
libgsm_encoder
libgsm_ms_encoder
libmp3lame_encoder
libopencore_amrnb_encoder
libschroedinger_encoder
libtheora_encoder
libvo_aacenc_encoder
libvo_amrwbenc_encoder
libvorbis_encoder
libvpx_encoder
libx264_encoder
libxavs_encoder
libxvid_encoder'
error_test='yes'
error_test_deps='mpeg4_encoder mpeg4_decoder'
escape124_decoder='yes'
fade_filter='yes'
fast_64bit_if_any='alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64'
fast_clz_if_any='alpha armv5te avr32 mips ppc x86'
fast_unaligned_if_any='armv6 ppc x86'
fastdiv='yes'
fbdev_indev='yes'
fbdev_indev_deps='linux_fb_h'
ffm_demuxer='yes'
ffm_muxer='yes'
ffm_test='yes'
ffm_test_deps='ffm_muxer ffm_demuxer'
ffmetadata_demuxer='yes'
ffmetadata_muxer='yes'
ffmpeg='yes'
ffmpeg_deps='avcodec avformat swscale'
ffmpeg_select='buffer_filter'
ffplay='yes'
ffplay_deps='avcodec avformat swscale sdl'
ffplay_select='rdft'
ffprobe='yes'
ffprobe_deps='avcodec avformat'
ffserver='yes'
ffserver_deps='avformat ffm_muxer fork rtp_protocol rtsp_demuxer'
ffserver_extralibs='$ldl'
ffv1_decoder='yes'
ffv1_decoder_select='golomb'
ffv1_encoder='yes'
ffv1_test='yes'
ffv1_test_deps='ffv1_encoder ffv1_decoder'
ffvhuff_decoder='yes'
ffvhuff_encoder='yes'
fieldorder_filter='yes'
fifo_filter='yes'
file_protocol='yes'
filmstrip_demuxer='yes'
filmstrip_muxer='yes'
filters_if_any='anull_filter
anullsrc_filter
anullsink_filter
blackframe_filter
copy_filter
crop_filter
cropdetect_filter
drawbox_filter
drawtext_filter
fade_filter
fieldorder_filter
fifo_filter
format_filter
frei0r_filter
gradfun_filter
hflip_filter
hqdn3d_filter
mp_filter
noformat_filter
null_filter
ocv_filter
overlay_filter
pad_filter
pixdesctest_filter
scale_filter
setdar_filter
setpts_filter
setsar_filter
settb_filter
showinfo_filter
slicify_filter
transpose_filter
unsharp_filter
vflip_filter
yadif_filter
buffer_filter
color_filter
frei0r_src_filter
movie_filter
nullsrc_filter
nullsink_filter'
flac_decoder='yes'
flac_decoder_select='golomb'
flac_demuxer='yes'
flac_demuxer_select='flac_parser'
flac_encoder='yes'
flac_encoder_select='golomb lpc'
flac_muxer='yes'
flac_parser='yes'
flac_test='yes'
flac_test_deps='flac_encoder flac_decoder'
flashsv2_encoder='yes'
flashsv2_encoder_select='zlib'
flashsv2_test='yes'
flashsv_decoder='yes'
flashsv_decoder_select='zlib'
flashsv_encoder='yes'
flashsv_encoder_select='zlib'
flashsv_test='yes'
flashsv_test_deps='flashsv_encoder flashsv_decoder'
flic_decoder='yes'
flic_demuxer='yes'
flv_decoder='yes'
flv_decoder_select='h263_decoder'
flv_demuxer='yes'
flv_encoder='yes'
flv_encoder_select='h263_encoder'
flv_fmt_test='yes'
flv_fmt_test_deps='flv_muxer flv_demuxer'
flv_muxer='yes'
flv_test='yes'
flv_test_deps='flv_encoder flv_decoder'
format_filter='yes'
fourxm_decoder='yes'
fourxm_demuxer='yes'
framecrc_muxer='yes'
framemd5_muxer='yes'
fraps_decoder='yes'
fraps_decoder_select='huffman'
frei0r_filter='yes'
frei0r_filter_deps='frei0r dlopen strtok_r'
frei0r_src_filter='yes'
frei0r_src_filter_deps='frei0r dlopen strtok_r'
frwu_decoder='yes'
g722_demuxer='yes'
g722_muxer='yes'
g726_test='yes'
g726_test_deps='adpcm_g726_encoder adpcm_g726_decoder'
gif_decoder='yes'
gif_encoder='yes'
gif_muxer='yes'
gif_test='yes'
gif_test_deps='gif_encoder gif_decoder'
gopher_protocol='yes'
gopher_protocol_deps='network'
gpl='yes'
gradfun_filter='yes'
gsm_decoder='yes'
gsm_demuxer='yes'
gsm_ms_decoder='yes'
gxf_demuxer='yes'
gxf_muxer='yes'
gxf_test='yes'
gxf_test_deps='gxf_muxer gxf_demuxer'
h261_decoder='yes'
h261_demuxer='yes'
h261_encoder='yes'
h261_encoder_select='aandct'
h261_muxer='yes'
h261_parser='yes'
h261_test='yes'
h261_test_deps='h261_encoder h261_decoder'
h263_decoder='yes'
h263_decoder_select='h263_parser'
h263_demuxer='yes'
h263_encoder='yes'
h263_encoder_select='aandct'
h263_muxer='yes'
h263_parser='yes'
h263_test='yes'
h263_test_deps='h263_encoder h263_decoder'
h263_vaapi_hwaccel='yes'
h263_vaapi_hwaccel_select='vaapi h263_decoder'
h263i_decoder='yes'
h263i_decoder_select='h263_decoder'
h263p_encoder='yes'
h263p_encoder_select='h263_encoder'
h263p_test='yes'
h263p_test_deps='h263_encoder h263_decoder'
h264_crystalhd_decoder='yes'
h264_crystalhd_decoder_select='crystalhd h264_mp4toannexb_bsf h264_parser'
h264_decoder='yes'
h264_decoder_select='golomb h264dsp h264pred'
h264_demuxer='yes'
h264_dxva2_hwaccel='yes'
h264_dxva2_hwaccel_deps='dxva2api_h'
h264_dxva2_hwaccel_select='dxva2 h264_decoder'
h264_mp4toannexb_bsf='yes'
h264_muxer='yes'
h264_parser='yes'
h264_parser_select='golomb h264dsp h264pred'
h264_vaapi_hwaccel='yes'
h264_vaapi_hwaccel_select='vaapi'
h264_vdpau_decoder='yes'
h264_vdpau_decoder_select='vdpau h264_decoder'
hflip_filter='yes'
host_cc_default='gcc'
host_cflags='-D_ISOC99_SOURCE -O3 -g -Wall'
host_libs='-lm'
host_os='linux'
hqdn3d_filter='yes'
hqdn3d_filter_deps='gpl'
http_protocol='yes'
http_protocol_deps='network'
http_protocol_select='tcp_protocol'
huffyuv_decoder='yes'
huffyuv_encoder='yes'
huffyuv_test='yes'
huffyuv_test_deps='huffyuv_encoder huffyuv_decoder'
hwaccels_if_any='h263_vaapi_hwaccel
h264_dxva2_hwaccel
h264_vaapi_hwaccel
mpeg1_vdpau_hwaccel
mpeg2_dxva2_hwaccel
mpeg2_vaapi_hwaccel
mpeg2_vdpau_hwaccel
mpeg4_vaapi_hwaccel
vc1_dxva2_hwaccel
vc1_vaapi_hwaccel
wmv3_dxva2_hwaccel
wmv3_vaapi_hwaccel'
idcin_decoder='yes'
idcin_demuxer='yes'
iff_byterun1_decoder='yes'
iff_demuxer='yes'
iff_ilbm_decoder='yes'
image2_demuxer='yes'
image2_muxer='yes'
image2pipe_demuxer='yes'
image2pipe_muxer='yes'
imc_decoder='yes'
imc_decoder_select='fft mdct sinewin'
imx_dump_header_bsf='yes'
incdir_default='${prefix}/include'
indeo2_decoder='yes'
indeo3_decoder='yes'
indeo5_decoder='yes'
indevs_if_any='alsa_indev
bktr_indev
dv1394_indev
fbdev_indev
jack_indev
oss_indev
sndio_indev
v4l2_indev
v4l_indev
vfwcap_indev
x11_grab_device_indev
libdc1394_indev'
ingenient_demuxer='yes'
inline_asm_deps='!tms470'
interplay_dpcm_decoder='yes'
interplay_video_decoder='yes'
ipmovie_demuxer='yes'
ipod_muxer='yes'
ipod_muxer_select='mov_muxer'
iss_demuxer='yes'
iv8_demuxer='yes'
ivf_demuxer='yes'
ivf_muxer='yes'
iwmmxt='yes'
iwmmxt_deps='arm'
jack_indev='yes'
jack_indev_deps='jack_jack_h sem_timedwait'
jpegls_decoder='yes'
jpegls_decoder_select='golomb'
jpegls_encoder='yes'
jpegls_encoder_select='golomb'
jpegls_test='yes'
jpegls_test_deps='jpegls_encoder jpegls_decoder'
jpg_test='yes'
jpg_test_deps='mjpeg_encoder mjpeg_decoder'
jv_decoder='yes'
jv_demuxer='yes'
kgv1_decoder='yes'
kmvc_decoder='yes'
l=''
lagarith_decoder='yes'
libcelt_decoder='yes'
libcelt_decoder_deps='libcelt'
libdc1394_indev='yes'
libdc1394_indev_deps='libdc1394'
libdir_default='${prefix}/lib'
libdirac_decoder='yes'
libdirac_decoder_deps='libdirac !libschroedinger'
libdirac_encoder='yes'
libdirac_encoder_deps='libdirac'
libfaac='yes'
libfaac_encoder='yes'
libfaac_encoder_deps='libfaac'
libgsm_decoder='yes'
libgsm_decoder_deps='libgsm'
libgsm_encoder='yes'
libgsm_encoder_deps='libgsm'
libgsm_ms_decoder='yes'
libgsm_ms_decoder_deps='libgsm'
libgsm_ms_encoder='yes'
libgsm_ms_encoder_deps='libgsm'
libmp3lame='yes'
libmp3lame_encoder='yes'
libmp3lame_encoder_deps='libmp3lame'
libnut_demuxer='yes'
libnut_demuxer_deps='libnut'
libnut_muxer='yes'
libnut_muxer_deps='libnut'
libopencore_amrnb='yes'
libopencore_amrnb_decoder='yes'
libopencore_amrnb_decoder_deps='libopencore_amrnb'
libopencore_amrnb_encoder='yes'
libopencore_amrnb_encoder_deps='libopencore_amrnb'
libopencore_amrwb='yes'
libopencore_amrwb_decoder='yes'
libopencore_amrwb_decoder_deps='libopencore_amrwb'
libopenjpeg_decoder='yes'
libopenjpeg_decoder_deps='libopenjpeg'
libschroedinger_decoder='yes'
libschroedinger_decoder_deps='libschroedinger'
libschroedinger_encoder='yes'
libschroedinger_encoder_deps='libschroedinger'
libspeex_decoder='yes'
libspeex_decoder_deps='libspeex'
libtheora='yes'
libtheora_encoder='yes'
libtheora_encoder_deps='libtheora'
libvo_aacenc_encoder='yes'
libvo_aacenc_encoder_deps='libvo_aacenc'
libvo_amrwbenc_encoder='yes'
libvo_amrwbenc_encoder_deps='libvo_amrwbenc'
libvorbis='yes'
libvorbis_encoder='yes'
libvorbis_encoder_deps='libvorbis'
libvpx='yes'
libvpx_decoder='yes'
libvpx_decoder_deps='libvpx'
libvpx_encoder='yes'
libvpx_encoder_deps='libvpx'
libx264='yes'
libx264_encoder='yes'
libx264_encoder_deps='libx264'
libxavs_encoder='yes'
libxavs_encoder_deps='libxavs'
libxvid='yes'
libxvid_encoder='yes'
libxvid_encoder_deps='libxvid'
ljpeg_encoder='yes'
ljpeg_encoder_select='aandct'
ljpeg_test='yes'
ljpeg_test_deps='mjpeg_encoder mjpeg_decoder'
lmlm4_demuxer='yes'
ln_s='ln -sf'
loco_decoder='yes'
loco_decoder_select='golomb'
logfile='config.log'
lxf_demuxer='yes'
m4v_demuxer='yes'
m4v_muxer='yes'
mace3_decoder='yes'
mace6_decoder='yes'
mandir_default='${prefix}/share/man'
matroska_audio_muxer='yes'
matroska_audio_muxer_select='matroska_muxer'
matroska_demuxer='yes'
matroska_demuxer_suggest='zlib bzlib'
matroska_muxer='yes'
md5_muxer='yes'
md5_protocol='yes'
mdct_select='fft'
mdec_decoder='yes'
microdvd_demuxer='yes'
microdvd_muxer='yes'
mimic_decoder='yes'
mjpeg2jpeg_bsf='yes'
mjpeg_decoder='yes'
mjpeg_demuxer='yes'
mjpeg_encoder='yes'
mjpeg_encoder_select='aandct'
mjpeg_muxer='yes'
mjpeg_parser='yes'
mjpeg_test='yes'
mjpeg_test_deps='mjpeg_encoder mjpeg_decoder'
mjpega_dump_header_bsf='yes'
mjpegb_decoder='yes'
mkv_test='yes'
mkv_test_deps='matroska_muxer matroska_demuxer'
mlp_decoder='yes'
mlp_decoder_select='mlp_parser'
mlp_demuxer='yes'
mlp_muxer='yes'
mlp_parser='yes'
mm_demuxer='yes'
mmf_demuxer='yes'
mmf_muxer='yes'
mmf_test='yes'
mmf_test_deps='mmf_muxer mmf_demuxer'
mmi='yes'
mmi_deps='mips'
mmsh_protocol='yes'
mmsh_protocol_select='http_protocol'
mmst_protocol='yes'
mmst_protocol_deps='network'
mmvideo_decoder='yes'
mmx='yes'
mmx2='yes'
mmx2_deps='mmx'
mmx_deps='x86'
motionpixels_decoder='yes'
mov2textsub_bsf='yes'
mov_demuxer='yes'
mov_demuxer_suggest='zlib'
mov_muxer='yes'
mov_test='yes'
mov_test_deps='mov_muxer mov_demuxer'
movie_filter='yes'
movie_filter_deps='avcodec avformat'
mp1_decoder='yes'
mp1float_decoder='yes'
mp1float_decoder_select='dct'
mp2_decoder='yes'
mp2_encoder='yes'
mp2_muxer='yes'
mp2_test='yes'
mp2_test_deps='mp2_encoder mp2_decoder'
mp2float_decoder='yes'
mp2float_decoder_select='dct'
mp3_decoder='yes'
mp3_demuxer='yes'
mp3_demuxer_select='mpegaudio_parser'
mp3_header_compress_bsf='yes'
mp3_header_decompress_bsf='yes'
mp3_muxer='yes'
mp3adu_decoder='yes'
mp3adufloat_decoder='yes'
mp3adufloat_decoder_select='dct'
mp3float_decoder='yes'
mp3float_decoder_select='dct'
mp3on4_decoder='yes'
mp3on4float_decoder='yes'
mp3on4float_decoder_select='dct'
mp4_muxer='yes'
mp4_muxer_select='mov_muxer'
mp_filter='yes'
mp_filter_deps='gpl avcodec'
mpc7_decoder='yes'
mpc8_decoder='yes'
mpc8_demuxer='yes'
mpc_demuxer='yes'
mpeg1_vdpau_decoder='yes'
mpeg1_vdpau_decoder_select='vdpau mpeg1video_decoder'
mpeg1_vdpau_hwaccel='yes'
mpeg1_vdpau_hwaccel_select='vdpau mpeg1video_decoder'
mpeg1b_test='yes'
mpeg1b_test_deps='mpeg1video_encoder mpeg1video_decoder'
mpeg1system_muxer='yes'
mpeg1vcd_muxer='yes'
mpeg1video_decoder='yes'
mpeg1video_encoder='yes'
mpeg1video_encoder_select='aandct'
mpeg1video_muxer='yes'
mpeg2_crystalhd_decoder='yes'
mpeg2_crystalhd_decoder_select='crystalhd'
mpeg2_dxva2_hwaccel='yes'
mpeg2_dxva2_hwaccel_deps='dxva2api_h'
mpeg2_dxva2_hwaccel_select='dxva2 mpeg2video_decoder'
mpeg2_test='yes'
mpeg2_test_deps='mpeg2video_encoder mpeg2video_decoder'
mpeg2_vaapi_hwaccel='yes'
mpeg2_vaapi_hwaccel_select='vaapi mpeg2video_decoder'
mpeg2_vdpau_hwaccel='yes'
mpeg2_vdpau_hwaccel_select='vdpau mpeg2video_decoder'
mpeg2dvd_muxer='yes'
mpeg2svcd_muxer='yes'
mpeg2thread_test='yes'
mpeg2thread_test_deps='mpeg2video_encoder mpeg2video_decoder'
mpeg2video_decoder='yes'
mpeg2video_encoder='yes'
mpeg2video_encoder_select='aandct'
mpeg2video_muxer='yes'
mpeg2vob_muxer='yes'
mpeg4_crystalhd_decoder='yes'
mpeg4_crystalhd_decoder_select='crystalhd'
mpeg4_decoder='yes'
mpeg4_decoder_select='h263_decoder mpeg4video_parser'
mpeg4_encoder='yes'
mpeg4_encoder_select='h263_encoder'
mpeg4_test='yes'
mpeg4_test_deps='mpeg4_encoder mpeg4_decoder'
mpeg4_vaapi_hwaccel='yes'
mpeg4_vaapi_hwaccel_select='vaapi mpeg4_decoder'
mpeg4_vdpau_decoder='yes'
mpeg4_vdpau_decoder_select='vdpau mpeg4_decoder'
mpeg4adv_test='yes'
mpeg4adv_test_deps='mpeg4_encoder mpeg4_decoder'
mpeg4nr_test='yes'
mpeg4nr_test_deps='mpeg4_encoder mpeg4_decoder'
mpeg4thread_test='yes'
mpeg4thread_test_deps='mpeg4_encoder mpeg4_decoder'
mpeg4video_parser='yes'
mpeg_test='yes'
mpeg_test_deps='mpeg1video_encoder mpeg1video_decoder'
mpeg_vdpau_decoder='yes'
mpeg_vdpau_decoder_select='vdpau mpegvideo_decoder'
mpeg_xvmc_decoder='yes'
mpeg_xvmc_decoder_deps='X11_extensions_XvMClib_h'
mpeg_xvmc_decoder_select='mpegvideo_decoder'
mpegaudio_parser='yes'
mpegps_demuxer='yes'
mpegts_demuxer='yes'
mpegts_muxer='yes'
mpegtsraw_demuxer='yes'
mpegtsraw_demuxer_select='mpegts_demuxer'
mpegvideo_decoder='yes'
mpegvideo_demuxer='yes'
mpegvideo_parser='yes'
mpg_test='yes'
mpg_test_deps='mpeg1system_muxer mpegps_demuxer'
mpjpeg_muxer='yes'
msmpeg4_crystalhd_decoder='yes'
msmpeg4_crystalhd_decoder_select='crystalhd'
msmpeg4_test='yes'
msmpeg4_test_deps='msmpeg4v3_encoder msmpeg4v3_decoder'
msmpeg4v1_decoder='yes'
msmpeg4v1_decoder_select='h263_decoder'
msmpeg4v1_encoder='yes'
msmpeg4v1_encoder_select='h263_encoder'
msmpeg4v2_decoder='yes'
msmpeg4v2_decoder_select='h263_decoder'
msmpeg4v2_encoder='yes'
msmpeg4v2_encoder_select='h263_encoder'
msmpeg4v2_test='yes'
msmpeg4v2_test_deps='msmpeg4v2_encoder msmpeg4v2_decoder'
msmpeg4v3_decoder='yes'
msmpeg4v3_decoder_select='h263_decoder'
msmpeg4v3_encoder='yes'
msmpeg4v3_encoder_select='h263_encoder'
msnwc_tcp_demuxer='yes'
msrle_decoder='yes'
msvideo1_decoder='yes'
msvideo1_encoder='yes'
msvideo1_test='yes'
mszh_decoder='yes'
mtv_demuxer='yes'
mulaw_test='yes'
mulaw_test_deps='pcm_mulaw_muxer pcm_mulaw_demuxer'
muxers_if_any='a64_muxer
ac3_muxer
adts_muxer
aiff_muxer
amr_muxer
asf_muxer
***_muxer
asf_stream_muxer
au_muxer
avi_muxer
avm2_muxer
cavsvideo_muxer
crc_muxer
daud_muxer
dirac_muxer
dnxhd_muxer
dts_muxer
dv_muxer
eac3_muxer
ffm_muxer
ffmetadata_muxer
filmstrip_muxer
flac_muxer
flv_muxer
framecrc_muxer
framemd5_muxer
g722_muxer
gif_muxer
gxf_muxer
h261_muxer
h263_muxer
h264_muxer
image2_muxer
image2pipe_muxer
ipod_muxer
ivf_muxer
m4v_muxer
md5_muxer
matroska_muxer
matroska_audio_muxer
microdvd_muxer
mjpeg_muxer
mlp_muxer
mmf_muxer
mov_muxer
mp2_muxer
mp3_muxer
mp4_muxer
mpeg1system_muxer
mpeg1vcd_muxer
mpeg1video_muxer
mpeg2dvd_muxer
mpeg2svcd_muxer
mpeg2video_muxer
mpeg2vob_muxer
mpegts_muxer
mpjpeg_muxer
mxf_muxer
mxf_d10_muxer
null_muxer
nut_muxer
ogg_muxer
pcm_alaw_muxer
pcm_mulaw_muxer
pcm_f64be_muxer
pcm_f64le_muxer
pcm_f32be_muxer
pcm_f32le_muxer
pcm_s32be_muxer
pcm_s32le_muxer
pcm_s24be_muxer
pcm_s24le_muxer
pcm_s16be_muxer
pcm_s16le_muxer
pcm_s8_muxer
pcm_u32be_muxer
pcm_u32le_muxer
pcm_u24be_muxer
pcm_u24le_muxer
pcm_u16be_muxer
pcm_u16le_muxer
pcm_u8_muxer
psp_muxer
rawvideo_muxer
rm_muxer
roq_muxer
rso_muxer
rtp_muxer
rtsp_muxer
sap_muxer
sox_muxer
spdif_muxer
srt_muxer
swf_muxer
tg2_muxer
tgp_muxer
truehd_muxer
vc1t_muxer
voc_muxer
wav_muxer
webm_muxer
yuv4mpegpipe_muxer
libnut_muxer'
mvi_demuxer='yes'
mxf_d10_muxer='yes'
mxf_d10_muxer_select='mxf_muxer'
mxf_demuxer='yes'
mxf_muxer='yes'
mxf_test='yes'
mxf_test_deps='mxf_muxer mxf_demuxer'
mxg_demuxer='yes'
mxpeg_decoder='yes'
n='protocols'
name='yuv4mpeg'
nc_demuxer='yes'
need_memalign='altivec neon sse'
nellymoser_decoder='yes'
nellymoser_decoder_select='mdct sinewin'
nellymoser_encoder='yes'
nellymoser_encoder_select='mdct sinewin'
neon='yes'
neon_deps='arm'
network='yes'
nm_default='nm'
nm_opts='-g'
noformat_filter='yes'
nogas=':'
noise_bsf='yes'
nonfree='yes'
nsv_demuxer='yes'
null_filter='yes'
null_muxer='yes'
null_test='yes'
nullsink_filter='yes'
nullsrc_filter='yes'
nut_demuxer='yes'
nut_muxer='yes'
nut_test='yes'
nut_test_deps='nut_muxer nut_demuxer'
nuv_decoder='yes'
nuv_demuxer='yes'
objformat='elf'
ocv_filter='yes'
ocv_filter_deps='libopencv'
ogg_demuxer='yes'
ogg_demuxer_select='golomb'
ogg_muxer='yes'
ogg_test='yes'
ogg_test_deps='ogg_muxer ogg_demuxer'
oma_demuxer='yes'
op='='
opt='--enable-x11grab'
optimizations='yes'
option='x11grab'
optval='--enable-x11grab'
oss_indev='yes'
oss_indev_deps_any='soundcard_h sys_soundcard_h'
oss_outdev='yes'
oss_outdev_deps_any='soundcard_h sys_soundcard_h'
outdevs_if_any='alsa_outdev
oss_outdev
sndio_outdev'
overlay_filter='yes'
pad_filter='yes'
pam_decoder='yes'
pam_encoder='yes'
parsers_if_any='aac_parser
aac_latm_parser
ac3_parser
cavsvideo_parser
dca_parser
dirac_parser
dnxhd_parser
dvbsub_parser
dvdsub_parser
flac_parser
h261_parser
h263_parser
h264_parser
mjpeg_parser
mlp_parser
mpeg4video_parser
mpegaudio_parser
mpegvideo_parser
pnm_parser
vc1_parser
vp3_parser
vp8_parser'
pbm_decoder='yes'
pbm_encoder='yes'
pbmpipe_test='yes'
pbmpipe_test_deps='pbm_encoder pbm_decoder'
pcm_alaw_decoder='yes'
pcm_alaw_demuxer='yes'
pcm_alaw_encoder='yes'
pcm_alaw_muxer='yes'
pcm_bluray_decoder='yes'
pcm_dvd_decoder='yes'
pcm_f32be_decoder='yes'
pcm_f32be_demuxer='yes'
pcm_f32be_encoder='yes'
pcm_f32be_muxer='yes'
pcm_f32le_decoder='yes'
pcm_f32le_demuxer='yes'
pcm_f32le_encoder='yes'
pcm_f32le_muxer='yes'
pcm_f64be_decoder='yes'
pcm_f64be_demuxer='yes'
pcm_f64be_encoder='yes'
pcm_f64be_muxer='yes'
pcm_f64le_decoder='yes'
pcm_f64le_demuxer='yes'
pcm_f64le_encoder='yes'
pcm_f64le_muxer='yes'
pcm_lxf_decoder='yes'
pcm_mulaw_decoder='yes'
pcm_mulaw_demuxer='yes'
pcm_mulaw_encoder='yes'
pcm_mulaw_muxer='yes'
pcm_s16be_decoder='yes'
pcm_s16be_demuxer='yes'
pcm_s16be_encoder='yes'
pcm_s16be_muxer='yes'
pcm_s16le_decoder='yes'
pcm_s16le_demuxer='yes'
pcm_s16le_encoder='yes'
pcm_s16le_muxer='yes'
pcm_s16le_planar_decoder='yes'
pcm_s24be_decoder='yes'
pcm_s24be_demuxer='yes'
pcm_s24be_encoder='yes'
pcm_s24be_muxer='yes'
pcm_s24daud_decoder='yes'
pcm_s24daud_encoder='yes'
pcm_s24le_decoder='yes'
pcm_s24le_demuxer='yes'
pcm_s24le_encoder='yes'
pcm_s24le_muxer='yes'
pcm_s32be_decoder='yes'
pcm_s32be_demuxer='yes'
pcm_s32be_encoder='yes'
pcm_s32be_muxer='yes'
pcm_s32le_decoder='yes'
pcm_s32le_demuxer='yes'
pcm_s32le_encoder='yes'
pcm_s32le_muxer='yes'
pcm_s8_decoder='yes'
pcm_s8_demuxer='yes'
pcm_s8_encoder='yes'
pcm_s8_muxer='yes'
pcm_test='yes'
pcm_test_deps='pcm_alaw_decoder pcm_alaw_encoder
pcm_f32be_decoder pcm_f32be_encoder
pcm_f32le_decoder pcm_f32le_encoder
pcm_f64be_decoder pcm_f64be_encoder
pcm_f64le_decoder pcm_f64le_encoder
pcm_mulaw_decoder pcm_mulaw_encoder
pcm_s8_decoder pcm_s8_encoder
pcm_s16be_decoder pcm_s16be_encoder
pcm_s16le_decoder pcm_s16le_encoder
pcm_s24be_decoder pcm_s24be_encoder
pcm_s24daud_decoder pcm_s24daud_encoder
pcm_s24le_decoder pcm_s24le_encoder
pcm_s32be_decoder pcm_s32be_encoder
pcm_s32le_decoder pcm_s32le_encoder
pcm_u8_decoder pcm_u8_encoder
pcm_u16be_decoder pcm_u16be_encoder
pcm_u16le_decoder pcm_u16le_encoder
pcm_u24be_decoder pcm_u24be_encoder
pcm_u24le_decoder pcm_u24le_encoder
pcm_u32be_decoder pcm_u32be_encoder
pcm_u32le_decoder pcm_u32le_encoder
pcm_zork_decoder pcm_zork_encoder'
pcm_u16be_decoder='yes'
pcm_u16be_demuxer='yes'
pcm_u16be_encoder='yes'
pcm_u16be_muxer='yes'
pcm_u16le_decoder='yes'
pcm_u16le_demuxer='yes'
pcm_u16le_encoder='yes'
pcm_u16le_muxer='yes'
pcm_u24be_decoder='yes'
pcm_u24be_demuxer='yes'
pcm_u24be_encoder='yes'
pcm_u24be_muxer='yes'
pcm_u24le_decoder='yes'
pcm_u24le_demuxer='yes'
pcm_u24le_encoder='yes'
pcm_u24le_muxer='yes'
pcm_u32be_decoder='yes'
pcm_u32be_demuxer='yes'
pcm_u32be_encoder='yes'
pcm_u32be_muxer='yes'
pcm_u32le_decoder='yes'
pcm_u32le_demuxer='yes'
pcm_u32le_encoder='yes'
pcm_u32le_muxer='yes'
pcm_u8_decoder='yes'
pcm_u8_demuxer='yes'
pcm_u8_encoder='yes'
pcm_u8_muxer='yes'
pcm_zork_decoder='yes'
pcm_zork_encoder='yes'
pcx_decoder='yes'
pcx_encoder='yes'
pcx_test='yes'
pcx_test_deps='pcx_encoder pcx_decoder'
pgm_decoder='yes'
pgm_encoder='yes'
pgm_test='yes'
pgm_test_deps='pgm_encoder pgm_decoder'
pgmpipe_test='yes'
pgmpipe_test_deps='pgm_encoder pgm_decoder'
pgmyuv_decoder='yes'
pgmyuv_encoder='yes'
pgssub_decoder='yes'
pictor_decoder='yes'
pipe_protocol='yes'
pixdesc_be_test='yes'
pixdesc_be_test_deps='bigendian'
pixdesc_le_test='yes'
pixdesc_le_test_deps='!bigendian'
pixdesctest_filter='yes'
pixfmt_test='yes'
pixfmt_test_deps='rawvideo_muxer rawvideo_demuxer'
pixfmts_copy_be_test_deps='bigendian'
pixfmts_copy_le_test='yes'
pixfmts_copy_le_test_deps='!bigendian'
pixfmts_crop_be_test_deps='bigendian'
pixfmts_crop_le_test='yes'
pixfmts_crop_le_test_deps='!bigendian'
pixfmts_hflip_be_test_deps='bigendian'
pixfmts_hflip_le_test='yes'
pixfmts_hflip_le_test_deps='!bigendian'
pixfmts_null_be_test_deps='bigendian'
pixfmts_null_le_test='yes'
pixfmts_null_le_test_deps='!bigendian'
pixfmts_pad_be_test_deps='bigendian'
pixfmts_pad_le_test='yes'
pixfmts_pad_le_test_deps='!bigendian'
pixfmts_scale_be_test_deps='bigendian'
pixfmts_scale_le_test='yes'
pixfmts_scale_le_test_deps='!bigendian'
pixfmts_vflip_be_test_deps='bigendian'
pixfmts_vflip_le_test='yes'
pixfmts_vflip_le_test_deps='!bigendian'
pkg_config_default='pkg-config'
pmp_demuxer='yes'
png_decoder='yes'
png_decoder_select='zlib'
png_encoder='yes'
png_encoder_select='zlib'
png_test='yes'
png_test_deps='png_encoder png_decoder'
pnm_parser='yes'
postproc='yes'
postproc_deps='gpl'
ppc4xx='yes'
ppc4xx_deps='ppc'
ppm_decoder='yes'
ppm_encoder='yes'
ppm_test='yes'
ppm_test_deps='ppm_encoder ppm_decoder'
ppmpipe_test='yes'
ppmpipe_test_deps='ppm_encoder ppm_decoder'
prefix_default='/usr/local'
protocols='yes'
protocols_if_any='applehttp_protocol
concat_protocol
crypto_protocol
file_protocol
gopher_protocol
http_protocol
mmsh_protocol
mmst_protocol
md5_protocol
pipe_protocol
rtmp_protocol
rtmpt_protocol
rtmpe_protocol
rtmpte_protocol
rtmps_protocol
rtp_protocol
tcp_protocol
udp_protocol'
psp_muxer='yes'
psp_muxer_select='mov_muxer'
ptx_decoder='yes'
pva_demuxer='yes'
qcelp_decoder='yes'
qcelp_decoder_select='lsp'
qcp_demuxer='yes'
qdm2_decoder='yes'
qdm2_decoder_select='mdct rdft'
qdraw_decoder='yes'
qpeg_decoder='yes'
qtrle_decoder='yes'
qtrle_encoder='yes'
qtrle_test='yes'
qtrlegray_test='yes'
quotes='""'
r='--enable-x11grab'
r10k_decoder='yes'
r210_decoder='yes'
r3d_demuxer='yes'
ra_144_decoder='yes'
ra_144_encoder='yes'
ra_144_encoder_select='lpc'
ra_288_decoder='yes'
ranlib='ranlib'
rawvideo_decoder='yes'
rawvideo_demuxer='yes'
rawvideo_encoder='yes'
rawvideo_muxer='yes'
rc_test='yes'
rc_test_deps='mpeg4_encoder mpeg4_decoder'
rdft_select='fft'
remove_extradata_bsf='yes'
rgb_test='yes'
rgb_test_deps='rawvideo_encoder rawvideo_decoder'
rl2_decoder='yes'
rl2_demuxer='yes'
rm_demuxer='yes'
rm_muxer='yes'
rm_test='yes'
rm_test_deps='rm_muxer rm_demuxer'
roq_decoder='yes'
roq_demuxer='yes'
roq_dpcm_decoder='yes'
roq_dpcm_encoder='yes'
roq_encoder='yes'
roq_muxer='yes'
roq_test='yes'
roq_test_deps='roq_encoder roq_decoder'
rpl_demuxer='yes'
rpza_decoder='yes'
rso_demuxer='yes'
rso_muxer='yes'
rtmp_protocol='yes'
rtmp_protocol_select='tcp_protocol'
rtmpe_protocol='yes'
rtmps_protocol='yes'
rtmpt_protocol='yes'
rtmpte_protocol='yes'
rtp_demuxer='yes'
rtp_demuxer_select='sdp_demuxer'
rtp_muxer='yes'
rtp_protocol='yes'
rtp_protocol_select='udp_protocol'
rtpdec_select='asf_demuxer rm_demuxer rtp_protocol mpegts_demuxer mov_demuxer'
rtsp_demuxer='yes'
rtsp_demuxer_select='http_protocol rtpdec'
rtsp_muxer='yes'
rtsp_muxer_select='rtp_muxer http_protocol rtp_protocol'
rv10_decoder='yes'
rv10_decoder_select='h263_decoder'
rv10_encoder='yes'
rv10_encoder_select='h263_encoder'
rv10_test='yes'
rv10_test_deps='rv10_encoder rv10_decoder'
rv20_decoder='yes'
rv20_decoder_select='h263_decoder'
rv20_encoder='yes'
rv20_encoder_select='h263_encoder'
rv20_test='yes'
rv20_test_deps='rv20_encoder rv20_decoder'
rv30_decoder='yes'
rv30_decoder_select='golomb h264pred'
rv40_decoder='yes'
rv40_decoder_select='golomb h264pred'
s302m_decoder='yes'
sap_demuxer='yes'
sap_demuxer_select='sdp_demuxer'
sap_muxer='yes'
sap_muxer_select='rtp_muxer rtp_protocol'
scale200_test='yes'
scale500_test='yes'
scale_filter='yes'
scale_filter_deps='swscale'
sdp_demuxer='yes'
sdp_demuxer_select='rtpdec'
seek_ac3_rm_test='yes'
seek_adpcm_ima_wav_test='yes'
seek_adpcm_ms_wav_test='yes'
seek_adpcm_qt_aiff_test='yes'
seek_adpcm_swf_flv_test='yes'
seek_adpcm_yam_wav_test='yes'
seek_alac_m4a_test='yes'
seek_asv1_avi_test='yes'
seek_asv2_avi_test='yes'
seek_dnxhd_1080i_mov_test='yes'
seek_dnxhd_720p_dnxhd_test='yes'
seek_dnxhd_720p_rd_dnxhd_test='yes'
seek_dv411_dv_test='yes'
seek_dv50_dv_test='yes'
seek_dv_dv_test='yes'
seek_error_mpeg4_adv_avi_test='yes'
seek_ffv1_avi_test='yes'
seek_flac_flac_test='yes'
seek_flashsv_flv_test='yes'
seek_flv_flv_test='yes'
seek_g726_wav_test='yes'
seek_h261_avi_test='yes'
seek_h263_avi_test='yes'
seek_h263p_avi_test='yes'
seek_huffyuv_avi_test='yes'
seek_image_bmp_test='yes'
seek_image_jpg_test='yes'
seek_image_pcx_test='yes'
seek_image_pgm_test='yes'
seek_image_ppm_test='yes'
seek_image_sgi_test='yes'
seek_image_tga_test='yes'
seek_image_tiff_test='yes'
seek_jpegls_avi_test='yes'
seek_lavf_aif_test='yes'
seek_lavf_al_test='yes'
seek_lavf_asf_test='yes'
seek_lavf_au_test='yes'
seek_lavf_avi_test='yes'
seek_lavf_dv_test='yes'
seek_lavf_ffm_test='yes'
seek_lavf_flv_test='yes'
seek_lavf_gif_test='yes'
seek_lavf_gxf_test='yes'
seek_lavf_mkv_test='yes'
seek_lavf_mmf_test='yes'
seek_lavf_mov_test='yes'
seek_lavf_mpg_test='yes'
seek_lavf_mxf_d10_test='yes'
seek_lavf_mxf_test='yes'
seek_lavf_nut_test='yes'
seek_lavf_ogg_test='yes'
seek_lavf_rm_test='yes'
seek_lavf_swf_test='yes'
seek_lavf_ts_test='yes'
seek_lavf_ul_test='yes'
seek_lavf_voc_test='yes'
seek_lavf_wav_test='yes'
seek_lavf_y4m_test='yes'
seek_ljpeg_avi_test='yes'
seek_mjpeg_avi_test='yes'
seek_mp2_mp2_test='yes'
seek_mpeg1_mpg_test='yes'
seek_mpeg1b_mpg_test='yes'
seek_mpeg2_422_mpg_test='yes'
seek_mpeg2_mpg_test='yes'
seek_mpeg2i_mpg_test='yes'
seek_mpeg2ivlc_qprd_mpg_test='yes'
seek_mpeg2reuse_mpg_test='yes'
seek_mpeg2thread_mpg_test='yes'
seek_mpeg2threadivlc_mpg_test='yes'
seek_mpeg4_adap_avi_test='yes'
seek_mpeg4_adv_avi_test='yes'
seek_mpeg4_nr_avi_test='yes'
seek_mpeg4_qprd_avi_test='yes'
seek_mpeg4_rc_avi_test='yes'
seek_mpeg4_thread_avi_test='yes'
seek_msmpeg4_avi_test='yes'
seek_msmpeg4v2_avi_test='yes'
seek_odivx_mp4_test='yes'
seek_pbmpipe_pbm_test='yes'
seek_pcm_alaw_wav_test='yes'
seek_pcm_f32be_au_test='yes'
seek_pcm_f32le_wav_test='yes'
seek_pcm_f64be_au_test='yes'
seek_pcm_f64le_wav_test='yes'
seek_pcm_mulaw_wav_test='yes'
seek_pcm_s16be_mkv_test='yes'
seek_pcm_s16be_mov_test='yes'
seek_pcm_s16le_mkv_test='yes'
seek_pcm_s16le_wav_test='yes'
seek_pcm_s24be_mov_test='yes'
seek_pcm_s24daud_302_test='yes'
seek_pcm_s24le_wav_test='yes'
seek_pcm_s32be_mov_test='yes'
seek_pcm_s32le_wav_test='yes'
seek_pcm_s8_mov_test='yes'
seek_pcm_u8_wav_test='yes'
seek_pcm_zork_wav_test='yes'
seek_pgmpipe_pgm_test='yes'
seek_ppmpipe_ppm_test='yes'
seek_rgb_avi_test='yes'
seek_roqav_roq_test='yes'
seek_rv10_rm_test='yes'
seek_rv20_rm_test='yes'
seek_snow53_avi_test='yes'
seek_snow_avi_test='yes'
seek_svq1_mov_test='yes'
seek_wmav1_asf_test='yes'
seek_wmav2_asf_test='yes'
seek_wmv1_avi_test='yes'
seek_wmv2_avi_test='yes'
seek_yuv_avi_test='yes'
segafilm_demuxer='yes'
setdar_filter='yes'
setpts_filter='yes'
setsar_filter='yes'
settb_filter='yes'
sgi_decoder='yes'
sgi_encoder='yes'
sgi_test='yes'
sgi_test_deps='sgi_encoder sgi_decoder'
shlibdir_default='${prefix}/lib'
shorten_decoder='yes'
shorten_decoder_select='golomb'
shorten_demuxer='yes'
showinfo_filter='yes'
siff_demuxer='yes'
sipr_decoder='yes'
sipr_decoder_select='lsp'
slicify_filter='yes'
smackaud_decoder='yes'
smacker_decoder='yes'
smacker_demuxer='yes'
smc_decoder='yes'
sndio_indev='yes'
sndio_indev_deps='sndio_h'
sndio_outdev='yes'
sndio_outdev_deps='sndio_h'
snow_decoder='yes'
snow_decoder_select='dwt'
snow_encoder='yes'
snow_encoder_select='aandct dwt'
snow_test='yes'
snow_test_deps='snow_encoder snow_decoder'
snowll_test='yes'
snowll_test_deps='snow_encoder snow_decoder'
sol_demuxer='yes'
sol_dpcm_decoder='yes'
sonic_decoder='yes'
sonic_decoder_select='golomb'
sonic_encoder='yes'
sonic_encoder_select='golomb'
sonic_ls_encoder='yes'
sonic_ls_encoder_select='golomb'
source_path='/home/vagelis/codec/ffmpeg'
source_path_used='no'
sox_demuxer='yes'
sox_muxer='yes'
sp5x_decoder='yes'
spdif_demuxer='yes'
spdif_muxer='yes'
spdif_muxer_select='aac_parser'
srt_decoder='yes'
srt_demuxer='yes'
srt_encoder='yes'
srt_muxer='yes'
sse='yes'
sse_deps='mmx'
ssse3='yes'
ssse3_deps='sse'
static='yes'
str_demuxer='yes'
strip_default='strip'
stripping='yes'
suf1='_muxer'
suf2='_demuxer'
sunrast_decoder='yes'
svq1_decoder='yes'
svq1_encoder='yes'
svq1_encoder_select='aandct'
svq1_test='yes'
svq1_test_deps='svq1_encoder svq1_decoder'
svq3_decoder='yes'
svq3_decoder_select='golomb h264dsp h264pred'
svq3_decoder_suggest='zlib'
swf_demuxer='yes'
swf_muxer='yes'
swf_test='yes'
swf_test_deps='swf_muxer swf_demuxer'
swscale='yes'
swscale_alpha='yes'
symver_if_any='symver_asm_label symver_gnu_asm'
targa_decoder='yes'
targa_encoder='yes'
target_os_default='linux'
target_path='$(CURDIR)'
tcp_protocol='yes'
tcp_protocol_deps='network'
tests='yuv4mpeg'
text2movsub_bsf='yes'
tg2_muxer='yes'
tg2_muxer_select='mov_muxer'
tga_test='yes'
tga_test_deps='targa_encoder targa_decoder'
tgp_muxer='yes'
tgp_muxer_select='mov_muxer'
theora_decoder='yes'
theora_decoder_select='vp3_decoder'
thp_decoder='yes'
thp_demuxer='yes'
tiertexseq_demuxer='yes'
tiertexseqvideo_decoder='yes'
tiff_decoder='yes'
tiff_decoder_suggest='zlib'
tiff_encoder='yes'
tiff_encoder_suggest='zlib'
tiff_test='yes'
tiff_test_deps='tiff_encoder tiff_decoder'
tmv_decoder='yes'
tmv_demuxer='yes'
transpose_filter='yes'
truehd_decoder='yes'
truehd_decoder_select='mlp_decoder'
truehd_demuxer='yes'
truehd_muxer='yes'
truemotion1_decoder='yes'
truemotion2_decoder='yes'
truespeech_decoder='yes'
ts_test='yes'
ts_test_deps='mpegts_muxer mpegts_demuxer'
tscc_decoder='yes'
tscc_decoder_select='zlib'
tta_decoder='yes'
tta_demuxer='yes'
tty_demuxer='yes'
twinvq_decoder='yes'
twinvq_decoder_select='mdct lsp sinewin'
txd_decoder='yes'
txd_demuxer='yes'
udp_protocol='yes'
udp_protocol_deps='network pthreads'
ulti_decoder='yes'
unsharp_filter='yes'
v='PROTOCOL_LIST'
v210_decoder='yes'
v210_encoder='yes'
v210x_decoder='yes'
v4l2_indev='yes'
v4l2_indev_deps_any='linux_videodev2_h sys_videoio_h'
v4l_indev='yes'
v4l_indev_deps='linux_videodev_h'
vaapi_deps='va_va_h'
value='yes'
var='x11grab'
vb_decoder='yes'
vc1_crystalhd_decoder='yes'
vc1_crystalhd_decoder_select='crystalhd'
vc1_decoder='yes'
vc1_decoder_select='h263_decoder'
vc1_demuxer='yes'
vc1_dxva2_hwaccel='yes'
vc1_dxva2_hwaccel_deps='dxva2api_h DXVA_PictureParameters_wDecodedPictureIndex'
vc1_dxva2_hwaccel_select='dxva2 vc1_decoder'
vc1_parser='yes'
vc1_vaapi_hwaccel='yes'
vc1_vaapi_hwaccel_select='vaapi vc1_decoder'
vc1_vdpau_decoder='yes'
vc1_vdpau_decoder_select='vdpau vc1_decoder'
vc1t_demuxer='yes'
vc1t_muxer='yes'
vcr1_decoder='yes'
vdpau_deps='vdpau_vdpau_h vdpau_vdpau_x11_h'
version3='yes'
vflip_crop_test='yes'
vflip_filter='yes'
vflip_test='yes'
vflip_vflip_test='yes'
vfwcap_indev='yes'
vfwcap_indev_deps='capCreateCaptureWindow vfwcap_defines'
vfwcap_indev_extralibs='-lavicap32'
vis='yes'
vis_deps='sparc'
vmd_demuxer='yes'
vmdaudio_decoder='yes'
vmdvideo_decoder='yes'
vmnc_decoder='yes'
voc_demuxer='yes'
voc_muxer='yes'
voc_s16_test='yes'
voc_test='yes'
voc_test_deps='voc_muxer voc_demuxer'
vorbis_decoder='yes'
vorbis_decoder_select='mdct'
vorbis_encoder='yes'
vorbis_encoder_select='mdct'
vp3_decoder='yes'
vp3_parser='yes'
vp5_decoder='yes'
vp6_decoder='yes'
vp6_decoder_select='huffman'
vp6a_decoder='yes'
vp6a_decoder_select='vp6_decoder'
vp6f_decoder='yes'
vp6f_decoder_select='vp6_decoder'
vp8_decoder='yes'
vp8_decoder_select='h264pred'
vp8_parser='yes'
vqa_decoder='yes'
vqf_demuxer='yes'
w64_demuxer='yes'
w64_demuxer_deps='wav_demuxer'
wav_demuxer='yes'
wav_muxer='yes'
wav_test='yes'
wav_test_deps='wav_muxer wav_demuxer'
wavpack_decoder='yes'
wc3_demuxer='yes'
webm_muxer='yes'
wmapro_decoder='yes'
wmapro_decoder_select='mdct sinewin'
wmav1_decoder='yes'
wmav1_decoder_select='mdct sinewin'
wmav1_encoder='yes'
wmav1_encoder_select='mdct sinewin'
wmav1_test='yes'
wmav1_test_deps='wmav1_encoder wmav1_decoder'
wmav2_decoder='yes'
wmav2_decoder_select='mdct sinewin'
wmav2_encoder='yes'
wmav2_encoder_select='mdct sinewin'
wmav2_test='yes'
wmav2_test_deps='wmav2_encoder wmav2_decoder'
wmavoice_decoder='yes'
wmavoice_decoder_select='lsp rdft dct mdct sinewin'
wmv1_decoder='yes'
wmv1_decoder_select='h263_decoder'
wmv1_encoder='yes'
wmv1_encoder_select='h263_encoder'
wmv1_test='yes'
wmv1_test_deps='wmv1_encoder wmv1_decoder'
wmv2_decoder='yes'
wmv2_decoder_select='h263_decoder'
wmv2_encoder='yes'
wmv2_encoder_select='h263_encoder'
wmv2_test='yes'
wmv2_test_deps='wmv2_encoder wmv2_decoder'
wmv3_crystalhd_decoder='yes'
wmv3_crystalhd_decoder_select='crystalhd'
wmv3_decoder='yes'
wmv3_decoder_select='vc1_decoder'
wmv3_dxva2_hwaccel='yes'
wmv3_dxva2_hwaccel_select='vc1_dxva2_hwaccel'
wmv3_vaapi_hwaccel='yes'
wmv3_vaapi_hwaccel_select='vc1_vaapi_hwaccel'
wmv3_vdpau_decoder='yes'
wmv3_vdpau_decoder_select='vc1_vdpau_decoder'
wnv1_decoder='yes'
ws_snd1_decoder='yes'
wsaud_demuxer='yes'
wsvqa_demuxer='yes'
wtv_demuxer='yes'
wv_demuxer='yes'
x11_grab_device_indev='yes'
x11_grab_device_indev_deps='x11grab XShmCreateImage'
x11_grab_device_indev_extralibs='-lX11 -lXext -lXfixes'
x11grab='yes'
x86_64_suggest='cmov fast_cmov'
xa_demuxer='yes'
xan_dpcm_decoder='yes'
xan_wc3_decoder='yes'
xan_wc4_decoder='yes'
xl_decoder='yes'
xsub_decoder='yes'
xsub_encoder='yes'
xwma_demuxer='yes'
yadif_filter='yes'
yadif_filter_deps='gpl'
yasmexe='yasm'
yop_decoder='yes'
yop_demuxer='yes'
yuv4mpeg_test='yes'
yuv4mpeg_test_deps='yuv4mpegpipe_muxer yuv4mpegpipe_demuxer'
yuv4mpegpipe_demuxer='yes'
yuv4mpegpipe_muxer='yes'
yuv_test='yes'
yuv_test_deps='rawvideo_encoder rawvideo_decoder'
zlib_decoder='yes'
zlib_decoder_select='zlib'
zlib_encoder='yes'
zlib_encoder_select='zlib'
zmbv_decoder='yes'
zmbv_decoder_select='zlib'
zmbv_encoder='yes'
zmbv_encoder_select='zlib'
mktemp -u XXXXXX
h7BxAZ
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_cflags -std=c99
check_cc -std=c99
BEGIN /tmp/ffconf.Bsxv6b04.c
1 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -std=c99 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_cc -D_FILE_OFFSET_BITS=64
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <stdlib.h>
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -std=c99 -D_FILE_OFFSET_BITS=64 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_cc -D_LARGEFILE_SOURCE
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <stdlib.h>
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -std=c99 -D_LARGEFILE_SOURCE -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_host_cflags -std=c99
check_host_cc -std=c99
BEGIN /tmp/ffconf.Bsxv6b04.c
1 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -O3 -g -Wall -std=c99 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 int test[(int)sizeof(char*) - 7];
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:13: error: size of array 'test' is negative
check_cpp_condition stdlib.h defined(__PIC__) || defined(__pic__) || defined(PIC)
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <stdlib.h>
2 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
3 #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
4 #endif
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:3:2: error: #error "unsatisfied condition: defined(__PIC__) || defined(__pic__) || defined(PIC)"
check_cflags -fomit-frame-pointer
check_cc -fomit-frame-pointer
BEGIN /tmp/ffconf.Bsxv6b04.c
1 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 int ff_extern;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 void foo(void) { __asm__ volatile ("" ::); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 void foo(char * restrict p);
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 struct { int x; } __attribute__((packed)) x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 union { int x; } __attribute__((may_alias)) x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <signal.h>
2 static void sighandler(int sig){
3 raise(SIGTERM);
4 }
5 int main(void){
6 signal(SIGILL, sighandler);
7 signal(SIGFPE, sighandler);
8 signal(SIGSEGV, sighandler);
9 #ifdef SIGBUS
10 signal(SIGBUS, sighandler);
11 #endif
12 { volatile int i=0;
13 __asm__ volatile (
14 "xorl %%ebp, %%ebp"
15 ::: "%ebp");
16 return i; }
17 }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c: In function 'main':
/tmp/ffconf.Bsxv6b04.c:17:1: error: bp cannot be used in asm here
check_asm ebx_available ""::"b"(0)
check_as
BEGIN /tmp/ffconf.Bsxv6b04.c
1 void foo(void){ __asm__ volatile(""::"b"(0)); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_asm ebx_available "":::"%ebx"
check_as
BEGIN /tmp/ffconf.Bsxv6b04.c
1 void foo(void){ __asm__ volatile("":::"%ebx"); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_asm xmm_clobbers "":::"%xmm0"
check_as
BEGIN /tmp/ffconf.Bsxv6b04.c
1 void foo(void){ __asm__ volatile("":::"%xmm0"); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c: In function 'foo':
/tmp/ffconf.Bsxv6b04.c:1:17: error: unknown register name '%xmm0' in 'asm'
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 int main(void) {
2 int x=0;
3 __asm__ volatile(
4 ""
5 :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
6 );
7 return 0;
8 }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_asm ssse3 "pabsw %xmm0, %xmm0"
check_as
BEGIN /tmp/ffconf.Bsxv6b04.c
1 void foo(void){ __asm__ volatile("pabsw %xmm0, %xmm0"); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_asm mmx2 "pmaxub %mm0, %mm1"
check_as
BEGIN /tmp/ffconf.Bsxv6b04.c
1 void foo(void){ __asm__ volatile("pmaxub %mm0, %mm1"); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_asm bswap "bswap %%eax" ::: "%eax"
check_as
BEGIN /tmp/ffconf.Bsxv6b04.c
1 void foo(void){ __asm__ volatile("bswap %%eax" ::: "%eax"); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
yasm --version
yasm 1.1.0.2352
Compiled on Aug 10 2010.
Copyright (c) 2001-2010 Peter Johnson and other Yasm developers.
Run yasm --license for licensing overview and summary.
check_yasm pextrd [eax], xmm0, 1
BEGIN /tmp/ffconf.WvKRcxLg.S
1 pextrd [eax], xmm0, 1
END /tmp/ffconf.WvKRcxLg.S
yasm -f elf -g dwarf2 -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.WvKRcxLg.S
check_yasm vpaddw xmm0, xmm0, xmm0
BEGIN /tmp/ffconf.WvKRcxLg.S
1 vpaddw xmm0, xmm0, xmm0
END /tmp/ffconf.WvKRcxLg.S
yasm -f elf -g dwarf2 -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.WvKRcxLg.S
check_asm gnu_as ".macro m n
\n:.int 0
.endm
m x"
check_as
BEGIN /tmp/ffconf.Bsxv6b04.c
1 void foo(void){ __asm__ volatile(".macro m n\n\\n:.int 0\n.endm\nm x"); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_ldflags -Wl,--as-needed
test_ldflags -Wl,--as-needed
check_ld -Wl,--as-needed
check_cc -Wl,--as-needed
BEGIN /tmp/ffconf.Bsxv6b04.c
1 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -Wl,--as-needed -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func dlopen
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int dlopen();
2 int main(void){ dlopen(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
/tmp/ffconf.tVMR80Wm.o: In function `main':
ffconf.Bsxv6b04.c:(.text+0x7): undefined reference to `dlopen'
collect2: ld returned 1 exit status
check_func dlopen -ldl
check_ld -ldl
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int dlopen();
2 int main(void){ dlopen(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -ldl
check_type sys/types.h sys/socket.h socklen_t
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1
2 #include <sys/types.h>
3 #include <sys/socket.h>
4 socklen_t v;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_type netdb.h struct addrinfo
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1
2 #include <netdb.h>
3 struct addrinfo v;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_type netinet/in.h struct ipv6_mreq -D_DARWIN_C_SOURCE
check_cc -D_DARWIN_C_SOURCE
BEGIN /tmp/ffconf.Bsxv6b04.c
1
2 #include <netinet/in.h>
3 struct ipv6_mreq v;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -D_DARWIN_C_SOURCE -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_type netinet/in.h struct sockaddr_in6
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1
2 #include <netinet/in.h>
3 struct sockaddr_in6 v;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_type sys/types.h sys/socket.h struct sockaddr_storage
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1
2 #include <sys/types.h>
3 #include <sys/socket.h>
4 struct sockaddr_storage v;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_type sys/types.h sys/socket.h struct sockaddr sa_len
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1
2 #include <sys/types.h>
3 #include <sys/socket.h>
4 const void *p = &((struct sockaddr *)0)->sa_len;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:4:40: error: 'struct sockaddr' has no member named 'sa_len'
check_header arpa/inet.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <arpa/inet.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_func closesocket
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int closesocket();
2 int main(void){ closesocket(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
/tmp/ffconf.tVMR80Wm.o: In function `main':
ffconf.Bsxv6b04.c:(.text+0x7): undefined reference to `closesocket'
collect2: ld returned 1 exit status
check_func nanosleep
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int nanosleep();
2 int main(void){ nanosleep(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func fcntl
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int fcntl();
2 int main(void){ fcntl(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func fork
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int fork();
2 int main(void){ fork(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func getaddrinfo
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int getaddrinfo();
2 int main(void){ getaddrinfo(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func gethrtime
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int gethrtime();
2 int main(void){ gethrtime(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
/tmp/ffconf.tVMR80Wm.o: In function `main':
ffconf.Bsxv6b04.c:(.text+0x7): undefined reference to `gethrtime'
collect2: ld returned 1 exit status
check_func getrusage
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int getrusage();
2 int main(void){ getrusage(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_type sys/time.h sys/resource.h struct rusage ru_maxrss
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1
2 #include <sys/time.h>
3 #include <sys/resource.h>
4 const void *p = &((struct rusage *)0)->ru_maxrss;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_func inet_aton
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int inet_aton();
2 int main(void){ inet_aton(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func isatty
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int isatty();
2 int main(void){ isatty(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func localtime_r
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int localtime_r();
2 int main(void){ localtime_r(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func memalign
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int memalign();
2 int main(void){ memalign(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func mkstemp
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int mkstemp();
2 int main(void){ mkstemp(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func mmap
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int mmap();
2 int main(void){ mmap(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func posix_memalign
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int posix_memalign();
2 int main(void){ posix_memalign(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func setrlimit
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int setrlimit();
2 int main(void){ setrlimit(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func strerror_r
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int strerror_r();
2 int main(void){ strerror_r(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func strtok_r
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int strtok_r();
2 int main(void){ strtok_r(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o
check_func_headers conio.h kbhit
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <conio.h>
2 long check_kbhit(void) { return (long) kbhit; }
3 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:19: fatal error: conio.h: No such file or directory
compilation terminated.
check_func_headers io.h setmode
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <io.h>
2 long check_setmode(void) { return (long) setmode; }
3 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:16: fatal error: io.h: No such file or directory
compilation terminated.
check_func_headers lzo/lzo1x.h lzo1x_999_compress
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <lzo/lzo1x.h>
2 long check_lzo1x_999_compress(void) { return (long) lzo1x_999_compress; }
3 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:23: fatal error: lzo/lzo1x.h: No such file or directory
compilation terminated.
check_lib2 windows.h psapi.h GetProcessMemoryInfo -lpsapi
check_func_headers windows.h psapi.h GetProcessMemoryInfo -lpsapi
check_ld -lpsapi
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <windows.h>
2 #include <psapi.h>
3 long check_GetProcessMemoryInfo(void) { return (long) GetProcessMemoryInfo; }
4 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:21: fatal error: windows.h: No such file or directory
compilation terminated.
check_func_headers windows.h GetProcessTimes
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <windows.h>
2 long check_GetProcessTimes(void) { return (long) GetProcessTimes; }
3 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:21: fatal error: windows.h: No such file or directory
compilation terminated.
check_func_headers windows.h MapViewOfFile
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <windows.h>
2 long check_MapViewOfFile(void) { return (long) MapViewOfFile; }
3 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:21: fatal error: windows.h: No such file or directory
compilation terminated.
check_func_headers windows.h VirtualAlloc
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <windows.h>
2 long check_VirtualAlloc(void) { return (long) VirtualAlloc; }
3 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:21: fatal error: windows.h: No such file or directory
compilation terminated.
check_header dlfcn.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <dlfcn.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_header dxva2api.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <dxva2api.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:22: fatal error: dxva2api.h: No such file or directory
compilation terminated.
check_header libcrystalhd/libcrystalhd_if.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <libcrystalhd/libcrystalhd_if.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:42: fatal error: libcrystalhd/libcrystalhd_if.h: No such file or directory
compilation terminated.
check_header malloc.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <malloc.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_header poll.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <poll.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_header sys/mman.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <sys/mman.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_header sys/resource.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <sys/resource.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_header sys/select.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <sys/select.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_header termios.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <termios.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_header vdpau/vdpau.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <vdpau/vdpau.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_header vdpau/vdpau_x11.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <vdpau/vdpau_x11.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_header X11/extensions/XvMClib.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <X11/extensions/XvMClib.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:36: fatal error: X11/extensions/XvMClib.h: No such file or directory
compilation terminated.
check_type dxva2api.h DXVA_PictureParameters wDecodedPictureIndex
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1
2 #include <dxva2api.h>
3 const void *p = &((DXVA_PictureParameters *)0)->wDecodedPictureIndex;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:2:22: fatal error: dxva2api.h: No such file or directory
compilation terminated.
check_lib zlib.h zlibVersion -lz
check_header zlib.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <zlib.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_func zlibVersion -lz
check_ld -lz
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int zlibVersion();
2 int main(void){ zlibVersion(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lz
check_lib2 bzlib.h BZ2_bzlibVersion -lbz2
check_func_headers bzlib.h BZ2_bzlibVersion -lbz2
check_ld -lbz2
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <bzlib.h>
2 long check_BZ2_bzlibVersion(void) { return (long) BZ2_bzlibVersion; }
3 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:19: fatal error: bzlib.h: No such file or directory
compilation terminated.
check_func pthread_create
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int pthread_create();
2 int main(void){ pthread_create(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lz
/tmp/ffconf.tVMR80Wm.o: In function `main':
ffconf.Bsxv6b04.c:(.text+0x7): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
check_func pthread_create -pthread
check_ld -pthread
check_cc -pthread
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int pthread_create();
2 int main(void){ pthread_create(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -pthread -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lz
check_lib math.h sin -lm
check_header math.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_func sin -lm
check_ld -lm
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int sin();
2 int main(void){ sin(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:12: warning: conflicting types for built-in function 'sin'
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_lib libcrystalhd/libcrystalhd_if.h DtsCrystalHDVersion -lcrystalhd
check_header libcrystalhd/libcrystalhd_if.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <libcrystalhd/libcrystalhd_if.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:42: fatal error: libcrystalhd/libcrystalhd_if.h: No such file or directory
compilation terminated.
check_mathfunc exp2
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return exp2(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc exp2f
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return exp2f(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc llrint
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return llrint(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc llrintf
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return llrintf(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc log2
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return log2(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc log2f
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return log2f(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc lrint
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return lrint(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc lrintf
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return lrintf(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc round
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return round(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc roundf
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return roundf(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc trunc
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return trunc(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_mathfunc truncf
check_ld
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <math.h>
2 float foo(float f) { return truncf(f); }
3 int main(void){ return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lm -pthread -lz
check_lib2 stdint.h faac.h faacEncGetVersion -lfaac
check_func_headers stdint.h faac.h faacEncGetVersion -lfaac
check_ld -lfaac
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <stdint.h>
2 #include <faac.h>
3 long check_faacEncGetVersion(void) { return (long) faacEncGetVersion; }
4 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lfaac -lm -pthread -lz
check_lib lame/lame.h lame_set_VBR_quality -lmp3lame
check_header lame/lame.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <lame/lame.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_func lame_set_VBR_quality -lmp3lame
check_ld -lmp3lame
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int lame_set_VBR_quality();
2 int main(void){ lame_set_VBR_quality(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lmp3lame -lfaac -lm -pthread -lz
check_lib opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
check_header opencore-amrnb/interf_dec.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <opencore-amrnb/interf_dec.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_func Decoder_Interface_init -lopencore-amrnb
check_ld -lopencore-amrnb
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int Decoder_Interface_init();
2 int main(void){ Decoder_Interface_init(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lz
check_lib opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
check_header opencore-amrwb/dec_if.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <opencore-amrwb/dec_if.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_func D_IF_init -lopencore-amrwb
check_ld -lopencore-amrwb
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int D_IF_init();
2 int main(void){ D_IF_init(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lz
check_lib theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
check_header theora/theoraenc.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <theora/theoraenc.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_func th_info_init -ltheoraenc -ltheoradec -logg
check_ld -ltheoraenc -ltheoradec -logg
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int th_info_init();
2 int main(void){ th_info_init(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -ltheoraenc -ltheoradec -logg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lz
check_lib vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
check_header vorbis/vorbisenc.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <vorbis/vorbisenc.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
check_func vorbis_info_init -lvorbisenc -lvorbis -logg
check_ld -lvorbisenc -lvorbis -logg
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 extern int vorbis_info_init();
2 int main(void){ vorbis_info_init(); }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lz
check_lib2 vpx/vpx_decoder.h vpx/vp8dx.h vpx_codec_dec_init_ver -lvpx
check_func_headers vpx/vpx_decoder.h vpx/vp8dx.h vpx_codec_dec_init_ver -lvpx
check_ld -lvpx
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <vpx/vpx_decoder.h>
2 #include <vpx/vp8dx.h>
3 long check_vpx_codec_dec_init_ver(void) { return (long) vpx_codec_dec_init_ver; }
4 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lz
check_lib2 vpx/vpx_encoder.h vpx/vp8cx.h vpx_codec_enc_init_ver VPX_CQ -lvpx
check_func_headers vpx/vpx_encoder.h vpx/vp8cx.h vpx_codec_enc_init_ver VPX_CQ -lvpx
check_ld -lvpx
check_cc
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <vpx/vpx_encoder.h>
2 #include <vpx/vp8cx.h>
3 long check_vpx_codec_enc_init_ver(void) { return (long) vpx_codec_enc_init_ver; }
4 long check_VPX_CQ(void) { return (long) VPX_CQ; }
5 int main(void) { return 0; }
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
gcc -Wl,--as-needed -o /tmp/ffconf.yduavK8J /tmp/ffconf.tVMR80Wm.o -lvpx -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lfaac -lm -pthread -lz
check_lib x264.h x264_encoder_encode -lx264
check_header x264.h
check_cpp
BEGIN /tmp/ffconf.Bsxv6b04.c
1 #include <x264.h>
2 int x;
END /tmp/ffconf.Bsxv6b04.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -std=c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.tVMR80Wm.o /tmp/ffconf.Bsxv6b04.c
/tmp/ffconf.Bsxv6b04.c:1:18: fatal error: x264.h: No such file or directory
compilation terminated.
ERROR: libx264 not found
JadedSamurai
May 14th, 2011, 03:56 PM
Hello. Linux noob here. I have to install ffmpeg with Lame support to run CollectiveAccess (cataloguing application), but I'm stuck.
I'm running Ubuntu 11.04 (as a guest OS through VirtualBox (with Windows 7 as host OS). I have followed the steps in this topic, but when I try to install FFmpeg (step 5), I get this:
hcoremans@hcoremans-VirtualBox:~/x264$ cd
hcoremans@hcoremans-VirtualBox:~$ git clone git://git.videolan.org/ffmpeg
Cloning into ffmpeg...
remote: Counting objects: 153301, done.
remote: Compressing objects: 100% (34219/34219), done.
remote: Total 153301 (delta 119198), reused 152878 (delta 118877)
Receiving objects: 100% (153301/153301), 40.24 MiB | 2.25 MiB/s, done.
Resolving deltas: 100% (119198/119198), done.
hcoremans@hcoremans-VirtualBox:~$ cd ffmpeg
hcoremans@hcoremans-VirtualBox:~/ffmpeg$ ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
> --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
> --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \
> --enable-libx264 --enable-libxvid --enable-x11grab
ERROR: libx264 not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
hcoremans@hcoremans-VirtualBox:~/ffmpeg$ make
Makefile:1: config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libavutil/../subdir.mak:96: warning: overriding commands for target `libavutil/'
libavutil/../subdir.mak:26: warning: ignoring old commands for target `libavutil/'
libavutil/../subdir.mak:96: warning: overriding commands for target `libavutil/'
libavutil/../subdir.mak:96: warning: ignoring old commands for target `libavutil/'
Makefile:236: /tests/fate.mak: No such file or directory
Makefile:237: /tests/fate2.mak: No such file or directory
Makefile:239: /tests/fate/aac.mak: No such file or directory
Makefile:240: /tests/fate/als.mak: No such file or directory
Makefile:241: /tests/fate/fft.mak: No such file or directory
Makefile:242: /tests/fate/h264.mak: No such file or directory
Makefile:243: /tests/fate/mp3.mak: No such file or directory
Makefile:244: /tests/fate/vorbis.mak: No such file or directory
Makefile:245: /tests/fate/vp8.mak: No such file or directory
make: *** No rule to make target `/tests/fate/vp8.mak'. Stop.
hcoremans@hcoremans-VirtualBox:~/ffmpeg$ sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no \
> --deldoc=yes --fstrans=no --default
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@hcoremans-VirtualBox ]
1 - Summary: [ Package created with checkinstall 1.6.2 ]
2 - Name: [ ffmpeg ]
3 - Version: [ 5:201105141637-git ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ ffmpeg ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ ffmpeg ]
12 - Conflicts: [ ]
13 - Replaces: [ ]
Enter a number to change any of them or press ENTER to continue:
Installing with make install...
========================= Installation results ===========================
Makefile:1: config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libavutil/../subdir.mak:96: warning: overriding commands for target `libavutil/'
libavutil/../subdir.mak:26: warning: ignoring old commands for target `libavutil/'
libavutil/../subdir.mak:96: warning: overriding commands for target `libavutil/'
libavutil/../subdir.mak:96: warning: ignoring old commands for target `libavutil/'
Makefile:236: /tests/fate.mak: No such file or directory
Makefile:237: /tests/fate2.mak: No such file or directory
Makefile:239: /tests/fate/aac.mak: No such file or directory
Makefile:240: /tests/fate/als.mak: No such file or directory
Makefile:241: /tests/fate/fft.mak: No such file or directory
Makefile:242: /tests/fate/h264.mak: No such file or directory
Makefile:243: /tests/fate/mp3.mak: No such file or directory
Makefile:244: /tests/fate/vorbis.mak: No such file or directory
Makefile:245: /tests/fate/vp8.mak: No such file or directory
make: *** No rule to make target `/tests/fate/vp8.mak'. Stop.
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
hcoremans@hcoremans-VirtualBox:~/ffmpeg$ hash x264 ffmpeg ffplay ffprobe
Can anyone tell me what I should do? The previous steps all went ok (I got messages that installation was successful), I just can't get the last step to work...
Scouto
May 14th, 2011, 05:52 PM
i'm also having the same problem as the above poster... :(
mc4man
May 14th, 2011, 07:25 PM
At least here on natty - for x264 you'll need to go
./configure --enable-static
or you'll only build the x264 binary
If ffmpeg can't find after that then build x264 as shared, though it should be able to statically link
andrew.46
May 14th, 2011, 11:23 PM
At least here on natty - for x264 you'll need to go
./configure --enable-static
or you'll only build the x264 binary
As usual mc4man you have hit the nail on the head :). There has been a change in the x264 build defaults (http://git.videolan.org/?p=x264.git;a=blobdiff;f=configure;h=d16441432f9a2 24619ee6b5c6100598147c24350;hp=d5a93e7ed78cbfbc06e bc4a49a2a50e35560f076;hb=c1e60b9032196d204db8dce77 051360e403a1d2f;hpb=330e258ed53553530290409671fe5a 3a26ee7f6a) so that now if Fakeoutdoorsman's x264 installation instructions are followed (with a bare ./configure) the following results:
andrew@skamandros~/source/ffmpeg_build/x264/copy of x264$ ./configure
Platform: X86
System: LINUX
cli: yes
libx264: internal
shared: no
static: no
asm: yes
interlaced: yes
avs: no
lavf: yes
ffms: no
gpac: yes
gpl: yes
thread: posix
filters: resize crop select_every
debug: no
gprof: no
strip: no
PIC: no
visualize: no
bit depth: 8
You can run 'make' or 'make fprofiled' now.
Which is to say that the old default of building static library has been removed. This is a little awkward as Fakeoutdoorsman is away for a while and thus the instructions themselves cannot be modified :(. Can those who are having x264 trouble try the following instructions for x264, as mc4man has suggested:
cd
git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
--fstrans=no --default
and if that solves the problem this post should serve as a pointer until FO returns :)
vagrale13
May 15th, 2011, 12:11 AM
For me works fine now with --enable-static
Thanks mc4man!
FakeOutdoorsman
May 15th, 2011, 07:57 AM
Thanks for keeping up with the upstream changes, everyone. I was able to borrow a laptop in Norway to update the guides.
andrew.46
May 15th, 2011, 10:24 AM
Thanks for keeping up with the upstream changes, everyone. I was able to borrow a laptop in Norway to update the guides.
That could be the opening lines in a great novel: "I was able to borrow a laptop in Norway.....". Have a great time up there!!!
umechanism
May 15th, 2011, 02:36 PM
Wow! Great thread...all 170 pages of it. This thread was started in 2008 so before I dive in and read it from end-to-end I want to be sure it is necessary to do so.
I simply want to install the latest cinelerra-cv which uses ffmpeg. I am using Ubuntu 10.10. Can't I just install ffmpeg and cinelerra from the repositories now assuming that enough time has elapsed and the repositories are up-to-date?
Thanks for the effort and time you put into this.
wim.glenn
May 16th, 2011, 04:57 AM
thanks all.. for a couple of days my build script wasn't working but it worked again after adding --enable-static as someone mentioned here.
just a dumb question , if i follow the guide as in the first step, and then i use ffmpeg with -vcodec libx264 , will i be using the same build of libx264 as if i were to call the x264 cli directly? i am comfortable with the x264 parameters and tunings but now i require some of the rtmp stuff that ffmpeg can do, and i would like to be using the latest libx264 builds (because i want all the newer low-latency stuff). i'm also a bit confused about how to pass the familiar flags from x264 cli , using ffmpeg. at the moment i'm using -fpre and specifying the path of a config file , and it seems to set parameters correctly, but what is the differences (if any) between -vpre and -fpre ?
qyot27
May 16th, 2011, 07:29 AM
thanks all.. for a couple of days my build script wasn't working but it worked again after adding --enable-static as someone mentioned here.
just a dumb question , if i follow the guide as in the first step, and then i use ffmpeg with -vcodec libx264 , will i be using the same build of libx264 as if i were to call the x264 cli directly? i am comfortable with the x264 parameters and tunings but now i require some of the rtmp stuff that ffmpeg can do, and i would like to be using the latest libx264 builds (because i want all the newer low-latency stuff). i'm also a bit confused about how to pass the familiar flags from x264 cli , using ffmpeg. at the moment i'm using -fpre and specifying the path of a config file , and it seems to set parameters correctly, but what is the differences (if any) between -vpre and -fpre ?
If x264 was built as static and ffmpeg was built as static, then yes, ffmpeg is using the same version as x264 CLI.
Someone else will have to tackle the preset usage changes, though. I thought that was already in the first post?
andrew.46
May 16th, 2011, 08:23 AM
i'm also a bit confused about how to pass the familiar flags from x264 cli , using ffmpeg. at the moment i'm using -fpre and specifying the path of a config file , and it seems to set parameters correctly, but what is the differences (if any) between -vpre and -fpre ?
I am ready to be corrected here, even from Norway if Fakeoutdoorsman gets online again!! The state of play at the moment (current git) is that now FFmpeg can use x264 presets, and to do this the -preset option is used. Details of these options can be seen with x264 --fullhelp and are illustrated quite nicely in Fakeoutdoorsman's guide. There are also a few of the old presets remaining:
root@skamandros/home/andrew# find /usr -iname '*ffpreset'
/usr/share/ffmpeg/libvpx-720p50_60.ffpreset
/usr/share/ffmpeg/libx264-lossless_slow.ffpreset
/usr/share/ffmpeg/libvpx-720p.ffpreset
/usr/share/ffmpeg/libvpx-1080p.ffpreset
/usr/share/ffmpeg/libvpx-1080p50_60.ffpreset
/usr/share/ffmpeg/libx264-baseline.ffpreset
/usr/share/ffmpeg/libx264-lossless_slower.ffpreset
/usr/share/ffmpeg/libvpx-360p.ffpreset
/usr/share/ffmpeg/libx264-lossless_fast.ffpreset
/usr/share/ffmpeg/libx264-lossless_max.ffpreset
/usr/share/ffmpeg/libx264-lossless_ultrafast.ffpreset
/usr/share/ffmpeg/libx264-ipod320.ffpreset
/usr/share/ffmpeg/libx264-ipod640.ffpreset
/usr/share/ffmpeg/libx264-lossless_medium.ffpreset
Just ignore the libvpx ones! These can be utilised with the old -vpre option. The final option is to create your own presets and load them, with their path, using the -fpre option. Hopefully that is a clear description, anybody feel free to correct me!
Edit: I can correct myself, I saw this link elsewhere in the Forums:
3.10 Preset files
http://www.ffmpeg.org/ffmpeg-doc.html#SEC13
which explains some of the differences in methods of calling the presets vs -fpre / -apre / -vpre etc..
WhatEverMD
May 16th, 2011, 10:58 AM
Thank you very much :)
Was away for the weekend, and could not respond.
./configure --enable-static has helped. Everything went fine!
wim.glenn
May 16th, 2011, 11:14 AM
thankyou , i will continue to use the -fpre arg then :)
fruttosio
May 16th, 2011, 10:28 PM
i can rename the folders x264, ffmpeg, libpvx in: .x264, .ffmpeg and .libpvx? it's possibile that there are problem about find something?
sailor420
May 16th, 2011, 10:32 PM
Thanks for keeping up with the upstream changes, everyone. I was able to borrow a laptop in Norway to update the guides.
Now that's dedication.
vagrale13
May 18th, 2011, 09:01 AM
i can rename the folders x264, ffmpeg, libpvx in: .x264, .ffmpeg and .libpvx? it's possibile that there are problem about find something?
Yes, you can do that.
The only change you must do, replace all names (x264, libpvx & ffmpeg) with new names (.x264, .libpvx & .ffmpeg) of commands to your path folder.
e.g.
cd ~/x264to
cd ~/.x264
fruttosio
May 18th, 2011, 02:38 PM
thank you.
andrew.46
May 19th, 2011, 12:02 AM
For a long time, though, if you wanted to simply transcode file A to file B, FFmpeg was easier because you *usually* didn't have to worry what the input formats were, and you could get an output file that had both video and audio. Getting that same functionality in x264 is a matter of extra, optional dependencies - you don't have to build an x264 that can do those things.
An extra temptation to use FFmpeg rather than x264 directly has been the recent addition of -x264opts which apparently opens up the use of all x264 options from within FFmpeg. Now if I only understood those options ... :(.
plantoschka
May 19th, 2011, 03:59 PM
I always get an error Message while trying to compile(make) ffmpeg:
...
libavcodec/crystalhd.c:970:13: warning: statement with no effect
libavcodec/crystalhd.c:981:16: error: ‘CHDContext’ has no member named ‘decode_wait’
libavcodec/crystalhd.c:981:5: warning: passing argument 1 of ‘usleep’ makes integer from pointer without a cast
/usr/include/unistd.h:457:12: note: expected ‘__useconds_t’ but argument is of type ‘const struct AVOption *’
make: *** [libavcodec/crystalhd.o] Fehler 1
make: *** Warte auf noch nicht beendete Prozesse...
Hope someone can help me.
Thanks
andrew.46
May 19th, 2011, 10:38 PM
I always get an error Message while trying to compile(make) ffmpeg:
make: *** [libavcodec/crystalhd.o] Fehler 1
make: *** Warte auf noch nicht beendete Prozesse...
I have just compiled FFmpeg with no problem, so I am not sure of the problem (and a little rusty with my German!). Are you adding a -j2 or similar to make? If so try omitting this.
plantoschka
May 20th, 2011, 01:34 PM
I have just compiled FFmpeg with no problem, so I am not sure of the problem (and a little rusty with my German!). Are you adding a -j2 or similar to make? If so try omitting this.
No just like in the Guide (make).
I tried a fresh build today but still get the same error message. (libvacodec/crystalhd)
Compiling x264 worked fine.
Using Xubuntu 11.04 in VirtualBox.
andrew.46
May 20th, 2011, 02:12 PM
Hmmm.... does compilation succeed if you add --disable-crystalhd to the ./configure string? Beyond this I am not sure what is going on and if no further thoughts are forthcoming from this Forums (or from Norway!!) I would suggest posting on the FFmpeg-user mailing list, or requesting help on #ffmpeg.
Edit: Do you actually have a Broadcom CrystalHD decoding chip on your system?
plantoschka
May 20th, 2011, 03:17 PM
Hmmm.... does compilation succeed if you add --disable-crystalhd to the ./configure string? Beyond this I am not sure what is going on and if no further thoughts are forthcoming from this Forums (or from Norway!!) I would suggest posting on the FFmpeg-user mailing list, or requesting help on #ffmpeg.
Edit: Do you actually have a Broadcom CrystalHD decoding chip on your system?
Thanks, now it worked fine with "--disable-crystalhd".
I don't have a CrystalHD Decoding Chip on my sys.
andrew.46
May 20th, 2011, 11:26 PM
Thanks, now it worked fine with "--disable-crystalhd".
I don't have a CrystalHD Decoding Chip on my sys.
It all sounds a bit odd but I guess your copy of FFmpeg is now ready for action :).
|Anthony|
May 22nd, 2011, 04:21 PM
I'm trying to turn your method into a bash script for easy use... But there seems to be an issue with:
sudo checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes
Your quoting isn't closed or something... Your awk separator is [" ] but i think that the " needs to be escaped. Maybe you could explain this since others run this method via cli with *no problem*.
andrew.46
May 24th, 2011, 12:17 AM
I'm trying to turn your method into a bash script for easy use... But there seems to be an issue with:
sudo checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes
This might have to wait until Fakeoutdoorsman's return but in the meantime perhaps a simple date string might get your script running:
sudo checkinstall --pkgname=x264 --default \
--pkgversion="3:$(date +"%d%m%Y")" --backup=no --deldoc=yes
jman4117
May 24th, 2011, 02:37 AM
Hi, I used the Lucid guide here to install with capturing support and I can't get it to work with any options that I've tried.
Here is the command and output:
user@ubuntu:~$ ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 640x480 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
ffmpeg version git-N-30166-g1bc81bf, Copyright (c) 2000-2011 the FFmpeg developers
built on May 23 2011 21:02:23 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libmp3lame
libavutil 51. 2. 1 / 51. 2. 1
libavcodec 53. 6. 0 / 53. 6. 0
libavformat 53. 2. 0 / 53. 2. 0
libavdevice 53. 0. 0 / 53. 0. 0
libavfilter 2. 10. 0 / 2. 10. 0
libswscale 0. 14. 0 / 0. 14. 0
libpostproc 51. 2. 0 / 51. 2. 0
[alsa @ 0xae15b20] capture with some ALSA plugins, especially dsnoop, may hang.
[alsa @ 0xae15b20] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'pulse':
Duration: N/A, start: 1306200463.989954, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[x11grab @ 0xae27920] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 640 height: 480
[x11grab @ 0xae27920] shared memory extension found
[x11grab @ 0xae27920] Estimating duration from bitrate, this may be inaccurate
Input #1, x11grab, from ':0.0':
Duration: N/A, start: 1306200464.858995, bitrate: 294912 kb/s
Stream #1.0: Video: rawvideo, bgra, 640x480, 294912 kb/s, 30 tbr, 1000k tbn, 30 tbc
Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p'
File 'output.mkv' already exists. Overwrite ? [y/N] n
Not overwriting - exiting
jgodwin@Minty:~$ clear
jgodwin@Minty:~$ ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 640x480 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
ffmpeg version git-N-30166-g1bc81bf, Copyright (c) 2000-2011 the FFmpeg developers
built on May 23 2011 21:02:23 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libmp3lame
libavutil 51. 2. 1 / 51. 2. 1
libavcodec 53. 6. 0 / 53. 6. 0
libavformat 53. 2. 0 / 53. 2. 0
libavdevice 53. 0. 0 / 53. 0. 0
libavfilter 2. 10. 0 / 2. 10. 0
libswscale 0. 14. 0 / 0. 14. 0
libpostproc 51. 2. 0 / 51. 2. 0
[alsa @ 0x9f30b20] capture with some ALSA plugins, especially dsnoop, may hang.
[alsa @ 0x9f30b20] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'pulse':
Duration: N/A, start: 1306200517.994972, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
[x11grab @ 0x9f429c0] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 640 height: 480
[x11grab @ 0x9f429c0] shared memory extension found
[x11grab @ 0x9f429c0] Estimating duration from bitrate, this may be inaccurate
Input #1, x11grab, from ':0.0':
Duration: N/A, start: 1306200518.910880, bitrate: 294912 kb/s
Stream #1.0: Video: rawvideo, bgra, 640x480, 294912 kb/s, 30 tbr, 1000k tbn, 30 tbc
Incompatible pixel format 'bgra' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0x9f26e80] w:640 h:480 pixfmt:bgra tb:1/1000000 sar:0/1 sws_param:
[ffsink @ 0x9f31b60] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x9f32140] w:640 h:480 fmt:bgra -> w:640 h:480 fmt:yuv420p flags:0xa0000004
[libx264 @ 0x9f29660] --psnr used with psy on: results will be invalid!
[libx264 @ 0x9f29660] --tune psnr should be used if attempting to benchmark psnr!
[libx264 @ 0x9f29660] interlace + weightp is not implemented
[libx264 @ 0x9f29660] using cpu capabilities: MMX2 SSE2Slow SlowCTZ
[libx264 @ 0x9f29660] constant rate-factor is incompatible with 2pass.
Output #0, matroska, to 'output.mkv':
Stream #0.0: Video: libx264, yuv420p, 640x480, q=0-69, pass 1, pass 2, 200 kb/s, 90k tbn, 30 tbc
Stream #0.1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, pass 1, pass 2, 1411 kb/s
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
flibustier
May 24th, 2011, 10:38 AM
Update for libvpx patches
Google updated their patches to version 7, as previous version was incompatible with latest ffmpeg
So, to apply patches, use the following command:
wget http://webm.googlecode.com/files/ffmpeg-HEAD-VP8_param_mapping-7.tar.gz
tar -xf ffmpeg-HEAD-VP8_param_mapping-7.tar.gz
git apply ffmpeg-HEAD-VP8_param_mapping.diff
sofakng
May 24th, 2011, 01:59 PM
How can I install multiple versions of FFmpeg?
I have the GIT version as my primary version (used instructions from the original post) but I need to compile a special version for a piece of software that I use (AirVideo).
How should I configure/compile this special FFmpeg build so it can exist alongside the GIT version?
prupert
May 24th, 2011, 08:02 PM
This might have to wait until Fakeoutdoorsman's return but in the meantime perhaps a simple date string might get your script running:
sudo checkinstall --pkgname=x264 --default \
--pkgversion="3:$(date +"%d%m%Y")" --backup=no --deldoc=yes
Not a great idea, it seems apt freaks out a little bit if it finds a version of FFmpeg installed that doesn't correspond to the naming scheme for FFmpeg it expects. It isn't a deal breaker, it just throws a warning when running apt-get update.
I'd wait till Fake comes back with a fix, but it might be just down to how you are escaping " and ' in your bash script.
I came across the same problem and haven't got round to fixing it yet.
andrew.46
May 25th, 2011, 01:06 AM
Update for libvpx patches
Thanks, I have the updated patch running here now :).
wim.glenn
May 25th, 2011, 07:52 AM
I'm trying to turn your method into a bash script for easy use... But there seems to be an issue with:
sudo checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yesYour quoting isn't closed or something... Your awk separator is [" ] but i think that the " needs to be escaped. Maybe you could explain this since others run this method via cli with *no problem*.
i have put the commands into a script, verbatim, and it ran with no issue. what is your method for running the script? /bin/sh , /bin/bash ? although my text editor thinks i am making a mistake at the checkinstall line , and breaks the syntax highlighting in the rest of the file, the script actually runs fine anyway. i can fix the syntax highlighting thing by just putting in a comment line #' after the offending line.
it does look like a mess with the quotes and double quotes inside a double quoted string, but my method was to simply put the commands into a text file named encoder_setup.sh and then run the script from the terminal with chmod +x encoder_setup.sh, and then ./encoder_setup.sh
check your output of running ./version.sh while in the ~/x264 directory , and check that your output of running
echo --pkgversion="3:$(./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}')"
matches the number that was printed by the checkinstall line. for me this was:
3 - Version: [ 3:0.115.1995+gitc1e60b9 ]
wim.glenn
May 25th, 2011, 07:53 AM
ps, i have no interpreter specified at the top of the .sh file, it just goes straight into the commands.
by the way , does anyone know if it is also necessary to add --enable-static to the x264 ./configure line in step 7 ?
andrew.46
May 25th, 2011, 08:33 AM
by the way , does anyone know if it is also necessary to add --enable-static to the x264 ./configure line in step 7 ?
I suspect so, we will have to put a note on the fridge for Fakeoutdoorsman to read on his return...
dozycat
May 25th, 2011, 11:55 AM
I am using ubuntu 11.04 64 bits and In the step 7 i got error:
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \ awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \ --fstrans=no --default
$make
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o x264.o x264.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o input/input.o input/input.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o input/timecode.o input/timecode.c
input/timecode.c: In function ‘parse_tcfile’:
input/timecode.c:163:18: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:196:22: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:242:14: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:248:18: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o input/raw.o input/raw.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o input/y4m.o input/y4m.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/raw.o output/raw.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/matroska.o output/matroska.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/matroska_ebml.o output/matroska_ebml.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/flv.o output/flv.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/flv_bytestream.o output/flv_bytestream.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/filters.o filters/filters.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/video.o filters/video/video.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/source.o filters/video/source.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/internal.o filters/video/internal.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/resize.o filters/video/resize.c
filters/video/resize.c: In function ‘convert_cpu_to_flag’:
filters/video/resize.c:105:24: error: ‘SWS_CPU_CAPS_ALTIVEC’ undeclared (first use in this function)
filters/video/resize.c:105:24: note: each undeclared identifier is reported only once for each function it appears in
filters/video/resize.c:107:24: error: ‘SWS_CPU_CAPS_MMX’ undeclared (first use in this function)
filters/video/resize.c:107:43: error: ‘SWS_CPU_CAPS_MMX2’ undeclared (first use in this function)
make: *** [filters/video/resize.o] Error 1
lawrence@lawrence-System-Product-Name:~/x264/x264$ sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes --fstrans=no --default
checkinstall 1.6.2, Copyright 2009 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@lawrence-System-Product-Name ]
1 - Summary: [ Package created with checkinstall 1.6.2 ]
2 - Name: [ x264 ]
3 - Version: [ 3:0.115.1995+gitc1e60b9 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ x264 ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ x264 ]
12 - Conflicts: [ ]
13 - Replaces: [ ]
Enter a number to change any of them or press ENTER to continue:
Installing with make install...
========================= Installation results ===========================
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/resize.o filters/video/resize.c
filters/video/resize.c: In function ‘convert_cpu_to_flag’:
filters/video/resize.c:105:24: error: ‘SWS_CPU_CAPS_ALTIVEC’ undeclared (first use in this function)
filters/video/resize.c:105:24: note: each undeclared identifier is reported only once for each function it appears in
filters/video/resize.c:107:24: error: ‘SWS_CPU_CAPS_MMX’ undeclared (first use in this function)
filters/video/resize.c:107:43: error: ‘SWS_CPU_CAPS_MMX2’ undeclared (first use in this function)
make: *** [filters/video/resize.o] Error 1
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
wim.glenn
May 26th, 2011, 03:55 AM
i get the same error in step 7. i guess something has changed upstream, however until it's fixed then you can workaround it by using the lavf support from ffmpeg and preset files to libx264 , so that you don't need lavf built into x264 cli.
fiklein
May 26th, 2011, 04:51 AM
I also needed to install:
sudo apt-get install ffmpeg libavcodec-extra-52
for Maverick. I was wondering if what I did would work on a fresh Natty install.
wim.glenn
May 26th, 2011, 08:07 AM
I also needed to install:
sudo apt-get install ffmpeg libavcodec-extra-52
for Maverick. I was wondering if what I did would work on a fresh Natty install.
yes! step 7 (adding lavf support to x264 cli) worked after installing package libavcodec-extra-52 , and i also added --enable-static to ./configure in step 7.
if anyone needs to get one , check in the attachment for a setup script that was working for me on a fresh install of 11.04. probably this will stop working again in a few weeks .. or days.. :P
wim.glenn
May 26th, 2011, 08:08 AM
ps.. ffserver seems to be automagically working again now , too, ..the segfault i was seeing previously has disappeared in the latest build.
fiklein
May 26th, 2011, 12:11 PM
I followed the guide on another computer using 10.10 and got the following error in the terminal opened by Winff:
[NULL @ 0x201f820] [Eval @ 0x7fff95420300] Invalid chars 'b' at the end of expression '160kb'
[NULL @ 0x201f820] Unable to parse option value "160kb"
Invalid value '160kb' for option 'ab'
fiklein
May 26th, 2011, 05:10 PM
I followed the guide on another computer using 10.10 and got the following error in the terminal opened by Winff:
[NULL @ 0x201f820] [Eval @ 0x7fff95420300] Invalid chars 'b' at the end of expression '160kb'
[NULL @ 0x201f820] Unable to parse option value "160kb"
Invalid value '160kb' for option 'ab'
I found a similar post on:
http://ubuntuforums.org/showthread.php?p=9488276
but I really would like to use a GUI
Also, I was wondering if I should simply clean and reinstall ffmpeg. Anybody out there with an idea?
fiklein
May 26th, 2011, 05:15 PM
I found a similar post on:
http://ubuntuforums.org/showthread.php?p=9488276
but I really would like to use a GUI
Also, I was wondering if I should simply clean and reinstall ffmpeg. Anybody out there with an idea?
Sorry to spam this thread, but there is a line in the above 9488276 thread that says:
"I'm not sure what your command looks like, but try it without the "b", so for example, instead of -ab 160kb, try -ab 160k. "
How would I try it without the "b"?
andrew.46
May 26th, 2011, 11:06 PM
How would I try it without the "b"?
You need to edit the presets that come with WinFF, I believe you can do this from within the program itself.
robdocmagic
May 27th, 2011, 12:20 AM
I believe I have a synax error that I can't seem to figure out.
I am using multiple drawtext filters and it's working fine:
/usr/local/bin/ffmpeg -i input.mts -vf "drawtext=fontfile=/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf:text='Test Event (Apr 2011) - Day\: 2\, Group\: 1\, Jump\: 1\, Sector\: 1':fontsize=11:fontcolor=black:x=5:y=5,drawtext=fo ntfile=/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf:text='Videographer\: view all event videos at www.ff.com':fontsize=11:fontcolor=black:x=5:y=305 (http://www.ff.com':fontsize=11:fontcolor=black:x=5:y=305)" -vol 0 -y -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -preset slow -crf 22 -threads 0 -s 480x320 -deinterlace output.mp4
I can use the overlay filter just fine:
/usr/local/bin/ffmpeg -i input.mts -vf "movie=overlay.png [logo];movie=overlay2.png [logo2];[in][logo] overlay=W-w:H-h [in+logo];[in+logo][logo2] overlay=0:H-h [out]" -vol 0 -y -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -preset slow -crf 22 -threads 0 -s 480x320 -deinterlace overlay.mp4
so, I figured I could just put a comma and put my overlay filter at the end of my drawtext filters (as I need to use them all together)
/usr/local/bin/ffmpeg -i input.mts -vf "drawtext=fontfile=/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf:text='Test Event (Apr 2011) - Day\: 2\, Group\: 1\, Jump\: 1\, Sector\: 1':fontsize=11:fontcolor=black:x=5:y=5,drawtext=fo ntfile=/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf:text='Videographer\: view all event videos at www.ff.com':fontsize=11:fontcolor=black:x=5:y=305, movie=overlay.png (http://www.ff.com':fontsize=11:fontcolor=black:x=5:y=305, movie=overlay.png) [logo];[in][logo] overlay=W-w:H-h [out]" -vol 0 -y -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -preset slow -crf 22 -threads 0 -s 480x320 -deinterlace output.mp4
But when I append the overlay filter on the end of the drawtext filter I get:
Too many inputs specified for the "movie" filter.
I am sure this is something simple I am doing wrong :)
fiklein
May 27th, 2011, 12:31 AM
Re: HOWTO: Install and use the latest FFmpeg and x264
Quote:
Originally Posted by fiklein http://ubuntuforums.org/images/buttons/viewpost.gif (http://ubuntuforums.org/showthread.php?p=10864312#post10864312)
I followed the guide on another computer using 10.10 and got the following error in the terminal opened by Winff:
[NULL @ 0x201f820] [Eval @ 0x7fff95420300] Invalid chars 'b' at the end of expression '160kb'
[NULL @ 0x201f820] Unable to parse option value "160kb"
Invalid value '160kb' for option 'ab'
I found a similar post on:
http://ubuntuforums.org/showthread.php?p=9488276
but I really would like to use a GUI
Also, I was wondering if I should simply clean and reinstall ffmpeg. Anybody out there with an idea?
Andrew 46
I do not think it is Winff because I get a similar lack of function with the DownloadHelper GUI. My other computer running 10.10 and following the same procedures seems to work in both. Is there a way to edit the "b" out of the commands? I have tried each GUI using MP4 or FLV to MP3 audio. I may just reinstall ffmpeg on the idea that something went wrong in the process. Any other ideas?
http://ubuntuforums.org/images/statusicon/user_online.gif http://ubuntuforums.org/images/buttons/report.gif (http://ubuntuforums.org/report.php?p=10865115) http://ubuntuforums.org/images/misc/progress.gif http://ubuntuforums.org/images/buttons/edit.gif (http://ubuntuforums.org/editpost.php?do=editpost&p=10865115)
dozycat
May 27th, 2011, 12:44 AM
yes! step 7 (adding lavf support to x264 cli) worked after installing package libavcodec-extra-52 , and i also added --enable-static to ./configure in step 7.
if anyone needs to get one , check in the attachment for a setup script that was working for me on a fresh install of 11.04. probably this will stop working again in a few weeks .. or days.. :P
./configure --enable-static
Platform: X86_64
System: LINUX
cli: yes
libx264: internal
shared: no
static: yes
asm: yes
interlaced: yes
avs: no
lavf: yes
ffms: no
gpac: no
gpl: yes
thread: posix
filters: resize crop select_every
debug: no
gprof: no
strip: no
PIC: no
visualize: no
bit depth: 8
You can run 'make' or 'make fprofiled' now.
well it changed sometjing adding the codec and the option enable static but still got error in make:
$ make
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o x264.o x264.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o input/input.o input/input.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o input/timecode.o input/timecode.c
input/timecode.c: In function ‘parse_tcfile’:
input/timecode.c:163:18: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:196:22: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:242:14: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:248:18: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o input/raw.o input/raw.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o input/y4m.o input/y4m.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/raw.o output/raw.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/matroska.o output/matroska.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/matroska_ebml.o output/matroska_ebml.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/flv.o output/flv.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o output/flv_bytestream.o output/flv_bytestream.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/filters.o filters/filters.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/video.o filters/video/video.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/source.o filters/video/source.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/internal.o filters/video/internal.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -std=gnu99 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/resize.o filters/video/resize.c
filters/video/resize.c: In function ‘convert_cpu_to_flag’:
filters/video/resize.c:105:24: error: ‘SWS_CPU_CAPS_ALTIVEC’ undeclared (first use in this function)
filters/video/resize.c:105:24: note: each undeclared identifier is reported only once for each function it appears in
filters/video/resize.c:107:24: error: ‘SWS_CPU_CAPS_MMX’ undeclared (first use in this function)
filters/video/resize.c:107:43: error: ‘SWS_CPU_CAPS_MMX2’ undeclared (first use in this function)
make: *** [filters/video/resize.o] Error 1
qyot27
May 27th, 2011, 02:50 AM
The problem isn't x264 (at least, not completely); calls including an SWS_ are coming from swscale. Purge ffmpeg, do a fresh clone, and compile it again. Then see if x264 compiles successfully. There were a rash of commits to fix swscale compiling problems about an hour ago or so. (http://git.videolan.org/?p=ffmpeg.git&a=search&h=HEAD&st=commit&s=swscale)
Worse comes to worst, compile ffmpeg and x264 as 32-bit and wait until both have their AMD64 routines working together again.
Or, you could simply forgo compiling x264 with lavf support. --disable-lavf would probably enable it to succeed, regardless of what happens on ffmpeg's side.
djdvant
May 27th, 2011, 02:53 AM
make install ffmpeg first, then x264, then ffmpeg.
This will ensure that that libswscale is up to date since filters/video/resize.c includes libswscale/swscale.h
andrew.46
May 27th, 2011, 07:11 AM
I do not think it is Winff because I get a similar lack of function with the DownloadHelper GUI. My other computer running 10.10 and following the same procedures seems to work in both. Is there a way to edit the "b" out of the commands? I have tried each GUI using MP4 or FLV to MP3 audio. I may just reinstall ffmpeg on the idea that something went wrong in the process. Any other ideas?
I am pretty sure the problem is that when you install WinFF and use it with the git FFmpeg there is a problem with WinFF using older syntax. You can edit this manually but I have just installed WinFF and I see that there are some newer presets that have edited out the offending 'b's and perhaps this will be the easiest way out of your problem.
Something like the following single command should work:
cd $HOME/.winff && \
mv -v presets.xml presets.xml_bak && \
wget http://winff.googlecode.com/files/presets-libavcodec52-v6.xml.gz && \
gunzip presets-libavcodec52-v6.xml.gz && \
mv -v presets-libavcodec52-v6.xml presets.xml
Doubtless there is a better way to do this but it worked well enough on my system. I have tested several of these presets on my own system which runs the latest git FFmpeg and so far all of them are working well enough. (One small alteration required for ogg encoding is to change the codec from vorbis to libvorbis and doubtless there are other small changes needed.)
andrew.46
May 27th, 2011, 08:46 AM
Hi, I used the Lucid guide here to install with capturing support and I can't get it to work with any options that I've tried.
Here is the command and output:
user@ubuntu:~$ ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 640x480 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
[...]
File 'output.mkv' already exists. Overwrite ? [y/N] n
Not overwriting - exiting
Here the command fails because the file 'output.mkv' already exists, perhaps from a previous encoding effort? You can simply select 'y' to overwrite your file or add the option -y to your commandline.
[jgodwin@Minty:~$ ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 640x480 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
[...]
[libx264 @ 0x9f29660] constant rate-factor is incompatible with 2pass.
Output #0, matroska, to 'output.mkv':
Stream #0.0: Video: libx264, yuv420p, 640x480, q=0-69, pass 1, pass 2, 200 kb/s, 90k tbn, 30 tbc
Stream #0.1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, pass 1, pass 2, 1411 kb/s
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
I suspect the problem here is the -vpre lossless_ultrafast setting, which gives similar error messages on my system. I don't know enough about lossless encoding with x264 and even less about x11grab but perhaps you could try -preset slower instead of your -vpre setting? Wiser heads than mine may suggest a better option but perhaps this will at least kickstart you screen capture :). As to the pass 2 error messages, which I can duplicate here as well. I am a little puzzled as well...
dozycat
May 27th, 2011, 10:55 AM
make install ffmpeg first, then x264, then ffmpeg.
This will ensure that that libswscale is up to date since filters/video/resize.c includes libswscale/swscale.h
Do I need to remove ffmmpeg and x264, and start again?
vagrale13
May 27th, 2011, 09:21 PM
Something like the following single command should work:
cd $HOME/.winff && \
mv -v presets.xml presets.xml_bak && \
wget http://winff.googlecode.com/files/presets-libavcodec52-v6.xml.gz && \
gunzip presets-libavcodec52-v6.xml.gz && \
mv -v presets-libavcodec52-v6.xml presets.xml
Doubtless there is a better way to do this but it worked well enough on my system. I have tested several of these presets on my own system which runs the latest git FFmpeg and so far all of them are working well enough. (One small alteration required for ogg encoding is to change the codec from vorbis to libvorbis and doubtless there are other small changes needed.)
What the difference if run
cp /usr/share/winff/presets-libavcodec52-v*.xml ~/.winff/presets.xml
sed -i 's/kb /k /g' ~/.winff/presets.xml:-k
andrew.46
May 28th, 2011, 12:17 AM
What the difference if run
cp /usr/share/winff/presets-libavcodec52-v*.xml ~/.winff/presets.xml
sed -i 's/kb /k /g' ~/.winff/presets.xml:-k
Indeed I did not notice that presets-libavcodec52-v6.xml is packaged in /usr/share/winff/ :). You will not need the sed command though as this change is already present in the preset. So to modify your command slightly:
mv -v ~/.winff/presets.xml ~/.winff/presets.xml_bak && \
cp -v /usr/share/winff/presets-libavcodec52-v6.xml ~/.winff/presets.xml
should be enough to get started with the git FFmpeg. To alter the ogg preset I would suggest:
sed -i_oggchange 's/-acodec vorbis/-acodec libvorbis/g' ~/.winff/presets.xml
and then possible more changes, I have only just started looking at the newer presets. Thanks for pointing out that the newer presets were already installed :).
FakeOutdoorsman
May 31st, 2011, 06:41 PM
How can I install multiple versions of FFmpeg?
I have the GIT version as my primary version (used instructions from the original post) but I need to compile a special version for a piece of software that I use (AirVideo).
How should I configure/compile this special FFmpeg build so it can exist alongside the GIT version?
Perhaps you could use a local installation of FFmpeg for AirVideo as andrew.46 shows in Howto: Build the development version of vlc under Ubuntu (http://ubuntuforums.org/showthread.php?t=1398119).
Not a great idea, it seems apt freaks out a little bit if it finds a version of FFmpeg installed that doesn't correspond to the naming scheme for FFmpeg it expects. It isn't a deal breaker, it just throws a warning when running apt-get update.
The guide should get around this by changing the epoch number in the pkgversion to be "(current epoch number for package in repo) + 1". From the Debian Policy Manual (http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version):
[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 previously used ~ffmpeg/version.sh to provide a pkgversion, but changed to using the date as the pkgversion, because as of Natty the version number must start with a digit. Annoying.
I came across the same problem and haven't got round to fixing it yet.
What is the problem exactly? I'd like to try to duplicate it.
by the way , does anyone know if it is also necessary to add --enable-static to the x264 ./configure line in step 7 ?
Yes, it was missing that and I added it. Thanks. Unfortunately, lavf support will currently not work until x264 catches up with some FFmpeg changes. I'm guessing it will be fixed in the next series of updates.
FakeOutdoorsman
May 31st, 2011, 06:43 PM
Also, I owe andrew.46 a beer for answering so many questions while I was playing tourist.
andrew.46
May 31st, 2011, 09:11 PM
Also, I owe andrew.46 a beer for answering so many questions while I was playing tourist.
Welcome back!! I shall now slide into the background again :).
andrew.46
June 3rd, 2011, 07:03 AM
Perhaps you could use a local installation of FFmpeg for AirVideo as andrew.46 shows in Howto: Build the development version of vlc under Ubuntu (http://ubuntuforums.org/showthread.php?t=1398119).
That technique works well for builds apart from FFmpeg, I have just finished updated another guide:
Howto: Build the BitTorrent client Transmission under the latest Ubuntu release
http://ubuntuforums.org/showthread.php?p=10896413
and I have used the same idea when building libevent, that is to install the library locally and add the path to PKG_CONFIG_PATH for the compiler to find. libevent is not such a hot potato as FFmpeg when building Ubuntu packages but I am sure doing it this way will avoid breakages on some systems...
ron999
June 3rd, 2011, 08:27 PM
EDIT
This patch is now obsolete.
See post #1768 here:- http://ubuntuforums.org/showpost.php?p=10967333&postcount=1768
(Another) Update for libvpx patches
Hi
It looks like those libvpx presets have changed again.
When I tried to apply the presets from "ffmpeg-HEAD-VP8_param_mapping-7.tar.gz" it produced an error.
This time I've used these commands:-
wget http://webm.googlecode.com/files/ffmpeg-presets.diff.gz
gzip -d ffmpeg-presets.diff.gz
git apply -v ffmpeg-presets.diff
Result:-
ron@ubuntu:~/ffmpeg$ git apply -v ffmpeg-presets.diff
Checking patch ffpresets/libvpx-1080p.ffpreset...
Checking patch ffpresets/libvpx-1080p50_60.ffpreset...
Checking patch ffpresets/libvpx-360p.ffpreset...
Checking patch ffpresets/libvpx-720p.ffpreset...
Checking patch ffpresets/libvpx-720p50_60.ffpreset...
Applied patch ffpresets/libvpx-1080p.ffpreset cleanly.
Applied patch ffpresets/libvpx-1080p50_60.ffpreset cleanly.
Applied patch ffpresets/libvpx-360p.ffpreset cleanly.
Applied patch ffpresets/libvpx-720p.ffpreset cleanly.
Applied patch ffpresets/libvpx-720p50_60.ffpreset cleanly.
Jose Catre-Vandis
June 12th, 2011, 12:04 PM
Followed guide successfully on Xubuntu 11.04. Everything works fine. Have an odd problem with mp4 playback using mplayer (no-gui).
If I encode a bit of recorded tv (.ts file, PAR 64:45, DAR 16/9) using the first crf example, the encode works fine and retains the PAR and DAR, but when I go to playback in mplayer (nothing in config file) mplayer seems to think the video has an aspect ratio of 2.53:1, making a wide thin video.
If I encode using the same command line but replace with mkv instead of mp4, mplayer plays back at the correct aspect of 16/9.
mplayer plays back avi/xvid (encoding the same piece of recorded tv) at the correct aspect ratio.
Screen is a 1920x1080 24". No similar problems on 10.04 LTS
I can fix this with a profile in mplayer's config:
[extension.mp4]
profile-desc="Profile for HD mp4 files"
aspect="16/9" but this will affect all mp4 extensions.
If I use parole, I have to use the "none" setting in Aspect menu to get the correct resolution.
Can anyone shed any light on this issue? I have tried encoding with all sorts of different parameters but with no success.
qyot27
June 12th, 2011, 09:11 PM
Followed guide successfully on Xubuntu 11.04. Everything works fine. Have an odd problem with mp4 playback using mplayer (no-gui).
If I encode a bit of recorded tv (.ts file, PAR 64:45, DAR 16/9) using the first crf example, the encode works fine and retains the PAR and DAR, but when I go to playback in mplayer (nothing in config file) mplayer seems to think the video has an aspect ratio of 2.53:1, making a wide thin video.
If I encode using the same command line but replace with mkv instead of mp4, mplayer plays back at the correct aspect of 16/9.
mplayer plays back avi/xvid (encoding the same piece of recorded tv) at the correct aspect ratio.
Screen is a 1920x1080 24". No similar problems on 10.04 LTS
I can fix this with a profile in mplayer's config:
[extension.mp4]
profile-desc="Profile for HD mp4 files"
aspect="16/9" but this will affect all mp4 extensions.
If I use parole, I have to use the "none" setting in Aspect menu to get the correct resolution.
Can anyone shed any light on this issue? I have tried encoding with all sorts of different parameters but with no success.
It's clearly interpreting the PAR as the file's SAR value. The two are not the same, and SAR values can mess up aspect display (they do have a reason for their existence, but I simply find it easier to encode to 1:1 and then do after-the-fact flagging if I need to).
Case in point:
64/45 * 1920 = ~2730
~2730/1080 = ~2.53
If you have the SAR or DAR at 1/1 (like it should be for files that actually are 1920 pixels wide and 1080 pixels tall), then it works out correctly to a normal ~1.78 ratio. Aspect flagging should only be used for files whose storage resolutions differ from their displayed resolutions. If the files were 1440x1080, then the 64:45 ratio would work out correctly to 2048, which is close enough to 1920 (to be pedantic, 2048 width is a studio format known as 2K, roughly equivalent to the difference between 'proper' anamorphic widescreen used for Hollywood movies and the 16:9 standard used on TVs).
With Matroska, aspect is handled a bit differently and the internal aspect ratios are set to match the reality of the files if they aren't specifically overridden by the user. MP4 isn't quite as straight-forward many times.
In essence,
PAR (Pixel aspect ratio) simply exists as the natural ratio of width to height
SAR (Sample aspect ratio) is a bitstream-level flag that indicates the internally-correct display ratio of the pixels
DAR (Display aspect ratio) is a container-level flag that matches the display ratio.
Whatever is happening in the encoder, the PAR and SAR are being mixed up. It might have to do with the TS container of the source file, but I'm not confident about that.
At least, that's how I understand the whole PAR, SAR, DAR situation. It's probably overly simplistic, but as long as you know what it should be displayed as and if the source resolution is a correct reduction of that value, then you're good.
FakeOutdoorsman
June 12th, 2011, 10:01 PM
Can anyone shed any light on this issue?
Perhaps the setdar or setpar FFmpeg filters would be useful here. There's some info on these filters in man ffmpeg. I haven't actually tried them though. Does ffplay show the video correctly?
Jose Catre-Vandis
June 12th, 2011, 10:22 PM
Perhaps the setdar or setpar FFmpeg filters would be useful here. There's some info on these filters in man ffmpeg. I haven't actually tried them though. Does ffplay show the video correctly?
Yes it plays at the correct aspect ratio in ffplay.
I'll have a go with the setsar and setdar filters....thanks to qyot27 for the detailed and informative explanation and to fakeoutdoorsman for the pointers.
[EDIT] getting unrecognised option for both of them - do they need to be compiled in? (Doh! you need to use -vf in front)
Bingo!
ffmpeg -i input.ts -vf setdar=16:9 -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 -threads 0 -deinterlace output.mp4
Sorted out the playback aspect ratio in mplayer (doesn't fix parole but I wasn't expecting that ;))
Seems advice is to put the filter at the front of the chain
FakeOutdoorsman
June 12th, 2011, 10:43 PM
[EDIT] getting unrecognised option for both of them - do they need to be compiled in?
They should be available if you followed the guide, but not in the repository FFmpeg (as of Natty). Sparse example:
-vf setdar=16:9
Edit: I'm a slow typer. Looks like you figured it out.
Jose Catre-Vandis
June 14th, 2011, 12:34 AM
Spoke to soon - I had left my config file setting in place!!
However, by trial and error, I found that setting the DAR to 3:2 worked:
ffmpeg -i input.ts -vf setdar=3:2 -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 -threads 0 -deinterlace output.mp4
I'll need to tweak a bit more as mplayer reports an aspect ratio of 1.80:1 !!!
Doesn't make any sense. Other mp4 files (e.g. iPlayer) work fine.
heyup
June 15th, 2011, 08:59 PM
I had a problem updating ffmpeg (Hardy).
When updating ffmpeg, I got to 'git pull', but the update aborted with this error meassge:
Your local changes to 'libavformat/avformat.h' would be overwritten by merge. Please, commit your changes or stash them before you can merge.
I had saved a change to ffmpeg/libavformat/avformat.h to test a patch, then decided to undo the change, and update ffmpeg instead.
How do I commit or stash my changes?
FakeOutdoorsman
June 16th, 2011, 06:27 AM
I'm fairly new to Git myself, but I think this will do it:
git stash
git pull
beyored
June 19th, 2011, 08:18 PM
Hello. I'm experiencing sort of problem. First of all i never ever used any Linux before and installed Xubuntu yesterday. And i did it mainly because of ffmpeg. I need to use some functions from its libraries. So i installed it following this guide. It works ( i mean works as tool to convert/encode/decode video/audio and so on ). After that i installed Codelite as IDE. All i need now is to include ffmpeg libraries to my project.
1) Here is a trouble number 1. ffmpeg installed in two directories. First one is /ffmpeg/ in my user's directory - i mean /home/username/ffmpeg/ and second one is /usr/local/bin/ and /usr/local/include/ and /usr/local/lib/. I don't understand why is it so and what libraries should i use for linking to my project. As far as i configure both x264 and ffmpeg as static (--enable-static) there are only .a libraries ( static ). They seems to be equal both in /ffmpeg/ subfolders and /usr/local/lib/. But i don't know what to use and why. I just thought that if i built something inside its own directory it shouldn't somehow go somewhere else but i'm obviously incorrect.
2) I've tried to use static libraries from /home/username/ffmpeg when linking to the project. I know that it's possible to use static and shared libraries. I have only static so i need to link it. In project properties i've added library path like that ../../../ffmpeg/libavcodec/ and so on, and specified libs by ../../../ffmpeg/libavcodec/avcodec as far as linker deprecates 'lib' and '.a'. When i'm trying to build it, it compiles successfully but linking stage give me error /usr/bin/ld: cannot find -l../../../ffmpeg/libavcodec/avcodec, though there is a file named libavcodec.a. I don't understand if /usr/local/lib is part of some PATH_TO_LIB global variable or something and it collides with my mentioned path in IDE or am i just missing something fundamental.
3) I've tried to build shared versions of x264 and ffmpeg. x264 builds shared well, but after that ffmpeg build fails with something like ".....x264.a(common.o)...try to compile with -fPic option". I just can't provide it exactly right now but i will do it anytime if necessary.
I understand that maybe it's the wrong place for such types of questions or i can find all answers in google or i just need to read some fundamental books before trying to make it work but i just don't know from what i should start. Sorry for the wall of text.
jwcalla
June 19th, 2011, 11:15 PM
1) Here is a trouble number 1. ffmpeg installed in two directories. First one is /ffmpeg/ in my user's directory - i mean /home/username/ffmpeg/ and second one is /usr/local/bin/ and /usr/local/include/ and /usr/local/lib/. I don't understand why is it so and what libraries should i use for linking to my project. As far as i configure both x264 and ffmpeg as static (--enable-static) there are only .a libraries ( static ). They seems to be equal both in /ffmpeg/ subfolders and /usr/local/lib/. But i don't know what to use and why. I just thought that if i built something inside its own directory it shouldn't somehow go somewhere else but i'm obviously incorrect.
Generally if you build a program or library in a directory it will stay there, unless you do a "make install", or unless a build script runs such a command, which installs the appropriate goodies in system-wide directories so that all users on the system have access. So the binary executable went into /usr/local/bin/ and the header files (for other programs you need to compile that tap into the codebase) are in /usr/local/include/ and the static / shared libraries for linking are in /usr/local/lib/.
The residual files in ~/ffmpeg/ will remain but are no longer necessary. You can choose to blow them away if you'd like, or keep them around in case you'd like to do another re-compile.
When linking from another program, you can specify the directories to use from either your home area or the system-wide area -- it's completely up to you, provided, of course, that both locations hold the exact same compiles. Otherwise, if for example you tinkered with the one in your home directory and didn't install it system wide, and want to include those tinkerings in your other program's compile, you'll have to be sure to deliberately include those files.
2) I've tried to use static libraries from /home/username/ffmpeg when linking to the project. I know that it's possible to use static and shared libraries. I have only static so i need to link it. In project properties i've added library path like that ../../../ffmpeg/libavcodec/ and so on, and specified libs by ../../../ffmpeg/libavcodec/avcodec as far as linker deprecates 'lib' and '.a'. When i'm trying to build it, it compiles successfully but linking stage give me error /usr/bin/ld: cannot find -l../../../ffmpeg/libavcodec/avcodec, though there is a file named libavcodec.a. I don't understand if /usr/local/lib is part of some PATH_TO_LIB global variable or something and it collides with my mentioned path in IDE or am i just missing something fundamental.mehhhh I'm having a C brainfart but I think the options you want to use are -L../../../ffmpeg/libavcodec -lavcodec. Or if you want to use the ones installed on the system, -L/usr/local/lib -lavcodec. (Note: in my case the libavcodec.a file is in the /usr/local/lib directory.)
I always get those library switches confused.
qyot27
June 20th, 2011, 08:14 AM
Generally if you build a program or library in a directory it will stay there, unless you do a "make install", or unless a build script runs such a command, which installs the appropriate goodies in system-wide directories so that all users on the system have access.
Minor elaboration: 'make install' actually will install to the specified prefix named during the configure process. By default Ubuntu defines this as /usr/local, and thus 'make install' will put the binaries/libraries/headers there, but it doesn't have to. Other distros use /usr by itself; others might even use /opt.
For instance, whenever I'm building everything I install only a basic ffmpeg to a directory in $HOME, then install ffms2 to the same directory (and link it against the ffmpeg installed there), then install x264 (linking it against the $HOME installs of ffmpeg and ffms2) and a full ffmpeg to system. Keeps things cleaner that way. And of course, if I'm cross-compiling, then everything goes to such a custom prefix.
bigdawgte
June 21st, 2011, 04:09 PM
I'm guessing my problem is simple. When I try to "make" ffmpeg on Natty, i get the following"
CC libavcodec/crystalhd.o
In file included from libavcodec/crystalhd.c:82:0:
/usr/include/libcrystalhd/bc_dts_types.h:64:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘bc_bool_t’
In file included from libavcodec/crystalhd.c:84:0:
/usr/include/libcrystalhd/libcrystalhd_if.h:149:14: error: expected ‘)’ before ‘*’ token
/usr/include/libcrystalhd/libcrystalhd_if.h:177:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:215:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:255:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:300:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:339:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:371:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:402:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:452:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:486:16: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:522:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:569:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:604:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:635:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:666:13: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:695:15: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:726:15: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:757:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:786:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:829:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:878:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:908:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:954:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:990:15: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1031:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1068:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1104:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1138:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1170:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1198:12: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1228:13: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1265:13: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1298:13: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1329:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1363:14: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1393:21: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1423:10: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1451:10: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1478:13: error: expected ‘)’ before ‘hDevice’
/usr/include/libcrystalhd/libcrystalhd_if.h:1507:13: error: expected ‘)’ before ‘hDevice’
libavcodec/crystalhd.c:125:5: error: expected specifier-qualifier-list before ‘HANDLE’
libavcodec/crystalhd.c:152:7: error: ‘CHDContext’ has no member named ‘sWidth’
libavcodec/crystalhd.c:153:7: warning: missing braces around initializer
libavcodec/crystalhd.c:153:7: warning: (near initialization for ‘options[0].default_val’)
libavcodec/crystalhd.c: In function ‘id2subtype’:
libavcodec/crystalhd.c:177:20: error: ‘CHDContext’ has no member named ‘is_nal’
libavcodec/crystalhd.c: In function ‘opaque_list_push’:
libavcodec/crystalhd.c:238:14: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:240:13: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:240:9: warning: statement with no effect
libavcodec/crystalhd.c:242:39: error: ‘CHDContext’ has no member named ‘tail’
libavcodec/crystalhd.c:242:45: error: ‘AVOption’ has no member named ‘fake_timestamp’
libavcodec/crystalhd.c:242:33: warning: assignment makes integer from pointer without a cast
libavcodec/crystalhd.c:243:13: error: ‘CHDContext’ has no member named ‘tail’
libavcodec/crystalhd.c:243:19: error: ‘AVOption’ has no member named ‘next’
libavcodec/crystalhd.c:243:9: warning: statement with no effect
libavcodec/crystalhd.c:245:9: error: ‘CHDContext’ has no member named ‘tail’
libavcodec/crystalhd.c:245:5: warning: statement with no effect
libavcodec/crystalhd.c: In function ‘opaque_list_pop’:
libavcodec/crystalhd.c:261:28: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:261:24: warning: initialization from incompatible pointer type
libavcodec/crystalhd.c:263:14: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:273:13: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:273:19: error: ‘AVOption’ has no member named ‘fake_timestamp’
libavcodec/crystalhd.c:273:36: warning: comparison between pointer and integer
libavcodec/crystalhd.c:274:13: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:274:9: warning: statement with no effect
libavcodec/crystalhd.c:276:18: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:276:24: error: ‘AVOption’ has no member named ‘next’
libavcodec/crystalhd.c:277:17: error: ‘CHDContext’ has no member named ‘tail’
libavcodec/crystalhd.c:277:30: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:277:13: warning: statement with no effect
libavcodec/crystalhd.c:293:20: error: ‘CHDContext’ has no member named ‘tail’
libavcodec/crystalhd.c:293:16: warning: statement with no effect
libavcodec/crystalhd.c: In function ‘flush’:
libavcodec/crystalhd.c:317:9: error: ‘CHDContext’ has no member named ‘last_picture’
libavcodec/crystalhd.c:317:5: warning: statement with no effect
libavcodec/crystalhd.c:318:9: error: ‘CHDContext’ has no member named ‘output_ready’
libavcodec/crystalhd.c:318:5: warning: statement with no effect
libavcodec/crystalhd.c:319:9: error: ‘CHDContext’ has no member named ‘need_second_field’
libavcodec/crystalhd.c:319:5: warning: statement with no effect
libavcodec/crystalhd.c:320:9: error: ‘CHDContext’ has no member named ‘skip_next_output’
libavcodec/crystalhd.c:320:5: warning: statement with no effect
libavcodec/crystalhd.c:321:9: error: ‘CHDContext’ has no member named ‘decode_wait’
libavcodec/crystalhd.c:321:5: warning: statement with no effect
libavcodec/crystalhd.c:327:5: error: implicit declaration of function ‘DtsFlushInput’
libavcodec/crystalhd.c:327:23: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c: In function ‘uninit’:
libavcodec/crystalhd.c:334:5: error: ‘HANDLE’ undeclared (first use in this function)
libavcodec/crystalhd.c:334:5: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/crystalhd.c:334:5: warning: statement with no effect
libavcodec/crystalhd.c:334:12: error: expected ‘;’ before ‘device’
libavcodec/crystalhd.c:336:5: error: ‘device’ undeclared (first use in this function)
libavcodec/crystalhd.c:336:18: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c:336:5: warning: statement with no effect
libavcodec/crystalhd.c:337:5: error: implicit declaration of function ‘DtsStopDecoder’
libavcodec/crystalhd.c:338:5: error: implicit declaration of function ‘DtsCloseDecoder’
libavcodec/crystalhd.c:339:5: error: implicit declaration of function ‘DtsDeviceClose’
libavcodec/crystalhd.c:341:25: error: ‘CHDContext’ has no member named ‘parser’
libavcodec/crystalhd.c:341:5: warning: passing argument 1 of ‘av_parser_close’ from incompatible pointer type
libavcodec/avcodec.h:4110:6: note: expected ‘struct AVCodecParserContext *’ but argument is of type ‘const struct AVOption *’
libavcodec/crystalhd.c:342:13: error: ‘CHDContext’ has no member named ‘bsfc’
libavcodec/crystalhd.c:343:39: error: ‘CHDContext’ has no member named ‘bsfc’
libavcodec/crystalhd.c:343:9: warning: passing argument 1 of ‘av_bitstream_filter_close’ from incompatible pointer type
libavcodec/avcodec.h:4138:6: note: expected ‘struct AVBitStreamFilterContext *’ but argument is of type ‘const struct AVOption *’
libavcodec/crystalhd.c:346:17: error: ‘CHDContext’ has no member named ‘sps_pps_buf’
libavcodec/crystalhd.c:346:5: warning: passing argument 1 of ‘av_free’ discards qualifiers from pointer target type
./libavutil/mem.h:97:6: note: expected ‘void *’ but argument is of type ‘const struct AVOption *’
libavcodec/crystalhd.c:351:13: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:352:31: error: ‘CHDContext’ has no member named ‘head’
libavcodec/crystalhd.c:352:27: warning: initialization from incompatible pointer type
libavcodec/crystalhd.c: In function ‘init’:
libavcodec/crystalhd.c:370:24: error: ‘FALSE’ undeclared (first use in this function)
libavcodec/crystalhd.c:370:9: warning: initialization makes integer from pointer without a cast
libavcodec/crystalhd.c:371:24: error: ‘TRUE’ undeclared (first use in this function)
libavcodec/crystalhd.c:371:9: warning: initialization makes integer from pointer without a cast
libavcodec/crystalhd.c:372:37: error: ‘vdecFrameRate59_94’ undeclared (first use in this function)
libavcodec/crystalhd.c:372:35: error: invalid operands to binary | (have ‘unsigned int’ and ‘const struct AVOption *’)
libavcodec/crystalhd.c:372:56: error: invalid operands to binary | (have ‘const struct AVOption *’ and ‘int’)
libavcodec/crystalhd.c:372:9: warning: initialization makes integer from pointer without a cast
libavcodec/crystalhd.c:384:21: error: ‘vdecRESOLUTION_1080p23_976’ undeclared (first use in this function)
libavcodec/crystalhd.c:384:21: error: invalid operands to binary << (have ‘const struct AVOption *’ and ‘int’)
libavcodec/crystalhd.c:383:46: error: invalid operands to binary | (have ‘int’ and ‘const struct AVOption *’)
libavcodec/crystalhd.c:379:21: warning: initialization makes integer from pointer without a cast
libavcodec/crystalhd.c:394:9: error: ‘CHDContext’ has no member named ‘is_nal’
libavcodec/crystalhd.c:394:5: warning: statement with no effect
libavcodec/crystalhd.c:395:9: error: ‘CHDContext’ has no member named ‘last_picture’
libavcodec/crystalhd.c:395:5: warning: statement with no effect
libavcodec/crystalhd.c:396:9: error: ‘CHDContext’ has no member named ‘decode_wait’
libavcodec/crystalhd.c:396:5: warning: statement with no effect
libavcodec/crystalhd.c:415:17: error: ‘CHDContext’ has no member named ‘bsfc’
libavcodec/crystalhd.c:415:13: warning: statement with no effect
libavcodec/crystalhd.c:416:22: error: ‘CHDContext’ has no member named ‘bsfc’
libavcodec/crystalhd.c:422:44: error: ‘CHDContext’ has no member named ‘bsfc’
libavcodec/crystalhd.c:423:40: warning: passing argument 1 of ‘av_bitstream_filter_filter’ from incompatible pointer type
libavcodec/avcodec.h:4134:5: note: expected ‘struct AVBitStreamFilterContext *’ but argument is of type ‘const struct AVOption *’
libavcodec/crystalhd.c:425:17: error: ‘CHDContext’ has no member named ‘sps_pps_buf’
libavcodec/crystalhd.c:425:13: warning: statement with no effect
libavcodec/crystalhd.c:426:17: error: ‘CHDContext’ has no member named ‘sps_pps_size’
libavcodec/crystalhd.c:426:13: warning: statement with no effect
libavcodec/crystalhd.c:430:38: error: ‘CHDContext’ has no member named ‘sps_pps_buf’
libavcodec/crystalhd.c:430:32: warning: assignment from incompatible pointer type
libavcodec/crystalhd.c:431:38: error: ‘CHDContext’ has no member named ‘sps_pps_size’
libavcodec/crystalhd.c:431:32: warning: assignment makes integer from pointer without a cast
libavcodec/crystalhd.c:454:13: error: ‘CHDContext’ has no member named ‘sWidth’
libavcodec/crystalhd.c:456:43: error: ‘CHDContext’ has no member named ‘sWidth’
libavcodec/crystalhd.c:456:37: warning: assignment makes integer from pointer without a cast
libavcodec/crystalhd.c:462:5: error: implicit declaration of function ‘DtsDeviceOpen’
libavcodec/crystalhd.c:462:30: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c:468:5: error: implicit declaration of function ‘DtsCrystalHDVersion’
libavcodec/crystalhd.c:468:35: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c:474:9: error: ‘CHDContext’ has no member named ‘is_70012’
libavcodec/crystalhd.c:474:5: warning: statement with no effect
libavcodec/crystalhd.c:476:13: error: ‘CHDContext’ has no member named ‘is_70012’
libavcodec/crystalhd.c:483:5: error: implicit declaration of function ‘DtsSetInputFormat’
libavcodec/crystalhd.c:483:33: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c:489:5: error: implicit declaration of function ‘DtsOpenDecoder’
libavcodec/crystalhd.c:489:30: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c:495:5: error: implicit declaration of function ‘DtsSetColorSpace’
libavcodec/crystalhd.c:495:32: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c:500:5: error: implicit declaration of function ‘DtsStartDecoder’
libavcodec/crystalhd.c:500:31: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c:505:5: error: implicit declaration of function ‘DtsStartCapture’
libavcodec/crystalhd.c:505:31: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c:512:13: error: ‘CHDContext’ has no member named ‘parser’
libavcodec/crystalhd.c:512:9: warning: statement with no effect
libavcodec/crystalhd.c:513:18: error: ‘CHDContext’ has no member named ‘parser’
libavcodec/crystalhd.c:517:13: error: ‘CHDContext’ has no member named ‘parser’
libavcodec/crystalhd.c:517:9: error: assignment of read-only location ‘*(const struct AVOption *)&<erroneous-expression>’
libavcodec/crystalhd.c:517:9: warning: statement with no effect
libavcodec/crystalhd.c: In function ‘copy_frame’:
libavcodec/crystalhd.c:542:53: error: ‘VDEC_FLAG_BOTTOMFIELD’ undeclared (first use in this function)
libavcodec/crystalhd.c:542:51: error: invalid operands to binary & (have ‘uint32_t’ and ‘const struct AVOption *’)
libavcodec/crystalhd.c:544:55: error: ‘VDEC_FLAG_BOTTOM_FIRST’ undeclared (first use in this function)
libavcodec/crystalhd.c:544:53: error: invalid operands to binary & (have ‘uint32_t’ and ‘const struct AVOption *’)
libavcodec/crystalhd.c:577:5: error: implicit declaration of function ‘DtsGetDriverStatus’
libavcodec/crystalhd.c:577:34: error: ‘CHDContext’ has no member named ‘dev’
libavcodec/crystalhd.c:601:50: error: ‘VDEC_FLAG_UNKNOWN_SRC’ undeclared (first use in this function)
libavcodec/crystalhd.c:601:48: error: invalid operands to binary & (have ‘uint32_t’ and ‘const struct AVOption *’)
libavcodec/crystalhd.c:602:28: error: ‘CHDContext’ has no member named ‘need_second_field’
libavcodec/crystalhd.c:612:47: error: ‘CHDContext’ has no member named ‘last_picture’
libavcodec/crystalhd.c:612:40: warning: comparison between pointer and integer
libavcodec/crystalhd.c:612:70: error: ‘CHDContext’ has no member named ‘need_second_field’
libavcodec/crystalhd.c:619:43: error: ‘VDEC_FLAG_INTERLACED_SRC’ undeclared (first use in this function)
libavcodec/crystalhd.c:619:41: error: invalid operands to binary & (have ‘uint32_t’ and ‘const struct AVOption *’)
libavcodec/crystalhd.c:630:35: error: ‘CHDContext’ has no member named ‘need_second_field’
libavcodec/crystalhd.c:633:9: error: ‘CHDContext’ has no member named ‘need_second_field’
libavcodec/crystalhd.c:633:50: error: ‘CHDContext’ has no member named ‘need_second_field’
libavcodec/crystalhd.c:633:5: warning: statement with no effect
libavcodec/crystalhd.c:645:13: error: ‘CHDContext’ has no member named ‘is_70012’
libavcodec/crystalhd.c:691:14: error: ‘CHDContext’ has no member named ‘need_second_field’
libavcodec/crystalhd.c:703:47: error: invalid operands to binary & (have ‘uint32_t’ and ‘const struct AVOption *’)
libavcodec/crystalhd.c:713:16: error: ‘CHDContext’ has no member named ‘need_second_field’
libavcodec/crystalhd.c:714:36: error: invalid operands to binary & (have ‘uint32_t’ and ‘const struct AVOption *’)
libavcodec/crystalhd.c: In function ‘receive_frame’:
libavcodec/crystalhd.c:728:5: error: ‘HANDLE’ undeclared (first use in this function)
libavcodec/crystalhd.c:728:5: warning: statement with no effect
libavcodec/crystalhd.c:728:12: error: expected ‘;’ before ‘dev’
libavcodec/crystalhd.c:733:5: error: implicit declaration of function ‘DtsProcOutputNoCopy’
libavcodec/crystalhd.c:733:31: error: ‘dev’ undeclared (first use in this function)
libavcodec/crystalhd.c:742:21: error: ‘CHDContext’ has no member named ‘last_picture’
libavcodec/crystalhd.c:742:36: warning: comparison between pointer and integer
libavcodec/crystalhd.c:747:21: error: ‘CHDContext’ has no member named ‘last_picture’
libavcodec/crystalhd.c:747:17: warning: statement with no effect
libavcodec/crystalhd.c:751:54: error: ‘CHDContext’ has no member named ‘bframe_bug’
libavcodec/crystalhd.c:754:21: error: ‘CHDContext’ has no member named ‘last_picture’
libavcodec/crystalhd.c:754:17: error: lvalue required as increment operand
libavcodec/crystalhd.c:754:17: warning: statement with no effect
libavcodec/crystalhd.c:755:17: error: implicit declaration of function ‘DtsReleaseOutputBuffs’
libavcodec/crystalhd.c:755:50: error: ‘FALSE’ undeclared (first use in this function)
libavcodec/crystalhd.c:761:21: error: ‘CHDContext’ has no member named ‘last_picture’
libavcodec/crystalhd.c:761:40: warning: comparison between pointer and integer
libavcodec/crystalhd.c:774:20: error: ‘CHDContext’ has no member named ‘last_picture’
libavcodec/crystalhd.c:774:16: warning: statement with no effect
libavcodec/crystalhd.c:780:21: error: ‘CHDContext’ has no member named ‘last_picture’
libavcodec/crystalhd.c:780:17: error: lvalue required as increment operand
libavcodec/crystalhd.c:780:17: warning: statement with no effect
libavcodec/crystalhd.c: In function ‘decode’:
libavcodec/crystalhd.c:811:5: error: ‘HANDLE’ undeclared (first use in this function)
libavcodec/crystalhd.c:811:5: warning: statement with no effect
libavcodec/crystalhd.c:811:12: error: expected ‘;’ before ‘dev’
libavcodec/crystalhd.c:812:5: warning: ISO C90 forbids mixed declarations and code
libavcodec/crystalhd.c:817:34: error: ‘CHDContext’ has no member named ‘bframe_bug’
libavcodec/crystalhd.c:823:13: error: ‘CHDContext’ has no member named ‘bframe_bug’
libavcodec/crystalhd.c:823:9: warning: statement with no effect
libavcodec/crystalhd.c:824:40: error: ‘CHDContext’ has no member named ‘bframe_bug’
libavcodec/crystalhd.c:830:13: error: ‘CHDContext’ has no member named ‘bframe_bug’
libavcodec/crystalhd.c:830:9: warning: statement with no effect
libavcodec/crystalhd.c:834:9: error: implicit declaration of function ‘DtsTxFreeSize’
libavcodec/crystalhd.c:834:50: error: ‘dev’ undeclared (first use in this function)
libavcodec/crystalhd.c:836:17: error: ‘CHDContext’ has no member named ‘parser’
libavcodec/crystalhd.c:841:21: error: ‘CHDContext’ has no member named ‘bsfc’
libavcodec/crystalhd.c:842:54: error: ‘CHDContext’ has no member named ‘bsfc’
libavcodec/crystalhd.c:844:50: warning: passing argument 1 of ‘av_bitstream_filter_filter’ from incompatible pointer type
libavcodec/avcodec.h:4134:5: note: expected ‘struct AVBitStreamFilterContext *’ but argument is of type ‘const struct AVOption *’
libavcodec/crystalhd.c:851:38: error: ‘CHDContext’ has no member named ‘parser’
libavcodec/crystalhd.c:851:46: error: ‘AVOption’ has no member named ‘priv_data’
libavcodec/crystalhd.c:851:34: warning: initialization from incompatible pointer type
libavcodec/crystalhd.c:853:46: error: ‘CHDContext’ has no member named ‘parser’
libavcodec/crystalhd.c:855:42: warning: passing argument 1 of ‘av_parser_parse2’ from incompatible pointer type
libavcodec/avcodec.h:4099:5: note: expected ‘struct AVCodecParserContext *’ but argument is of type ‘const struct AVOption *’
libavcodec/crystalhd.c:898:13: error: implicit declaration of function ‘DtsProcInput’
libavcodec/crystalhd.c:918:13: error: ‘CHDContext’ has no member named ‘skip_next_output’
libavcodec/crystalhd.c:920:13: error: ‘CHDContext’ has no member named ‘skip_next_output’
libavcodec/crystalhd.c:920:9: warning: statement with no effect
libavcodec/crystalhd.c:939:13: error: ‘CHDContext’ has no member named ‘output_ready’
libavcodec/crystalhd.c:939:28: warning: comparison between pointer and integer
libavcodec/crystalhd.c:941:17: error: ‘CHDContext’ has no member named ‘output_ready’
libavcodec/crystalhd.c:941:13: error: lvalue required as increment operand
libavcodec/crystalhd.c:941:13: warning: statement with no effect
libavcodec/crystalhd.c:953:13: error: ‘CHDContext’ has no member named ‘decode_wait’
libavcodec/crystalhd.c:953:9: warning: statement with no effect
libavcodec/crystalhd.c:981:28: error: ‘CHDContext’ has no member named ‘decode_wait’
libavcodec/crystalhd.c:981:17: warning: passing argument 1 of ‘usleep’ makes integer from pointer without a cast
/usr/include/unistd.h:457:12: note: expected ‘__useconds_t’ but argument is of type ‘const struct AVOption *’
libavcodec/crystalhd.c:998:17: error: ‘CHDContext’ has no member named ‘skip_next_output’
libavcodec/crystalhd.c:998:13: warning: statement with no effect
libavcodec/crystalhd.c:1009:16: error: ‘CHDContext’ has no member named ‘decode_wait’
libavcodec/crystalhd.c:1009:5: warning: passing argument 1 of ‘usleep’ makes integer from pointer without a cast
/usr/include/unistd.h:457:12: note: expected ‘__useconds_t’ but argument is of type ‘const struct AVOption *’
make: *** [libavcodec/crystalhd.o] Error 1
Any suggestions?
qyot27
June 21st, 2011, 09:40 PM
I'm guessing my problem is simple. When I try to "make" ffmpeg on Natty, i get the following"
Any suggestions?
CrystalHD-related errors were brought up about 4 weeks ago, and since I didn't get the chance to really ask then, I will now:
Was this ffmpeg one of the release tarballs (0.6.3 or 0.7-rc1) or a git clone? Because these errors point to a situation where there was an error in the code itself, and thus it would probably (and in the case of 4 weeks ago, clearly did) throw this kind of stuff even when one does not have a Broadcom CrystalHD chip.
I don't even bother with the release tarballs, and have never seen this error arise from git. I would try this first if you haven't already. If the error remains, use the solution described here:
http://ubuntuforums.org/showpost.php?p=10840807&postcount=1716
bigdawgte
June 22nd, 2011, 06:44 AM
Thanks a bunch, that worked. I am using git, though.
terrykiwi83
June 22nd, 2011, 07:04 AM
excellent article, just updated my natty - thanks heaps
andrew.46
June 22nd, 2011, 09:41 AM
Keen users of webm should note that now that patching is no longer necessary to get the libvpx presets as they have been absorbed into the FFmpeg source (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=e1674d7ef7e25d9c37b8f6a6f dac2bba93692fef). Easy now to make quality webm files using FakeOutdoorsman's guide :).
xzero1
June 23rd, 2011, 01:29 AM
The ffmpeg x264 encoding guide link is no longer working. Please update this if possible.
FakeOutdoorsman
June 23rd, 2011, 02:17 AM
Thanks for the notification. It appears that the server is down for maintenance. I just removed the link because it was outdated (due to the new -preset option) and no longer worked.
Smacker_626
June 24th, 2011, 09:00 PM
Keen users of webm should note that now that patching is no longer necessary to get the libvpx presets as they have been absorbed into the FFmpeg source (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=e1674d7ef7e25d9c37b8f6a6f dac2bba93692fef). Easy now to make quality webm files using FakeOutdoorsman's guide :).
Awesome!
Also, YouTube was having issues with WebM videos that used Alt Refs (which the presets turn on). I posted on the WebM mailing list a few days ago and someone from Google has put in a fix for it; it may be fixed already.
aranwe
June 29th, 2011, 05:23 PM
great
Tnx man
Smacker_626
June 30th, 2011, 11:07 PM
Awesome!
Also, YouTube was having issues with WebM videos that used Alt Refs (which the presets turn on). I posted on the WebM mailing list a few days ago and someone from Google has put in a fix for it; it may be fixed already.
The libvpx presets that come with ffmpeg don't enable Alt Refs. Assuming that someone from Google removed the altref option from the presets, YouTube+Alt Refs probably won't be fixed anytime soon. On the bright side, the latest ffmpeg+libvpx presets once again produce WebM videos that work perfectly with YouTube :).
And on a related note, using mkclean isn't a good idea anymore. While a mkclean'ed WebM video will still work with YouTube, it won't be processed as you upload it like the original ffmpeg produced WebM will be.
Here's some up-to-date example WebM cmdlines for ffmpeg in case anyone wants 'em (assuming dual-core CPU and 720p+eng input).
2-pass VBR
(video=4 Mbps, audio=320 Kbps):
ffmpeg -i example.avi -an -vlang eng -vcodec libvpx -vpre 720p -vb 4M -pass 1 -threads 2 vbr_example.webm
ffmpeg -i example.avi -alang eng -acodec libvorbis -ab 320k -vlang eng -vcodec libvpx -vpre 720p -vb 4M -pass 2 -threads 2 -y vbr_example.webm
2-pass CQ (Constrained Quality, similar to x264's CRF)
(video=23 quality with 4 Mbps target maximum, audio=9 quality which is ~320 Kbps for Vorbis):
ffmpeg -i example.avi -an -vlang eng -vcodec libvpx -vpre 720p -crf 23 -vb 4M -pass 1 -threads 2 cq_example.webm
ffmpeg -i example.avi -alang eng -acodec libvorbis -aq 9 -vlang eng -vcodec libvpx -vpre 720p -crf 23 -vb 4M -pass 2 -threads 2 -y cq_example.webm
OKComputerQ
July 6th, 2011, 05:31 PM
Hi Guys !
I'm really new to Linux and in order to use OpenCV I needed to install ffmpeg . I followed the guide for Natty but problem I'm facing is during making of x264 . What I get from googling is that this error is coming perhaps due to my previous attempts to install ffmpeg . I tried uninstalling and performing the whole process all over again several times , but I'm still getting the same error.
Below is the log
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o x264.o x264.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o input/input.o input/input.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o input/timecode.o input/timecode.c
input/timecode.c: In function ‘parse_tcfile’:
input/timecode.c:163:18: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:196:22: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:242:14: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:248:18: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o input/raw.o input/raw.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o input/y4m.o input/y4m.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o output/raw.o output/raw.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o output/matroska.o output/matroska.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o output/matroska_ebml.o output/matroska_ebml.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o output/flv.o output/flv.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o output/flv_bytestream.o output/flv_bytestream.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o filters/filters.o filters/filters.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/video.o filters/video/video.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/source.o filters/video/source.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/internal.o filters/video/internal.c
gcc -Wshadow -O3 -ffast-math -Wall -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -fomit-frame-pointer -fno-tree-vectorize -c -o filters/video/resize.o filters/video/resize.c
filters/video/resize.c:44:27: fatal error: libavutil/opt.h: No such file or directory
compilation terminated.
make: *** [filters/video/resize.o] Error 1
I would be really grateful if someone could help me out since I have spent 3-4 days on unsuccessful attempts to properly install ffmpeg
andrew.46
July 7th, 2011, 02:11 AM
Just to get you going perhaps add --disable-lavf to your x264 ./configure string? I have to confess though that I know nothing about OpenCV so I do not know if you will actually need x264 lavf support for this...
OKComputerQ
July 7th, 2011, 02:40 AM
Just to get you going perhaps add --disable-lavf to your x264 ./configure string? I have to confess though that I know nothing about OpenCV so I do not know if you will actually need x264 lavf support for this...
OpenCV is a library of computer vision related functions . I tried adding --disable-lavf, it gives the same error
andrew.46
July 7th, 2011, 02:45 AM
I tried adding --disable-lavf, it gives the same error
In that case we shall have to wait for wiser heads than mine to have a look at the problem :(
OKComputerQ
July 7th, 2011, 04:19 PM
In that case we shall have to wait for wiser heads than mine to have a look at the problem :(
I guess so , Thanks for the reply :)
qyot27
July 7th, 2011, 11:42 PM
Google only showed this thread and a few OpenSUSE discussions where that error occurred. And the OpenSUSE discussions were centered around an old revision of ffmpeg (0.6.25320 as far as the package naming was concerned; back in October 2010). And more specifically, it mentioned that this issue of libavutil/opt.h coming up missing was fixed when ffmpeg was still using SVN (r25420, specifically).
So I'm guessing that's the issue. Use an ffmpeg that isn't horrifically outdated and the problem will probably go away.
OKComputerQ
July 8th, 2011, 05:45 AM
Google only showed this thread and a few OpenSUSE discussions where that error occurred. And the OpenSUSE discussions were centered around an old revision of ffmpeg (0.6.25320 as far as the package naming was concerned; back in October 2010). And more specifically, it mentioned that this issue of libavutil/opt.h coming up missing was fixed when ffmpeg was still using SVN (r25420, specifically).
So I'm guessing that's the issue. Use an ffmpeg that isn't horrifically outdated and the problem will probably go away.
Thanks for the reply
Yes you are right , but I'm following exactly what it says in the tutorial given here (using git). And also I can't even make it to the ffmpeg step due to this problem occurring in make x264 . I did however got past this step in my previous attempts , then only ffmpeg was causing problems , but now I could not even reach there
qyot27
July 8th, 2011, 07:35 AM
Thanks for the reply
Yes you are right , but I'm following exactly what it says in the tutorial given here (using git). And also I can't even make it to the ffmpeg step due to this problem occurring in make x264 . I did however got past this step in my previous attempts , then only ffmpeg was causing problems , but now I could not even reach there
Try
sudo apt-get purge ffmpeg
and then attempt to build x264 again. I have a feeling that there may have been a copy of FFmpeg 0.6 installed previously, and the 'remove' step didn't flush all of it out. Also, if any part of a make process fails, it tends to be a good idea to run 'make distclean' before running ./configure again. Otherwise you could get remnants from previous failed build attempts.
From a different angle, I would hope I'm wrong, but it could be due to the 'bulk' of the FFmpeg build that x264 is trying to link against. Some git commits from this past April mention an opt.h, but I don't know if it's related to this issue. You could try to build a stripped-down version of FFmpeg *first*, then build x264 (which will detect FFmpeg), then uninstall FFmpeg and install a proper, full version. For cleanliness reasons, you can install the minimal FFmpeg to a custom area, which won't mess with the system.
This is what I do since none of the encoders or muxers in FFmpeg are necessary for x264's lavf support to function (along with inflating FFMS2 the same way, and needing to link even more stuff in the process).
If you want to try the minimal FFmpeg->x264->full FFmpeg option, then see if this works:
basic FFmpeg:
cd ffmpeg
./configure --prefix=$HOME/ffms2_build --enable-gpl --enable-version3 \
--enable-postproc --disable-encoders --disable-muxers --disable-debug \
--disable-network --disable-hwaccels --disable-indevs --disable-outdevs
make
make install
FFMS2 (as optional as the lavf support in x264 is, and I think the sudo part covers everything needed):
sudo apt-get install subversion automake autoconf libtool
svn checkout http://ffmpegsource.googlecode.com/svn/trunk ffms2
cd ffms2
./configure --prefix=$HOME/ffms2_build PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig
make
make install
x264 (which is just changes to the ./configure step):
cd x264
PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig ./configure --enable-static \
--extra-cflags="-I$HOME/ffms2_build/include" --extra-ldflags="-L$HOME/ffms2_build/lib"
Cleanup before building full FFmpeg:
cd ffmpeg
make uninstall
make distclean
OKComputerQ
July 8th, 2011, 02:17 PM
Try
sudo apt-get purge ffmpeg
and then attempt to build x264 again. I have a feeling that there may have been a copy of FFmpeg 0.6 installed previously, and the 'remove' step didn't flush all of it out. Also, if any part of a make process fails, it tends to be a good idea to run 'make distclean' before running ./configure again. Otherwise you could get remnants from previous failed build attempts.
From a different angle, I would hope I'm wrong, but it could be due to the 'bulk' of the FFmpeg build that x264 is trying to link against. Some git commits from this past April mention an opt.h, but I don't know if it's related to this issue. You could try to build a stripped-down version of FFmpeg *first*, then build x264 (which will detect FFmpeg), then uninstall FFmpeg and install a proper, full version. For cleanliness reasons, you can install the minimal FFmpeg to a custom area, which won't mess with the system.
This is what I do since none of the encoders or muxers in FFmpeg are necessary for x264's lavf support to function (along with inflating FFMS2 the same way, and needing to link even more stuff in the process).
If you want to try the minimal FFmpeg->x264->full FFmpeg option, then see if this works:
basic FFmpeg:
cd ffmpeg
./configure --prefix=$HOME/ffms2_build --enable-gpl --enable-version3 \
--enable-postproc --disable-encoders --disable-muxers --disable-debug \
--disable-network --disable-hwaccels --disable-indevs --disable-outdevs
make
make installFFMS2 (as optional as the lavf support in x264 is, and I think the sudo part covers everything needed):
sudo apt-get install subversion automake autoconf libtool
svn checkout http://ffmpegsource.googlecode.com/svn/trunk ffms2
cd ffms2
./configure --prefix=$HOME/ffms2_build PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig
make
make installx264 (which is just changes to the ./configure step):
cd x264
PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig ./configure --enable-static \
--extra-cflags="-I$HOME/ffms2_build/include" --extra-ldflags="-L$HOME/ffms2_build/lib"Cleanup before building full FFmpeg:
cd ffmpeg
make uninstall
make distclean
Thank you very much qyot27!!! You just resolved my issue . I did the minimum install and followed your instructions and it worked! :D Now I just need to setup OpenCV to get my development working ! You rock man :guitar:
vagrale13
July 10th, 2011, 02:01 PM
Indeed I did not notice that presets-libavcodec52-v6.xml is packaged in /usr/share/winff/ :). You will not need the sed command though as this change is already present in the preset. So to modify your command slightly:
mv -v ~/.winff/presets.xml ~/.winff/presets.xml_bak && \
cp -v /usr/share/winff/presets-libavcodec52-v6.xml ~/.winff/presets.xml
should be enough to get started with the git FFmpeg. To alter the ogg preset I would suggest:
sed -i_oggchange 's/-acodec vorbis/-acodec libvorbis/g' ~/.winff/presets.xmland then possible more changes, I have only just started looking at the newer presets. Thanks for pointing out that the newer presets were already installed :).
After a couple of days, i try to convert a video with winff without command
sed -i 's/kb /k /g' ~/.winff/presets.xmland doesn' t work.
After run the command, where change kb to k, works fine!
wrightjmf
July 13th, 2011, 04:42 PM
Thanks. This was incredibly helpful.
budgierless
July 22nd, 2011, 11:42 AM
Hi, i am using ubuntu 9.10, i am trying to get mp4box to support x264 for ipad mp4 files, but i dont have a clue what im doing, can someone give me a step by step tutorial to config this via the terminal of ubuntu 9.10.
i dont know if this help but their is an example of my current output:
FFmpeg version SVN-r25924, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 9 2010 20:10:38 with gcc 4.4.1
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50.34. 0 / 50.34. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.99. 1 / 52.99. 1
libavformat 52.88. 0 / 52.88. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.68. 1 / 1.68. 1
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
[flv @ 0x2eb5510] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (2997/50) -> 29.92 (359/12)
Input #0, flv, from '/var/www/vhosts/xxxxxxxx/mydomain.com/httpdocs/vdata/videoclip.flv':
Metadata:
metadatacreator : Yet Another Metadata Injector for FLV - Version 1.5
hasKeyframes : true
hasVideo : true
hasAudio : true
hasMetadata : true
canSeekToEnd : false
duration : 138
datasize : 6524496
videosize : 5791258
videocodecid : 7
width : 640
height : 360
framerate : 30
videodatarate : 325
audiosize : 703690
audiocodecid : 10
audiosamplerate : 44100
audiosamplesize : 16
stereo : true
audiodatarate : 38
filesize : 6525667
lasttimestamp : 138
lastkeyframetimestamp: 135
lastkeyframelocation: 6341071
Duration: 00:02:18.32, start: 0.000000, bitrate: 370 kb/s
Stream #0.0: Video: h264, yuv420p, 640x360 [PAR 1:1 DAR 16:9], 332 kb/s, 29.92 tbr, 1k tbn, 59.94 tbc
Stream #0.1: Audio: aac, 48000 Hz, mono, s16, 38 kb/s
File for preset 'hq' not found
no idea if that helps at all.
bflag
July 24th, 2011, 04:39 PM
I'm using Ubuntu 11.04 and was having difficulty encoding in x264 format from Handbrake using the AppleTV 2 preset. I kept getting a Segmentation Fault about 10% into the encode. I followed FakeOutdoorsman's instructions and attempted to encode the video directly from ffmpeg :
ffmpeg -i input.mpg -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 -threads 0 output.mp4
But, I kept getting a Segmentation Fault.
So, I performed a new install of Ubuntu 11.04... updated the system, and refollowed FakeOutdoorsman's instructions.
Segmentation Fault.
Unistalled everything. Installed ffmpeg, then x264, removed ffmpeg, then reinstalled ffmpeg.
Segmentation Fault.
I've been encoding the same input videos on another Ubuntu 11.04 system, using the AppleTV2 preset from Handbrake wiithout issues.
Anyone have any ideas?
PS : I'm using a new AMD Phenom II X6 1090T Processor and the 64 Bit version of Ubuntu 11.04
bflag
July 24th, 2011, 08:38 PM
Attached is the output from an attempted encode. Does anyone have any ideas?
---
frank@Ubuntu-1:~$ ffmpeg -i test_input.mpg -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 -threads 0 output.mp4
ffmpeg version N-31629-g9e4ed29, Copyright (c) 2000-2011 the FFmpeg developers
built on Jul 24 2011 15:27:06 with gcc 4.5.2
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 9. 0 / 53. 9. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 27. 3 / 2. 27. 3
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mpeg, from 'test_input.mpg':
Duration: 00:30:00.09, start: 0.402556, bitrate: 11928 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 19392 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1bd]: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
[buffer @ 0x18f8380] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[libx264 @ 0x18f8440] using SAR=1/1
[libx264 @ 0x18f8440] using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
[libx264 @ 0x18f8440] profile High, level 5.0
[libx264 @ 0x18f8440] 264 - core 116 r2037 f8ebd4a - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=9 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf53.6.0
Stream #0.0: Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30k tbn, 29.97 tbc
Stream #0.1: Audio: libfaac, 48000 Hz, 5.1, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
Segmentation fault0 q=28.0 size= 71288kB time=00:01:36.39 bitrate=6058.2kbits/s dup=20 drop=0
FakeOutdoorsman
July 27th, 2011, 07:25 PM
I'm using Ubuntu 11.04 and was having difficulty encoding in x264 format from Handbrake using the AppleTV 2 preset. I kept getting a Segmentation Fault about 10% into the encode. I followed FakeOutdoorsman's instructions and attempted to encode the video directly from ffmpeg...But, I kept getting a Segmentation Fault.
Handbreak and FFmpeg (that you compiled from this guide) are both giving you a seg fault? Does FFmpeg from the repository give you a seg fault too?
sudo apt-get remove ffmpeg x264
sudo apt-get install ffmpeg libavcodec-extra-52
hash ffmpeg
ffmpeg -i test_input.mpg -an -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mp4
bflag
July 28th, 2011, 01:37 AM
Another Segmentation Fault... I installed Ubuntu 11.04 Minimum install, implemented your original instructions, followed by your most recent instructions...
frank@encoder-1-host:~$ ffmpeg -i "The Office - The Cover-Up.mpg" -an -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mp4
FFmpeg version 0.6.2-4:0.6.2-1ubuntu1, Copyright (c) 2000-2010 the Libav developers
built on Mar 22 2011 15:55:04 with gcc 4.5.2
configuration: --extra-version=4:0.6.2-1ubuntu1 --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 --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
libavutil configuration: --extra-version=4:0.6.2-1ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-libopenjpeg --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdirac --enable-libfaad --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libdc1394 --enable-shared --disable-static
libavcodec configuration: --extra-version=4:0.6.2-1ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-libopenjpeg --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdirac --enable-libfaad --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libdc1394 --enable-shared --disable-static
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mpeg2video @ 0x15a2a50]mpeg_decode_postinit() failure
Last message repeated 12 times
[mpeg @ 0x1551640]max_analyze_duration reached
Input #0, mpeg, from 'The Office - The Cover-Up.mpg':
Duration: 00:30:02.39, start: 1.000000, bitrate: 13391 kb/s
Stream #0.0[0x1bd]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Stream #0.1[0x1e0]: Video: mpeg2video, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 20000 kb/s, 32.72 fps, 29.97 tbr, 90k tbn, 59.94 tbc
[libx264 @ 0x16b1770]using SAR=1/1
[libx264 @ 0x16b1770]using cpu capabilities: MMX2 SSE2Fast FastShuffle SSEMisalign LZCNT
[libx264 @ 0x16b1770]profile High, level 5.0
[libx264 @ 0x16b1770]264 - core 106 Ubuntu_2:0.106.1741-3 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=9 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf52.64.2
Stream #0.0: Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=10-51, 200 kb/s, 30k tbn, 29.97 tbc
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
[mpeg2video @ 0x15a2a50]warning: first frame is no keyframe
Segmentation fault1 q=27.0 size= 64256kB time=71.07 bitrate=7406.4kbits/s its/s
Mr.Goose
July 28th, 2011, 10:59 PM
@Jose Catre-Vandis, WRT your post a few weeks ago:-
http://ubuntuforums.org/showpost.php?p=10930828&postcount=1753
After a lot of digging around, I think I found a fix for the issue of ffmpeg-x264 *.mp4 files playing with the wrong aspect ratio in MPlayer - whilst playing perfectly OK in VLC, Kaffeine, Totem etc.
Seems it is a bug with MPlayer :P - though I don't understand why ffmpeg-x264 *.mp4 files I encoded last year seem to play fine. :confused:
Anyway, an updated MPlayer is available in PPA:-
https://launchpad.net/~motumedia/+archive/mplayer-daily
This updated version fixes the aspect ratio issue. To install it, open a terminal window and type in each of the three lines (remembering to hit your return key at the end of each line of course):-
sudo apt-add-repository ppa:motumedia/mplayer-daily
sudo apt-get update
sudo apt-get dist-upgrade
I just did it and I'm delighted to report that all my recently-encoded ffmpeg-x264 encoded mp4's now play perfectly in Mplayer. All the old ones play fine too.
FWIW, I'm actually using Ricardo Villalba's SMPlayer, an excellent QT-based front end for Mplayer. IMHO, it's probably one of the finest (and easiest to use) media players for this type of file - especially now I've figured out how to fix the aspect ratio issue. lol. :D
Anyway Jose, I'd be very interested to know if this fixes the issue for you too?
Best wishes, G.
Followed guide successfully on Xubuntu 11.04. Everything works fine. Have an odd problem with mp4 playback using mplayer (no-gui).
If I encode a bit of recorded tv (.ts file, PAR 64:45, DAR 16/9) using the first crf example, the encode works fine and retains the PAR and DAR, but when I go to playback in mplayer (nothing in config file) mplayer seems to think the video has an aspect ratio of 2.53:1, making a wide thin video.
If I encode using the same command line but replace with mkv instead of mp4, mplayer plays back at the correct aspect of 16/9.
mplayer plays back avi/xvid (encoding the same piece of recorded tv) at the correct aspect ratio.
Screen is a 1920x1080 24". No similar problems on 10.04 LTS
I can fix this with a profile in mplayer's config:
[extension.mp4]
profile-desc="Profile for HD mp4 files"
aspect="16/9" but this will affect all mp4 extensions.
If I use parole, I have to use the "none" setting in Aspect menu to get the correct resolution.
Can anyone shed any light on this issue? I have tried encoding with all sorts of different parameters but with no success.
andrew.46
July 28th, 2011, 11:31 PM
FWIW, I'm actually using Ricardo Villalba's SMPlayer, an excellent QT-based front end for Mplayer. IMHO, it's probably one of the finest (and easiest to use) media players for this type of file - especially now I've figured out how to fix the aspect ratio issue. lol. :D
There has been a lot of interest recently in a fork of SMPlayer called UMPlayer, might be worth a look as well?
andrew.46
July 30th, 2011, 12:03 PM
I am converting some footage of my daughter tandem skydiving for my android phone. For this to play on this particular device I have to use the baseline profile but I cannot get past an error message:
andrew@skamandros~/Desktop$ ffmpeg -i claire.vob \
> -vcodec libx264 -preset slow -profile baseline -crf 22 -threads 0 \
> -acodec libfaac -ac 2 -ar 44100 -ab 128k \
> claire_skydive.mp4
ffmpeg version N-31694-g0e29c4f, Copyright (c) 2000-2011 the FFmpeg developers
built on Jul 30 2011 20:54:25 with gcc 4.5.3
configuration: --prefix=/usr --mandir=/usr/man --enable-postproc --enable-avfilter --enable-pthreads --enable-shared --disable-static --disable-ffserver --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvpx --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-x11grab --enable-nonfree --enable-gpl --enable-version3
libavutil 51. 11. 1 / 51. 11. 1
libavcodec 53. 9. 0 / 53. 9. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 27. 3 / 2. 27. 3
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[mpeg @ 0x8068380] max_analyze_duration 5000000 reached at 5000000
Input #0, mpeg, from 'claire.vob':
Duration: 00:05:38.68, start: 0.360000, bitrate: 7605 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 8000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0xa0]: Audio: pcm_s16be, 48000 Hz, 2 channels, s16, 1536 kb/s
w:720 h:576 pixfmt:yuv420p tb:1/1000000 sar:64/45 sws_param:
[libx264 @ 0x8063700] using SAR=64/45
[libx264 @ 0x8063700] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x8063700] profile Constrained Baseline, level 3.0
[libx264 @ 0x8063700] 264 - core 116 r84 9cc407d - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=0 ref=5 deblock=1:0:0 analyse=0x1:0x111 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[B][NULL @ 0x80658c0] [Eval @ 0xbfdff01c] Undefined constant or missing '(' in 'baseline'
[NULL @ 0x80658c0] Unable to parse option value "baseline"
[NULL @ 0x80658c0] Error setting option profile to value baseline.
Output #0, mp4, to 'claire_skydive.mp4':
Stream #0.0: Video: libx264, yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream #0.1: Audio: libfaac, 44100 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
This has been reported to FFmpeg-users (http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2011-July/001690.html) just recently with no subsequent comments :(. Any thoughts or fixes for this one?
qyot27
July 30th, 2011, 04:27 PM
I am converting some footage of my daughter tandem skydiving for my android phone. For this to play on this particular device I have to use the baseline profile but I cannot get past an error message:
---snip---
[NULL @ 0x80658c0] [Eval @ 0xbfdff01c] Undefined constant or missing '(' in 'baseline'
[NULL @ 0x80658c0] Unable to parse option value "baseline"
[NULL @ 0x80658c0] Error setting option profile to value baseline.
---snip---
This has been reported to FFmpeg-users (http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2011-July/001690.html) just recently with no subsequent comments :(. Any thoughts or fixes for this one?
It was mentioned here (http://permalink.gmane.org/gmane.comp.video.ffmpeg.devel/133615) that it has something to do with audio being included. Looks like the possible interim solutions are:
Encode video and audio separately, mux later (with MP4Box or mp4creator, most likely, unless it supports MKV too), or
Use an L-SMASH equipped x264 build directly, since those come with audio encoding support.
FakeOutdoorsman
July 30th, 2011, 10:48 PM
It appears that 5dc6bd86 (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=5dc6bd86f0f5cfffb44b47e6e 916119f26b12091) introduced this issue to me. I replied to the thread that qyot27 mentioned. Maybe it will add some more interest to the issue.
Another option is to use the previous working commit (1885824b20a493d25db4b8e5397666e3a68f45f2): example (http://ubuntuforums.org/showpost.php?p=11096593&postcount=151).
andrew.46
July 31st, 2011, 07:43 AM
Thanks qyot and Fakeoutdoorsman, I encoded video and audio separately and then muxed with MP4Box. Hopefully the FFmpeg developers will sort it all out soon...
cpcpcp
July 31st, 2011, 09:31 PM
Following the instructions to install the latest ffmpeg etc on LTS10.04 it seems to be going wrong.
Is it hopeless (am I hopeless) or can things be fixed?
cjp@cjp-desktop:~$ sudo apt-get remove ffmpeg x264 libx264-dev
Reading package lists... Done Building dependency tree
Reading state information... Done Package libx264-dev is not installed, so not removed
The following packages will be REMOVED ffmpeg winff winff-doc x264 0 upgraded, 0 newly installed, 4 to remove and 88 not upgraded. After this operation, 7,791kB disk space will be freed. Do you want to continue [Y/n]? y
(Reading database ... 279297 files and directories currently installed.)
Removing winff-doc ... Removing winff ...
Removing ffmpeg ...
Removing x264 ...
Processing triggers for doc-base ... Processing 1 removed doc-base file(s)... Registering documents with scrollkeeper...
Processing triggers for shared-mime-info ... Processing triggers for man-db ... Processing triggers for menu ... Processing triggers for hicolor-icon-theme ... Processing triggers for desktop-file-utils ... Processing triggers for python-gmenu ... Rebuilding /usr/share/applications/desktop.en_GB.utf8.cache... Processing triggers for python-support ...
cjp@cjp-desktop:~$ sudo apt-get update Hit http://ppa.launchpad.net lucid Release.gpg Ign http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/ lucid/main Translation-en_GB
etc
Hit http://archive.ubuntu.com/ubuntu/ lucid/main Translation-en_GB
Hit http://archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_GB
Hit http://archive.ubuntu.com lucid-updates Release.gpg Ign http://archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_GB Ign http://archive.ubuntu.com/ubuntu/ lucid-u etc Ign http://packages.medibuntu.org/ lucid/free Translation-en_GB
Hit http://archive.ubuntu.com lucid-security Release.gpg Ign http://archive.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_GB Hit http://ppa.launchpad.net lucid Release Ign http://archive.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_GB Ign http://archive.ubuntu.com/ubuntu/ lucid-security/main Translation-en_GB etc Hit http://deb.torproject.org lucid/main Packages Get: 1 http://archive.getdeb.net lucid-getdeb Release.gpg [836B]
Ign http://archive.getdeb.net/ubuntu/ lucid-getdeb/games Translation-en_GB Get: 2 http://archive.getdeb.net lucid-getdeb Release [7,246B] Get: 3 http://archive.getdeb.net lucid-getdeb/games Packages [68.3kB] Fetched 76.3kB in 3s (25.1kB/s)
Reading package lists... Done cjp@cjp-desktop:~$ sudo apt-get install build-essential git-core checkinstall yasm texi2html libfaac-dev \ > libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \ > libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev Reading package lists... Done Building dependency tree
Reading state information... Done git-core is already the newest version. Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies. libsdl1.2-dev: Depends: libglu1-mesa-dev but it is not going to be installed E: Broken packages
cjp@cjp-desktop:~$ d d: command not found cjp@cjp-desktop:~$ git clone git://git.videolan.org/x264 fatal: destination path 'x264' already exists and is not an empty directory. cjp@cjp-desktop:~$ cd x264 cjp@cjp-desktop:~/x264$ ./configure --enable-static Unknown option --enable-static, ignored Found no assembler Minimum version is yasm-0.7.0 If you really want to compile without asm, configure with --disable-asm. cjp@cjp-desktop:~/x264$ make Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is yasm-0.7.0 If you really want to compile without asm, configure with --disable-asm. make: *** [config.mak] Error 1 cjp@cjp-desktop:~/x264$ sudo checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | \ > awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes sudo: checkinstall: command not foundAll I want to do is put a video on my Nokia 5800 mobile phone but it all seems like hard work:sad:
Chris
ron999
July 31st, 2011, 09:52 PM
All I want to do is put a video on my Nokia 5800 mobile phone :sad:
You're in the wrong place pal.
Put some effort into your original thread and you might get a response.
Here:- http://ubuntuforums.org/showthread.php?t=1815602
cpcpcp
August 1st, 2011, 08:37 PM
You're in the wrong place pal.
Put some effort into your original thread and you might get a response.
Here:- http://ubuntuforums.org/showthread.php?t=1815602
Why do you think I am in the wrong place?
I am after help in installing the latest version of ffmpeg as FakeOutdoorsman's instructions for the install failed for me.
The reason I want the latest version is to convert a video file to play on my Nokia mobile phone (which is the subject of another thread - on which FakeOutdoorsman has been able to assist!!).:o
I now just need ffmpeg installed to try the solution and if all else fails I will re- install the original Ubuntu distro version
Chris
qyot27
August 2nd, 2011, 07:23 AM
Well, that log noted two things:
Broken dependencies
No assembler (yasm, in this case)
So you need to fix the broken dependencies issue. That's totally unrelated to this thread and I can never seem to remember the proper course of action to address that situation, so use search to track down the answer for that, unless someone else responds with that info.
Then, you need to make sure you run every preparatory command in this thread's first post - because it tells the system to install yasm, thus that should be a non-issue.
madeinfamous
August 5th, 2011, 09:49 PM
@ FakeOutdoorsman
"Install libvpx (optional)
4. This is used to encode VP8 video. If you follow this step, add --enable-libvpx to the FFmpeg ./configure line in step 5."
should be:
./configure --enable-vp8
thank you!
andrew.46
August 5th, 2011, 10:40 PM
should be:
./configure --enable-vp8
Hmmm...... not here:
andrew@skamandros~/source/ffmpeg_build/ffmpeg/ffmpeg$ ./configure --help | grep -i vpx
--enable-libvpx enable VP8 support via libvpx [no]
FakeOutdoorsman
August 5th, 2011, 10:47 PM
I think madeinfamous is refering to the libvpx configure. Amirite? Da/nyet? Although it doesn't seem to make a difference for FFmpeg...unless I missed something. I don't use this encoder often myself. Perhaps a reason why --enable-vp8 needs to be included might clear things up.
madeinfamous
August 6th, 2011, 01:28 PM
hi :)
@siva:~/ffmpeg/libvpx$ ./configure --enable-libvpx
Unknown option "--enable-libvpx".
See ./configure --help for available options.
--enable-vp8 VP8 codec support
ubuntu natty amd64
have a nice day!
FakeOutdoorsman
August 6th, 2011, 07:38 PM
The --enable-libvpx configuration option is intended for FFmpeg, not libvpx:
If you follow this step, add --enable-libvpx to the FFmpeg ./configure line in step 5.
madeinfamous
August 7th, 2011, 12:49 PM
@ FakeOutdoorsman
oh my bad, I am terribly ashamed! :oops:
probably due to fatigue ... :)
thank you for pointing this out!
have a nice week!
spielnicht
August 12th, 2011, 04:41 PM
Thanks for the great guide.
Quick question, is RMVB fully supported by simply following this guide?? Only reason I ask is that I get an error when converting RMVB ("Unsupported Video Codec"). Funny thing, is that the conversion does go on and finishes...but only to discover that the audio and picture are slightly out of sync.
Thoughts???
FakeOutdoorsman
August 12th, 2011, 07:22 PM
Please show your command and the complete terminal output. What players did you use? Does it play normally with ffplay?
MarioMey
August 13th, 2011, 03:51 AM
Sorry if what I'm going to ask was discuss... I can't read 180 pages.
I compiled FFMPEG, there wasn't problems. I expected to have version 0.8 of ffmpeg, but now I have N-31831-g931187e version... What is this strange number?
It's ok, I don't care the number. But now, I would need the dependencies that are in this page: http://packages.ubuntu.com/oneiric/ffmpeg. I thought they were to be compiled when compiling ffmpeg, but no. I downloaded some of them from the page, but there're some problems when trying to install them... version problems... I can't install them.
Should I compile all of them?
I need ffmpeg 0.8, because a branch of Blender requires it.
I need to compile ffmpeg, because I want to encode in x264.
shreepads
August 13th, 2011, 05:05 AM
Hi
Is there a way of compiling the latest ffmpeg and x264 code but without installing it, so that it is run when needed from command line? Essentially not have to use sudo (other than to install necessary dependencies from the standard repositories).
I am a little worried about affecting other apps that I have installed as a result of doing this and having to deal with apt-get problems. I have done this before for mplayer (like this (http://ubuntuforums.org/showthread.php?t=1637794), to get VDPAU support) so I think there should be a way of doing this.
I'm using 64-bit Lucid (desktop) latest from the standard repositories. Only additions outside the standard repos are PPAs for Handbrake and PiTiVi (gstreamer).
Thanks!
Shreepad
shreepads
August 13th, 2011, 02:14 PM
Please ignore, found the solution here (http://www.unix.com/302530919-post2.html) ...
Had a mix of different size video clips to merge in PiTiVi, which was making an absolute dog's breakfast while resizing.. Looks great with ffmpeg!!
Hi
Is there a way of compiling the latest ffmpeg and x264 code but without installing it, so that it is run when needed from command line? Essentially not have to use sudo (other than to install necessary dependencies from the standard repositories).
I am a little worried about affecting other apps that I have installed as a result of doing this and having to deal with apt-get problems. I have done this before for mplayer (like this (http://ubuntuforums.org/showthread.php?t=1637794), to get VDPAU support) so I think there should be a way of doing this.
I'm using 64-bit Lucid (desktop) latest from the standard repositories. Only additions outside the standard repos are PPAs for Handbrake and PiTiVi (gstreamer).
Thanks!
Shreepad
qyot27
August 13th, 2011, 04:14 PM
Is there a way of compiling the latest ffmpeg and x264 code but without installing it, so that it is run when needed from command line? Essentially not have to use sudo (other than to install necessary dependencies from the standard repositories).
I am a little worried about affecting other apps that I have installed as a result of doing this and having to deal with apt-get problems. I have done this before for mplayer (like this (http://ubuntuforums.org/showthread.php?t=1637794), to get VDPAU support) so I think there should be a way of doing this.
Even though you solved it yourself, for anyone else reading this is the course of action/reasoning needed:
--prefix=$HOME/yourdirectory will cause 'make install' to install the desired package to the 'yourdirectory' directory in $HOME ($HOME, ~/, and /home/username all point to the same place). Because you are installing it to an area of the system that your user has control over, there's no need to use sudo.
If this needs to be linked against other projects that have been installed to $HOME/yourdirectory, you then must specify those with --extra-cflags and --extra-ldflags commands, or in some cases, with PKG_CONFIG_PATH or FFMPEG_CFLAGS or so on. It depends on the programs involved and what their build systems dictate.
Finally, when running those programs which are not on your PATH, you must use ./ (for example, ./ffmpeg or ./x264) when calling them, lest they fail to run.
ron999
August 13th, 2011, 11:16 PM
Hi
In post #1 way back at page 1.
What's the difference between the commands
Part 3:- Get the current source files, compile, and install x264
and
Part 7:- This allows x264 to accept just about any input that FFmpeg...
:confused:
andrew.46
August 14th, 2011, 12:03 AM
If you follow section 7 you will be able to use many different formats as inputs for x264 from the commandline. Which is to say you can input many different containers and codecs, without this x264 is somewhat limited in the containers and formats it will deal with as inputs.
Totally unnecessary if you do not use x264 directly from the commandline. The option will show here:
andrew@skamandros~$ x264 --help | head -n 13
x264 core:116 r2057 0ba8a9c
Syntax: x264 [options] -o outfile infile
Infile can be raw (in which case resolution is required),
or YUV4MPEG (*.y4m),
or Avisynth if compiled with support (no).
or libav* formats if compiled with lavf support (yes) or ffms support (no).
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC support (yes)
Output bit depth: 8 (configured at compile time)
It has been a while since I have looked at L-SMASH integrated x264 but I would guess that one day having an L-SMASH copy + FFmpeg import abilities would substantially increase the value of x264 as a commandline application in its own right.
qyot27
August 14th, 2011, 12:40 AM
It has been a while since I have looked at L-SMASH integrated x264 but I would guess that one day having an L-SMASH copy + FFmpeg import abilities would substantially increase the value of x264 as a commandline application in its own right.
Eh, IMO that depends on one's feelings toward multi-format or singular-format encoders.
Of course, this is also different between Linux and Windows. x264 has supported AviSynth for nearly as long as x264 has been worked on, which is, well, a really long time, development-wise (http://git.videolan.org/?p=x264.git;a=commit;h=29dee22af6b6174f54bb621f103 8c0604a42d21e) (that's revision 161).
Since AviSynth is Windows-only, they're the only ones that got the benefit*; to achieve equivalent functionality on Linux, it was necessary to either A) use an x264-equipped build of FFmpeg, or B) pipe data into x264. LAVF/FFMS2 support was meant to supersede users having to use pipes and to increase x264's possible user friendliness.
*yes, it is fully possible to use AviSynth and a Windows build of x264 in Wine, although you won't be able to use DirectShowSource() or possibly other system-dependent filters. Windows x264 builds actually work better under Wine than they do on Windows, at least as far as I saw when I compared the performance a few years ago.
L-SMASH is primarily an alternative MP4 muxer; the audio encoding support is actually a separate project that gets included in the L-SMASH branch and patch for reasons of convenience.
As Windows users had that input-agnostic functionality for almost 5 years before that, though, that's why I mentioned it. Over there, x264 is typically used by itself (disclaimer for trusting anything online, but it is certainly true when looking at many encoding GUIs: they just call x264 directly and may do external muxing in a subsequent stage). That was true well before LAVF/FFMS2 support, and afterward. LAVF/FFMS2 on Windows really serves more of the purpose of providing multi-format input support for those users that have an aversion to using AviSynth.
andrew.46
August 14th, 2011, 01:03 AM
L-SMASH is primarily an alternative MP4 muxer; the audio encoding support is actually a separate project that gets included in the L-SMASH branch and patch for reasons of convenience.
I was not aware of that, is this the audio branch:
https://github.com/Kovensky/x264-audio/
qyot27
August 14th, 2011, 01:07 AM
I was not aware of that, is this the audio branch:
https://github.com/Kovensky/x264-audio/
Yep, as the 'kaudio' branch on x264_L-SMASH is identical to that repository. I don't know how far along progress is on the audio portions, though.
FakeOutdoorsman
August 14th, 2011, 01:32 AM
Part 7:- This allows x264 to accept just about any input that FFmpeg... :confused:
Yeah... I should probably elaborate that a bit more on the guide to make it more clear, but I probably won't get to it for a few days. I saw the sun today for the first time in three weeks. It's been cloudy.
FakeOutdoorsman
August 14th, 2011, 01:49 AM
I compiled FFMPEG, there wasn't problems. I expected to have version 0.8 of ffmpeg, but now I have N-31831-g931187e version... What is this strange number?
I assume N stands for Michael Niedermayer, the Self-Appointed (I think) FFmpeg Benevolent Dictator For Life (SA-FFbdfl). 31831 is a Subversion style version number indicating that your version of FFmpeg is the 31831th update to the source. g931187e is similar to 31831, and is the shortened Git hash that corresponds to a certain commit.
But now, I would need the dependencies that are in this page: http://packages.ubuntu.com/oneiric/ffmpeg. I thought they were to be compiled when compiling ffmpeg, but no.
Are you using Oneiric already? Compiling FFmpeg as shown in this guide will not create all of these packages shown in your link, but it should provide most of the files that these packages contain. So no, you shouldn't have to install the packages on your link.
Should I compile all of them?
No, because if you followed this guide you probably should already have the necessary files for anything that you're compiling that depends on a recent FFmpeg.
I need ffmpeg 0.8, because a branch of Blender requires it.
What branch? Where are you getting this Blender version?
I need to compile ffmpeg, because I want to encode in x264.
You can also encode with x264 via the repository FFmpeg (or libav as of Natty since Ubuntu dropped FFmpeg for libav) if you install an additional package as shown here:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
andrew.46
August 14th, 2011, 01:49 AM
I saw the sun today for the first time in three weeks. It's been cloudy.
Come to Australia :)
qyot27
August 14th, 2011, 03:00 AM
I assume N stands for Michael Niedermayer, the Self-Appointed (I think) FFmpeg Benevolent Dictator For Life (SA-FFbdfl). 31831 is a Subversion style version number indicating that your version of FFmpeg is the 31831th update to the source. g931187e is similar to 31831, and is the shortened Git hash that corresponds to a certain commit.
Technically, 31831 is the number of revisions since the N tag. The N tag is assigned to the first commit, hence, the number of commits since the first commit.
To treat it like a Subversion revision, you actually have to add 1, because the method used there - of counting since a tag - means the tag is understood as essentially a 'revision 0', whereas Subversion treats the first revision as 1 (as does using git rev-list to just count the total # of revisions). I actually replace version.sh with a local version that prints the revision info in a way I like better, wherein 'N-31831-g931187e' would change to 'r31832 git-931187e', which I find easier to parse mentally.
Come to Australia :D
I know I'd love to, even if only to escape this blasted heat (http://www.weather.com/weather/today/Saint+Petersburg+FL+USFL0438) (even though I could go to Seattle for that relief too; it's a lot closer - not that I could afford any sort of vacation, though).
andrew.46
August 14th, 2011, 03:39 AM
I know I'd love to, even if only to escape this blasted heat (http://www.weather.com/weather/today/Saint+Petersburg+FL+USFL0438) (even though I could go to Seattle for that relief too; it's a lot closer - not that I could afford any sort of vacation, though).
Hmmm... perhaps you should not come to Australia in summer then :). Temps of 104 Fahrenheit are not that uncommon...
qyot27
August 14th, 2011, 04:06 AM
Hmmm... perhaps you should not come to Australia in summer then :). Temps of 104 Fahrenheit are not that uncommon...
Oh, I'd definitely be sure to make any such trip during the Southern Hemisphere's Fall or Winter. Which works out, because it's roughly the opposite of the Northern Hemisphere's Spring and Summer.
I'd be a reverse snowbird.
spielnicht
August 15th, 2011, 05:24 PM
Please show your command and the complete terminal output. What players did you use? Does it play normally with ffplay?
I played it back with Totem on my linux box and even tried it on my Windows box and my Xoom...all with exact same results.
Command
ffmpeg -i sample.rmvb -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 -threads 0 sample.mp4
Output
ffmpeg -i sample.rmvb -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 -threads 0 sample.mp4
ffmpeg version N-31826-gd912e44, Copyright (c) 2000-2011 the FFmpeg developers
built on Aug 12 2011 09:48:35 with gcc 4.5.2
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
libavutil 51. 11. 1 / 51. 11. 1
libavcodec 53. 10. 0 / 53. 10. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 3. 0 / 53. 3. 0
libavfilter 2. 29. 1 / 2. 29. 1
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[NULL @ 0x33cf560] Unsupported video codec
[rm @ 0x33bd460] max_analyze_duration 5000000 reached at 5063000
Input #0, rm, from 'sample.rmvb':
Metadata:
title :
author :
copyright :
comment :
Duration: 00:43:07.63, start: 0.000000, bitrate: 510 kb/s
Stream #0.0: Audio: cook, 44100 Hz, stereo, s16, 64 kb/s
Stream #0.1: Video: rv40, yuv420p, 700x460, 429 kb/s, 12.05 fps, 12 tbr, 1k tbn, 12 tbc
Stream #0.2: Data: [0][0][0][0] / 0x0000
mysoogal
August 20th, 2011, 11:09 PM
i created this script after installing the latest ffmpeg
this script will encode to Webm,Theora OGG,MP4- with Qt-faststart, and Flash FLV.
#!/bin/bash
DIR=/var/www
find $DIR -type f |
while read i
do
ffmpeg -i "$i" "$i".webm
sleep 5
ffmpeg -i "$i" -y -vcodec libx264 -s qvga -acodec libfaac -ab 96k -ac 2 -b 200K -threads 4 -flags +loop -cmp +chroma -partitions 0 -me_method epzs -subq 1 -trellis 0 -refs 1 -coder 0 -me_range 16 -g 300 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -maxrate 10M -bufsize 10M -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 "$i".mp4
sleep 5
qt-faststart "$i".mp4 "$i".qt.mp4
sleep 5
rm "$i".mp4
sleep 5
ffmpeg -i "$i" -ar 22050 -ab 32 -f flv -s 320x240 "$i".flv
sleep 5
ffmpeg -i "$i" -s 720x576 -aspect 16:9 \
-vcodec libtheora -g 15 -qscale 8 \
-acodec libvorbis -ac 2 -aq 6 \
-sn "$i".ogg
done
mocha
August 21st, 2011, 09:45 AM
Does anyone know if the latest pulls of ffmpeg have x11grab working again? There was a problem recently as far as I know.
FakeOutdoorsman
August 22nd, 2011, 12:19 AM
Looks like it's still not working as expected. I submitted this as a bug report 3 weeks ago (Ticket 373: e35c674d breaks alsa input (https://ffmpeg.org/trac/ffmpeg/ticket/373)), but it's received little attention. I might have to report it to libav as well since the commit that broke this was merged from that project, but I don't like their bug tracker at all and haven't motivated myself to get over that hump yet.
Until it gets fixed you could use the last commit that worked (http://ubuntuforums.org/showpost.php?p=11096593&postcount=151), and/or make a comment on the bug report.
andrew.46
August 27th, 2011, 12:12 AM
Yet another good reason to use the latest FFmpeg with the recent addition of a Windows Media Image decoder (WMVP/WVP2). Details here (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=45ecda855405f102bcc5d8fba dc5f2376e8e9c42). I tested with the following:
wget http://samples.mplayerhq.hu/V-codecs/WMVP/Arlington.wmv
and it all worked very nicely :).
Edit: And the addition is seen also in MPlayer, see screenshot...
vagrale13
August 27th, 2011, 03:59 PM
In some days newer version Ubuntu (Oneiric Ocelot 11.10) will be available and so today i tried to install lastest FFmpeg and x264 on it.
With commands for Natty i think works fine.
I have some warnings to config.log but i don' t know if this is problem
If someone want to see to config.log here
menachem
September 7th, 2011, 01:14 AM
My question: How do I use your instructions to create and install libavcodec as an external codec instead of internal to ffmpeg? Is there a way to accomplish what I want without having to do that?
To explain:
This has probably been discusses in this thread already, but I couldn't find this issue.
I'm running:
Lubuntu - 11:04
Mplayer - 2:1.0~rc4.dfsg1-1ubuntu3+medibuntu1
libavcodec-extra-52 - 4:0.6.2-1ubuntu2+medibuntu1
ffmpeg - latest build following instruction in this thread
I am trying to play this file with mplayer, but it doesn't work: rtsp://rs-au.JewishAudio.org:554/ohr-tmimim/gafne-sz/5760-ki-setse-1.mp3
I get the following error message:
Initiated "audio/X-MP3-DRAFT-00" RTP subsession on port 42884
================================================== ========================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
ADecoder init failed :(
ADecoder init failed :(
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Cannot find codec 'mp3float' in libavcodec...
ADecoder init failed :(
ADecoder init failed :(
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Unknown/missing audio format -> no sound
ADecoder init failed :(
Requested audio codec family [mad] (afm=libmad) not available.
Enable it at compilation.
Opening audio decoder: [acm] Win32/ACM decoders
Loading codec DLL: 'l3codeca.acm'
Loaded DLL driver l3codeca.acm at 640a000
ACM_Decoder: Unappropriate audio format
Could not load/initialize Win32/ACM audio codec (missing DLL file?).
ADecoder preinit failed :(
ADecoder init failed :(
Opening audio decoder: [hwmpa] MPEG audio pass-through (fake decoder)
Cannot sync MPA frame: 0
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x55.
Audio: no sound
Video: no video
ffplay is able to play the file, here is the information it gives:
ffplay version N-32309-g09c5f99, Copyright (c) 2003-2011 the FFmpeg developers
built on Sep 4 2011 10:31:47 with gcc 4.5.2
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx --enable-decoder=mp3float
libavutil 51. 16. 0 / 51. 16. 0
libavcodec 53. 13. 0 / 53. 13. 0
libavformat 53. 11. 0 / 53. 11. 0
libavdevice 53. 3. 0 / 53. 3. 0
libavfilter 2. 37. 0 / 2. 37. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
The way I see it, mplayer is failing because it is using the old, external libavcodec instead of the compiled ffmpeg which uses a newer, internal libavcodec.
However, I can't uninstall the external libavcodec without also uninstalling mplayer, since mplayer depends on libavcodec.
To try and solve this problem I want to compile ffmpeg with libavcodec as an external library, use that to replace the existing library and see if mplayer will use it.
So I figured out that I can add --enable-shared to the ./configure line to make shared libraries.
My question is, how do I run the checkinstall command to make a libavcodec package? Is this even what I need to do to solve this problem?
Any help would be greatly appreciated.
ron999
September 7th, 2011, 01:33 AM
Any help would be greatly appreciated.
Hi
That stream plays OK for me with mPlayer.
I compiled mPlayer using the tutorial here:- http://ubuntuforums.org/showthread.php?t=1542240
This method compiles mPlayer with it's own version of FFmpeg codecs.
Maybe this is the route to follow instead of messing with your own FFmpeg.
MPlayer SVN-r34007-4.5.2 (C) 2000-2011 MPlayer Team
Playing rtsp://rs-au.JewishAudio.org:554/ohr-tmimim/gafne-sz/5760-ki-setse-1.mp3.
Resolving rs-au.JewishAudio.org for AF_INET6...
Couldn't resolve name for AF_INET6: rs-au.JewishAudio.org
Resolving rs-au.JewishAudio.org for AF_INET...
Connecting to server rs-au.JewishAudio.org[75.99.96.252]: 554...
rtsp_session: session can not be established.
STREAM_LIVE555, URL: rtsp://rs-au.JewishAudio.org:554/ohr-tmimim/gafne-sz/5760-ki-setse-1.mp3
Stream not seekable!
file format detected.
Initiated "audio/X-MP3-DRAFT-00" RTP subsession on port 59204
================================================== ========================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 16000 Hz, 1 ch, floatle, 32.0 kbit/6.25% (ratio: 4000->64000)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
================================================== ========================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 16000Hz 1ch floatle (4 bytes per sample)
Video: no video
Starting playback...
A: 396.9 (06:36.9) of 0.0 (unknown) 3.4%
MPlayer interrupted by signal 2 in module: play_audio
A: 397.0 (06:36.9) of 0.0 (unknown) 3.4%
Exiting... (Quit)
andrew.46
September 7th, 2011, 01:40 AM
The way I see it, mplayer is failing because it is using the old, external libavcodec instead of the compiled ffmpeg which uses a newer, internal libavcodec.
Mind you I run the latest MPlayer compiled against new internal libavcodec and MPlayer still fails on the stream, hanging indefinitely after the following:
mplayer 'rtsp://rs-au.JewishAudio.org:554/ohr-tmimim/gafne-sz/5760-ki-setse-1.mp3'
MPlayer SVN-r34067-4.5.2 (C) 2000-2011 MPlayer Team
Loading extension-related profile 'extension.mp3'
Playing rtsp://rs-au.JewishAudio.org:554/ohr-tmimim/gafne-sz/5760-ki-setse-1.mp3.
Resolving rs-au.JewishAudio.org for AF_INET6...
Couldn't resolve name for AF_INET6: rs-au.JewishAudio.org
Resolving rs-au.JewishAudio.org for AF_INET...
Connecting to server rs-au.JewishAudio.org[75.99.96.252]: 554...
rtsp_session: session can not be established.
STREAM_LIVE555, URL: rtsp://rs-au.JewishAudio.org:554/ohr-tmimim/gafne-sz/5760-ki-setse-1.mp3
Stream not seekable!
file format detected.
Initiated "audio/X-MP3-DRAFT-00" RTP subsession on port 56308
and the alternative command is not much better:
mplayer 'ffmpeg://rtsp://rs-au.JewishAudio.org:554/ohr-tmimim/gafne-sz/5760-ki-setse-1.mp3'
ron999
September 7th, 2011, 01:54 AM
Mind you I run the latest MPlayer compiled against new internal libavcodec and MPlayer still fails on the stream, hanging indefinitely...
Perhaps it's a geographical reason.
Does it play with ffplay or cvlc?
andrew.46
September 7th, 2011, 02:15 AM
That stream plays OK for me with mPlayer.
I compiled mPlayer using the tutorial here:- http://ubuntuforums.org/showthread.php?t=1542240
This method compiles mPlayer with it's own version of FFmpeg codecs.
Maybe this is the route to follow instead of messing with your own FFmpeg.
Hmmm..... but I follow this tutorial as well and the stream does not play for me :(. Not sure about the geographical issue, plays with FFplay but fails on vlc. Interesting.....
mc4man
September 7th, 2011, 06:59 AM
Hmmm..... but I follow this tutorial as well and the stream does not play for me :(. Not sure about the geographical issue, plays with FFplay but fails on vlc. Interesting.....
See the same here, pretty much as shown by menachem, this is with a couple of different mplayers & mplayer2
Just won't play.
Worst case you could use ffmpeg to grab the stream, either to save & playback at leisure or play while grabbing (give it a min or so headstart, then start player on the .wav or .mp3
ffmpeg to wav wouldn't produce to big a file, maybe about 2MB per min.
Or you could let ffmpeg convert back to mp3 or pipe to lame
Ex.
ffmpeg -i rtsp://rs2.SichosInEnglish.org:554/sie/heritage/01.mp3 heritage-1.wav
or
ffmpeg -i rtsp://rs2.SichosInEnglish.org:554/sie/heritage/01.mp3 -f wav - |lame -V6 - heritage-1.mp3
Another possibility, while not ideal, is to pipe directly from ffmpeg to a player - ex. (maybe there's a way to get vlc to cache a bit?
ffmpeg -i rtsp://rs2.SichosInEnglish.org:554/sie/heritage/01.mp3 -f wav - |vlc -
andrew.46
September 7th, 2011, 08:01 AM
See the same here, pretty much as shown by menachem, this is with a couple of different mplayers & mplayer2
Just won't play.
Glad it is not just me :)
FakeOutdoorsman
September 8th, 2011, 07:01 PM
Wanted: FFmpeg Maintainer for Ubuntu (or Debian)
As of Natty, Ubuntu (and Debian unstable) has switched from FFmpeg to the libav fork. The "ffmpeg" package and binary is available, but it is from libav and not FFmpeg. In my opinion, forcing users to switch to the fork instead of providing both packages for the user to decide what to use was an unfortunate decision.
Currently, as far as I know, FFmpeg is not available for Natty+. See Ubuntu renaming FFmpeg to libav (https://lists.ubuntu.com/archives/technical-board/2011-June/000911.html) for a few more details.
I don't know much about maintaining a package, but I (and the FFmpeg developers) would be glad to offer any help for those interested.
ashwin_cse
September 12th, 2011, 11:52 AM
FFmpeg is a versatile tool to encode and decode a multitude of video and audio formats. x264 encodes high-quality H.264 video.
.....
....
.....
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="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
--fstrans=no --default
......
.......
.....
Adding lavf support to x264 (optional)
7. This allows x264 to accept just about any input that FFmpeg can handle and is useful if you want to directly use x264.
cd ~/x264
make distclean
./configure --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
--fstrans=no --default
That's it for installation. You can keep the x264, libvpx, and ffmpeg directories in your home directory if you plan on updating later. See Updating FFmpeg and x264 below for more details.
.....
.....
What is the difference between above two steps ? I see only the codec name changed except that we are cd'ing in to the same directory and running the same set of commands (essentially). Since distclean does nothing but clean up previous run of ./configure. So how is it providing new feature by running the same compilation process again and creating and installing the same deb package. Since it says optional and issues as stated above, i choose to skip. If clarification can be provided it will be great.
Thanks,
with regards,
ashwin
ron999
September 12th, 2011, 11:58 AM
What is the difference between above two steps ?
I asked that question in post #1812
qyot27
September 12th, 2011, 01:26 PM
What is the difference between above two steps ? I see only the codec name changed except that we are cd'ing in to the same directory and running the same set of commands (essentially). Since distclean does nothing but clean up previous run of ./configure. So how is it providing new feature by running the same compilation process again and creating and installing the same deb package. Since it says optional and issues as stated above, i choose to skip. If clarification can be provided it will be great.
x264 can use LAVF input if it detects a usable install of FFmpeg. Notice that the first x264 set was issued before compiling FFmpeg, therefore it will not have the option of using LAVF to open files. The later step recompiles x264 after FFmpeg is installed, detecting LAVF automatically.
LAVF input (and FFMS input, if that had been covered) allows the user to give x264 any general video file directly. Any way you look at the steps though, a recompile is going to be necessary somewhere in the process. Either x264 has to be rebuilt (as per this guide), or FFmpeg has to be rebuilt (in cases where the user wants to keep the LAVF and FFMS components streamlined (http://ubuntuforums.org/showpost.php?p=11025444&postcount=1781), and needs a stripped-down version of FFmpeg).
ashwin_cse
September 12th, 2011, 01:56 PM
x264 can use LAVF input if it detects a usable install of FFmpeg. Notice that the first x264 set was issued before compiling FFmpeg, therefore it will not have the option of using LAVF to open files. The later step recompiles x264 after FFmpeg is installed, detecting LAVF automatically.
LAVF input (and FFMS input, if that had been covered) allows the user to give x264 any general video file directly. Any way you look at the steps though, a recompile is going to be necessary somewhere in the process. Either x264 has to be rebuilt (as per this guide), or FFmpeg has to be rebuilt (in cases where the user wants to keep the LAVF and FFMS components streamlined (http://ubuntuforums.org/showpost.php?p=11025444&postcount=1781), and needs a stripped-down version of FFmpeg).
Thanks qyot27 for the beautiful explanation. That clears the air. Thanks.
with regards,
ashwin
ron999
September 12th, 2011, 03:06 PM
Yes, thanks qyot27.
Re-compile x264 again after FFmpeg.
I understand now.:D
FakeOutdoorsman
September 12th, 2011, 07:50 PM
I updated the guide on step 7 with a link to qyot27's explanation. You can give it a try with the most simple of examples:
x264 input.foo -o output.mkv
Some advantages of using this method:
avoids a layer of complexity and potential bugs by encoding directly with x264 instead of through ffmpeg
access to specific x264 options that may be missing in ffmpeg
no more named pipes to feed input to x264
Disadvantages:
slightly more compiling
have to deal with audio and subsequent muxing separately (ignoring stuff like L-SMASH)
lacks many of the filters that are included in ffmpeg
mc4man
September 12th, 2011, 08:33 PM
Wanted: FFmpeg Maintainer for Ubuntu (or Debian)
As of Natty, Ubuntu (and Debian unstable) has switched from FFmpeg to the libav fork. The "ffmpeg" package and binary is available, but it is from libav and not FFmpeg. In my opinion, forcing users to switch to the fork instead of providing both packages for the user to decide what to use was an unfortunate decision.
Currently, as far as I know, FFmpeg is not available for Natty+. See Ubuntu renaming FFmpeg to libav (https://lists.ubuntu.com/archives/technical-board/2011-June/000911.html) for a few more details.
I don't know much about maintaining a package, but I (and the FFmpeg developers) would be glad to offer any help for those interested.
I guess someone could ppa this, though to do so properly they'd need to test current apps that depend on the shared libs & if there are any issues then provide new builds of those apps.
Can't see ubuntu/debian offering anymore than 1 or the other - the last I checked they both use the same names for the libs which if so would be problematic
(I've somewhat stopped paying attention to who uses what, be it a how-to, mplayer, mplayer2 ect. ect.
An interesting conversation may be between a ffmpeg (real) dev and Reinhard Tartler as to the reasons to use libav
(what I did find a pita was that when searching ffmpeg in synaptic no shared libs are found
This is because while libav still uses the 'ffmpeg' name, ffmpeg is not ever mentioned in the lib descriptions
prupert
September 14th, 2011, 12:15 AM
Hi
Just a little note for anyone interested, my little install / update script, that handily automates fakeoutdoorsman's awesomeness here is finally getting a major update, so it follows the current guide.
It also combines the install and update scripts into one and also has it's own (very basic) auto-update function.
The new version can be found here in the next couple of days:
http://code.google.com/p/x264-ffmpeg-up-to-date/
prupert
September 15th, 2011, 12:01 AM
And just another little update to say the new script has now been released: http://code.google.com/p/x264-ffmpeg-up-to-date/
It supports:
Natty, Maverick, Lucid, Hardy
Initial install and subsequent updates all in one script
Ability to check and then update the script if there is a new version available
A basic config file so it can be run with no user interaction via cron
I'll be adding a new feature (hopefully tomorrow) so it will only download and build from source if git says there is a newer version.
I'll try to keep this version updated, but as it took me a year to update the old version, due to work and kids, don't hold your breath.
FakeOutdoorsman
September 15th, 2011, 12:33 AM
Thanks for the update. I haven't tried the script myself, but you may want to consider adding --depth 1 to your FFmpeg git command such as:
git clone --depth 1 git://git.videolan.org/ffmpeg
From man git-clone:
--depth <depth>
Create a shallow clone with a history truncated to the specified number of revisions. A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is adequate if you are only interested in the recent history of a large project with a long history, and would want to send in fixes as patches.
This would currently create a ~40 MB ffmpeg directory, but if --depth 1 is omitted it would end up ~80 MB.
I debated adding it to this guide, but once in a while a checkout to a specific commit is suggested to avoid bugs and I don't think that can be done with such a shallow clone. I think it would be fine for most users though. I wish I was more familiar with Git. Indecision...
ShodanjoDM
September 15th, 2011, 12:42 AM
Pardon my curiousity - and maybe I should appologize for not reading the whole thread first to find whether this was asked before or not.
From a complete newbie's perspective (regarding video encoder/decoder stuff), is there any visible differences in playback quality between using standard packages and compiling them yourself?
Like maybe reducing video artifacts or smoother color gradation and so on?
FakeOutdoorsman
September 15th, 2011, 01:24 AM
Short answer: it depends. Most users probably wouldn't notice a difference, but of course it depends on what the user is doing. However, compiling the latest source can add new features, fix bugs (and introduce new bugs), and is customizable to your needs.
If you're using ffmpeg by itself and doing a lot of encoding (especially with a more modern and developmentally active encoder such as x264), then you may want to compile. Or if you're experiencing a known bug the newest source may already contain a fix.
If you're using something from the repository that depends on ffmpeg, then you'll want to stick with that. Of course you could have both the repo ffmpeg and a new compiled one, but that would require a few simple changes to the guide.
Note that Ubuntu doesn't use ffmpeg (the binary) from FFmpeg (the project) anymore as of Natty. The maintainer switched to libav which is a recent fork of FFmpeg.
ShodanjoDM
September 15th, 2011, 02:49 PM
Thank you.
I'm planning to upgrade my DSLR to a more capable one with HD video capability so I'll have to learn about video editing and encoding when the time comes. But I think I'll stick with prebuild packages from the repository for now.
prupert
September 15th, 2011, 10:31 PM
Thanks for the update. I haven't tried the script myself, but you may want to consider adding --depth 1 to your FFmpeg git command such as:
git clone --depth 1 git://git.videolan.org/ffmpeg
From man git-clone:
This would currently create a ~40 MB ffmpeg directory, but if --depth 1 is omitted it would end up ~80 MB.
I debated adding it to this guide, but once in a while a checkout to a specific commit is suggested to avoid bugs and I don't think that can be done with such a shallow clone. I think it would be fine for most users though. I wish I was more familiar with Git. Indecision...
I can see the advantage, but if it risks causing the occasional issue, it might be worth avoiding it. Plus, since the user is already building from source, which takes quite a while, and with the fast download speeds available these days, I think it best to leave as is for now.
However, if you add it to your instructions, I'll add it to my script;)
Dmole
September 16th, 2011, 10:42 PM
{{{
# git clone git://review.webmproject.org/libvpx
Initialized empty Git repository in /opt/libvpx/libvpx/.git/
review.webmproject.org[0: 140.211.167.235]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
}}}
vs
{{{
#git clone http://git.chromium.org/webm/libvpx.git
Initialized empty Git repository in /opt/libvpx/libvpx/.git/
remote: Counting objects: 12138, done.
remote: Compressing objects: 100% (2573/2573), done.
remote: Total 12138 (delta 9435), reused 12101 (delta 9415)
Receiving objects: 100% (12138/12138), 3.89 MiB | 504 KiB/s, done.
Resolving deltas: 100% (9435/9435), done.
}}}
andrew.46
September 16th, 2011, 11:04 PM
Perhaps try a snapshot:
wget http://webm.googlecode.com/files/libvpx-v0.9.7-p1.tar.bz2
mc4man
September 17th, 2011, 01:04 AM
{{{
# git clone git://review.webmproject.org/libvpx
vs
#git clone http://git.chromium.org/webm/libvpx.git
see here -
http://www.webmproject.org/code/
FakeOutdoorsman
September 17th, 2011, 06:45 AM
Thanks Dmole for letting me know and mc4man for the new URL. I updated the guides. The link mc4man provides mentions that the new URL should be changed in your local clone by editing ~/libvpx/.git/config, but I prefer:
cd ~/libvpx
git config remote.origin.url http://git.chromium.org/webm/libvpx.git
...which should update it for you.
andrew.46
September 17th, 2011, 10:20 PM
Soon this guide will hit the big one:
Views: 994,283
Incredible work FakeOutdoorsman!!!
prupert
September 17th, 2011, 10:35 PM
Soon this guide will hit the big one:
Incredible work FakeOutdoorsman!!!
Seconded, and if we all do the same, it will get there a hell of a lot quicker ;)
Amazed there isn't a built in ability within FFmpeg to do this, given how it is so often updated. But, hey, that's where my script fits in ;)
CLAROX
September 22nd, 2011, 06:40 PM
Great guide. Thanks a lot. One problem
When I configure FFMPEG I get the error:
libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/******/ffmpeg/libavcodec/libx264.c:128: undefined reference to `x264_picture_init'
libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/******/ffmpeg/libavcodec/libx264.c:259: undefined reference to `x264_param_default_preset'
/home/******/ffmpeg/libavcodec/libx264.c:465: undefined reference to `x264_param_apply_fastfirstpass'
/home/******/ffmpeg/libavcodec/libx264.c:468: undefined reference to `x264_param_apply_profile'
/home/******/ffmpeg/libavcodec/libx264.c:503: undefined reference to `x264_encoder_open_118'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
x264 ok but ffmpeg ......
thanks......
|Anthony|
September 23rd, 2011, 01:20 PM
@prupert
Hi
Just a little note for anyone interested, my little install / update script, that handily automates fakeoutdoorsman's awesomeness here is finally getting a major update, so it follows the current guide.
It also combines the install and update scripts into one and also has it's own (very basic) auto-update function.
The new version can be found here in the next couple of days:
http://code.google.com/p/x264-ffmpeg-up-to-date/
when i run:
sudo sh ffmpegupdate.shi get this error:
386: Syntax error: "(" unexpected (expecting "}")The corresponding line in your script is:
DISTRO=( $(cat /etc/lsb-release | grep CODE | cut -c 18-) )I assume that it will fault at every similar line in your script. (there are other instances like that)
What to do?
I don't want to go hacking up your code if it works for everyone but me lol.
I should also mention that i modified something, not sure if what i did caused the error, or if it was even needed but here it is:
From:
apt-get -y install nasm build-essential git-core checkinstall yasm texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev 2>> $LOG >> $LOG
To:
apt-get -y install nasm build-essential git-core checkinstall yasm texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev 2>> $LOG >> $LOG
And
From:
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libmp3lame 2>> $LOG >> $LOG
To:
./configure --enable-vdpau --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-avfilter --enable-avfilter-lavf --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libx264 --enable-runtime-cpudetect --enable-libxvid --enable-x11grab --enable-postproc --enable-swscale --enable-libmp3lame 2>> $LOG >> $LOG
FakeOutdoorsman
September 23rd, 2011, 07:28 PM
Soon this guide will hit the big one:
Incredible work FakeOutdoorsman!!!
Thanks! Although half of those numbers are probably me, and your contributions have been much appreciated.
Great guide. Thanks a lot. One problem
When I configure FFMPEG I get the error:
libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/******/ffmpeg/libavcodec/libx264.c:128: undefined reference to `x264_picture_init'
libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/******/ffmpeg/libavcodec/libx264.c:259: undefined reference to `x264_param_default_preset'
/home/******/ffmpeg/libavcodec/libx264.c:465: undefined reference to `x264_param_apply_fastfirstpass'
/home/******/ffmpeg/libavcodec/libx264.c:468: undefined reference to `x264_param_apply_profile'
/home/******/ffmpeg/libavcodec/libx264.c:503: undefined reference to `x264_encoder_open_118'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
x264 ok but ffmpeg ......
thanks......
This probably means that you have two versions of x264 installed at the same time in two different locations. It's actually a good thing that FFmpeg is complaining, because otherwise it could use the incorrect x264. Remove the old x264 (which could possibly be the libx264-dev package from the repository) and try again.
prupert
September 24th, 2011, 10:09 AM
@prupert
when i run:
sudo sh ffmpegupdate.shi get this error:
386: Syntax error: "(" unexpected (expecting "}")The corresponding line in your script is:
DISTRO=( $(cat /etc/lsb-release | grep CODE | cut -c 18-) )I assume that it will fault at every similar line in your script. (there are other instances like that)
What to do?
I don't want to go hacking up your code if it works for everyone but me lol.
I should also mention that i modified something, not sure if what i did caused the error, or if it was even needed but here it is:
From:
apt-get -y install nasm build-essential git-core checkinstall yasm texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev 2>> $LOG >> $LOG
To:
apt-get -y install nasm build-essential git-core checkinstall yasm texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libpostproc-dev libswscale-dev 2>> $LOG >> $LOG
And
From:
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libmp3lame 2>> $LOG >> $LOG
To:
./configure --enable-vdpau --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-avfilter --enable-avfilter-lavf --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libx264 --enable-runtime-cpudetect --enable-libxvid --enable-x11grab --enable-postproc --enable-swscale --enable-libmp3lame 2>> $LOG >> $LOG
Hmm, I don't get that when I run it and others have reported it working, so I guess it is down to the modifications you have made. I am looking at a way to allow users to add the kind of additional config options like you have, but in a slightly easier way to reduce the chance of breaking the script.
Can you post the modified version of the script here or on the google code site and I will have a look.
|Anthony|
September 24th, 2011, 02:28 PM
@prupert
I listed all modifications that i made in my post. Here is the modified script in it's entirety:
https://docs.google.com/leaf?id=0B8_ebxl7goQtNmZmZmMzMWMtMDcwZi00YjQ3LWI4O TAtMTVmNWYxZjRiMWQ3&hl=en_US
If you would like to add me as a member to your code.google project, i could upload it there.
A user-friendly front end to your script could be to write it using zenity ;) Let me know if you would like some assistance making the modifications to have a zenity front end.
prupert
September 24th, 2011, 03:17 PM
@prupert
I listed all modifications that i made in my post. Here is the modified script in it's entirety:
https://docs.google.com/leaf?id=0B8_ebxl7goQtNmZmZmMzMWMtMDcwZi00YjQ3LWI4O TAtMTVmNWYxZjRiMWQ3&hl=en_US
If you would like to add me as a member to your code.google project, i could upload it there.
A user-friendly front end to your script could be to write it using zenity ;) Let me know if you would like some assistance making the modifications to have a zenity front end.
Cool, I'll check your version out.
You don't need to be a member of my project to post comments on google code, just use your google login.
I did consider providing a zenity interface, but as the script makes some potentially big changes to your system, I wanted it to be a little daunting for those who know nothing of the command line, so they knew the seriousness of what they were doing. Giving sudo access to a script that they got off the internet is not always the best idea, though in this case it is. Hence, it is terminal only (thus you can also schedule it via cron).
FakeOutdoorsman
September 26th, 2011, 06:13 AM
Added a lossless H.264 encoding example for anyone who wants to monkey with that.
vagrale13
September 26th, 2011, 08:32 AM
@FakeOutdoorsman (http://ubuntuforums.org/member.php?u=162846)
I think in the end of first post (http://ubuntuforums.org/showpost.php?p=4907079&postcount=1)
Recent Updates
2011-10-25: (Natty/Maverick) Add lossless H.264 encoding example
you mean 2011-09-25 :popcorn:
FakeOutdoorsman
September 26th, 2011, 06:46 PM
Thanks. Fixed. I wasn't sure if anyone actually read that section.
FakeOutdoorsman
September 26th, 2011, 09:30 PM
The lossless presets have been removed upstream. They were out of date and slow.
The old way:
ffmpeg -i input -vcodec libx264 -vpre lossless_ultrafast -threads 0 output
The new way:
ffmpeg -i input -vcodec libx264 -preset ultrafast -crf 0 -threads 0 output
or
ffmpeg -i input -vcodec libx264 -preset ultrafast -qp 0 -threads 0 output
Either one should give the same result. If you used the old lossless_max preset the equivalent would be -preset veryslow -crf 0.
|Anthony|
September 29th, 2011, 11:34 PM
@prupert
Did you find any errors?
Pithikos
October 5th, 2011, 01:41 AM
Thanks a lot for the script! It saved my **** from headaches! :P
Just in case someone is running Mint Ubuntu you have to edit two variables in the scripts.
Just under:
DISTRO=( $(cat /etc/lsb-release | grep CODE | cut -c 18-) )Add:
DISTRO="natty";(or whatever version of Ubuntu your Mint corresponds to)
And under:
DISTRIB=( $(cat /etc/lsb-release | grep ID | cut -c 12-) )Add:
DISTRIB="Ubuntu";
gregburnham
October 5th, 2011, 08:04 PM
Ok, so I've run the script and everything works, but when I do:
ffmpeg -codecs
I get (with a bunch of other stuff)
D V D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
I want to encode to H.264, is that possible?
Thank,
Greg
ron999
October 5th, 2011, 08:24 PM
Ok, so I've run the script and everything works, but when I do:
ffmpeg -codecs
I get (with a bunch of other stuff)
D V D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
I want to encode to H.264, is that possible?
Thank,
Greg
Hi
If this is on the list you can:-
EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
gregburnham
October 5th, 2011, 09:19 PM
Hi
If this is on the list you can:-
EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
Sadly, that is not on the list - how can I enable encoding to H.264?
andrew.46
October 5th, 2011, 09:40 PM
Could you show the full output of:
ffmpeg -codecs | grep libx264
This should give a few hints as to the problem...
gregburnham
October 5th, 2011, 09:57 PM
ffmpeg version N-33294-gf9bd979, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 5 2011 12:02:17 with gcc 4.4.3
configuration:
libavutil 51. 19. 0 / 51. 19. 0
libavcodec 53. 19. 0 / 53. 19. 0
libavformat 53. 14. 0 / 53. 14. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 6 / 2. 43. 6
libswscale 2. 1. 0 / 2. 1. 0
gregburnham
October 5th, 2011, 10:10 PM
Hold the horses, stop the presses and call off the search party. I changes the configure options, recompiled and it looks like it'll work!
Thanks for the feedback!!
andrew.46
October 5th, 2011, 10:17 PM
I changes the configure options, recompiled and it looks like it'll work!
Great news :). Your full output should now look something like this:
andrew@skamandros~$ ffmpeg -codecs | grep libx264
ffmpeg version N-33293-gec1ffae, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 5 2011 17:33:24 with gcc 4.5.2
configuration: --prefix=/usr --mandir=/usr/man --enable-postproc --enable-avfilter --enable-pthreads --enable-shared --disable-static --disable-ffserver --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvpx --enable-zlib --enable-libxvid --enable-libfreetype --enable-x11grab --enable-nonfree --enable-gpl --enable-version2
libavutil 51. 19. 0 / 51. 19. 0
libavcodec 53. 19. 0 / 53. 19. 0
libavformat 53. 14. 0 / 53. 14. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 6 / 2. 43. 6
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
EV libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
andrew.46
October 6th, 2011, 09:31 PM
I have failed while attempting to copy metadata from input file to output file with the latest FFmpeg. Has anybody had success with this? For example:
andrew@skamandros~/music/Bartók_4tets$ ffmpeg -i Bartók_4tet_1.ogg -map_metadata 0:0 test.flac
ffmpeg version N-33293-gec1ffae, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 5 2011 17:33:24 with gcc 4.5.2
configuration: --prefix=/usr --mandir=/usr/man --enable-postproc --enable-avfilter --enable-pthreads --enable-shared --disable-static --disable-ffserver --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libvpx --enable-zlib --enable-libxvid --enable-libfreetype --enable-x11grab --enable-nonfree --enable-gpl --enable-version2
libavutil 51. 19. 0 / 51. 19. 0
libavcodec 53. 19. 0 / 53. 19. 0
libavformat 53. 14. 0 / 53. 14. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 6 / 2. 43. 6
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, ogg, from 'Bartók_4tet_1.ogg':
Duration: 00:29:04.40, start: 0.000000, bitrate: 186 kb/s
Stream #0:0: Audio: vorbis, 44100 Hz, stereo, s16, 192 kb/s
Metadata:
TITLE : String Quartet no.1 op.7 (1908-1909)
ARTIST : Emerson String Quartet
ALBUM : Béla Bartók - 6 String Quartets
Invalid metadata type 0.
I suspect I am missing something basic here and I was keen to display my ignorance here rather on ffmpeg-users :).
FakeOutdoorsman
October 7th, 2011, 02:16 AM
I would call it either a syntax change or a regression because this works on a previous revision. I didn't get to investigate it thoroughly however.
FFmpeg should automatically attempt to copy metadata from the input to the output, IIRC. I'm not sure how long this has been the default.
In an unrelated side-note I failed to notice for some time that -threads 0 appears to be on by default with libx264, so I updated the example commands.
andrew.46
October 7th, 2011, 09:57 PM
Oh well I shall retreat to my little script that adds the metadata in combination with FFmpeg. Certainly ogg to flac does not work with metadata transfer, I have not tested other audio codecs.
FakeOutdoorsman
October 9th, 2011, 08:51 PM
Looks like this is the commit that changed things:
ffmpeg: make -map_metadata work consistently with the other options (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=5a9e42ec45df40c565aced708 0e2f9933d914c80)
FakeOutdoorsman
October 11th, 2011, 02:57 AM
Today at #ffmpeg-devel:
@michaelni | -vf 'scale=256:256,mp=geq=st(0\,0)+st(1\,0)+st(2\,0)+w hile(lt(hypot(st(3\,2*ld(0)*ld(1)+Y/100-1.3)\,st(0\,ld(0)^2-ld(1)^2+X/100-1.7)+0*st(1\,ld(3)))\,2)*lt(ld(2)\,260)\,st(2\,ld( 2)+10)):128:128'
Which I suppose can be played back with (there is probably a better way, but I'm supposed to be working now):
ffplay -f lavfi 'color=black,scale=256:256,mp=geq=st(0\,0)+st(1\,0 )+st(2 \
\,0)+while(lt(hypot(st(3\,2*ld(0)*ld(1)+Y/100-1.3)\,st(0\,ld(0)^2-ld(1)^2+X \
/100-1.7)+0*st(1\,ld(3)))\,2)*lt(ld(2)\,260)\,st(2\,ld( 2)+10)):128:128'
Update: Another one: [FFmpeg-cvslog] eval:add hypot() (http://ffmpeg.org/pipermail/ffmpeg-cvslog/2011-October/041637.html)
-vf 'scale=256:256,mp=geq=random(1)/hypot(X-cos(N*0.07)*W/2-W/2\,Y-sin(N*0.09)*H/2-H/2)^2*1000000*sin(N*0.02):128:128'
FakeOutdoorsman
October 15th, 2011, 02:19 AM
Updated the guide for Ubuntu Oneiric Ocelot 11.10. Other changes:
Added --depth 1 to the FFmpeg git command. This will create a "shallow" local repository of about half the total file size, but a user won't be able to git checkout to a specific commit. I don't think many users do this so it should be fine for most users. See git help clone for a better explanation.
Removed libxvidcore-dev. Does anyone use this anymore? The native encoder (mpeg4) seems fairly comparable to me.
qyot27
October 15th, 2011, 07:00 AM
Hahaha, apparently FFMS2 is in the repositories (http://packages.ubuntu.com/search?keywords=ffms2&searchon=names&suite=all§ion=all). Why didn't I realize this during the Natty cycle?
Just a funny coincidence I guess, although if instructions for it were to be added it would make more sense for it to be more up-to-date than r473 (SVN is at r578 right now), and whatever strange things might happen with the repo version being a shared, rather than static, library.
I still have yet to build anything on Oneiric; too busy messing with getting the DE kinks worked out.
videox
October 15th, 2011, 01:40 PM
how do i do this on my mac
Your version of ffmpeg located at /usr/local/bin/ffmpeg doesn't support AAC audio or H264 video.
You need to upgrade your ffmpeg software
stressat
October 16th, 2011, 04:08 PM
Hello!
I use ffmpeg for recording audio/video x11:
ffmpeg -f oss -i /dev/audio -f x11grab -s 1280x960 -r 24 -b 6500 -bt 712k -sameq -i :0.0 ~/out.avi
It is possible to do same thing in tty (Ctrl+Alt+F1....F6) ???
I solved it:
ffmpeg -f alsa -i pulse -f fbdev -i /dev/fb0 -r 30 video-output.avi
1- Must be put vga=792 to the end of kernel line in /boot/grub/menu.lst ( /boot/grub/grub.conf )
2- Works fine with fbterm and screen.
http://www.youtube.com/watch?feature=player_embedded&v=NGPVYbL5VKQ :P
superadu
October 20th, 2011, 05:02 PM
Hi
When I tried installing x264 by the above commands I am getting the following error after performing make on x264
input/timecode.o: In function `open_file':
timecode.c.text+0x615): undefined reference to `cli_input'
timecode.c.text+0x623): undefined reference to `cli_input'
timecode.c.text+0x62b): undefined reference to `cli_input'
timecode.c.text+0x633): undefined reference to `cli_input'
timecode.c.text+0x63b): undefined reference to `cli_input'
input/timecode.o:timecode.c.text+0x643): more undefined references to `cli_input' follow
collect2: ld returned 1 exit status
make: *** [x264] Error 1
How can I fix this?
Thanks
andrew.46
October 21st, 2011, 11:07 PM
I personally build my copy of FFmpeg with:
--disable-avconv
as it seems that Libav developers will eventually move further away from FFmpeg. Will this guide eventually adopt this option or are the waters a little too muddy at this stage to decide?
FakeOutdoorsman
October 22nd, 2011, 12:27 AM
How can I fix this?
I can't duplicate your error in Oneiric. Did you make any modifications to the guide? What version of Ubuntu are you using?
I personally build my copy of FFmpeg with:
--disable-avconv
as it seems that Libav developers will eventually move further away from FFmpeg. Will this guide eventually adopt this option or are the waters a little too muddy at this stage to decide?
Good question. Does including avconv introduce any issues for you?
andrew.46
October 22nd, 2011, 03:26 AM
Good question. Does including avconv introduce any issues for you?
No, it simply installs a binary and set of man pages that I will never use as well as reminding me too much of the crazy FFmpeg and Libav split :(.
superadu
October 23rd, 2011, 04:05 PM
I can't duplicate your error in Oneiric. Did you make any modifications to the guide? What version of Ubuntu are you using?
No I did not make any modifications to the guide.
I am using Ubuntu Maverick 10.10 which is on my work machine.
I have Lucid Lynx 10.04 on my laptop and your guide works fine on that but somehow it fails on my workstation
~Drü
October 24th, 2011, 03:12 AM
I'm trying watch something here and keep receving this message:
Could not find GStreamer caps mapping for FFmpeg codec 'h264', and you are using an external libavcodec. This is most likely due to a packaging problem and/or libavcodec having been upgraded to a version that is not compatible with this version of gstreamer-ffmpeg. Make sure your gstreamer-ffmpeg and libavcodec packages come from the same source/repository.
i'm using Ubuntu Oneiric Ocelot 11.10.
andrew.46
October 25th, 2011, 11:02 PM
Looks like a wma lossless decoder is on the horizon (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=123b1fac5c0a18061d7fa9a78 69e537e81d16506), hopefully not too long now...
FakeOutdoorsman
October 26th, 2011, 12:01 AM
Looks like a wma lossless decoder is on the horizon (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=123b1fac5c0a18061d7fa9a78 69e537e81d16506), hopefully not too long now...
Ut Video decoding is a recent addition. This is a lossless codec good for use in editors because it seeks fairly quickly. Ut Video is also actively developed which is always good. I might recommend this codec for my Windows friends who use Adobe Premiere.
andrew.46
October 26th, 2011, 12:26 AM
Ut Video decoding is a recent addition
I sometimes wish that my old friend MPLayer was developed as enthusiastically :(. Found some UT Video samples here (http://ffmpeg.org/trac/ffmpeg/ticket/534). Mind you the name of the gentleman who wrote this ticket looks familiar so I suspect you may have seen these samples before :).
prupert
October 26th, 2011, 08:37 PM
A script I have written using the instructions here is erroring out on Lucid, with an issue with yasm, saying it is too old, see logs here:
Initialized empty Git repository in /usr/local/src/x264/.git/
Found yasm 0.8.0.2194
Minimum version is yasm-1.0.0
If you really want to compile without asm, configure with --disable-asm.
Makefile:3: config.mak: No such file or directory
./configure
Found yasm 0.8.0.2194
Minimum version is yasm-1.0.0
If you really want to compile without asm, configure with --disable-asm.
make: *** [config.mak] Error 1
Any ideas? Obviously I can use --disable-asm from x264, but it looks like according to the instructions for Lucid this shouldn't be an issue.
ron999
October 26th, 2011, 09:55 PM
Any ideas? Obviously I can use --disable-asm from x264, but it looks like according to the instructions for Lucid this shouldn't be an issue.
Hi
I had this problem when I was using Lucid.
Something changed with x264, so yasm-0.8.0 isn't accepted now.
Need to compile yasm-1.1.0
This is the method I used:-
sudo apt-get install build-essential checkinstall
sudo apt-get build-dep yasm
wget http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz && \
tar -xf yasm-1.1.0.tar.gz && cd yasm-1.1.0 && ./configure
make
sudo checkinstall --pakdir "$HOME/Desktop" --pkgname yasm --pkgversion 1.1.0 \
--backup=no --default
FakeOutdoorsman
October 26th, 2011, 10:32 PM
Thanks for the update. I haven't tested Lucid for a long time. I updated the Lucid guide with Yasm instructions that I copied from the Hardy version of the guide. I then tested it and everything compiled just fine.
ndejonge
October 26th, 2011, 11:35 PM
Just now did everything in the first post of this thread.
Ubuntu version 11.10:
- - - - - - - - - -
norbert@ren:~$ grep DISTRIB_RELEASE /etc/lsb-release
DISTRIB_RELEASE=11.10
- - - - - - - - - -
Running into a video_size problem:
- - - - - - - - - -
norbert@ren:~$ ffmpeg -s 100x100 -f alsa -ac 2 -i pulse -f x11grab -r 25 -i :0.0+100,100 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
ffmpeg version git-2011-10-26-7d7e302, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 26 2011 23:53:17 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
libavutil 51. 22. 0 / 51. 22. 0
libavcodec 53. 23. 0 / 53. 23. 0
libavformat 53. 17. 0 / 53. 17. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 45. 0 / 2. 45. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Option video_size not found.
- - - - - - - - - -
Also tried --video_size and -video_size.
No success.
FakeOutdoorsman
October 27th, 2011, 12:43 AM
Your command is attempting to apply the -s option to your pulse input. Note that the placement of your options will determine which input(s) and oututs(s) they will be applied. Try moving -s so it applies to your video input:
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 25 -s 100x100 -i :0.0+100,100 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 output.mkv
Other changes in this example:
-threads 0 is now default with libx264, so I removed it.
-vpre has been depreciated for -preset with libx264.
lossless encoding is now achieved by using a "normal" preset with the addition of -crf 0 or -qp 0 (this applies for 8-bit encoding; 10-bit is probably different).
ndejonge
October 27th, 2011, 12:45 AM
Thanks, works now.
FakeOutdoorsman
October 29th, 2011, 12:27 AM
Apple Lossless Audio Codec (ALAC) is now open source under the Apache 2.0 license. Here's how to compile alacconvert.
1. Install some build dependencies:
sudo apt-get install build-essential checkinstall subversion
2. Get the source files with subversion:
svn co http://svn.macosforge.org/repository/alac/trunk alacconvert
3. Get a patch and apply it [1]:
wget https://aur.archlinux.org/packages/al/alacconvert/alacconvert.tar.gz
tar xzvf alacconvert.tar.gz
cd alacconvert/convert-utility
patch -Np0 -i ../move-lflags.patch
4. Compile and install:
make
sudo checkinstall --pkgname=alacconvert --pkgversion="$(LANG=C svn info | grep Revision | \
awk '{ print $NF }')-svn" --backup=no --deldoc=yes --fstrans=no --default \
install -D alacconvert /usr/local/bin/alacconvert
5. Usage. To encode:
alacconvert input.wav output.caf
To decode:
alacconvert input.caf output.wav
I'd be interested to know if there is an alternative method of getting alacconvert to compile without the patch. I expect FFmpeg to eventually utilize libalac which would then make alacconvert redundant in my opinion.
[1] Patch credit: http://mtakagi.tumblr.com/post/12027648706/apple-lossless-audio-codec-freebsd
andrew.46
October 29th, 2011, 03:21 AM
I'd be interested to know if there is an alternative method of getting alacconvert to compile without the patch.
It is a little ugly but the following does the same as the patch:
sed -i_bak 's/$(CC) $(LFLAGS) $(OBJS) -o alacconvert/$(CC) $(OBJS) -o alacconvert $(LFLAGS)/' makefile
Should be a neater way to do this though....
FakeOutdoorsman
October 29th, 2011, 03:47 AM
Thanks for the sed solution, but I was revealing my ignorance of LFLAGS because I was wondering if the patch is really the best solution to it not compiling correctly. I found the patch here: Apple Lossless Audio Codec ためしに FreeBSD でビルドしてみたら makefile を少し修正するだけでビルドできてしまってつまらなかった。 (http://mtakagi.tumblr.com/post/12027648706/apple-lossless-audio-codec-freebsd)
However, maybe your sed method would be good for the Arch Linux PKGBUILD, but then I couldn't conveniently borrow the patch file for this thread.
andrew.46
October 29th, 2011, 06:26 AM
Hmmm... I am not sure. I crafted a beautifully detailed ticket at the apple site:
http://alac.macosforge.org/trac/newticket
but the ticket would not submit with a bunch of python errors on the remote site :(. Should keep the complaints down anyway if bugs cannot be submitted!
FakeOutdoorsman
October 29th, 2011, 06:53 PM
I was wondering why there were no bugs. Perhaps a message to ealdrich at apple would prod them into fixing it.
In other news, FFmpeg now has a ProRes encoder (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=70bab5847e12e50f9095e9761 0c3454a934d4039).
andrew.46
October 29th, 2011, 10:52 PM
I was wondering why there were no bugs. Perhaps a message to ealdrich at apple would prod them into fixing it.
I have mixed feelings about pursuing it too much further: the encoder produces files that I have yet been unable to play with any media software available to me, there is a compile problem, the bug-reporting mechanism is broken....
Mguel
October 30th, 2011, 03:37 AM
Hi, great guide, thanks FakeOutdoorsman.
But I had one problem which prevent me from getting ffmpeg installed.
On the step:
$ hash x264 ffmpeg ffplay ffprobe
I get error messages:
bash: hash: ffmpeg: not found
bash: hash: ffplay: not found
bash: hash: ffprobe: not found
Something similiar it seams that happened to http://ubuntuforums.org/showpost.php?p=10134997&postcount=1388 but he didn't post again.
I checked as suggested for him:
$ echo $SHELL
and get:
/bin/bash
If I run:
$ ffmpeg -version
I get:
The program 'ffmpeg' is currently not installed. You can install it by typing:
sudo apt-get install ffmpeg
BTW I'm using Lubuntu 11.10, so maybe it has something to do with being a more lightweight ubuntu
I would appreciate any help, thanks!
Mguel
October 30th, 2011, 05:28 PM
Or is it a way to do manually what hash command is supposed to do?
Searching on google for hash man, it states it:
Remember the full pathnames of commands specified as name arguments, so they need not be searched for on subsequent invocations.
Maybe create a link from /usr/bin to the place where it was downloaded/compiles ~/ffmpeg or move the executable there?
FakeOutdoorsman
October 30th, 2011, 09:19 PM
...I have yet been unable to play with any media software available to me...
I noticed this after I made the guide, unfortunately. So much for realtime, crappily tested guide writing...
Hi, great guide, thanks FakeOutdoorsman.
But I had one problem which prevent me from getting ffmpeg installed.
On the step:
$ hash x264 ffmpeg ffplay ffprobe
I get error messages:
bash: hash: ffmpeg: not found
bash: hash: ffplay: not found
bash: hash: ffprobe: not found
Strange. Did the ffmpeg, ffplay, and ffprobe binaries actually get installed?
$ ls /usr/local/bin/ff*
Or is it a way to do manually what hash command is supposed to do?
The hash command in this guide isn't terribly important. When the ffmpeg binary from the repository is executed, and then replaced by a compiled ffmpeg while using the same shell session, the shell will still think ffmpeg is installed to /usr/bin instead of /usr/local/bin. Using hash tells the shell to remember the new location of the binary. Or something like that.
You can try "hash -r". That will, "forget all previously remembered utility locations". If that doesn't resolve the issue then the problem probably isn't with hash.
Mguel
October 30th, 2011, 09:35 PM
Strange. Did the ffmpeg, ffplay, and ffprobe binaries actually get installed?
$ ls /usr/local/bin/ff*
Hi, thanks a lot for the answer!:
Nope, it did not get installed:
$ ls /usr/local/bin/ff*
ls: cannot access /usr/local/bin/ff*: No such file or directory
there are only the following files on /usr/local/bin:
$ ls /usr/local/bin/
vp8_scalable_patterns vpxdec vpxenc x264
if I manually copy the ff* files from ~/ffmpeg to /usr/bin or /usr/local/bin?
PS: I'm not cursing when I mention ff* files LOL
FakeOutdoorsman
October 30th, 2011, 10:13 PM
Something must have gone wrong with the Install FFmpeg step. Navigate to the ffmpeg source directory, run make distclean, and update your source code:
cd ~/ffmpeg
make distclean
git pull
Then continue with Step 5 starting with the ./configure line. Make note if it fails again and when it fails: either ./configure, make, or checkinstall.
if I manually copy the ff* files from ~/ffmpeg to /usr/bin or /usr/local/bin?
That's a somewhat messy way of doing it and will not integrate the package into the package management system like checkinstall will.
Mguel
October 30th, 2011, 10:17 PM
OK!!!
I'll do it and report back the results
Edit: during make execution I get many warnings, but the process goes on with no interruption so far... the same as the first time
Edit2 sudo checkinstall... seems ok (the same as first time):
Copying files to the temporary directory...OK
Stripping ELF binaries and libraries...OK
Compressing man pages...OK
Building file list...OK
Building Debian package...OK
Installing Debian package...OK
Erasing temporary files...OK
Deleting doc-pak directory...OK
Deleting temp dir...OK
************************************************** ********************
Done. The new package has been installed and saved to
/home/user/ffmpeg/ffmpeg_201110301826-git-1_i386.deb
You can remove it from your system anytime using:
dpkg -r ffmpeg
************************************************** ********************
Edit 3... strange... no errors on hash command
hash x264 ffmpeg ffplay ffprobe
Edit 4... ffmpeg installed!!!! thanks a lot!! :D
$ ffmpeg -version
ffmpeg version git-2011-10-30-49aa397, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 30 2011 18:25:25 with gcc 4.6.1
...
andrew.46
October 31st, 2011, 07:41 AM
Apple fixed their trac bug-reporting system so I have filed a bug on the compile difficulties for alacconvert:
Cannot build alacconvert under Slackware 13.37: makefile problem?
http://alac.macosforge.org/trac/ticket/4
Interesting to see how keen the response is :)
mc4man
October 31st, 2011, 06:14 PM
I have mixed feelings about pursuing it too much further: the encoder produces files that I have yet been unable to play with any media software available to me
It would seem that atm ffmpeg will reject these .caf files (based on 'magic cookie'
The only player i've seen that will play is apples' quicktime player (on windows or mac
andrew.46
November 1st, 2011, 11:31 PM
Keen mp3 encoders might be interested to know that a new version of lame came out a week or 2 ago:
andrew@skamandros~$ lame --version | head -n 1
LAME 32bits version 3.99 (http://lame.sf.net)
robla64
November 2nd, 2011, 06:35 PM
delete
ron999
November 3rd, 2011, 12:14 AM
Looks like a wma lossless decoder is on the horizon (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=123b1fac5c0a18061d7fa9a78 69e537e81d16506), hopefully not too long now...
It's included now, but doesn't seem to work properly yet.
ffmpeg -codecs | grep -i wmalossless
ffmpeg version N-34354-g0b3e9d5
....
....
D A wmalossless Windows Media Audio 9 Lossless
mc4man
November 3rd, 2011, 03:11 AM
It's included now, but doesn't seem to work properly yet.
I guess it's got to start somewhere - wmal is detected properly & not rejected by either ffplay or ffmpeg, just can't do a decode atm
(a ffmpeg conversion to wav or flac creates a header & pretty much nothing else
andrew.46
November 3rd, 2011, 10:34 PM
I noticed this after I made the guide, unfortunately. So much for realtime, crappily tested guide writing...
Looks like FFplay, FFmpeg and MPlayer will now decode the files produced by alacconvert so all is well :).
Support new ALAC magic cookie in caf files. (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=80af00b4b23a38dd8c63b892c d103af0d9407452)
PayPaul
November 5th, 2011, 02:55 PM
This question may have been asked before but I don't have any idea or time to parse through the umpteen pages in this thread to find it. How do I know which version of ffmpeg I have on my system. Do I even have x264. I did a check of formats currently supported and found what seems to cover just about everything.. I don't wish to reinvent the wheel if my wheel isn't broken.
prupert
November 5th, 2011, 09:23 PM
Just type ffmpeg at the command line and it will show you, this is what I get:
rupert@netbook:~$ ffmpeg
ffmpeg version N-32936-g58c6149, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 25 2011 20:56:07 with gcc 4.5.2
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
libavutil 51. 17. 0 / 51. 17. 0
libavcodec 53. 17. 0 / 53. 17. 0
libavformat 53. 13. 0 / 53. 13. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 43. 5 / 2. 43. 5
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
andrew.46
November 5th, 2011, 10:16 PM
Do I even have x264.
And for x264:
andrew@skamandros~$ x264 --version
x264 0.119.2106 07efeb4
(libswscale 2.1.0)
built on Nov 5 2011, gcc: 4.5.2
configuration: --bit-depth=10 --chroma-format=all
x264 license: GPL version 2 or later
libswscale license: nonfree and unredistributable
WARNING: This binary is unredistributable!
I did a check of formats currently supported and found what seems to cover just about everything.. I don't wish to reinvent the wheel if my wheel isn't broken.
If your current FFmpeg fills your needs I would suspect there is no need to build your own. But in time you will find the substantial limitations of the Ubuntu packaged FFmpeg and that is where this guide comes into its own.
ron999
November 5th, 2011, 11:07 PM
... wmal is detected properly & not rejected by either ffplay or ffmpeg, just can't do a decode atm...
Hi
In the meantime... mPlayer will convert these wma lossless to wav.
(Maybe it uses the extra all-20110131 codecs, not sure.)
Also there are some wma2wav.exe programs that might work with WINE.
Then afterwards convert from wav to the required format.
This is a method using mPlayer, FFmpeg and a named pipe.
Does the job in one operation.
(Change the red parts to suit).8-)
# Make sure no pipe.pipe file already exists. && \
rm -f pipe.pipe && \
# && \
mkfifo pipe.pipe && \
mplayer -noconsolecontrols \
-vc null -vo null \
-ao pcm:fast:file=pipe.pipe \
luckynight.wma & \
ffmpeg -y -i pipe.pipe -acodec libmp3lame -aq 4 luckynight.mp3 && \
rm -f pipe.pipe
Borrowed the idea from here:- http://incise.org/transcoding-music.html
...
andrew.46
November 5th, 2011, 11:28 PM
Or perhaps:
transcode -H 0 -x null,mplayer -i luckynight.wma -y null,tcaud \
--lame_preset standard -E 44100,16,2 -m luckynight.mp3
but only for the 32bit MPlayer of course and Transcode's MPlayer import module:
andrew@skamandros~$ ls -1 $( tcmodinfo -p )/import*.so | grep mplayer
/usr/lib/transcode/import_mplayer.so
PayPaul
November 5th, 2011, 11:56 PM
I did get a nice long description of all the add-ons that are included with ffmpeg including some warnings about mismatches. What sort of problems could those cause? How do I fix them? I just did some security updates but I'm not certain if anything associated with ffmpeg was in those updates.
FFmpeg version 0.6.2-4:0.6.2-1ubuntu1.1, Copyright (c) 2000-2010 the Libav developers
built on Sep 16 2011 17:00:39 with gcc 4.5.2
configuration: --extra-version=4:0.6.2-1ubuntu1.1 --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 --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
libavutil configuration: --extra-version=4:0.6.2-1ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-libopenjpeg --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdirac --enable-libfaad --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libdc1394 --enable-shared --disable-static
libavcodec configuration: --extra-version=4:0.6.2-1ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-libopenjpeg --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdirac --enable-libfaad --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libdc1394 --enable-shared --disable-static
libavformat configuration: --extra-version=4:0.6.2-1ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-vaapi --enable-libopenjpeg --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdirac --enable-libfaad --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libdc1394 --enable-shared --disable-static
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Thanks for that nice simple command.
FakeOutdoorsman
November 6th, 2011, 07:59 PM
...including some warnings about mismatches. What sort of problems could those cause? How do I fix them?
You can ignore those warnings. They are a result from the way the maintainer created the package and will not cause you any issues.
PayPaul
November 6th, 2011, 08:55 PM
You can ignore those warnings. They are a result from the way the maintainer created the package and will not cause you any issues.
I don't mean to fuss about it and appreciate the heads up but do those warnings indicate that the maintainer created a faulty package? Weird.
beew
November 12th, 2011, 12:10 AM
Hi,
I have followed your great tutorial to install ffmpeg and x264 on Ubuntu 11.04. It went through very smoothly and so far everything seems to be working. Thanks a lot!
I have a few questions though, I would greatly appreciate your thoughts on them.
I notice that ffmpeg is installed in /usr/local/bin/. Now many applications use ffmpeg as backend, do I need to make a symbolic like to /usr/bin/, since it may be where ffmpeg is expected to be?
When compiling ffmpeg I saw that it was building libvacodec and some othe libva packages. Prior to building ffmpeg with your instructions I have installed libvacodecs-extra52 (and other libva--extra packages) from Ubuntu restricted extras and Medibuntu. I think with your method of building ffmpeg the extra codecs are already built into the libraries. So far i haven't notice any conflict with my previously installed "extra" packages.. I am wondering if I have to install these packages in the future if I plan to build ffmpeg this way, would they be superfluous?
Has there been report of compatibility issue in using this build as the "system" ffmpeg? I was building k3b from debian source and was told that if I have installed ffmpeg from this tutorial I would have to revert to the old "stripped" version first and then rebuild ffmpeg after compiling k3b. I am wondering if this example may indicate some compatibility issues in system-wide deployment of this build.
Finally, I have pinned ffmpeg and x264 so that they won't get "upgraded' by the package manager. Would they get out of sync with the rest of the system when other things are getting updated, or are these packages pretty self contain?
Thanks again.
mc4man
November 12th, 2011, 01:05 AM
Has there been report of compatibility issue in using this build as the "system" ffmpeg? I was building k3b from debian source and was told that if I have installed ffmpeg from this tutorial I would have to revert to the old "stripped" version first and then rebuild ffmpeg after compiling k3b. I am wondering if this example may indicate some compatibility issues in system-wide deployment of this build.
beew -
Just to 'clear' that up for anyone answering this - this issue building k3b wasn't 'stripped', ect.
k3b uses libavcodec/libavformat-dev, with the ffmpeg static build installed it was using those headers instead of the ones in /usr/include
It's possible k3b could be statically linked but even then it would need patching for newer ffmpeg sources, it was easier & probably better to get ffmpeg 'out of the way' during the build.
beew
November 12th, 2011, 02:22 AM
Hi, mc4man.
Thanks for the clarification. So does it mean that the same would apply for building other programs that would use those dev files unless they are statically linked to their own version of ffmpeg?
Now I think I have two sets of libavcodecs, one statically built with ffmpeg following this guide and then there is another installed with restricted extras and Medibuntu before. But I have to make sure when I go home later. One of my questions was basically I am not sure which one will be used by what...
Thanks again.. this is all kind of new to me and I easily get confused..
andrew.46
November 12th, 2011, 02:31 AM
Just to add a little more confusion, it is possible to direct the application you are compiling to use a specific version of FFmpeg + friends by explicitly giving PKG_CONFIG_PATH before compiling. On my own system I use this to give SoX, Transcode and a few other applications an FFmpeg that they will compile against:
export PKG_CONFIG_PATH="/home/andrew/source/ffmpeg_old/usr/lib/pkgconfig"
This copy of FFmpeg is a bare-bones copy without FFmpeg/FFplay/FFserver/docs etc and is a very useful technique when you wish to run the git FFmpeg as your 'system' copy. Currently my 'ffmpeg_old' is 0.7.6 as this maintains features of 0.6 while containing multiple bugfixes and improvements.
mc4man
November 12th, 2011, 04:38 AM
?
Now I think I have two sets of libavcodecs, one statically built with ffmpeg following this guide and then there is another installed with restricted extras and Medibuntu before. But I have to make sure when I go home later. One of my questions was basically I am not sure which one will be used by what...
No - you only have 1 set of the 'libavcodes', those are the shared libs that you've installed from medibuntu, they end in .so (shared object file'
Sources that were built against their 'corresponding' -dev packages will then depend on (use), those shared libs. So that would be all the repo/ppa apps/plugins that depend on the ffmpeg libs'.
To see run this something like this, using the exact name of the repo libavcodec package, on 11.10 it's llbavcodec53 or libavformat53, ect.
apt-cache rdepends libavcodec53
So if you build a source that uses the repo/ppa libavcodec-dev, libavformat-dev, ect. they will also then depend on (use) the shared libs, libavcodec53, libavformat53 ect. That was the case with k3b, we built against the repo libavcodec-dev, libavformat-dev, so it now depends on those shared libs.
When you build a source statically or against a static depend then it will not depend on the associated shared libs. A clear example is this how-to, ffmpeg is a static build, using a static x264
So the ffmpeg binary does not depend on any of the ffmpeg shared libs, nor on libx264. It does depend on all of the .so's associated with the -dev packages you installed or had installed prior to building ffmpeg
You can see this clearly here if run when your static, 'ala this how-to' ffmpeg is installed - there will be no libx264* or libavcodec53, ect. listed
ldd /usr/local/bin/ffmpeg
If you were to uninstall your ffmpeg built, install the repo ffmpeg, & run that command again you'll see the difference.
As far as the apps that use the ffmpeg binary itself. They will use whichever one that is installed. (try not to have more than 1 ffmpeg installed at once
If it's your built one then most of the time things will be fine, sometimes maybe not, they need the usually older repo version.
Hopefully this is somewhat informing, don't consider definitive or even absolutely technically correct, I mainly know whatever I think I know from observing
beew
November 12th, 2011, 09:58 PM
Hi, mc4man,
Thanks for the detailed explanation, you are the man!
How do you know if something is statically build? (I take it to mean that it is built in such a way that it is linked to its own versions of whatever libraries that it uses, rather than the system wide?)
mc4man
November 13th, 2011, 12:17 AM
How do you know if something is statically build?
Only sources that you build yourself May be. No repo/ppa source is built static only, (at least anything of concern) nor is static linking allowed (as far as I know
As far as your builds, that depends on the source, if they use a configure script then ./configure --help will usually show you.
Some, like ffmpeg, default to static only, others may default to static & shared, some, like x264, need either or both to be specified
qyot27
November 13th, 2011, 03:20 PM
The facetious answer to knowing if something is built statically is 'the binary is larger'. That still means you can see that it's larger, meaning you'd have to be comparing it to a shared build.
Basically,
Static = self-contained (and therefore larger)
Shared = not self-contained; relies on external libraries
For instance, taking Windows builds of FFmpeg as an example:
I always build as static. My static build of ffmpeg.exe is 10 megabytes.
Zeranoe's shared build of ffmpeg.exe is only 126 kilobytes, but has to have all of its dependency dlls either in the same folder or on the PATH to be usable. These dlls are much larger - avcodec-53.dll alone is 13 megabytes (there can be size differences due to feature support; my static builds don't have any external libraries included except for zlib, bzip2, and xvidcore).
In short, the difference between static and shared is where the 'mass' is - in a static build, the binary itself has all of the mass; in a shared build, the binary is small and depends on libraries in order to function, with the libraries having all the mass.
FakeOutdoorsman
November 14th, 2011, 04:36 AM
Mandelbrot set:
ffplay -f lavfi mandelbrot
beew
November 14th, 2011, 09:43 PM
Hi,
Kazam screen caster has stopped working, I am not sure if this has to do with switching to this build of ffmpeg, or if the problem lies elsewhere. This is the terminal output.
Xlib.protocol.request.QueryExtension
ffmpeg -f alsa -i pulse -f x11grab -r 30 -s 1366x768 -i :0.0+0,0 -ac 2 -acodec flac -ab 128k -vcodec libx264 -vpre lossless_ultrafast -threads 0 /tmp/tmpvCzVAk.mkv
ffmpeg version git-2011-11-11-985e768, Copyright (c) 2000-2011 the FFmpeg developers
built on Nov 11 2011 06:06:01 with gcc 4.5.2
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
libavutil 51. 24. 1 / 51. 24. 1
libavcodec 53. 31. 0 / 53. 31. 0
libavformat 53. 20. 0 / 53. 20. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 47. 2 / 2. 47. 2
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
[alsa @ 0x92c9ae0] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'pulse':
Duration: N/A, start: 1321233958.242020, bitrate: N/A
Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
[x11grab @ 0x92cec80] device: :0.0+0,0 -> display: :0.0 x: 0 y: 0 width: 1366 height: 768
[x11grab @ 0x92cec80] shared memory extension found
[x11grab @ 0x92cec80] Estimating duration from bitrate, this may be inaccurate
Input #1, x11grab, from ':0.0+0,0':
Duration: N/A, start: 1321233958.328359, bitrate: 1007124 kb/s
Stream #1:0: Video: rawvideo (BGRA / 0x41524742), bgra, 1366x768, 1007124 kb/s, 30 tbr, 1000k tbn, 30 tbc
File for preset 'lossless_ultrafast' not found
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/kazam/app.py", line 159, in cb_save_requested
shutil.move(self.screencast.get_recording_filename (), uri)
File "/usr/lib/python2.7/shutil.py", line 292, in move
copy2(src, real_dst)
File "/usr/lib/python2.7/shutil.py", line 127, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 81, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/tmp/tmpvCzVAk.mkv'
Please advise, and my apologies if problem is not with ffmpeg, in that case I will start a different thread. Thanks.
FakeOutdoorsman
November 14th, 2011, 09:49 PM
I'm not familiar with Kazam, but if you want to use it you will have to somehow change the FFmpeg encoding command from:
-vpre lossless_ultrafast -threads 0
to
-preset ultrafast -crf 0
The method of presets has changed, and Kazam appears to be using the old preset system. The -threads 0 is superfluous now that it should be the default with libx264.
beew
November 15th, 2011, 09:15 PM
I'm not familiar with Kazam, but if you want to use it you will have to somehow change the FFmpeg encoding command from:
-vpre lossless_ultrafast -threads 0to
-preset ultrafast -crf 0The method of presets has changed, and Kazam appears to be using the old preset system. The -threads 0 is superfluous now that it should be the default with libx264.
Hi, thanks for the reply. Kazam is a gui,if I use it I wouldn't want to do it in the terminal. I am not sure how to change the encoding command since it seems to be hard coded. I will see what I happens if I try making screencast directly with ffmpeg instead.
ppqq
November 20th, 2011, 12:13 PM
Hi, I've been editing mpeg movies in Avidemux and when I play the output file there is a fraction of a second of blocky picture where the movie was cut and joined.
I suspect this is not Avidemux but the encoder that it uses, so is that ffmpeg?
As far as i know I followed the instructions at the beginning of this thread to install the codecs, not too long ago. I run ubuntu natty, 64bit on core duo, cq40 laptop, 4gb.
any help would be appreciated!
thanks
FakeOutdoorsman
November 20th, 2011, 08:11 PM
I believe Avidemux contains some FFmpeg code, but I don't think it uses any FFmpeg libraries as a dependency, so following this guide probably won't make Avidemux change its behavior.
Are you simply cutting and joining clips? This can often be deceptively tricky if you are not willing to re-encode (depending on your input formats).
qyot27
November 20th, 2011, 10:26 PM
Avidemux does use libavcodec to do any encoding (not sure if static, however), but that still leaves two different scenarios:
1) The blocking is due to not cutting on I frame or GOP boundaries. In this case, the 'blocking' would probably look more like smearing, since it doesn't have all the data. To remedy this, programs might use a smart encoding process that will decode only those portions affected by a bad merge so that all the data is retained, and then re-encode that portion so that all there aren't any adverse artifacts.
2) You're encountering a case of libavcodec's bad rate control, especially in the event of joins that incur a smart encoding method (again, I don't know if Avidemux does smart encoding). My tests of libavcodec as an MPEG-2 encoder a few years ago showed that it had pretty bad RC that was most obvious at the very beginning of a stream and then lessened as encoding progressed. I've not done tests with a current version to know whether this has been improved - FFmpeg's git log does show that there have been fairly recent commits that affected the MPEG-2 encoder, so it's possible that it has. That's no guarantee that Avidemux is using that updated code, though (especially in the case of Avidemux under Natty; the more recent MPEG-2 commits were from September).
ppqq
November 21st, 2011, 05:29 AM
I could see that happening, the join smearing where I've moved single frames and made a cut, and not on key frames.
it's making all my films look so amateurish!! actual frames are being ground up in the process.
I've just read up .. about mpeg editors (http://tangentsoft.net/video/mpeg/edit.html) and realise now that editing mpeg is not the easiest or best thing to do!
the thing is I tend to put all my MTS files from my hd camera through Kdenlive to make mpeg files for dvds, and only after the mpegs are made I might need to cut out parts (kdenlive makes freezes happen with me) or re-edit them for m4v encoding with handbrake. It would NOT be that practical to put the MTS through kdenlive all over again (that's at least 4x movie length for encode time on my intel core duo) to make another edit.
putting the mpeg movie into kdenlive again and rendering with cuts gives a movie with no smearing. it's just its a lot easier to edit in avidemux.
------
OK, I've found that converting the movie to DV with avidemux re-encodes and hence gives no blocky transitions, the output of this DV from handbrake is good quality too. My problem was with avidemux not re-encoding but sticking the mpeg pieces together which is not a good idea.
But oh help, DV files are huge, so I might have to do all the work in kdenlive and render to a good mpeg2 setting.
leekyuh
November 23rd, 2011, 12:48 PM
I fixed the compile error on OpenCV "relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC" on my Ubuntu 11.10 64 bit system.
The cure was to add " --enable-pic --enable-shared" in addition to "--enable static" while configuring x264. Also I had to add " --enable-pic --enable-shared" while configuring ffmpeg.
Thanks to:
http://thebitbangtheory.wordpress.com/2011/10/23/how-to-install-opencv-2-3-1-in-ubuntu-11-10-oneiric-ocelot-with-python-support/#comment-71
Jerriy
November 23rd, 2011, 06:05 PM
HELP
I'm unable to install this from step 4 (http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289) onwards. I get connection error message
****@******:~$ cd
****@******:~$ git clone git://git.videolan.org/x264
Initialized empty Git repository in /home/****/x264/.git/
git.videolan.org[0: 88.191.250.118]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
****@******:~$ cd x264
bash: cd: x264: No such file or directory
****@******:~$ ./configure --enable-static
bash: ./configure: No such file or directory
****@******:~$ make
make: *** No targets specified and no makefile found. Stop.
****@******:~$ sudo checkinstall --pkgname=x264 --default --pkgversion="3:$(./version.sh | \
> awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes
FakeOutdoorsman
November 23rd, 2011, 07:01 PM
Some users may not be able to use Git. For example, the Git server may refuse the connection or a firewall on the users end might be interfering. Here are two alternative methods to get the x264, libvpx, and FFmpeg project files:
Using Git over http
The guide uses the git protocol for the git clone command. The files can also be retrieved over http instead and will probably not be blocked by firewalls. This method is slower, but will still give the user the same files. Note that the command may sit for a long time with little user feedback. To retrieve the files via http instead, use:
git clone http://git.videolan.org/git/x264.git
Using Snapshots
You can also skip Git completely and use snapshots instead. A snapshot is a routinely updated collection of all project source files continently compressed into a single file.
x264
cd
wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar xvjf last_x264.tar.bz2
cd x264-snapshot-*
Then continue with the ./configure line in the Install x264 section. Now for libvpx if you decide to use it too:
libvpx
cd
wget "http://git.chromium.org/gitweb/?p=webm/libvpx.git;a=snapshot;h=HEAD;sf=tgz" -O libvpx-snapshot.tar.gz
tar xzvf libvpx-snapshot.tar.gz
cd libvpx-HEAD-*
Then continue with the ./configure line in the Install libvpx section. The FFmpeg snapshot is similar:
FFmpeg
cd
wget "http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=HEAD;sf=tgz" -O ffmpeg-snapshot.tar.gz
tar xzvf ffmpeg-snapshot.tar.gz
cd ffmpeg-HEAD-*
Now, as with the others, continue with the ./configure line in the Install FFmpeg section. Follow the rest of the guide normally.
mc4man
November 23rd, 2011, 10:18 PM
. Note that the command may sit for a long time with little user feedback.
Just to mention because I've seen this confuse a few users who thought their terminal/command had 'frozen'
In gnome/nautilus 3 it's been decided to timeout the cursor blink at 10 secs
I find it annoying & reset much higher
Can be seen with this
~$ gsettings get org.gnome.desktop.interface cursor-blink-timeout
10
And altered with this, value as desired
gsettings set org.gnome.desktop.interface cursor-blink-timeout 200
Jerriy
November 24th, 2011, 05:56 AM
Thanks for the heads up, FakeOutdoorsman. It is indeed a sort firewall issue (git protocol apparently had no permission to pass through) basically the problem is caused as a result of the fact that I didn't recognize that git protocol before (I'm no Linux pro so it didn't even catch my eye that there was a different protocol... I was thinking it was the IP or some other thing that was the problem. So now rather than follow up on your alternative suggestions I'll go back to the original instruction step and see how that goes first...
PDA1
November 24th, 2011, 07:08 AM
Excellent work folks.
Is there a simple set of instructions to install the latest stable version of FFMPEG for Ubuntu 10.04?
I really need help with this stuff.
Thanks.
FakeOutdoorsman
November 24th, 2011, 09:23 AM
I consider FFmpeg from Git to be stable (for my purposes) on most occasions, but others have disagreed with me. Of couse a project with such active development will encounter issues, but most of the time they are fixed in a timely manner. Once again, others have disagreed with me on this point.
If you don't feel comfortable using the bleeding-edge, then you can try a recent release version. For a typical user a release version probably won't have any advantages over FFmpeg from Git other than they are called a "release" to ease any anxiety from stability concerns.
Compiling and installing a release version is fairly similar to using FFmpeg from Git as shown in the guide. Just download your desired release version from the FFmpeg download (http://ffmpeg.org/download.html) page, extract the archive file, and then continue with the guide starting with the appropriate ./configure line.
As for x264, there is a stable branch. x264 updates are usually pushed in one big dump every month or two. This includes fixes and other non-fix updates. The stable branch will include the most recent fixes, but the other non-fix updates won't be included in stable until the next set of updates. This allows the developers to catch any unforseen bugs that can be fixed before the next push to stable, and therefore hopefully decreasing the number of bugs encountered by the user. That's the idea at least, as I understand it, but I don't know how many bugs have actually been avoided in stable. To switch to the stable branch for x264, enter the following command before the x264 ./configure command:
git checkout stable
PDA1
November 24th, 2011, 01:59 PM
Thanks for helping me but I got an error message when I tried to get the mp3 from a video file.
Below is the entire results from the command line input to the end;
echo@echo-laptop:~/Downloads$ ffmpeg -i rrr.mp4 dkdik.mp3
ffmpeg version git-2011-11-24-957867a, Copyright (c) 2000-2011 the FFmpeg developers
built on Nov 24 2011 07:50:58 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-x11grab
libavutil 51. 27. 0 / 51. 27. 0
libavcodec 53. 37. 0 / 53. 37. 0
libavformat 53. 21. 0 / 53. 21. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 49. 0 / 2. 49. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'rrr.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2011-09-11 20:34:31
Duration: 00:09:58.73, start: 0.000000, bitrate: 610 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360, 508 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 95 kb/s
Metadata:
creation_time : 2011-09-11 20:34:32
handler_name :
Output #0, mp3, to 'dkdik.mp3':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2011-09-11 20:34:31
Stream #0:0(und): Audio: none, 44100 Hz, stereo, s16, 128 kb/s
Metadata:
creation_time : 2011-09-11 20:34:32
handler_name :
Stream mapping:
Stream #0:1 -> #0:0 (aac -> ?)
Encoder (codec none) not found for output stream #0:0
Any idea how to fix it?
Thank you
FakeOutdoorsman
November 24th, 2011, 09:19 PM
Your FFmpeg configure line is missing --enable-libmp3lame. This is required if you want to encode mp3, although the error message could be improved. I assume you followed the 10.04 version of the guide and skipped step 5 or simply omitted the instructions to add --enable-libmp3lame. This happens on occasion, and I will consider changing the guide because I feel that note about adding --enable-libmp3lame is often ignored or overlooked.
What you can do:
Recompile ffmpeg and follow step 5,
Or Pipe from ffmpeg to LAME,
Or uninstall your compiled ffmpeg and install it from the repository instead
If you're impatient just install lame:
sudo apt-get install lame
Then pipe the audio from ffmpeg to lame:
ffmpeg -i input.mp4 -f wav - | lame - output.mp3
Or install ffmpeg from the repository and enable the mp3 encoder. It's easy to do since you'll just need to install two packages and is described under Option B here:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
Then you can use your same command from post #1950, but I recommend adding -aq 4 to improve the quality of the output because the default settings use an unusually low bitrate (64 kilobits/s [but maybe default is 128k now]) for most purposes.
PDA1
November 24th, 2011, 10:24 PM
I think I discovered the problem;
The first 3 lines (see the attached picture) weren't checked off. Installation was successful (so I think) once they were checked off. We'll see.
Thank you for the help.
FakeOutdoorsman
November 24th, 2011, 10:28 PM
The Canonical Partner Repositories do not provide anything that is required by this guide.
PDA1
November 24th, 2011, 11:19 PM
I have no idea why I now have the mp3 codec. I made many attempts to install ffmpeg using your guide to no success until those 2 or 3 items were checked off.
Perhaps in Step 7 (for Ubuntu 10.04) adding the mp3 (or whatever it's called) to the ./configure line at a specific part of one of the code lines is important. The successful time I placed the additional code line just after the words "./configure" instead of at the end of the entire ./configure line.
I'm just a computer user and not a programmer and have little ability to work around things which are understandable by experienced users.
I've asked this question 10,000 times and it never gets easier for me to understand but all I want to do is take any video (usually off of Y T) and put it on my iPod 160 G Classic. Everyone has a code line that works for them but only a few times have those lines worked for me. This is so frustrating.
FakeOutdoorsman
November 25th, 2011, 12:07 AM
Perhaps in Step 7 (for Ubuntu 10.04) adding the mp3 (or whatever it's called) to the ./configure line at a specific part of one of the code lines is important.
Yes, as I mentioned previously, and as the guide stated, adding --enable-libmp3lame is required if you want to encode mp3 files.
The successful time I placed the additional code line just after the words "./configure" instead of at the end of the entire ./configure line.
Placement of --enable-libmp3lame on the ffmpeg ./configure line does not matter as long as it is there.
I'm just a computer user and not a programmer and have little ability to work around things which are understandable by experienced users.
I am also not a programmer.
I changed the 10.04 guide to make it more user friendly by removing the extra complexity of the optional sections. Now users can simply copy and paste the code boxes without reading the additional instructions (which probably happens much more than I expect) and still get all of the features offered by the guide. I will do this to the other guides where applicable for consistency.
Also, although I try to write the guides from the viewpoint of a beginner, compiling may not be for everyone. I have an additional guide that shows how to install ffmpeg from the repository and enable the disabled-by-default encoders for formats such as mp3 and aac:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
I've asked this question 10,000 times and it never gets easier for me to understand but all I want to do is take any video (usually off of Y T) and put it on my iPod 160 G Classic. Everyone has a code line that works for them but only a few times have those lines worked for me. This is so frustrating.
Picky devices are picky. Did you see my answer (http://ubuntuforums.org/showthread.php?p=11486441#post11486441) to your other recent post?
qyot27
November 25th, 2011, 04:48 AM
Thanks for helping me but I got an error message when I tried to get the mp3 from a video file.
Below is the entire results from the command line input to the end;
echo@echo-laptop:~/Downloads$ ffmpeg -i rrr.mp4 dkdik.mp3
[snip]
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 95 kb/s
[snip]
Any idea how to fix it?
I've asked this question 10,000 times and it never gets easier for me to understand but all I want to do is take any video (usually off of Y T) and put it on my iPod 160 G Classic. Everyone has a code line that works for them but only a few times have those lines worked for me. This is so frustrating.
As the readout showed, the audio stream in the file is AAC. iPods support that format, so you don't have to convert anything (although it might need to be run through qtfaststart).
For instance,
ffmpeg -i inputfile.mp4 -vn -acodec copy outputfile.m4a
The -vn disables the video, and -acodec copy transfers the audio to a new, smaller file. If you know the audio is MP3 and not AAC, then just change the .m4a on the output filename to .mp3 (because while it's totally standard-compliant to put MP3 into the MP4 container, I have no clue whether devices are weird about that).
PDA1
November 25th, 2011, 04:57 AM
I really love all of that hi-tech lingo.....but have no idea what it means. I'm rather dumb- all I want to do is take any video like from Y T and convert it to a playable format for my iPod. From what I've seen and tried about 95% of the code lines DO NOT work, are old and out of date and won't work with current ffmpeg stuff.
popper
November 25th, 2011, 12:23 PM
I have no idea why I now have the mp3 codec.
I'm just a computer user and not a programmer and have little ability to work around things which are understandable by experienced users.
I've asked this question 10,000 times and it never gets easier for me to understand but all I want to do is take any video (usually off of Y T) and put it on my iPod 160 G Classic. Everyone has a code line that works for them but only a few times have those lines worked for me. This is so frustrating.
well lets see :D
goggling the spec as YOU didn't say what that iPod 160 G Classic device takes
http://support.apple.com/kb/SP572
"Video
H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second, Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats"
"Audio
Frequency response: 20Hz to 20,000Hz
Audio formats supported: AAC (8 to 320 Kbps), Protected AAC (from iTunes Store), MP3 (8 to 320 Kbps), MP3 VBR, Audible (formats 2, 3, 4, Audible Enhanced Audio, AAX, and AAX+), Apple Lossless, AIFF, and WAV"
SO given the latest ffmpeg/avconv that would be
video coded to H.264/x264/AVC baseline profile (NOT mp4 aka divx/xvid) at a max 2.5 Mbp 640 by 480, and audio codec AAC (not Mp3) at 128Kb/s is fine (320Kbit/s or even 192KBit/s IS OTT) inside an .MP4 container ... given that AVC and AAC go together as intended....and do not make the sharp input video fuzzy as hell like divx/xvid does every single time..
so the line you want is probably this
avconv.exe if your using their latest GIT as their ffmpeg will be renamed soon or
ffmpeg -threads 4 -i "infile.whatever" -f mp4 -vcodec libx264 -crf 18 -minrate 600k -maxrate 1500k -bufsize 1500k -refs 3 -preset slow -vprofile Baseline -level 3.0 -flags2 -bpyramid -wpredp 0 -strict experimental -acodec aac -ac 2 -ab 128k -vf hqdn3d,unsharp=5:5:0.5,scale=640:480 "outfile.MP4"
this is OC untested as i don't have that device and iv just modified my usual MKV to MP4 CRF line to suit and add the scale etc.... so there may be syntax typing errors in that line that need sorting, but it should work as is given the data above.
edit:
so i made a quick sample encode with the line and it seems to work fine although not as sharp as it could be but thats down to the re-scale to a far lower screen size OC, so test that and see if it plays OK for you.
http://www.mediafire.com/?2egrbf61jf5ejn6
and given that screen size and not knowing what the actual ratio is of your infile ("mediainfo" is good for finding that info out per file) then you may want/need to add ,setdar=16:9 after the scale part to make it display widescreen/16:9 ratio files properly
so the main points are your device takes the better AVC.AAC codecs so use them over the fuxxy and old divx/xvid to get far better visual quality and file size when you re-encode properly.
you may need/want to change the "1500k" parts to read "765k" if you're device is an older one that only takes slower bit rates to play video smoothly apparently, but try 2500k first then 1500k as above as theres no point throwing away good bit-rate detail if you dont need/want to.
that line is using CRF-18 for keeping as much quality as possible which is considered high usually BUT the -minrate,maxrate, and bufsize counter act that to restrict the video stream to the given lower bitrate as is required and is good.
PDA1
November 25th, 2011, 02:08 PM
As the readout showed, the audio stream in the file is AAC. iPods support that format, so you don't have to convert anything (although it might need to be run through qtfaststart).
For instance,
ffmpeg -i inputfile.mp4 -vn -acodec copy outputfile.m4aThe -vn disables the video, and -acodec copy transfers the audio to a new, smaller file. If you know the audio is MP3 and not AAC, then just change the .m4a on the output filename to .mp3 (because while it's totally standard-compliant to put MP3 into the MP4 container, I have no clue whether devices are weird about that).
Wow! your code for getting only the audio (m4a) was REALLY fast. Most of the time I convert to MP3 which takes a long time for most files I have.
Here's what I typically do to get the audio- ffmpeg -i INPUT.mp4 OUTPUT.mp3
The reason I use mp3 is (being the dope that I am) because M4A isn't a familiar extension to me and I'm concerned about moving any audio (or video) file to another media player (like something other than an iPod) and most play MP3.
Thanks for the help.
popper
November 25th, 2011, 02:30 PM
Wow! your code for getting only the audio (m4a) was REALLY fast. Most of the time I convert to MP3 which takes a long time for most files I have.
Here's what I typically do to get the audio- ffmpeg -i INPUT.mp4 OUTPUT.mp3
The reason I use mp3 is (being the dope that I am) because M4A isn't a familiar extension to me and I'm concerned about moving any audio (or video) file to another media player (like something other than an iPod) and most play MP3.
Thanks for the help.
actually you misunderstand that line , ill try and explain, qyot27's ffmpeg -i inputfile.mp4 -vn -acodec copy outputfile.m4a says take any input file even with video and audio but dont even try and copy or encode any video contained in there to the new container , and COPY (hence the -acodec copy part) any audio inside there TO a new .m4a container file.
digital video/audio files are basically made up of 3 or more parts, the video codec, the audio codec and any other data such as subtitles placed inside a container, a container being MP4, MKV or the antiquated avi container that everyone should avoid using/making today etc
the basic rule i follow these days is anything that cant take AVC, AAC inside a MP4 or MKV container in 2011 needs scrapping ASAP and its way past time to go and get something that can. :)
PDA1
November 25th, 2011, 02:40 PM
Here's the thing I find odd- I used to able to download videos from Y T (or other sources) in mp4 format and put them on my iPod. Now, after upgrading to iTunes 10.5 and re-installing XP most mp4's need some sort of conversion before they can play perfectly on my iPod. It's a pain-in-the-neck and I'm sick of it.
As I said some other place Linux just doesn't have an easy program that'll manage music for iPod and that's why I'm stuck with that stupid Windows/iTunes stuff.
popper
November 25th, 2011, 03:03 PM
Here's the thing I find odd- I used to able to download videos from Y T (or other sources) in mp4 format and put them on my iPod. Now, after upgrading to iTunes 10.5 and re-installing XP most mp4's need some sort of conversion before they can play perfectly on my iPod. It's a pain-in-the-neck and I'm sick of it.
As I said some other place Linux just doesn't have an easy program that'll manage music for iPod and that's why I'm stuck with that stupid Windows/iTunes stuff.
well thats apple for you :) changing all sorts of things on your device behind your back, LOL, that's why people today are preferring to buy ARM/NEON dual and quad core Devices this year with a nice Linux OS installed and ready for ARM x264/ffmpeg encoding :) (Yes ARM with NEON SIMD devices can run "x264/ffmpeg directly" unless their default locked as standard like apple)
well try that sample i made for you and see if it plays fine on the pod, i can give you a windows bat script that will convert all your files to that format if it plays fine i dont know bash shell script so someone else can convert that for linux use later perhaps...
PDA1
November 25th, 2011, 03:32 PM
Yes, the file you provided loads and plays on the iPod perfectly.
I'm running Ubuntu 10.04 which is where I download the Y T videos. Then I put them on a USB drive and move 'em over to Windows/iTunes.
Frankly, I want to have as little to do with Windows as possible.
Thank you for the help.
Say, here's a the ffmpeg- i information from a video I downloaded. It transfers and plays on the iPod BUT the width of the video is partially cut off on the iPod screen. Any idea why?
echo@echo-laptop:~/Downloads$ ffmpeg -i rp.mp4
ffmpeg version git-2011-11-24-957867a, Copyright (c) 2000-2011 the FFmpeg developers
built on Nov 24 2011 16:13:53 with gcc 4.4.3
configuration: --enable-libmp3lame --enable-libvpx --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-x11grab
libavutil 51. 27. 0 / 51. 27. 0
libavcodec 53. 37. 0 / 53. 37. 0
libavformat 53. 21. 0 / 53. 21. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 49. 0 / 2. 49. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'rp.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2011-09-11 20:34:31
Duration: 00:09:58.73, start: 0.000000, bitrate: 610 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360, 508 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 95 kb/s
Metadata:
creation_time : 2011-09-11 20:34:32
handler_name :
At least one output file must be specified
andrew.46
November 25th, 2011, 09:49 PM
As I said some other place Linux just doesn't have an easy program that'll manage music for iPod and that's why I'm stuck with that stupid Windows/iTunes stuff.
But FFmpeg is easy :).
Jerriy
November 25th, 2011, 09:58 PM
I consider FFmpeg from Git to be stable (for my purposes) on most occasions, but others have disagreed with me. Of couse a project with such active development will encounter issues, but most of the time they are fixed in a timely manner. Once again, others have disagreed with me on this point.
If you don't feel comfortable using the bleeding-edge, then you can try a recent release version. For a typical user a release version probably won't have any advantages over FFmpeg from Git other than they are called a "release" to ease any anxiety from stability concerns.
Compiling and installing a release version is fairly similar to using FFmpeg from Git as shown in the guide. Just download your desired release version from the FFmpeg download (http://ffmpeg.org/download.html) page, extract the archive file, and then continue with the guide starting with the appropriate ./configure line.
As for x264, there is a stable branch. x264 updates are usually pushed in one big dump every month or two. This includes fixes and other non-fix updates. The stable branch will include the most recent fixes, but the other non-fix updates won't be included in stable until the next set of updates. This allows the developers to catch any unforseen bugs that can be fixed before the next push to stable, and therefore hopefully decreasing the number of bugs encountered by the user. That's the idea at least, as I understand it, but I don't know how many bugs have actually been avoided in stable. To switch to the stable branch for x264, enter the following command before the x264 ./configure command:
git checkout stableI have succeeded in solving the git problem and moved up to the final 7th step (http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289). That's where my next problem occured. Apparently libfaac is not found (although I checked synaptic and there is an item called "libfaac0" but it's already istalled! So I've bumped into another odd problem, namely: I don't even know what the problem is :p
****@******:~$ cd
****@******:~$ git clone --depth 1 git://source.ffmpeg.org/ffmpeg
Initialized empty Git repository in /home/****/ffmpeg/.git/
remote: Counting objects: 7436, done.
remote: Compressing objects: 100% (5262/5262), done.
remote: Total 7436 (delta 4734), reused 3646 (delta 2039)
Receiving objects: 100% (7436/7436), 9.59 MiB | 1.96 MiB/s, done.
Resolving deltas: 100% (4734/4734), done.
****@******:~$ cd ffmpeg
****@******:~/ffmpeg$ ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
> --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \
> --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
ERROR: libfaac not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
****@******:~/ffmpeg$ make
Makefile:2: config.mak: No such file or directory
Makefile:45: /common.mak: No such file or directory
Makefile:82: /libavutil/Makefile: No such file or directory
Makefile:148: /doc/Makefile: No such file or directory
Makefile:149: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
****@******:~/ffmpeg$ sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
> --deldoc=yes --default
checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@****** ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ ffmpeg ]
3 - Version: [ 5:git-2011-11-25-9e794d1 ]
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:2: config.mak: No such file or directory
Makefile:45: /common.mak: No such file or directory
Makefile:82: /libavutil/Makefile: No such file or directory
Makefile:148: /doc/Makefile: No such file or directory
Makefile:149: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
****@******:~/ffmpeg$ hash x264 ffmpeg ffplay ffprobe
bash: hash: ffmpeg: not found
bash: hash: ffplay: not found
bash: hash: ffprobe: not found
FakeOutdoorsman
November 25th, 2011, 10:07 PM
ERROR: libfaac not found
Did you install the libfaac-dev package as shown in step 2?
sudo apt-get install libfaac-dev
cd ~/ffmpeg
make distclean
git pull
Then continue with the ./configure line as shown in step 7.
Jerriy
November 26th, 2011, 02:15 AM
^ That's not solving it
I went back and re-read the results and noticed something I overlooked before: that during step 2 things were not exactly going on as planned:
****@******:~$ sudo apt-get update
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/banshee-team/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://gb.archive.ubuntu.com lucid Release.gpg
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_US
Ign http://ppa.launchpad.net/chromium-daily/stable/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/debfx/virtualbox/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/ferramroberto/extra/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/gnuzilla-team/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://debian.anonymous-proxy-servers.net lucid Release.gpg
Ign http://debian.anonymous-proxy-servers.net/ lucid/main Translation-en_US
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid/restricted Translation-en_US
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_US
Hit http://gb.archive.ubuntu.com lucid-updates Release.gpg
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid-updates/universe Translation-en_US
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid-updates/main Translation-en_US
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Translation-en_US
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_US
Hit http://security.ubuntu.com lucid-security Release.gpg
Ign http://security.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/main Translation-en_US
Hit http://packages.medibuntu.org lucid Release.gpg
Ign http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/kubuntu-ppa/beta/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/midori/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://archive.canonical.com lucid Release.gpg
Ign http://archive.canonical.com/ lucid/partner Translation-en_US
Hit http://debian.anonymous-proxy-servers.net lucid Release
Hit http://gb.archive.ubuntu.com lucid-backports Release.gpg
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid-backports/universe Translation-en_US
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid-backports/main Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_US
Ign http://download.skype.com stable Release.gpg
Hit http://security.ubuntu.com lucid-security Release
Ign http://ppa.launchpad.net/mozillateam/firefox-stable/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/mozillateam/thunderbird-stable/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://archive.canonical.com lucid Release.gpg
Ign http://archive.canonical.com/ubuntu/ lucid/partner Translation-en_US
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid-backports/multiverse Translation-en_US
Ign http://gb.archive.ubuntu.com/ubuntu/ lucid-backports/restricted Translation-en_US
Hit http://gb.archive.ubuntu.com lucid Release
Hit http://archive.canonical.com lucid Release
Hit http://gb.archive.ubuntu.com lucid-updates Release
Hit http://debian.anonymous-proxy-servers.net lucid/main Packages
Ign http://download.skype.com/linux/repos/debian/ stable/non-free Translation-en_US
Hit http://security.ubuntu.com lucid-security/universe Packages
Ign http://ppa.launchpad.net/openshot.developers/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/rvm/smplayer/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/tiheum/equinox/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://archive.canonical.com lucid Release
Hit http://gb.archive.ubuntu.com lucid-backports Release
Ign http://packages.medibuntu.org/ lucid/free Translation-en_US
Ign http://ppa.launchpad.net/tualatrix/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://security.ubuntu.com lucid-security/main Packages
Hit http://security.ubuntu.com lucid-security/multiverse Packages
Hit http://security.ubuntu.com lucid-security/restricted Packages
Hit http://security.ubuntu.com lucid-security/universe Sources
Hit http://security.ubuntu.com lucid-security/main Sources
Hit http://security.ubuntu.com lucid-security/multiverse Sources
Hit http://archive.canonical.com lucid/partner Packages
Hit http://gb.archive.ubuntu.com lucid/main Packages
Hit http://gb.archive.ubuntu.com lucid/universe Packages
Hit http://gb.archive.ubuntu.com lucid/restricted Packages
Hit http://gb.archive.ubuntu.com lucid/multiverse Packages
Hit http://gb.archive.ubuntu.com lucid/main Sources
Hit http://gb.archive.ubuntu.com lucid/universe Sources
Ign http://download.skype.com stable Release
Hit http://security.ubuntu.com lucid-security/restricted Sources
Ign http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/webkit-team/ppa/ubuntu/ lucid/main Translation-en_US
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://archive.canonical.com lucid/partner Sources
Hit http://archive.canonical.com lucid/partner Packages
Hit http://gb.archive.ubuntu.com lucid/restricted Sources
Hit http://gb.archive.ubuntu.com lucid/multiverse Sources
Hit http://gb.archive.ubuntu.com lucid-updates/universe Packages
Hit http://gb.archive.ubuntu.com lucid-updates/main Packages
Hit http://gb.archive.ubuntu.com lucid-updates/multiverse Packages
Hit http://gb.archive.ubuntu.com lucid-updates/restricted Packages
Hit http://gb.archive.ubuntu.com lucid-updates/universe Sources
Hit http://gb.archive.ubuntu.com lucid-updates/main Sources
Hit http://gb.archive.ubuntu.com lucid-updates/multiverse Sources
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://download.skype.com stable/non-free Packages
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://gb.archive.ubuntu.com lucid-updates/restricted Sources
Hit http://gb.archive.ubuntu.com lucid-backports/universe Packages
Hit http://gb.archive.ubuntu.com lucid-backports/main Packages
Hit http://gb.archive.ubuntu.com lucid-backports/multiverse Packages
Hit http://gb.archive.ubuntu.com lucid-backports/restricted Packages
Hit http://gb.archive.ubuntu.com lucid-backports/universe Sources
Hit http://ppa.launchpad.net lucid Release
Ign http://packages.medibuntu.org/ lucid/non-free Translation-en_US
Hit http://gb.archive.ubuntu.com lucid-backports/main Sources
Hit http://ppa.launchpad.net lucid Release
Hit http://gb.archive.ubuntu.com lucid-backports/multiverse Sources
Hit http://ppa.launchpad.net lucid Release
Hit http://gb.archive.ubuntu.com lucid-backports/restricted Sources
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid Release
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://packages.medibuntu.org lucid Release
Ign http://getswiftfox.com unstable Release.gpg
Hit http://download.virtualbox.org lucid Release.gpg
Hit http://packages.medibuntu.org lucid/free Packages
Hit http://packages.medibuntu.org lucid/non-free Packages
Ign http://download.virtualbox.org/virtualbox/debian/ lucid/contrib Translation-en_US
Ign http://getswiftfox.com/builds/debian/ unstable/non-free Translation-en_US
Hit http://packages.medibuntu.org lucid/free Sources
Hit http://download.virtualbox.org lucid Release
Hit http://packages.medibuntu.org lucid/non-free Sources
Ign http://getswiftfox.com unstable Release
Hit http://download.virtualbox.org lucid/contrib Packages
Ign http://getswiftfox.com unstable/non-free Packages
Ign http://getswiftfox.com unstable/non-free Packages
Hit http://getswiftfox.com unstable/non-free Packages
Reading package lists... Done
****@******:~$ sudo apt-get install build-essential git-core checkinstall texi2html libfaac-dev \
> libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \
> libvorbis-dev libx11-dev libxfixes-dev zlib1g-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
build-essential set to manually installed.
git-core is already the newest version.
checkinstall is already the newest version.
libfaac-dev is already the newest version.
libx11-dev is already the newest version.
libx11-dev set to manually installed.
libxfixes-dev is already the newest version.
libxfixes-dev set to manually installed.
zlib1g-dev is already the newest version.
zlib1g-dev set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libsdl1.2-dev: Depends: libpulse-dev but it is not going to be installed
libvorbis-dev: Depends: libvorbis0a (= 1.2.3-3ubuntu1) but 1.3.1-1ubuntu1~ppa1~lucid1 is to be installed
Depends: libvorbisenc2 (= 1.2.3-3ubuntu1) but 1.3.1-1ubuntu1~ppa1~lucid1 is to be installed
Depends: libvorbisfile3 (= 1.2.3-3ubuntu1) but 1.3.1-1ubuntu1~ppa1~lucid1 is to be installed
I went to synaptic and noticed that I wasn't able to install the files and to me the problem seems to be that there is a version discrepancy in my system. I tried to see where that came from and my suspicion is that I use certain "ppa"s or "builds" of a couple of programs including Pulseaudio. That version incompatibility seems to be the root cause of the problem so far as I can see but as I'm not expert I can't prove that. Why else is it possible that there are stuff in the repository yet I can't install them?!?!
FakeOutdoorsman
November 26th, 2011, 04:15 AM
That's the most PPAs I've ever seen anyone use (I generally avoid them myself). You need to track down which one(s) is causing your problems. mc4man is usually good at navigating issues like this. Maybe he can help pinpoint which repository is to blame.
mc4man
November 26th, 2011, 06:31 AM
^ That's not solving it
I went back and re-read the results and noticed something I overlooked before: that during step 2 things were not exactly going on as planned
libvorbis-dev: Depends: libvorbis0a (= 1.2.3-3ubuntu1) but 1.3.1-1ubuntu1~ppa1~lucid1 is to be installed
Depends: libvorbisenc2 (= 1.2.3-3ubuntu1) but 1.3.1-1ubuntu1~ppa1~lucid1 is to be installed
Depends: libvorbisfile3 (= 1.2.3-3ubuntu1) but 1.3.1-1ubuntu1~ppa1~lucid1 is to be installed
[/CODE]I went to synaptic and noticed that I wasn't able to install the files and to me the problem seems to be that there is a version discrepancy in my system. I tried to see where that came from and my suspicion is that I use certain "ppa"s or "builds" of a couple of programs including Pulseaudio. That version incompatibility seems to be the root cause of the problem so far as I can see but as I'm not expert I can't prove that. Why else is it possible that there are stuff in the repository yet I can't install them?!?!
The vorbis packages you have installed, (blue) are likely from this ppa
https://launchpad.net/~lucid-bleed/+archive/ppa
or this variation of
https://launchpad.net/~lucid-bleed/+archive/lucidbleed-exp
So as it stands you'd need to add either ppa to your sources, then you could install libvorbis-dev OR just go one of the pages, click on "View package details", expand the vorbis entry & download & install libvorbis-dev, it's the same in either ppa
As far as libpulse-dev, who knows..., search out pulse in synaptic & post the complete name of your installed libpulse packages - if you highlight it, > properties you can see & maybe some additional info
Additionally -
In synaptic - click on the "Origin" tab on left side, this will list all your current sources & packages available & installed from - you should be able to figure some things out by highlighting the various ppa's & then seeing what you have installed from them
If you used lucidbleed experimental to upgrade packages previously then you'd probably be better off re-enabling that ppa depending on what you installed from there.
Overall the amount of ppa's you have enabled is fairly ripe ground for trouble, particularly if you've just done 'blanket updates', & not paid attention to what packages may have been replaced.
Jerriy
November 26th, 2011, 03:18 PM
Thanks guys I solved the step2 problems (added the ppa mc4man suggested for the vorbis stuff and downgraded/streamlined the libpulse-dev dependencies and it all went OK.
So I went on with the steps and the next problem showed up during step 5 (http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289):
****@******:~$ sudo apt-get remove libmp3lame-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libmp3lame-dev is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
****@******:~$ sudo apt-get install nasm
Reading package lists... Done
Building dependency tree
Reading state information... Done
nasm is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
****@******:~$ cd
****@******:~$ wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz
--2011-11-26 15:02:06-- http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz
Connecting to 127.0.0.1:8118... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.tar.gz/download?use_mirror=switch [following]
--2011-11-26 15:02:07-- http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.tar.gz/download?use_mirror=switch
Connecting to 127.0.0.1:8118... connected.
Proxy request sent, awaiting response... 200 OK
Length: 16767 (16K) [text/html]
Saving to: `lame-3.99.tar.gz.2'
100%[================================================== ================================================== =======================>] 16,767 --.-K/s in 0s
2011-11-26 15:02:08 (172 MB/s) - `lame-3.99.tar.gz.2' saved [16767/16767]
****@******:~$ tar xzvf lame-3.99.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
****@******:~$ cd lame-3.99
bash: cd: lame-3.99: No such file or directory
****@******:~$ ./configure --enable-nasm --disable-shared
bash: ./configure: No such file or directory
****@******:~$ make
make: *** No targets specified and no makefile found. Stop.
****@******:~$ sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99" --backup=no --default \
> --deldoc=yes
checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
*** No known documentation files were found. The new package
*** won't include a documentation directory.
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@****** ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ lame-ffmpeg ]
3 - Version: [ 3.99 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ **** ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ lame-ffmpeg ]
Enter a number to change any of them or press ENTER to continue:
Installing with make...Installing with install...
========================= Installation results ===========================
make: *** No rule to make target `install'. Stop.
*** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.Now what?
ron999
November 26th, 2011, 04:22 PM
Now what?
Connecting to 127.0.0.1:8118... connected.
Proxy request sent, awaiting response... 200 OK
Length: 16767 (16K) [text/html]
Saving to: `lame-3.99.tar.gz.2'
100%[================================================== ================================================== =======================>] 16,767 --.-K/s in 0s
2011-11-26 15:02:08 (172 MB/s) - `lame-3.99.tar.gz.2' saved [16767/16767]
****@******:~$ tar xzvf lame-3.99.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
There's a problem unzipping lame.
That's probably because you've already downloaded it and there are probably multiple copies on your hard drive....
lame-3.99.tar.gz
lame-3.99.tar.gz.1
lame-3.99.tar.gz.2
etc.
So look for all these lame tar.gz files and delete them, then try again from:-
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz
Jerriy
November 26th, 2011, 05:32 PM
^ I did that and that went well but then the very next line of instruction failed:
****@******:~$ tar xzvf lame-3.99.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
****@******:~$ cd lame-3.99
bash: cd: lame-3.99: No such file or directory
****@******:~$ ./configure --enable-nasm --disable-shared
bash: ./configure: No such file or directory
****@******:~$ make
make: *** No targets specified and no makefile found. Stop.
****@******:~$ sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99" --backup=no --default \
> --deldoc=yes
ron999
November 26th, 2011, 05:49 PM
Works for me.
mc4man
November 26th, 2011, 06:20 PM
Jerriy - try step 5 like this, then maybe you can move along, copy & paste the complete code box as 1 command
cd
mkdir -p lame_build; cd lame_build; \
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz; \
tar xzvf lame-3.99.tar.gz; cd lame-3.99; \
./configure --enable-nasm --disable-shared; \
make; sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99" --backup=no \
--default --deldoc=yes
Jerriy
November 26th, 2011, 08:59 PM
^ That was to no avail:
****@******:~$ cd
****@******:~$ mkdir -p lame_build; cd lame_build; \
> wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz; \
> tar xzvf lame-3.99.tar.gz; cd lame-3.99; \
> ./configure --enable-nasm --disable-shared; \
> make; sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99" --backup=no \
> --default --deldoc=yes
--2011-11-26 19:33:59-- http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz
Connecting to 127.0.0.1:8118... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.tar.gz/download?use_mirror=netcologne [following]
--2011-11-26 19:34:00-- http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.tar.gz/download?use_mirror=netcologne
Connecting to 127.0.0.1:8118... connected.
Proxy request sent, awaiting response... 200 OK
Length: 16823 (16K) [text/html]
Saving to: `lame-3.99.tar.gz'
100%[================================================== ================================================== ========================>] 16,823 --.-K/s in 0s
2011-11-26 19:34:01 (159 MB/s) - `lame-3.99.tar.gz' saved [16823/16823]
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
bash: cd: lame-3.99: No such file or directory
bash: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
[sudo] password for ****:
checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
*** No known documentation files were found. The new package
*** won't include a documentation directory.
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@****** ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ lame-ffmpeg ]
3 - Version: [ 3.99 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ lame_build ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ lame-ffmpeg ]
Enter a number to change any of them or press ENTER to continue:
Installing with make...Installing with install...
========================= Installation results ===========================
make: *** No rule to make target `install'. Stop.
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
****@******:~/lame_build$ cd
****@******:~$ mkdir -p lame_build; cd lame_build; \
> wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz; \
> tar xzvf lame-3.99.tar.gz; cd lame-3.99; \
> ./configure --enable-nasm --disable-shared; \
> make; sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99" --backup=no \
> --default --deldoc=yes
--2011-11-26 20:55:41-- http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz
Connecting to 127.0.0.1:8118... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.tar.gz/download?use_mirror=heanet [following]
--2011-11-26 20:55:42-- http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.tar.gz/download?use_mirror=heanet
Connecting to 127.0.0.1:8118... connected.
Proxy request sent, awaiting response... 200 OK
Length: 16760 (16K) [text/html]
Saving to: `lame-3.99.tar.gz'
100%[================================================== ================================================== ========================>] 16,760 --.-K/s in 0s
2011-11-26 20:55:43 (139 MB/s) - `lame-3.99.tar.gz' saved [16760/16760]
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Exiting with failure status due to previous errors
bash: cd: lame-3.99: No such file or directory
bash: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
[sudo] password for ****:
checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y
Preparing package documentation...OK
*** No known documentation files were found. The new package
*** won't include a documentation directory.
*****************************************
**** Debian package creation selected ***
*****************************************
This package will be built according to these values:
0 - Maintainer: [ root@****** ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ lame-ffmpeg ]
3 - Version: [ 3.99 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ lame_build ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ lame-ffmpeg ]
Enter a number to change any of them or press ENTER to continue:
Installing with make...Installing with install...
========================= Installation results ===========================
make: *** No rule to make target `install'. Stop.
*** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
mc4man
November 26th, 2011, 09:20 PM
Then maybe just open the folder with lame-3.99.tar.gz, r. click on > extract here & then proceed from at the lame-3.99 prompt
./configure --enable-nasm --disable-shared; \
make; sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99" --backup=no \
--default --deldoc=yes
Or try changing the tar command posted above or from step 5 to
tar xvf lame-3.99.tar.gz
Jerriy
November 26th, 2011, 10:57 PM
I can't seem to be able to extract "lame-3.99.tar.gz" in any folder or even desktop
qyot27
November 26th, 2011, 11:01 PM
The problem is that the lame tarball isn't being downloaded at all. The size isn't right, which confirms this (the tarball isn't 16KB, but an HTML error page certainly is - hence the reason it complains about the file not being in gzip format).
Compare filesizes:
2011-11-26 19:34:01 (159 MB/s) - `lame-3.99.tar.gz' saved [16823/16823]
And then me, having downloaded lame-3.99.tar.gz from the provided link above:
2011-11-26 16:57:07 (466 KB/s) - `lame-3.99.tar.gz' saved [1441166/1441166]
The difference is that mine correctly downloaded, and hence really is a tarball, and it extracts fine. Check the proxy settings you're using, or just bypass the problem entirely and download the tarball through your web browser.
Jerriy
November 27th, 2011, 12:12 AM
qyot27, yes that's the case. So I went directly to the sourceforge via my browser and downloaded it and it worked!....
Then I went thru the instructions until step 7 (http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289) and then (you guessed it!) the next mysterious problem showed up that I'm at a loss to solve:
****@******:~/libvpx$ cd
****@******:~$ git clone --depth 1 git://source.ffmpeg.org/ffmpeg
fatal: destination path 'ffmpeg' already exists and is not an empty directory.
****@******:~$ cd ffmpeg
****@******:~/ffmpeg$ ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
> --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \
> --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
ERROR: libvpx decoder version must be >=0.9.1
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
****@******:~/ffmpeg$ make
Makefile:2: config.mak: No such file or directory
Makefile:45: /common.mak: No such file or directory
Makefile:82: /libavutil/Makefile: No such file or directory
Makefile:148: /doc/Makefile: No such file or directory
Makefile:149: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
****@******:~/ffmpeg$ sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
> --deldoc=yes --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@****** ]
1 - Summary: [ Package created with checkinstall 1.6.1 ]
2 - Name: [ ffmpeg ]
3 - Version: [ 5:N-31031-g022f8d2 ]
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:2: config.mak: No such file or directory
Makefile:45: /common.mak: No such file or directory
Makefile:82: /libavutil/Makefile: No such file or directory
Makefile:148: /doc/Makefile: No such file or directory
Makefile:149: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
qyot27
November 27th, 2011, 01:20 AM
ERROR: libvpx decoder version must be >=0.9.1
Did Step 6 complete successfully? That should have taken care of the issue of making sure libvpx was at or above version 0.9.1. Otherwise, I'd think it a problem with a repository version of libvpx-dev (or whatever the exact package name is) not being new enough.
The solution would likely be to 'completely remove' (sudo apt-get purge if using the Terminal) the libvpx packages and then do Step 6 again.
PDA1
November 27th, 2011, 02:05 AM
I figured it out!
This is amazing- the width problem is solved simply by changing the Video Settings on the iPod itself.
In Video---Settings----turn OFF "fit to full screen" (or whatever it's called).
Jerriy
November 27th, 2011, 03:06 AM
Did Step 6 complete successfully? I guess not, so I purged it and installed that then voila! all went well. I think that has been the cause of some of my previous problems as well: every time I resume installation I should have purged everything incl folders that was installed and not only do the delete stuff mentioned in "step one".
Anyways, now step 6 and 7 completed, which means I have FFMPEG installed, yay!
Now let's see if it all works :o
popper
November 27th, 2011, 04:31 PM
I figured it out!
This is amazing- the width problem is solved simply by changing the Video Settings on the iPod itself.
In Video---Settings----turn OFF "fit to full screen" (or whatever it's called).
LOL yes but did you re-code any video with that line i gave you for yourself to try....
heres that windows bat file with the working line 3 pages back BTW, if any Linux bash writer reading wants to help you out and convert it to the equivalent Linux use.so you dont need to use windows again :)
just make the bat, call it say multi-encode.bat or whatever, make an empty dir on the top of your USB stick , put the bat,your ffmpeg/avconv
the current windows http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-git-2c44aed-win32-static.7z will be fine* for that OS until someone converts the bat to linux bash then you can use this threads linux ffmpeg (static version) on there OC) and ALL your files for conversion in there.
make another dir in there called \encoded in this case as thats where the bat will want to locally save all its encodes, and change the ("%srcPATH%*.mkv") part of the bat to whatever your files extension is if not .mkv , double click the multi-encode.bat to start it off and forget about it till its done all the files in that dir for you ( and OC using a quirk of windows bat you get to have the "iPod-160G-Classic-" pre-pended to all your files :) )
the REM at the end of the script is just for reference as i cant usually be bothered to open another txt file with all the cheat sheets options etc :D
.....cut
@echo on
set srcPATH=.\
set dstPATH=.\encoded\iPod-160G-Classic-
FOR %%A in ("%srcPATH%*.mkv") DO (
avconv.exe -threads 4 -i "%%A" -f mp4 -vcodec libx264 -crf 18 -minrate 600k -maxrate 1500k -bufsize 1500k -refs 3 -preset slow -vprofile Baseline -level 3.0 -flags2 -bpyramid -wpredp 0 -strict experimental -acodec aac -ac 2 -ab 128k -vf hqdn3d,unsharp=5:5:0.5,scale=640:480 "%dstPATH%%%~nA.MP4"
)
pause
REM -vf yadif, gradfun, hqdn3d, unsharp=5:5:0.5, setdar=16:9, scale=640:480
...cut
* actually that http://ffmpeg.zeranoe.com/builds/ is worth a second look as they auto build that windows version with Linux Ubuntu Desktop 10.04 http://ffmpeg.zeranoe.com/builds/readme/win32/static/ffmpeg-git-2c44aed-win32-static-readme.txt and always keep the Current Zeranoe FFmpeg Builds External Libraries and External Libraries Source Code links at the most current so could be useful for making an auto build script for this thread etc...
beew
November 28th, 2011, 01:15 AM
Hi,
Sorry if this is the wrong thread but I think it has something to do with ffmpeg, which I compiled using this great guide I was trying to build bino on Ubuntu 11.10 and got stuck, the "make" command produced this
mb@oot:~$ cd bino
mb@oot:~/bino$ make
make all-recursive
make[1]: Entering directory `/home/mb/bino'
Making all in po
make[2]: Entering directory `/home/mb/bino/po'
make[2]: Leaving directory `/home/mb/bino/po'
Making all in src
make[2]: Entering directory `/home/mb/bino/src'
make all-recursive
make[3]: Entering directory `/home/mb/bino/src'
Making all in base
make[4]: Entering directory `/home/mb/bino/src/base'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/mb/bino/src/base'
make[4]: Entering directory `/home/mb/bino/src'
CXXLD bino
/usr/local/lib/libavdevice.a(lavfi.o): In function `lavfi_read_packet':
/home/mb/ffmpeg/libavdevice/lavfi.c:275: undefined reference to `av_buffersink_get_buffer_ref'
/home/mb/ffmpeg/libavdevice/lavfi.c:289: undefined reference to `av_buffersink_get_buffer_ref'
/home/mb/ffmpeg/libavdevice/lavfi.c:315: undefined reference to `avfilter_unref_buffer'
/usr/local/lib/libavdevice.a(lavfi.o): In function `lavfi_read_close':
/home/mb/ffmpeg/libavdevice/lavfi.c:73: undefined reference to `avfilter_graph_free'
/usr/local/lib/libavdevice.a(lavfi.o): In function `lavfi_read_header':
/home/mb/ffmpeg/libavdevice/lavfi.c:90: undefined reference to `avfilter_register_all'
/home/mb/ffmpeg/libavdevice/lavfi.c:92: undefined reference to `avfilter_get_by_name'
/home/mb/ffmpeg/libavdevice/lavfi.c:93: undefined reference to `avfilter_get_by_name'
/home/mb/ffmpeg/libavdevice/lavfi.c:99: undefined reference to `avfilter_graph_alloc'
/home/mb/ffmpeg/libavdevice/lavfi.c:102: undefined reference to `avfilter_graph_parse'
/home/mb/ffmpeg/libavdevice/lavfi.c:186: undefined reference to `av_buffersink_params_alloc'
/home/mb/ffmpeg/libavdevice/lavfi.c:190: undefined reference to `avfilter_graph_create_filter'
/home/mb/ffmpeg/libavdevice/lavfi.c:207: undefined reference to `av_abuffersink_params_alloc'
/home/mb/ffmpeg/libavdevice/lavfi.c:210: undefined reference to `avfilter_all_channel_layouts'
/home/mb/ffmpeg/libavdevice/lavfi.c:212: undefined reference to `avfilter_graph_create_filter'
/home/mb/ffmpeg/libavdevice/lavfi.c:221: undefined reference to `avfilter_link'
/home/mb/ffmpeg/libavdevice/lavfi.c:226: undefined reference to `avfilter_graph_config'
/home/mb/ffmpeg/libavdevice/lavfi.c:254: undefined reference to `avfilter_inout_free'
/home/mb/ffmpeg/libavdevice/lavfi.c:255: undefined reference to `avfilter_inout_free'
collect2: ld returned 1 exit status
make[4]: *** [bino] Error 1
make[4]: Leaving directory `/home/mb/bino/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/mb/bino/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mb/bino/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mb/bino'
make: *** [all] Error 2
On the other hand installing bino from ppa which dynamically links to ffmpeg works without problem.
Thanks in advance for any help.
FakeOutdoorsman
November 28th, 2011, 02:04 AM
I'm guessing that Bino probably needs to be updated to use FFmpeg Git. Either use an older FFmpeg (I'd try FFmpeg 0.8.7), or submit a bug report (http://savannah.nongnu.org/bugs/?func=additem&group=bino) to the Bino bug tracker.
Erik1984
November 30th, 2011, 11:15 AM
Great guide! Followed the instructions on Lucid and it worked. However when building ffmpeg the compiler drops lots of warnings like:
ffserver.c:4236: warning: ‘avcodec_get_context_defaults2’ is deprecated (declared at ./libavcodec/avcodec.h:3818)
Yeah I know it are warnings not errors and ffmpeg just seems to work but is it normal to get so many warnings?
PDA1
November 30th, 2011, 02:35 PM
I did several attempted installs on one of my computers and met with failure in all of them UNTIL I treated each step of the EXCELLENT GUIDE at http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289 as individual steps.
Here's what I mean;
The following is Step 7 for the Lucid installation
cd git clone --depth 1 git://source.ffmpeg.org/ffmpeg cd ffmpeg ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \ --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \ --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab make sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \ --deldoc=yes --default hash x264 ffmpeg ffplay ffprobe
No matter how hard I tried FFMPEG would not be successfully installed using the above code entered in one Paste into Terminal.
So, this is how I entered the above code into Terminal;
cd
Then....
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
Then....
cd ffmpeg
Then....
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \ --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \ --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
Then....
make
Then....
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \ --deldoc=yes --defaultFinally....
hash x264 ffmpeg ffplay ffprobe
Like I said....no matter how many times I tried to install FFMPEG using the blocks of code in each of the Guide's steps the installation would never succeed. The reason could be because my computer is old or something similar.
FakeOutdoorsman
November 30th, 2011, 07:12 PM
...is it normal to get so many warnings?
It is normal. If they are particularly annoying then upstream will gladly accept any patches to correctly silence them.
qyot27
December 1st, 2011, 06:22 AM
I did several attempted installs on one of my computers and met with failure in all of them UNTIL I treated each step of the EXCELLENT GUIDE at http://ubuntuforums.org/showpost.php?p=9868359&postcount=1289 as individual steps.
[snip]
Like I said....no matter how many times I tried to install FFMPEG using the blocks of code in each of the Guide's steps the installation would never succeed. The reason could be because my computer is old or something similar.
That's because the guide isn't meant to copy/paste the entire code block at once. The only multiple-lined instructions that can be copy-pasted are the ones with \ in them, because \ allows a new line to be used without interrupting a singular command.
But it is possible to do it all at once. You just need to join the commands with &&, like this (I also used \ to increase readability; if you don't want to use the \, just make sure there aren't any new lines separating the && and the next command):
git clone --depth 1 git://source.ffmpeg.org/ffmpeg && \
cd ffmpeg && \
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \
--enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab && \
make && \
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
--deldoc=yes --default && \
hash x264 ffmpeg ffplay ffprobe
The quick version:
make && make install
Is the same as running make, and then running make install after make is finished.
FakeOutdoorsman
December 1st, 2011, 07:10 PM
The FFmpeg Filtering Guide (https://ffmpeg.org/trac/ffmpeg/wiki/FilteringGuide) was created yesterday on the FFmpeg Bug Tracker and Wiki (https://ffmpeg.org/trac/ffmpeg/). The page is somewhat disorganized, but I think it will be a good place to save various filtering examples and tips. If you would like to add something just register (https://ffmpeg.org/trac/ffmpeg/register) and then simply edit the page. This page was created for users to edit, so don't hesitate to contribute (and additions can be reverted if you are afraid of breaking things).
popper
December 2nd, 2011, 01:22 PM
PDA1.
why are you asking the same questions yesterday about getting a working ffmpeg line in
http://ffmpeg.org/pipermail/ffmpeg-user/2011-December/003431.html
i thought you said the iPod 640x480 line i worked out for your device was working perfectly fine.... days ago?:confused:
and why are you still using the old -vpre syntax there when i gave you the current
newer internal -preset -vprofile etc syntax to use
rulet
December 7th, 2011, 08:15 AM
Hello, I have this error with missing preset:
r@ngf:~/Рабочий стол/1$ ffmpeg -i 1.mp4 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 2.mp4
ffmpeg version git-2011-12-04-f88d5df, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 4 2011 11:21:47 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
libavutil 51. 30. 0 / 51. 30. 0
libavcodec 53. 40. 0 / 53. 40. 0
libavformat 53. 24. 0 / 53. 24. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 50. 0 / 2. 50. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.24.0
Duration: 06:35:03.80, start: 0.000000, bitrate: 198 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x596, 66 kb/s, 15 fps, 15 tbr, 15 tbn, 30 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 127 kb/s
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name :
File for preset 'slow' not found
popper
December 7th, 2011, 09:58 AM
Hello, I have this error with missing preset:
built on Dec 4 2011 11:21:47 with gcc 4.6.1
File for preset 'slow' not found
" -vpre slow" is the old syntax.... its replaced with the internal " -preset slow" now , you might also want to add a "-vprofile high" to the line if you care about better visual quality too, or even add some filters.
-vf gradfun,hqdn3d,unsharp=5:5:0.5,setdar=16:9
works nicely on just about all DAR (display aspect ratio) 16:9 ration videos, replace setdar=16:9 with =4:3 were required or remove the ,setdar= filter if you have other ratio input files to re-code, hqdn3d and especially unsharp=5:5:0.5 having the most notable visually improved quality effect IMO, try them and compare.
rulet
December 7th, 2011, 10:21 AM
Thanks for the answer, -preset slow works. I just need recoding for compession for now, in other words, the most smallest file with the best quality. Maybe you have any ideas how to compress it better then in that command which I've wrote.
popper
December 7th, 2011, 10:59 AM
Thanks for the answer, -preset slow works. I just need recoding for compession for now, in other words, the most smallest file with the best quality. Maybe you have any ideas how to compress it better then in that command which I've wrote.
some people don't seem to like my answer to that one :) as they prefer unrestricted bit-rate within the confines of the CRF setting and wasting drive space needlessly , BUT if you want to give it a try i do this all the time and its fine for everyday use (not for archiving or a first backup OC) remove the minrate., maxrate etc for these one off keeps;)
ffmpeg.exe -threads 4 -i "inputfile.whatever" -f mp4 -vcodec libx264 -crf 18 -minrate 800k -maxrate 900k -bufsize 900k -refs 3 -preset fast -vprofile high -flags2 -bpyramid -wpredp 0 -strict experimental -acodec aac -ac 2 -ab 128k -vf gradfun,hqdn3d,unsharp=5:5:0.5 "outfile.MP4"
ffmpeg.exe -threads 4 -i "inputfile.whatever" -f mp4 -vcodec libx264 -crf 18 -minrate 800k -maxrate 1500k -bufsize 1500k -refs 3 -preset fast -vprofile high -flags2 -bpyramid -wpredp 0 -strict experimental -acodec aac -ac 2 -ab 128k -vf gradfun,hqdn3d,unsharp=5:5:0.5 "outfile.MP4"
ffmpeg.exe -threads 4 -i "inputfile.whatever" -f mp4 -vcodec libx264 -crf 16 -minrate 800k -maxrate 2000k -bufsize 2000k -refs 3 -preset fast -vprofile high -flags2 -bpyramid -wpredp 0 -strict experimental -acodec aac -ac 2 -ab 128k -vf gradfun,hqdn3d,unsharp=5:5:0.5 "outfile.MP4"
as you can see only the maxrate and bufsize change and match each other for simplicity of a seconds worth of buffering.
and you get a larger file with each change, i find 900k , 1100k and 1300k to be fine for most web streaming and every day use ,and thats also why the combined
" -flags2 -bpyramid -wpredp 0" are there for the older VLC browser plugin to be able to play the -vprofile high produced output files....
and notice how i use CRF 18 or even lower... as the min/max resticts that anyway so trying to keep as good a visual quality as it can.
also notice how i don't even try and re-scale the input on purpose, as i don't like the jaggys that always produces, just lowering the max bit-rate is perfectly fine in my book to whatever limit you prefer for a given input file.
for things like David Attenborough Frozen Planet 1080P TS you might want to use the -maxrate1600k to 2500k range OC if you care to reduce that down for good every day visual playback on less powerful old single core laptops etc, works for me :)
rulet
December 7th, 2011, 11:26 AM
Well, I tried your first command
ffmpeg -threads 4 -i "inputfile.whatever" -f mp4 -vcodec libx264 -crf 18 -minrate 800k -maxrate 900k -bufsize 900k -refs 3 -preset fast -vprofile high -flags2 -bpyramid -wpredp 0 -strict experimental -acodec aac -ac 2 -ab 128k -vf gradfun,hqdn3d,unsharp=5:5:0.5 "outfile.MP4"
but that's even makes larger file then with that command that I used before. Seems like the video-file is already compessed as it possible with normal quality.
qyot27
December 7th, 2011, 11:43 AM
Faster presets = lower quality at same filesize or larger filesize for same quality, considering the use of CRF. Use a slower preset if you want to maintain the quality with a smaller filesize.
There's also the option of using 10-bit H.264 (requires a 10-bit build of x264), and/or using Wine in order to have access to AviSynth and thereby get better filtering possibilities.
popper
December 7th, 2011, 11:55 AM
Faster presets = lower quality at same filesize or larger filesize for same quality, considering the use of CRF. Use a slower preset if you want to maintain the quality with a smaller filesize.
There's also the option of using 10-bit H.264 (requires a 10-bit build of x264), and/or using Wine in order to have access to AviSynth and thereby get better filtering possibilities.
ohh yeah forgot that and was looking at an older script of mine, so -preset slow or -preset slower will be better but take more time to finish so try those too OC
actually talking about AviSynth , do you/anyone have or can make a working self contained rar of the needed files and how-to text using Wine ,as using that with QTGMC de-interlace script will produce far greater quality But far slower even on a i5 sandy bridge , than the internal ffmpeg jaggy "yadif" de-interlace filter, assuming OC that the QTGMC etc even work's on Linux/Wine.
and some better de-ringing advice for working avisynth scripts rather than using the internal ffmpeg/avconv gradfun filter as its not very good but all we have really
popper
December 7th, 2011, 01:11 PM
Well, I tried your first command
but that's even makes larger file then with that command that I used before. Seems like the video-file is already compessed as it possible with normal quality.
that doesn't really surprise me given the smaller oddball re-scaled
Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x596, 66 kb/s, 15 fps, 15 tbr, 15 tbn, 30 tbc
i don't really like re-scaled anything as it usually looks crap when played back on generic full screen monitors etc , unless it's to make it actually play on a given device that cant take generic dvd/BR sizes of 16:9/4:3 ratio files such as the mac device a few pages back. but hows the -preset slower looking, still larger or the same size now as your original line, what about the quality at full screen size, the same, better,worse ?
qyot27
December 7th, 2011, 02:13 PM
actually talking about AviSynth , do you/anyone have or can make a working self contained rar of the needed files and how-to text using Wine ,as using that with QTGMC de-interlace script will produce far greater quality But far slower even on a i5 sandy bridge , than the internal ffmpeg jaggy "yadif" de-interlace filter, assuming OC that the QTGMC etc even work's.
I rarely ever purely deinterlace things and my computer is far too slow (P3 Coppermine-based Celeron) to even attempt to use QTGMC - I still rely on TDeint or TomsMoComp. Heck, it takes 45-50 minutes for me to just build FFmpeg on here (the entire basic FFmpeg->FFMS2->x264 8/9/10bit->full FFmpeg process takes something on the order of 3 hours).
What I would recommend is - if one has access to Windows - to get all their needed AviSynth plugins worked out there, and then just copy them over to the same folder under Wine. If something doesn't work, then refer to the AviSynth MediaWiki to find alternatives that do. Of course, if one's first experiences with AviSynth are under Linux it would be virtually the same - just that you have to keep in mind Wine's organization hierarchy. It helps to add a bookmark to drive_c in Nautilus' or PCManFM's sidebar (Konqueror and Dolphin probably have a similar feature but I've not used KDE in a couple years) so you can just jump right there if needed.
The single biggest thing (to my knowledge) that AviSynth-under-Wine lacks is the use of DirectShowSource, since Wine can't use DirectShow. AVISource will work so long as ffdshow's VFW interface is installed and configured*, and MPEG2Source (an SSE-optimized version of DGDecode.dll is available on the main HCenc release page), FFmpegSource 1.x, and FFMS2 will all work since they're self-contained.
*I would suggest doing this on Windows and telling ffdshow to export the settings to a .reg file. The .reg can then be imported into Wine's regedit. This is because ffdshow's decoders can't be configured under Wine, or at least they couldn't last time I checked.
and some better de-ringing advice for working avisynth scripts rather than using the internal ffmpeg/avconv gradfun filter as its not very good but all we have really
For debanding, I used to use gradfun2db, but have since moved to flash3kyuu_deband (especially since it can output in higher bit depths, and if x264 has been patched to accept high bit depths coming from AviSynth, then it's a pretty straightforward process to maintain a high bit depth workflow - note that that only works with Windows builds of x264 since Linux builds can't take AVS input at all).
rulet
December 7th, 2011, 02:19 PM
what about the quality at full screen size, the same, better,worse ?
Well, looking at the video, the quality seems like the same.
qyot27, I don't care which operating system to use, I use both -- linux and windows. So there is no problem for me to use avisynth on windows. Have you used avisynth? I've read a little about avisynth but never used it before. If I understand right, to use avisynth for recoding in another file format or compression in the same file format I just need a script for avisynth and a player which plays that videofile?
qyot27
December 7th, 2011, 02:46 PM
I've been using AviSynth since 2004.
First, you'd install AviSynth, and put any external plugins you wish to use in its 'plugins' folder (AviSynth has internal functions for many types of filtering operations as well). You write a script, it treats the script as it would treat any other type of video file. Any filtering done in the script appears in the output as though it was always there. The media player software isn't necessary, but it helps for the task of previewing the changes in the script (VirtualDub works for that purpose too).
For instance, you might have the following script (let's say, test.avs):
AVISource("test.avi") #for example's sake, let's say test.avi's resolution is 1920x1080
BilinearResize(848,480)
FlipVertical()
The first line loads test.avi, the second line resizes it to 848x480, the third line flips the video upside-down. As far as any program you give that script to is concerned, the video has always been 848x480 and upside down.
rulet
December 7th, 2011, 02:59 PM
I see, thanks. Looks like many options possible to use in script, anyway I need to read documentation and examples.
Does avisynth support any file format(mp4, mkv, flv e.t.) and codecs? By the way, do I need to install codec-packs to use it for any file format?
popper
December 7th, 2011, 03:06 PM
I've been using AviSynth since 2004.
...
For instance, you might have the following script (let's say, test.avs):
AVISource("test.avi") #for example's sake, let's say test.avi's resolution is 1920x1080
BilinearResize(848,480)
FlipVertical()
The first line loads test.avi, the second line resizes it to 848x480, the third line flips the video upside-down. As far as any program you give that script to is concerned, the video has always been 848x480 and upside down.
Eek :( , you gave him a re-scaling example ,just encouraging them to do it even more :( LOL
qyot27
December 7th, 2011, 03:42 PM
Does avisynth support any file format(mp4, mkv, flv e.t.) and codecs? By the way, do I need to install codec-packs to use it for any file format?
The file format support is determined by what source filter you use and how that source filter works. For instance, AVISource opens AVI files, but it does so using the Video for Windows framework. So if you can open and play the .avi file in a program that uses VfW to do its loading (for instance, VirtualDub) then AVISource will work fine. But if it can't be loaded with VfW, then AVISource can't load it either.
DirectShowSource works the same way - if the video doesn't work in Windows Media Player (or WMP6.4, or Media Player Classic, if MPC isn't using internal decoding), it won't work in DirectShowSource. A combination of ffdshow and Haali's Media Splitter can cover this for almost anything you'd run across. If you have to go with a codec pack, the only one I would ever recommend is the Combined Community Codec Pack. But like I said, DirectShowSource won't work on Linux by virtue of Wine not supporting DirectShow, so this only applies to Windows. DirectShowSource is technically an external plugin, but it comes with AviSynth by default.
MPEG2Source opens MPEG-2 (and MPEG-1) files. Or well, it actually opens .d2v files that you create with DGIndex - the .d2v is an index that DGIndex creates for MPEG-1 or -2 files. This would more than likely be what you'd use for stuff sourced from DVD, or some types of captures from cable or capture cards or camcorders. It's self-contained, so all you need to do is have DGDecode.dll in AviSynth's plugins folder.
FFmpegSource and FFmpegSource2 open the file using the FFmpeg libraries (libavcodec and libavformat, etc.). Like mplayer or VLC, they're self-contained, so you don't need anything else but ffmpegsource.dll and/or FFMS2.dll in AviSynth's plugins folder. These source filters can open anything that FFmpeg can, so this would be what you'd use for MKV, FLV, MOV, MP4, or so on.
AVISource is an internal function. MPEG2Source and the FFmpegSource functions are external plugins, and you need to download and unzip them and place them in AviSynth's plugins folder first.
Eek , you gave him a re-scaling example ,just encouraging them to do it even more LOL
It would have happened sooner or later. :P
rulet
December 7th, 2011, 04:00 PM
FFmpegSource and FFmpegSource2 open the file using the FFmpeg libraries (libavcodec and libavformat, etc.). Like mplayer or VLC, they're self-contained, so you don't need anything else but ffmpegsource.dll and/or FFMS2.dll in AviSynth's plugins folder. These source filters can open anything that FFmpeg can, so this would be what you'd use for MKV, FLV, MOV, MP4, or so on.
Ok, that is more clear now. Saying more specific, if I will use ffmpegsource.dll and/or FFMS2.dll for decoding or compession, I don't need to install any additional system codecs for MKV, FLV, MOV, MP4, WMV f.e.?
FakeOutdoorsman
December 7th, 2011, 07:49 PM
I just need recoding for compession for now, in other words, the most smallest file with the best quality. Maybe you have any ideas how to compress it better then in that command which I've wrote.
I can't give you an exact command because I know nothing of your input and "best quality" is subjective. A typical procedure to find a good balance between quality, file size, and encoding time for just about any input:
Use the highest crf value that still gives you an acceptable quality. A good starting number is 24.
Use the slowest preset you have patience for (see x264 --help for a list of presets).
Use these settings for the rest of your video set you are encoding.
Ignore the placebo preset. It's a waste of time and probably gives about a ~1% improvement over veryslow at a huge time cost. You don't have to encode the whole input when testing your crf/preset combinations. Just choose random sections with the -ss and -t options.
" -flags2 -bpyramid -wpredp 0" are there for the older [B]VLC browser plugin to be able to play
The option "-flags2 -bpyramid" is probably being ignored. See the FFmpeg output that includes the x264 settings being applied during encoding.
internal ffmpeg jaggy "yadif" de-interlace filter
What do you mean by "jaggy"? Is the jagginess visible on a single frame, or is it more of a temporal jerkiness?
qyot27
December 7th, 2011, 11:10 PM
Ok, that is more clear now. Saying more specific, if I will use ffmpegsource.dll and/or FFMS2.dll for decoding or compession, I don't need to install any additional system codecs for MKV, FLV, MOV, MP4, WMV f.e.?
Correct (except that AviSynth doesn't do compression - you'd still need to give the script to x264 or FFmpeg to do that). Both versions of FFmpegSource use an index to ensure frame accuracy, but have differences in other areas (ffmpegsource.dll, which is version 1.21, is a couple of years outdated, although it still decodes various items just fine; FFMS2 is in active development).
For FFMS2, the process would look something like this:
ffmsindex -t -1 filename.flv
This would create the index. The plugin itself will create an index if one isn't already present, but since it takes the time to do that the first time you load the script, it can give the impression of hanging. It's generally easier to take care of any indexing beforehand, so there's no extra time spent. And, ffmsindex gives you a nice progress meter.
The script would look like this (the FFmpegSource2 function is provided by the FFMS2.avsi file, which fuses the FFVideoSource and FFAudioSource functions that FFMS2 provides into a single function that's more familiar to old 1.x users):
FFmpegSource2("filename.flv",atrack=-1)
or, if you don't want audio,
FFVideoSource("filename.flv")
FFMS2 also has the advantage of being able to convert variable frame rate video to constant frame rate, using the fpsnum and fpsden parameters, like this:
FFmpegSource2("filename.flv",atrack=-1,fpsnum=30000,fpsden=1001)
which will ensure the framerate is at 29.97fps. This can be important in order to maintain audio sync for some formats that can be of questionable framerate (WMV, most notoriously, but MKV, MP4, etc. can show it at times too, depending on one's files).
rulet
December 8th, 2011, 01:26 AM
.
rulet
December 8th, 2011, 01:27 AM
Correct (except that AviSynth doesn't do compression - you'd still need to give the script to x264 or FFmpeg to do that).
So with avisynth it's not possible to do compression at all, or possible with some filters? If it's possible, can you give an example(for that mp4 file f.e.)?
By the way, that functions that can do avisynth, isn't that that can do kdenlive also? Or avisynth can do it faster?
qyot27
December 8th, 2011, 05:50 PM
AviSynth doesn't compress anything. Basically, the script is a list of changes intended for the file you are opening, and then any program you give the script to sees all of those changes having already been made. I've heard of 'output' plugins that will write to new video or audio files, but I've never messed with them myself. I really just don't see the point.
The functions AviSynth has access to may not be faster, but there's a whole lot more of them to choose from, and some of those choices are better quality/more accurate.
A script named input.avs:
FFVideoSource("filename.mp4")
The compression step (on Windows):
x264.exe --preset veryslow --crf 18 -o output-test.mkv input.avs
The compression step (on Linux):
wine avs2yuv input.avs - | x264 --stdin y4m --preset veryslow --crf 18 -o output-test.mkv -
Iloru
December 8th, 2011, 09:35 PM
Lots of great information and all in one place. I will definitely be bookmarking this. :)
FakeOutdoorsman
December 9th, 2011, 03:30 AM
Generate a life pattern based on a generalization of John Conway's life game:
ffplay -f lavfi life
rulet
December 9th, 2011, 05:04 PM
A script named input.avs:
FFVideoSorce("filename.mp4")
The compression step (on Windows):
x264.exe --preset veryslow --crf 18 -o output-test.mkv input.avs
Ok, I've installed avisynth, then dowloaded x264.exe 32bit 10bit-depth(what is general difference with 32bit 8bit-depth?) from here (http://x264.nl/), puted x264.exe in C:\Program Files\AviSynth 2.5\plugins, and also downloaded FFmpegSource 2.16 from here (http://code.google.com/p/ffmpegsource/downloads/detail?name=ffms-2.16.7z&can=2&q=), and puted files FFMS2.avsi ffms2.dll ffmsindex.exe in C:\Program Files\AviSynth 2.5\plugins. Then copied in C:\Program Files\AviSynth 2.5\plugins test videofile 1.mp4. I created input.avs file(and puted it in the same folder) with this content:
FFVideoSource("1.mp4")
I cutted mp4 file(just extracted small peace for recode testing)
Then I entered in C:\Program Files\AviSynth 2.5\plugins folder and run a command:
x264.exe --preset slow --crf 18 -o output-test.mp4 input.avs
That gave an output mp4 file smaller in about two times, but with no sound(guess I should extract the audio before and compress it separately because avisynth doesn't support it?). But the video is very bad(small colored squares), so I think I have to use another preset. Maybe I have to use FFmpegSource 2.16 AVS cplugin instead of FFmpegSource 2.16?
... wait a minute, mplayer under linux(without gui) is able to play normally that output file(but again with no audio) which played with squares on windows, but totem and vlc uder linux doesn't play it.
Here is mediainfo information about this output file:
General
Complete name : output-test.mp4
Format : MPEG-4
Format profile : JVT
Codec ID : avc1
File size : 26.2 MiB
Duration : 30mn 0s
Overall bit rate : 122 Kbps
Encoded date : UTC 2011-12-09 15:40:38
Tagged date : UTC 2011-12-09 15:40:38
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 10@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 30mn 0s
Bit rate : 121 Kbps
Maximum bit rate : 1 833 Kbps
Width : 800 pixels
Height : 598 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 15.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.017
Stream size : 26.0 MiB (99%)
Writing library : x264 core 120 r2120 0c7dab9
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=15 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2011-12-09 15:40:38
Tagged date
I wonder what is the best way to do the compession with ffmpeg? Mediainfo of input 1.mp4 test file is:
General
Complete name : 1.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 42.5 MiB
Duration : 30mn 0s
Overall bit rate : 198 Kbps
Encoded date : UTC 2011-12-08 15:25:12
Tagged date : UTC 2011-12-08 15:25:12
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 30mn 0s
Bit rate : 143 Kbps
Width : 800 pixels
Height : 598 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 15.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.020
Stream size : 30.6 MiB (72%)
Language : English
Encoded date : UTC 2011-12-07 08:18:34
Tagged date : UTC 2011-12-08 15:25:14
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 30mn 0s
Bit rate mode : Constant
Bit rate : 53.6 Kbps
Nominal bit rate : 48.0 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 11.5 MiB (27%)
Language : English
Encoded date : UTC 2011-12-07 08:18:34
Tagged date : UTC 2011-12-08 15:25:14
perspectoff
December 9th, 2011, 05:21 PM
First of all, mencoder is better than ffmpeg.
Secondly, I did all the instructions in this thread only to find that everything I wanted to do (including a reasonably current version of x264) was already included in the repository packaging of FFMPEG from Lucid onwards.
I wasted a lot of time reading this thread; it is only for cutting edge changes and for the average user is no longer necessary at all.
FakeOutdoorsman
December 9th, 2011, 07:33 PM
First of all, mencoder is better than ffmpeg.
Please elaborate how MEncoder, which is barely maintained, is better than FFmpeg. In what ways is it better?
Secondly, I did all the instructions in this thread only to find that everything I wanted to do (including a reasonably current version of x264) was already included in the repository packaging of FFMPEG from Lucid onwards.
The Ubuntu maintainer for FFmpeg and x264 is doing a better job at keeping the repository packages relatively recent (although Ubuntu doesn't actually provide FFmpeg packages anymore). This was not always the case and was a major reason for the creation of this guide. Of course the repository packages are inflexible and can not provide the features and additions that a user may acquire from compiling. However, this guide can not predict what all users will want and it's the user's responsibility to first see if the packages from the repository will meet their needs.
I wasted a lot of time reading this thread;
I hope you didn't read the whole thread. It's long.
...it is only for cutting edge changes and for the average user is no longer necessary at all.
Of course I will disagree with this, and you may be underestimating the average Linux user.
qyot27
December 10th, 2011, 08:30 PM
Ok, I've installed avisynth, then dowloaded x264.exe 32bit 10bit-depth(what is general difference with 32bit 8bit-depth?) from here (http://x264.nl/), puted x264.exe in C:\Program Files\AviSynth 2.5\plugins, and also downloaded FFmpegSource 2.16 from here (http://code.google.com/p/ffmpegsource/downloads/detail?name=ffms-2.16.7z&can=2&q=), and puted files FFMS2.avsi ffms2.dll ffmsindex.exe in C:\Program Files\AviSynth 2.5\plugins. Then copied in C:\Program Files\AviSynth 2.5\plugins test videofile 1.mp4. I created input.avs file(and puted it in the same folder) with this content
x264.exe can be put in C:\WINDOWS (ffmsindex.exe could be put there as well, unless you want to go and modify the Path environment variable). Having x264 in C:\WINDOWS will allow you to use it from any place in the file system, and the video and script files need not be in the same folder as the program. Nor do the video file and script have to be in AviSynth's plugins folder. Just the plugins need to be in that folder.
The difference between 8-bit and 10-bit is the internal precision of the codec (more or less) and generally speaking, the higher the bit depth, the less of a problem with banding you'll have and you'll also feasibly get better compression for the same level of quality. 10-bit support is rather new (relatively speaking; encoding it with x264 has been possible since July of 2010, but solid decoding support came a few months later and some users are still using decoders from a couple years ago, which are too old to support it), and some of the problems on playback you describe below may simply be the result of not having properly updated decoding software on Windows.
That gave an output mp4 file smaller in about two times, but with no sound(guess I should extract the audio before and compress it separately because avisynth doesn't support it?). But the video is very bad(small colored squares), so I think I have to use another preset. Maybe I have to use FFmpegSource 2.16 AVS cplugin instead of FFmpegSource 2.16?
There's no super-huge difference between FFMS2's trunk and C plugin branches (that is, if one doesn't consider the compiler to be a huge difference). The biggest difference is the need to use LoadCPlugin() at the beginning of your script* to load the C plugin, as C plugins don't autoload. The C plugin also has a couple of observable quirks under special circumstances, but these aren't exactly common.
*inserting the LoadCPlugin call into FFMS2.avsi before the function starts works too.
The lack of audio is because you didn't tell FFMS2 to load audio (if you want audio with FFMS2, use FFmpegSource2 and the atrack= parameter). Also, unless you get audio-supporting builds of x264, then no, x264 doesn't support audio. If you see that the build supports L-SMASH (which is an alternative MP4 muxer), then it's almost certain to support audio.
... wait a minute, mplayer under linux(without gui) is able to play normally that output file(but again with no audio) which played with squares on windows, but totem and vlc uder linux doesn't play it.
Likely just an issue of the restricted-extras package not being installed? Or like I said before, you might need to make sure the versions of the software are new enough to support 10-bit H.264.
rulet
December 10th, 2011, 08:40 PM
Likely just an issue of the restricted-extras package not being installed? Or like I said before, you might need to make sure the versions of the software are new enough to support 10-bit H.264.
No, everything is installed, and new versions, this issue concerning just this output mp4 file.
qyot27
December 11th, 2011, 12:35 AM
Then, based on the mediainfo output, try to make sure the height and width are multiples of 16 (actually, I think H.264 can use multiples of 4 or 8, but 16 makes that completely safe). 800 is fine (if nonstandard), but 598 is not; it's not even a multiple of 4. I wouldn't be at all surprised if that's responsible for at least some issue.
800x600 would probably be fine.
rulet
December 11th, 2011, 09:48 AM
So, do I have to rescale it with avisynth adding some parameters in input.avs file?
qyot27
December 11th, 2011, 05:51 PM
The original source file, yes. Don't try to do that with the test file, because it's not good to recompress lossy sources over and over again.
There's several types of resizing filters. I used BilinearResize() in the previous examples because it's fast, but there are others that can give a sharper result. The documentation lists these others, but yes, you would use that filter to make sure the script is giving x264 a video stream that's 800x600, not 800x598.
katya_sehgal
December 11th, 2011, 07:59 PM
I followed every step here, but I get 'file not found' (in red font).
My MTS file is in an external hard drive. I gave the command
ffmpeg -i 00001.mts -sameq output.avi
rulet
December 12th, 2011, 01:22 PM
qyot27, I haven't tried scaling with avisynth yet, but I found that avidemux can do resizing of a picture(and it has a gui for it) and do it well. And also avidemux has abilitity to use avisynth scripts(haven't tried yet), I wonder if it works with the latest versions of avisynth scripts(in avidemus gui it says of "avisynth version 0.7a internal", suppouse it's old as I see on avisynth site v.2.5)? And as I understand using avisynth with avidemux needs wine or windows?
... I used ffmpeg command for compessing(as I understand, newest versions of ffmpeg don't use -vpre slow syntax):
ffmpeg -i input1.mp4 -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 22 -threads 0 2.mp4
That gave smoller size video file in 15%.The output 2.mp4 file is playable in vlc and totem also, despite the fact that it has size 800X598, not 800X600. But it's interesting that when I rescaled an output file to 800X600 it gave thumbnail picture of a file in nautilus, while wnen in 800X598 -- it doesn't(but that issue with thumbnails happens also with videos with the picture size of which multiples of 16) .
when I run a command:
ffmpeg -i input1.mp4 -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 2.mp4
that gaves a file smaller in about 40%, and I don't see quality loss(maybe that's because of a low frame rate in 15fps of an input vide), although for this videofile the quality is not so important.
I have a question -- does -vpre slow is an exacly equivalent to -preset slow -tune film?
katya_sehgal
December 12th, 2011, 01:50 PM
I have learned about Handbrake and EKD and will use them since I need to convert mts files urgently.
However, I am keen on learning ffmpeg. I have followed all instructions but get the 'file not found' error. My videos are on an external hard drive.
P.S: Do I start a new thread for this?
rulet
December 12th, 2011, 04:21 PM
katya_sehgal, have you entered(in terminal) into that folder which contains your mts file?
FakeOutdoorsman
December 12th, 2011, 08:38 PM
I have a question -- does -vpre slow is an exacly equivalent to -preset slow -tune film?
No. The previous method of using presets with libx264 was via text files that attempted to use the same options that are set as if using "x264 --preset". Not all x264 options were available to the text files, so the text file based presets were not quite complete (although the "important" options were there). Now the presets are accessed directly via libx264 and the text preset files were removed. So, no, even -vpre slow may be not an exact equivalent to -preset slow.
To simplify, consider a tune to be like a mini preset that applies or overwrites several preset options to better suit the output depending on your input (-tune animation for animation input for example).
rulet
December 12th, 2011, 10:13 PM
Generate a life pattern based on a generalization of John Conway's life game:
ffplay -f lavfi life
Yea, and question, what is that?
FakeOutdoorsman
December 12th, 2011, 10:19 PM
Yea, and question, what is that?
Just a "toy" filter based on Conway's Game of Life (http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life).
popper
December 13th, 2011, 02:31 AM
I have learned about Handbrake and EKD and will use them since I need to convert mts files urgently.
However, I am keen on learning ffmpeg. I have followed all instructions but get the 'file not found' error. My videos are on an external hard drive.
P.S: Do I start a new thread for this?
your not in the external drives directory and didn't use an explicit path to the file to tell ffmpeg where to find it, so cd to the files directory you want to encode first, then in the shell run something like (assuming you have a current ffmpeg/avconv and not an old one that cant take this new syntax, update if you don't ASAP)
ffmpeg -threads 0 -i "00001.mts" -f mp4 -vcodec libx264 -preset slow -vprofile high -crf 18 -acodec copy "outfile.MP4"
or if you want to de-interlace the file add -vf yadif filter like so
ffmpeg -threads 0 -i "00001.mts" -f mp4 -vcodec libx264 -preset slow -vprofile high -crf 18 -acodec copy -vf yadif "outfile.MP4"
stay away from using the antiquated avi container and use mp4 or mkv today is my advice unless you need it for a given device that cant take anything else, but then it probably cant take high profile AVC/H.264 ether then.
qyot27
December 13th, 2011, 04:04 AM
I wonder if it works with the latest versions of avisynth scripts(in avidemus gui it says of "avisynth version 0.7a internal", suppouse it's old as I see on avisynth site v.2.5)?
The '0.7a' is referring to the component that allows Avidemux to use AviSynth, not the version of AviSynth (if 0.7a was even a valid version of AviSynth, that version would be close to/over a decade old).
And as I understand using avisynth with avidemux needs wine or windows?
I would assume so.
rulet
December 13th, 2011, 01:22 PM
How to do batch encoding for all files in one directory?, f.e. by this command:
ffmpeg -i input1.mp4 -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 2.mp4
I found one example here (http://ubuntuforums.org/showthread.php?t=867670&page=2) in post 15, bu I don't know exactly how it will look in my case,
or is there a better command line or script?
popper
December 13th, 2011, 06:45 PM
How to do batch encoding for all files in one directory?, f.e. by this command:
I found one example here (http://ubuntuforums.org/showthread.php?t=867670&page=2) in post 15, bu I don't know exactly how it will look in my case,
or is there a better command line or script?
for a windows bat you can use my http://ubuntuforums.org/showpost.php?p=11493036&postcount=1983
a few pages back.
change the avconv/ffmpeg -threads 4 -i "%%A" ....... "%dstPATH%%%~nA.MP4" part of the bat file to suit for your working line, and the ("%srcPATH%*.mkv") part to ("%srcPATH%*.avs") taking a .avs script or whatever your input as it says on that post
so for your line above it would be
ffmpeg -threads 4 -i "%%A" -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 "%dstPATH%%%~nA.MP4"
and the ("%srcPATH%*.mkv") would be changed to ("%srcPATH%*.mp4") to encode all the .mp4 files found in the dir when you double clicked the bat file also placed in there.
qyot27
December 13th, 2011, 08:23 PM
I do any batch encoding the 'dumb' way, by explicitly declaring each and every command discretely, even if it is the same command over and over again. Helps me keep it straight in my head (and it's not as tedious as it sounds - spreadsheets help, as do conditional formatting performed using gedit and/or userland-level utils). It also makes sure that the files are processed in exactly the order I want them to be, which sometimes is important.
rulet
December 13th, 2011, 10:04 PM
@echo on
set srcPATH=.\
set dstPATH=.\somewhere
FOR %%A in ("%srcPATH%*.mkv") DO (
avconv.exe -threads 4 -i "%%A" -f mp4 -vcodec libx264 -crf 18 -minrate 600k -maxrate 1500k -bufsize 1500k -refs 3 -preset slow -vprofile Baseline -level 3.0 -flags2 -bpyramid -wpredp 0 -strict experimental -acodec aac -ac 2 -ab 128k -vf hqdn3d,unsharp=5:5:0.5,scale=640:480 "%dstPATH%%%~nA.MP4"
)
pause
REM -vf yadif, gradfun, hqdn3d, unsharp=5:5:0.5, setdar=16:9, scale=640:480
Is that the bat-script which you talking about(I changed to "somewhere")?
Actually, I asked about command-line or bash-script on linux, but thanks anyway.
As I understand, there is no difference in result(quality) using ffmpeg algorithms on windows or linux?
And I don't understand, do I have to install ffmpeg system-wide to use that bat-file(on windows), and what is avconv.exe, is it a replacement of ffmpeg?
Is that would be right bash-script for linux for the command that I mentioned above?:
#!/bin/bash
for i in 'ls *.mp4'
do
ffmpeg -i -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 ${i%.mp4}.mp4
done
qyot27
December 14th, 2011, 01:36 AM
As I understand, there is no difference in result(quality) using ffmpeg algorithms on windows or linux?
Correct. The biggest difference would mainly be in whatever impact might be made by the threading system involved. Linux and Windows can use pthreads, but Windows can also use win32threads. And while I know there is sometimes a slight effect on encoding quality by the use of multithreaded encoding, I don't know how or if it differs between threading methods.
And I don't understand, do I have to install ffmpeg system-widely to use that bat-file(on windows)
ffmpeg needs to be on the PATH, which does essentially mean it's 'installed system-wide'. It could be in C:\Program Files\ffmpeg, but as long as that folder has been added to the PATH then the system will see it.
and what is avconv.exe, is it a replacement of ffmpeg?
It's not a replacement, it's written by the libav fork for their own obstinate reasons. You can safely ignore it if all you're interested in is using FFmpeg (especially if this (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=c83ef636a665b2e17f1b6745a 98ec7a5719264df) commit means what I think it does).
rulet
December 14th, 2011, 02:38 AM
Talking about "system-wide" istallation on windows -- is the difference between "shared" and "static" builds which are here (http://ffmpeg.zeranoe.com/builds) that shared build is fo system-wide installation and static is not?
qyot27
December 14th, 2011, 03:26 AM
Talking about "system-wide" istallation on windows -- is the difference between "shared" and "static" builds which are here (http://ffmpeg.zeranoe.com/builds) that shared build is fo system-wide installation and static is not?
See the explanation here:
http://ubuntuforums.org/showpost.php?p=11452692&postcount=1934
Both static and shared can be system-wide. The difference is where the 'mass' is.
katya_sehgal
December 14th, 2011, 06:39 PM
katya_sehgal, have you entered(in terminal) into that folder which contains your mts file?
your not in the external drives directory and didn't use an explicit path to the file to tell ffmpeg where to find it, so cd to the files directory you want to encode first, then in the shell run something like (assuming you have a current ffmpeg/avconv and not an old one that cant take this new syntax, update if you don't ASAP)
ffmpeg -threads 0 -i "00001.mts" -f mp4 -vcodec libx264 -preset slow -vprofile high -crf 18 -acodec copy "outfile.MP4"
or if you want to de-interlace the file add -vf yadif filter like so
ffmpeg -threads 0 -i "00001.mts" -f mp4 -vcodec libx264 -preset slow -vprofile high -crf 18 -acodec copy -vf yadif "outfile.MP4"
stay away from using the antiquated avi container and use mp4 or mkv today is my advice unless you need it for a given device that cant take anything else, but then it probably cant take high profile AVC/H.264 ether then.
I have managed to enter the drive correctly and enter the command. I get this now.
http://tinypic.com/view.php?pic=30w2uq0&s=5
I am willing to learn. But currently, I need to convert files immediately. WinFF hangs and Arista is non-responsive. I could not get past EKD.
Is there any way I can use a GUI and edit?
@popper: tried your command too.
FakeOutdoorsman
December 14th, 2011, 07:31 PM
I have managed to enter the drive correctly and enter the command. I get this now.
http://tinypic.com/view.php?pic=30w2uq0&s=5
Your input has 6 audio channels. You chose AVI as your output container, and FFmpeg will automatically choose MP3 audio by default for AVI if you do not manually select your desired audio format. The MP3 encoder, libmp3lame, apparently does not support 6 channels, so it complains:
[libmp3lame] Invalid number of channels 6, must be <= 2.
I see you have some MTS files from a Panasonic video camera (an AG-HMC150 maybe?). What are you trying to do with these? If you explain what you are trying to do we can maybe give you a better example command suited for your task.
AVI is generally not a recommended output container format for most cases due to its age and lack of support for some modern video and audio formats. The sameq option is also not recommended and is probably the most misused option. Previously, the FFmpeg documentation implied that this option, "makes the output the same quality as the input", but this is not the case and is format specific. The documentation has been updated; although it's still not descriptive, but I can only blame myself for that one. An unfortunate side effect is that recommendations to use this option have been widely circulated on various forums, blogs, etc.
katya_sehgal
December 14th, 2011, 08:02 PM
Your input has 6 audio channels. You chose AVI as your output container, and FFmpeg will automatically choose MP3 audio by default for AVI if you do not manually select your desired audio format. The MP3 encoder, libmp3lame, apparently does not support 6 channels, so it complains:
[libmp3lame] Invalid number of channels 6, must be <= 2.
I see you have some MTS files from a Panasonic video camera (an AG-HMC150 maybe?). What are you trying to do with these? If you explain what you are trying to do we can maybe give you a better example command suited for your task.
AVI is generally not a recommended output container format for most cases due to its age and lack of support for some modern video and audio formats. The sameq option is also not recommended and is probably the most misused option. Previously, the FFmpeg documentation implied that this option, "makes the output the same quality as the input", but this is not the case and is format specific. The documentation has been updated; although it's still not descriptive, but I can only blame myself for that one. An unfortunate side effect is that recommendations to use this option have been widely circulated on various forums, blogs, etc.
Yes, I got the recommendation from a forum. Also, I installed WinFF from terminal and got a different software from the one I got from Software Centre!
Followed instructions from here:
http://www.omgubuntu.co.uk/2010/09/winff-provides-an-interface-to-command-line-ffmpeg-conversion/
Now when I convert I get this:
http://tinypic.com/view.php?pic=15o88lj&s=5
What I am doing.
I want to convert MTS to smaller formats with as little loss as possible. So that the video play smoothly in OpenShot. From OpenShot, I will cut the video.
I am okay with anything other than avi if OpenShot is okay with it. Read good things about MKV.
You are right about the camera, Panasonic: TM200
FakeOutdoorsman
December 14th, 2011, 08:16 PM
...I installed WinFF from terminal and got a different software from the one I got from Software Centre!
Are you using FFmpeg directly, or via WinFF? If you prefer to use WinFF, then you should probably use ffmpeg from the repository because, last I checked, the WinFF presets are not updated to work with recent FFmpeg.
Now when I convert I get this:
http://tinypic.com/view.php?pic=15o88lj&s=5
You are attempting to encode with the libxvid encoder, but this guide does not install that encoder because the "mpeg4" encoder in FFmpeg usually does the job. I don't know your command, so I can't give you an exact replacement.
I want to convert MTS to smaller formats with as little loss as possible. So that the video play smoothly in OpenShot. From OpenShot, I will cut the video.
I have no experience with OpenShot. Does it not like the MTS files? FFmpeg can perform simple cuts. If all you are doing is cutting you could use FFmpeg, otherwise an editor, such as OpenShot I guess, would be more appropriate. I'm not sure what formats OpenShot will accept. Maybe I'll try it myself.
katya_sehgal
December 14th, 2011, 08:21 PM
Are you using FFmpeg directly, or via WinFF? If you prefer to use WinFF, then you should probably use ffmpeg from the repository because, last I checked, the WinFF presets are not updated to work with recent FFmpeg.
You are attempting to encode with the libxvid encoder, but this guide does not install that encoder because the "mpeg4" encoder in FFmpeg usually does the job. I don't know your command, so I can't give you an exact replacement.
I have no experience with OpenShot. Does it not like the MTS files? FFmpeg can perform simple cuts. If all you are doing is cutting you could use FFmpeg, otherwise an editor, such as OpenShot I guess, would be more appropriate. I'm not sure what formats OpenShot will accept. Maybe I'll try it myself.
I am using FFMPEG via WinFF.
I installed FFMPEG by following the guide on page one of this forum.
I then installed WINFF through the terminal.
I would prefer using OpenShot to edit. It works with MTS, but MTS lags. It is not smooth during preview (same in Windows).
Do you suggest I delete ffmpeg (that I got from this forum guide) and use only WinFF?
Edit: I am using ffmpeg via WinFF, in the case I was not clear. The posts prior to the last 2, i was using only ffmpeg and not WinFF.
FakeOutdoorsman
December 14th, 2011, 08:42 PM
Do you suggest I delete ffmpeg (that I got from this forum guide) and use only WinFF?
Yes, but only if for some reason you must use WinFF and its presets.
OpenShot is laggy with the MTS files for me too, unsurprisingly, but you can re-encode the MTS files to a lossless intermediate file that will run much more smoothly in OpenShot:
ffmpeg -i input.mts -c:v ffvhuff -c:a copy output.mkv
I hope you have adequate disk space because this will create some huge files. If this is unacceptable then I can give another example that will use a lossy encoder but should, I'm guessing, still play somewhat smoothly in OpenShot.
You can make a custom WinFF preset based on my example and then you'll be able to use your compiled FFmpeg and WinFF. WinFF itself can use any FFmpeg version, but its default presets won't work with all versions of FFmpeg.
katya_sehgal
December 14th, 2011, 09:08 PM
Yes, but only if for some reason you must use WinFF and its presets.
OpenShot is laggy with the MTS files for me too, unsurprisingly, but you can re-encode the MTS files to a lossless intermediate file that will run much more smoothly in OpenShot:
ffmpeg -i input.mts -c:v ffvhuff -c:a copy output.mkv
I hope you have adequate disk space because this will create some huge files. If this is unacceptable then I can give another example that will use a lossy encoder but should, I'm guessing, still play somewhat smoothly in OpenShot.
You can make a custom WinFF preset based on my example and then you'll be able to use your compiled FFmpeg and WinFF. WinFF itself can use any FFmpeg version, but its default presets won't work with all versions of FFmpeg.
thank you, I think I may need the lossy encoder as well, and would need to understand it as well.
shall get back to you after using this command. trust you will be around later.
Edit: I understand that ffmpeg would give me flexibility over presets that WINFF won't. I would prefer FFMPEG. But the need to get going makes me opt for WinFF. I hope to get the commands for FFMPEG and understand them
FakeOutdoorsman
December 14th, 2011, 10:02 PM
thank you, I think I may need the lossy encoder as well, and would need to understand it as well.
Lossy command:
ffmpeg -i input.mts -c:v mpeg2video -qscale 2 -c:a copy output.mkv
-c:v mpeg2video: codec, video using encoder named mpeg2video
-qscale: quality level for video output. A value of 2 for MPEG-1/2/4, in my opinion, can usually be considered "roughly visually lossless".
-c:a copy: copy the audio from input to output. Does not encode, but it is more like a "copy and paste".
I just realized my MTS samples are all stereo (2 channels), so I'm unsure if my example commands will work with 6 channel or if OpenShot can handle 6 channel inputs.
katya_sehgal
December 15th, 2011, 09:21 AM
FakeOutdoorsman, hello.
I tried your codes. Got the following error:
http://tinypic.com/view.php?pic=2nw3ecn&s=5
And same result with the lossy code:
[*** @ 0x9731320] Only SUBTITLE_*** type supported.
FakeOutdoorsman
December 15th, 2011, 08:23 PM
I know nothing of subtitles, but you can add -sn to the command (before output.mkv) to disable subtitles. That should work, but I don't know if you want to keep the subtitle stream.
katya_sehgal
December 15th, 2011, 08:36 PM
I know nothing of subtitles, but you can add -sn to the command (before output.mkv) to disable subtitles. That should work, but I don't know if you want to keep the subtitle stream.
I added -sn. It is happening! [for newcomers= happiness]
I must ask, how do I do the entire folder?
katya_sehgal
December 15th, 2011, 08:41 PM
Importantly, you had mentioned that there are various websites with outdated information. Would you recommend any one website (I will search the forums of course)? Where I can read and try to interpret? For example, changing output folder once and for all.
As per your estimation, this website is outdated...
http://linuxers.org/tutorial/ffmpeg-basics-beginners
It has the command
ffmpeg -i input.avi -sameq output.mpg
Would this be the best and the simplest one?
http://ffmpeg.org/ffmpeg.html
FakeOutdoorsman
December 15th, 2011, 10:48 PM
I must ask, how do I do the entire folder?
You can use a "for loop" (example (http://ubuntuforums.org/showpost.php?p=10559378&postcount=5)) or I think you can create a custom preset in WinFF and then use that to select and encode all of the files.
Would you recommend any one website (I will search the forums of course)? Where I can read and try to interpret?
The problem with most sites that give examples is that they don't keep up with FFmpeg development, but that would be an incredible task as development is very active. This forum (and this thread in particular), the #ffmpeg IRC channel, and the ffmpeg-user (http://ffmpeg.org/contact.html) mailing list are all good resources.
For example, changing output folder once and for all.
You can output to any existing directory (assuming you have proper permissions and can write to the desired directory).
Would this be the best and the simplest one?
http://ffmpeg.org/ffmpeg.html
It's a good one, and in theory should be kept up to date, but it's not always very easy to understand and can seem overwhelming. Another is FFmpeg FAQ (http://ffmpeg.org/faq.html).
katya_sehgal
December 17th, 2011, 06:10 PM
You can use a "for loop" (example (http://ubuntuforums.org/showpost.php?p=10559378&postcount=5)) or I think you can create a custom preset in WinFF and then use that to select and encode all of the files.
The problem with most sites that give examples is that they don't keep up with FFmpeg development, but that would be an incredible task as development is very active. This forum (and this thread in particular), the #ffmpeg IRC channel, and the ffmpeg-user (http://ffmpeg.org/contact.html) mailing list are all good resources.
You can output to any existing directory (assuming you have proper permissions and can write to the desired directory).
It's a good one, and in theory should be kept up to date, but it's not always very easy to understand and can seem overwhelming. Another is FFmpeg FAQ (http://ffmpeg.org/faq.html).
Your posts are very valuable. I am currently practicing.
This is what I have come up with.
ffmpeg -i 00001.MTS -ab 320k -c:v mpeg2video -qscale 12 -r 25 -sn output5.mkv
and
ffmpeg -i 00001.MTS -c:v mpeg2video -qscale 15 -r 25 -sn output5.mkv
I am not getting how I can bring the audio bitrate down. It is 1439 k. I had tried -ab 320k and -b:a 320 k. I have a feeling that qscale overpowers this function? Before I convert the folder, I need to learn these various commands.
I hope you are around.
decryption
December 18th, 2011, 05:56 AM
First of all - thanks to the OP for an awesome post. I found it very useful.
I have a Dell Precision 490 workstation, running Ubuntu 11.10, with two dual core Xeon 5160 CPUs (so 2 physical CPUs, with 2 cores each), which I am using to encode TV recordings (MPEG2) to H264 using ffmpeg & x264. ffmpeg is encoding at approx 180fps and everything works well, but CPU usage is little low, hovering around 30% per core, when I would expect close to 100%. Anyone know why this is?
These are the inputs I'm giving ffmpeg
time ffmpeg -i ch31.m2t -s 640x360 -acodec libfaac -ac 1 -ar 44100 -b:a 56k -vcodec libx264 -preset superfast -b:v 744k ch31_superfast_800.mp4
Output of uname -a
Linux dell 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
Output of grep -i core /proc/cpuinfo
core id : 0
cpu cores : 2
core id : 0
cpu cores : 2
core id : 1
cpu cores : 2
core id : 1
cpu cores : 2
Output of mpstat -P ALL
Linux 3.0.0-14-generic (dell) 18/12/11 _x86_64_ (4 CPU)
15:46:52 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
15:46:52 all 16.37 10.29 1.20 3.46 0.00 0.13 0.00 0.00 68.54
15:46:52 0 21.43 10.91 1.74 1.06 0.00 0.39 0.00 0.00 64.47
15:46:52 1 15.64 9.95 1.08 5.29 0.00 0.07 0.00 0.00 67.97
15:46:52 2 14.65 10.29 1.03 5.88 0.00 0.03 0.00 0.00 68.11
15:46:52 3 13.79 10.03 0.97 1.59 0.00 0.02 0.00 0.00 73.60
Output of top whilst ffmpeg is running
top - 15:35:59 up 1:11, 3 users, load average: 0.00, 0.15, 0.29
Tasks: 162 total, 2 running, 159 sleeping, 0 stopped, 1 zombie
Cpu0 : 29.9%us, 1.7%sy, 31.6%ni, 36.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 30.4%us, 1.3%sy, 25.8%ni, 42.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 38.7%us, 2.0%sy, 22.7%ni, 36.0%id, 0.7%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 27.2%us, 1.0%sy, 27.9%ni, 43.5%id, 0.3%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4056484k total, 3939144k used, 117340k free, 16532k buffers
Swap: 4190204k total, 9348k used, 4180856k free, 3024616k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3559 decrypti 20 0 321m 91m 4708 R 240 2.3 45:52.11 ffmpeg
katya_sehgal
December 18th, 2011, 09:30 PM
FakeOutdoorsman, hello. (please, anyone is welcome to provide inputs)
From whatever I have managed to grasp, I have formed this.
for f in *.MTS; do ffmpeg -i "$f" -ab 320k -b:v 10000k -c:v mpeg2video -r 25 -sn "${f%.MTS}.mkv"; done
It is working as I just checked. Do you think this is good?
Should I go for a higher bitrate if I want to put video on DVD?
And any other information I may have missed?
Thank you. I have made a log of my learning. It includes experiments with ffmpeg.
qyot27
December 19th, 2011, 03:21 AM
FakeOutdoorsman, hello. (please, anyone is welcome to provide inputs)
From whatever I have managed to grasp, I have formed this.
It is working as I just checked. Do you think this is good?
Should I go for a higher bitrate if I want to put video on DVD?
And any other information I may have missed?
Thank you. I have made a log of my learning. It includes experiments with ffmpeg.
The bitrates used in the command given above are already non-compliant; higher bitrates would still be non-compliant. Authoring programs that are worth using will reject streams like that, and even if they did allow it to go through, actual DVD players would likely choke on such streams.
To quote Wikipedia (emphasis mine):
DVD-Video discs have a raw bitrate of 11.08 Mbit/s, with a 1.0 Mbit/s overhead, leaving a payload bitrate of 10.08 Mbit/s. Of this, up to 3.36 Mbit/s can be used for subtitles and a maximum of 9.80 Mbit/s can be split amongst audio and video. In the case of multiple angles the data is stored interleaved, and so there's a bitrate penalty leading to a max bitrate of 8 Mbit/s per angle to compensate for additional seek time. This limit is not cumulative, so each additional angle can still have up to 8 Mbit/s of bitrate available.
That means that the listed values above that come to 10320kbps are 520kbps over the cumulative limit for video+audio. In most cases, you shouldn't need bitrates that high for DVD anyway (although I remember ffmpeg's ratecontrol for MPEG-2 being rather unpleasant, but still).
Even just going from my normal MPEG-2 encoder (HCenc, for Windows - I use it under Wine if I'm on Linux), 6000kbps is typically more than adequate for the video stream. I'd drop the audio bitrate too; my rule of thumb there is 192kbps for 2 channels, and either 384kbps or 448kbps for 5.1 (as all three of those values are what you typically see for AC-3 streams on professional DVDs).
And why are you outputting to MKV? If you're using MPEG-2, just use .mpg (which should get understood as being MPEG-2 PS, although it may not be NAV-enabled like most DVD authoring programs like them to be).
katya_sehgal
December 19th, 2011, 09:19 AM
The bitrates used in the command given above are already non-compliant; higher bitrates would still be non-compliant. Authoring programs that are worth using will reject streams like that, and even if they did allow it to go through, actual DVD players would likely choke on such streams.
To quote Wikipedia (emphasis mine):
That means that the listed values above that come to 10320kbps are 520kbps over the cumulative limit for video+audio. In most cases, you shouldn't need bitrates that high for DVD anyway (although I remember ffmpeg's ratecontrol for MPEG-2 being rather unpleasant, but still).
Even just going from my normal MPEG-2 encoder (HCenc, for Windows - I use it under Wine if I'm on Linux), 6000kbps is typically more than adequate for the video stream. I'd drop the audio bitrate too; my rule of thumb there is 192kbps for 2 channels, and either 384kbps or 448kbps for 5.1 (as all three of those values are what you typically see for AC-3 streams on professional DVDs).
And why are you outputting to MKV? If you're using MPEG-2, just use .mpg (which should get understood as being MPEG-2 PS, although it may not be NAV-enabled like most DVD authoring programs like them to be).
Thank you qyot27. I shall be editing on OpenShot with these clips and when they are edited, I shall convert them to the settings you have mentioned. Would that do fine?
As for avi, it is an outdated container as I have been told. What would be the best? In Windows, I was used to avi.
I am converting from MTS to another container so that OpenShot is smooth (as it is not with the heavy MTS files). Would my settings do for editing? Or do you suggest I edit in mpg?
Would it be advisable to edit with my current settings and later trans-code to 6000 k.
rulet
December 19th, 2011, 09:58 AM
What will be command-line or bash-script for batch encoding for all video files in one directory? f.e. for this command:
ffmpeg -i input1.mp4 -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 2.mp4
qyot27
December 19th, 2011, 05:27 PM
Thank you qyot27. I shall be editing on OpenShot with these clips and when they are edited, I shall convert them to the settings you have mentioned. Would that do fine?
As for avi, it is an outdated container as I have been told. What would be the best? In Windows, I was used to avi.
I am converting from MTS to another container so that OpenShot is smooth (as it is not with the heavy MTS files). Would my settings do for editing? Or do you suggest I edit in mpg?
Would it be advisable to edit with my current settings and later trans-code to 6000 k.
For editing purposes, you should be using a lossless or high bitrate I-frame only lossy format. For those purposes, AVI is not outdated and will work just as well as other containers. The limitations of AVI only really start to show when you start working with B-frames, variable frame rate video, or variable bit rate audio - features of video formats like H.264 and audio formats like AAC and Vorbis (and MP3, although VBR was a late development there).
My suggestion, with that in mind, is to use HuffYUV or FFV1. Normally this would be in AVI, but OpenShot might support those formats in MOV or MKV as well (it depends on how it handles opening files).
Once the video is exported from the editing program, and you want to author a DVD, then you would convert to DVD compliant MPEG-2 video and either AC3 or MP2 audio. This would generally be put in the MPEG-2 PS container, optionally with NAV sectors since many DVD authoring programs (particularly open source ones) tend to prefer that. I don't know if ffmpeg writes NAV sectors when it outputs to .mpg, but if it doesn't, you could encode the video and audio separately and then mux them with mplex (from the mjpegtools package):
mplex -f8 -V input.m2v input.ac3 -o final-output.mpg
-f8 writes NAV sectors, -V allows the container to be variable bitrate-aware, which MPEG2 generally is, especially on DVD.
rulet
December 19th, 2011, 07:37 PM
What will be command-line or bash-script for batch encoding for all video files in one directory? f.e. for this command:
ffmpeg -i input1.mp4 -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 2.mp4
I found the asnwer, the command is:
mkdir output ; for file in *.mp4 ; do ffmpeg -i $file -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 output/$file ; done
Now I have a question, how to recode all avi files in one directory into mp4 with compression?
FakeOutdoorsman
December 20th, 2011, 03:15 AM
FakeOutdoorsman, hello. (please, anyone is welcome to provide inputs)
From whatever I have managed to grasp, I have formed this.
for f in *.MTS; do ffmpeg -i "$f" -ab 320k -b:v 10000k -c:v mpeg2video -r 25 -sn "${f%.MTS}.mkv"; done
It is working as I just checked. Do you think this is good?
Not for your workflow. For each step you want to minimize data/quality loss. That is why qyot27 and I both recommended a lossless format to edit. Imagine opening a jpg file in GIMP, editing it, and then re-saving as jpg again. Conventional jpg files are lossy and each time you edit and save a file you will reduce the quality of the output. You may not always notice a difference, but it's good to avoid this entirely if you can. The lossless format should work better in OpenShot (less jerky than the MTS) and look the same as the MTS.
Secondly, there is no reason for you to be re-encoding the audio for your file that you will edit in OpenShot (unless OpenShot doesn't like it for some reason). My earlier examples showed how to copy the audio from the input to the output.
Now I have a question, how to recode all avi files in one directory into mp4 with compression?
Change:
for file in *.mp4
to:
for file in *.avi
katya_sehgal
December 22nd, 2011, 12:59 PM
Not for your workflow. For each step you want to minimize data/quality loss. That is why qyot27 and I both recommended a lossless format to edit. Imagine opening a jpg file in GIMP, editing it, and then re-saving as jpg again. Conventional jpg files are lossy and each time you edit and save a file you will reduce the quality of the output. You may not always notice a difference, but it's good to avoid this entirely if you can. The lossless format should work better in OpenShot (less jerky than the MTS) and look the same as the MTS.
Secondly, there is no reason for you to be re-encoding the audio for your file that you will edit in OpenShot (unless OpenShot doesn't like it for some reason). My earlier examples showed how to copy the audio from the input to the output.
Change:
for file in *.mp4
to:
for file in *.avi
You have been kind Fakeoutdoorsman and qyot27. I am learning much. Over the last 2 days, I have edited a small sequence in mkv.
I want to know if this is a ffmpeg error.
The video lags, especially during transitions in OpenSHot. I have a feeling that it could be because of configuration. But then, I am using a 3-4 GB RAM system with good space and Intel core 2 duo.
I am convincing a family person to consider Ubuntu on their desktop. I will check if the same error persists there.
I read in the forums about MLT (melt) and saw that I have it in my Ubuntu. Is there anything else I am missing in ffmpeg that can prevent lagging? And would the desktop fare better?
For each step you want to minimize data/quality loss. That is why qyot27 and I both recommended a lossless format to edit. Imagine opening a jpg file in GIMP, editing it, and then re-saving as jpg again. Conventional jpg files are lossy and each time you edit and save a file you will reduce the quality of the output. You may not always notice a difference, but it's good to avoid this entirely if you can. The lossless format should work better in OpenShot (less jerky than the MTS) and look the same as the MTS.
A fine example.
Is MKV (qscale 2) too heavy for laptop?
Once the video is exported from the editing program, and you want to author a DVD, then you would convert to DVD compliant MPEG-2 video and either AC3 or MP2 audio. This would generally be put in the MPEG-2 PS container, optionally with NAV sectors since many DVD authoring programs (particularly open source ones) tend to prefer that. I don't know if ffmpeg writes NAV sectors when it outputs to .mpg, but if it doesn't, you could encode the video and audio separately and then mux them with mplex (from the mjpegtools package):
I shall follow this once I am onto the DVD. I have made notes on this.
Even just going from my normal MPEG-2 encoder (HCenc, for Windows - I use it under Wine if I'm on Linux), 6000kbps is typically more than adequate for the video stream. I'd drop the audio bitrate too; my rule of thumb there is 192kbps for 2 channels, and either 384kbps or 448kbps for 5.1 (as all three of those values are what you typically see for AC-3 streams on professional DVDs).
So many people are asking about this elsewhere. This rule of thumb is useful and I will do this.
I am happy about OpenShot. And if it runs smoothly, it will help the digital medium.
If the lag problem is not of ffmpeg, then I will seek some change in hardware. Do let me know.
Cheers.
rulet
December 22nd, 2011, 11:30 PM
Change:
for file in *.mp4
to:
for file in *.avi
Yes, but I getting an error using this command for avi:
ffmpeg -i input.avi -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -threads 0 output.mp4
ffmpeg version git-2011-12-04-f88d5df, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 4 2011 11:21:47 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
libavutil 51. 30. 0 / 51. 30. 0
libavcodec 53. 40. 0 / 53. 40. 0
libavformat 53. 24. 0 / 53. 24. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 50. 0 / 2. 50. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
[avi @ 0x90fcac0] parser not found for codec camtasia, packets or times may be invalid.
[avi @ 0x90fcac0] parser not found for codec pcm_s16le, packets or times may be invalid.
Input #0, avi, from 'input.avi':
Duration: 00:01:04.00, start: 0.000000, bitrate: 743 kb/s
Stream #0:0: Video: camtasia (tscc / 0x63637374), bgr24, 1028x739, 15 tbr, 15 tbn, 15 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
Incompatible pixel format 'bgr24' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0x9104160] w:1028 h:739 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x9102800] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0x911a7c0] w:1028 h:739 fmt:bgr24 -> w:1028 h:739 fmt:yuv420p flags:0x4
[libx264 @ 0x9102240] height not divisible by 2 (1028x739)
Output #0, mp4, to 'output.mp4':
Stream #0:0: Video: h264, yuv420p, 1028x739, q=-1--1, 90k tbn, 15 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, 352 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (camtasia -> libx264)
Stream #0:1 -> #0:1 (copy)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
What do I have to change in the command?
andrew.46
December 25th, 2011, 10:18 AM
Looks like there is some unhappiness with your dimensions:
[scale @ 0x911a7c0] w:1028 h:739 fmt:bgr24 -> w:1028 h:739 fmt:yuv420p flags:0x4
[libx264 @ 0x9102240] height not divisible by 2 (1028x739)
Mind you when I took more attention to such things encoding with x264 demanded that width and height should be divisible by 16 but this is obviously no longer the case. I suspect that you will need to investigate either the scale or the pad filter...
rulet
December 25th, 2011, 02:20 PM
Looks like there is some unhappiness with your dimensions:
[scale @ 0x911a7c0] w:1028 h:739 fmt:bgr24 -> w:1028 h:739 fmt:yuv420p flags:0x4
[libx264 @ 0x9102240] height not divisible by 2 (1028x739)
Mind you when I took more attention to such things encoding with x264 demanded that width and height should be divisible by 16 but this is obviously no longer the case. I suspect that you will need to investigate either the scale or the pad filter...
Yea, thank's, seems you are right. I cropped the height of this test video to 738 by the command:
ffmpeg -i input.avi -vf crop=1028:738:0:0 output.avi
And then recoded it to mp4 with that command without errors.
...Is it possible to do cropping and recoding with one command? What it will look with this example?
FakeOutdoorsman
December 25th, 2011, 07:49 PM
...Is it possible to do cropping and recoding with one command?
Yes.
What it will look with this example?
Combining your commands it would look like:
ffmpeg -i input.avi -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -vf crop=1028:738:0:0 output.mp4
I removed -threads 0 since that is default now.
rulet
December 26th, 2011, 11:14 AM
It gives an error:
ffmpeg -i input.avi -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 -vf crop=1028:738:0:0 output.mp4
ffmpeg version git-2011-12-04-f88d5df, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 4 2011 11:21:47 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
libavutil 51. 30. 0 / 51. 30. 0
libavcodec 53. 40. 0 / 53. 40. 0
libavformat 53. 24. 0 / 53. 24. 0
libavdevice 53. 4. 0 / 53. 4. 0
libavfilter 2. 50. 0 / 2. 50. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
[avi @ 0xa676ac0] parser not found for codec camtasia, packets or times may be invalid.
[avi @ 0xa676ac0] parser not found for codec pcm_s16le, packets or times may be invalid.
Input #0, avi, from 'input.avi':
Duration: 00:01:04.00, start: 0.000000, bitrate: 743 kb/s
Stream #0:0: Video: camtasia (tscc / 0x63637374), bgr24, 1028x739, 15 tbr, 15 tbn, 15 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, s16, 352 kb/s
Incompatible pixel format 'bgr24' for codec 'libx264', auto-selecting format 'yuv420p'
[buffer @ 0xa67e160] w:1028 h:739 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:
[crop @ 0xa694600] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'Parsed_crop_0'
[scale @ 0xa6949a0] w:1028 h:739 fmt:bgr24 -> w:1028 h:739 fmt:yuv420p flags:0x4
[crop @ 0xa694600] w:1028 h:739 -> w:1028 h:738
[libx264 @ 0xa67c240] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[libx264 @ 0xa67c240] profile Main, level 3.1
[libx264 @ 0xa67c240] 264 - core 119 r2106 07efeb4 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:-1:-1 analyse=0x1:0x111 me=umh subme=8 psy=1 psy_rd=1.00:0.15 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-3 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=15 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=29.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0xa67bd40] Tag [1][0][0][0]/0x00000001 incompatible with output codec id '65536'
Output #0, mp4, to 'output.mp4':
Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 1028x738, q=-1--1, 90k tbn, 15 tbc
Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, 1 channels, 352 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (camtasia -> libx264)
Stream #0:1 -> #0:1 (copy)
Could not write header for output file #0 (incorrect codec parameters ?)
... But when I pointing output file as mkv or avi, it recodes. Maybe options, mentioned in this command, incompatible with mp4?
qyot27
December 27th, 2011, 01:06 AM
... But when I pointing output file as mkv or avi, it recodes. Maybe options, mentioned in this command, incompatible with mp4?
[mp4 @ 0xa67bd40] Tag [1][0][0][0]/0x00000001 incompatible with output codec id '65536'
-acodec copy is the problem. MP4 doesn't support PCM audio, or at least ffmpeg doesn't like trying to put it in MP4. Compress it with AAC, MP3, or AC3.
GhettoYhetti
December 29th, 2011, 09:28 PM
Attempting to use ffmpeg to get video taken by my vid-cam to burn to DVD using the following:
ffmpeg -i MAH00212.MP4 -target ntsc-dvd -s hd1080 -aspect 16:9 ./sandbox/2011-CM.mpg
ffmpeg version 0.7.2-4:0.7.2-1ubuntu1, Copyright (c) 2000-2011 the Libav developers
built on Oct 2 2011 15:13:26 with gcc 4.6.1
configuration: --extra-version='4:0.7.2-1ubuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
avutil configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
avcodec configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
avformat configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
swscale configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
postproc configuration: --extra-version='4:0.7.2.1ubuntu1+medibuntu1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --enable-shared --disable-static
libavutil 51. 7. 0 / 51. 7. 0
libavcodec 53. 5. 0 / 53. 5. 0
libavformat 53. 2. 0 / 53. 2. 0
libavdevice 53. 0. 0 / 53. 0. 0
libavfilter 2. 4. 0 / 2. 4. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 52. 0. 0 / 52. 0. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'MAH00212.MP4':
Metadata:
major_brand : MSNV
minor_version : 20054127
compatible_brands: MSNVmp42isom
creation_time : 2011-12-25 14:39:34
Duration: 00:04:03.26, start: 0.000000, bitrate: 8955 kb/s
Stream #0.0(und): Video: h264 (Main), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 8821 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
Metadata:
creation_time : 2011-12-25 14:39:34
Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 128 kb/s
Metadata:
creation_time : 2011-12-25 14:39:34
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
This results in video and no sound.
I am assuming the possible "library mismatch" is causing my issue?
andrew.46
December 29th, 2011, 10:41 PM
When you use '-target ntsc-dvd' by default FFmpeg tries to use mpeg2video video and ac3 sound, looks like the problem might be more likely the conversion to ac3 sound. The 'library mismatch' and 'auto-selecting format 'flt'' warnings are both red herrings, you need to give the rest of the terminal output which unfortunately has been snipped :(.
salmjuh
December 30th, 2011, 11:50 AM
Hi
I have done everything by the book, but when recording videos from RTSP feed, I get "MOOV ATOM" errors:
ffmpeg -i rtsp://10.10.22.31:8555 -aspect 16:9 -copyts -vcodec libx264 -b_strategy 2 -flags2 +bpyramid -coder 1 -flags +loop -deblockalpha 0 -deblockbeta 0 -flags2 +wpred -me_method hex -subq 8 -keyint_min 20 -crf 17 -threads 0 -y /tmp/test.mp4
Some times file is OK and sometimes it's not but there is broken "moov atom":
root@Vod1:~# ffmpeg -i /tmp/test.mp4
ffmpeg version N-31684-g6071e4d, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 29 2011 09:01:07 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
libavutil 51. 33.100 / 51. 33.100
libavcodec 53. 49.100 / 53. 49.100
libavformat 53. 29.100 / 53. 29.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 55.100 / 2. 55.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 5.100 / 0. 5.100
libpostproc 51. 2.100 / 51. 2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1a3b7e0] moov atom not found
/tmp/test.mp4: Operation not permitted
root@Vod1:~#
root@Vod1:~# x264 -V
x264 0.120.2120 0c7dab9
(libswscale 2.1.100)
(libavformat 53.29.100)
built on Dec 29 2011, gcc: 4.6.1
configuration: --bit-depth=8 --chroma-format=all
x264 license: GPL version 2 or later
Some times the recording is OK, sometimes it's broken.
Hope someone can help me with this.
Cheers,
Jii
FakeOutdoorsman
December 31st, 2011, 01:47 AM
Hi
I have done everything by the book, but when recording videos from RTSP feed, I get "MOOV ATOM" errors:
ffmpeg -i rtsp://10.10.22.31:8555 -aspect 16:9 -copyts -vcodec libx264 -b_strategy 2 -flags2 +bpyramid -coder 1 -flags +loop -deblockalpha 0 -deblockbeta 0 -flags2 +wpred -me_method hex -subq 8 -keyint_min 20 -crf 17 -threads 0 -y /tmp/test.mp4
Some times file is OK and sometimes it's not but there is broken "moov atom".
Is there a reason that you're not using an encoding preset instead of declaring a bunch of individual options? Example:
ffmpeg -i rtsp://10.10.22.31:8555 -aspect 16:9 -copyts -vcodec libx264 -preset fast -crf 18 output.mp4
phiri
January 4th, 2012, 01:46 PM
I seem to have issues with optional Step# 4 (Install libvpx (optional))
It would seem as though the repository is down; or could I be doing something wrong?
lphiri@mufasa:~/proj$ git clone http://git.chromium.org/webm/libvpx.git
Initialized empty Git repository in /home/lphiri/proj/libvpx/.git/
error: Failed connect to git.chromium.org:80; Operation now in progress while accessing http://git.chromium.org/webm/libvpx.git/info/refs
fatal: HTTP request failed
I tried the other protocols (https and git) and I am still getting errors.
ron999
January 4th, 2012, 02:51 PM
Hi
libvpx is working OK for me.:D
Delete the libvpx folder and try again.
ron@ubuntu:~$ git clone http://git.chromium.org/webm/libvpx.git
Cloning into libvpx...
remote: Counting objects: 13892, done.
remote: Compressing objects: 100% (3311/3311), done.
remote: Total 13892 (delta 10755), reused 13466 (delta 10392)
Receiving objects: 100% (13892/13892), 5.06 MiB | 422 KiB/s, done.
Resolving deltas: 100% (10755/10755), done.
phiri
January 4th, 2012, 07:30 PM
Hi
libvpx is working OK for me.:D
Delete the libvpx folder and try again.
ron@ubuntu:~$ git clone http://git.chromium.org/webm/libvpx.git
Cloning into libvpx...
remote: Counting objects: 13892, done.
remote: Compressing objects: 100% (3311/3311), done.
remote: Total 13892 (delta 10755), reused 13466 (delta 10392)
Receiving objects: 100% (13892/13892), 5.06 MiB | 422 KiB/s, done.
Resolving deltas: 100% (10755/10755), done.
Yep. Its working now; the repo must have been down at the time. Thank you.
liutszho
January 5th, 2012, 03:39 AM
Hi all!
Just tried playing with ffmpeg in making prores today.
Was really happy with the new feature, worked for both Windows and Linux (Ubuntu 11.10)
However, when I brought them back to my mac Final Cut Pro, I notice a slight color shift when compared to the original clip, seems like saturation was bumped up a bit. It is also apparent in the RGB Mixer scopes too.
I tried using "-pxl_fmt yuv422p" and "-dct8x8" but none of them fixed the issue.
Here is the command I entered: ffmpeg -i prores_test.mov -vcodec prores prores_test_output.mov
I even tried "-vcodec copy" but it did not work :(
And here is the info for both clips through ffmpeg:
ORIGINAL CLIP
-----------------
ffmpeg version git-2012-01-05-7f83db3, Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 4 2012 17:58:18 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
libavutil 51. 34.100 / 51. 34.100
libavcodec 53. 53.100 / 53. 53.100
libavformat 53. 29.100 / 53. 29.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 57.101 / 2. 57.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 5.100 / 0. 5.100
libpostproc 51. 2.100 / 51. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'prores_test.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2012-01-04 21:32:19
Duration: 00:00:03.00, start: 0.000000, bitrate: 168154 kb/s
Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x1080, 166554 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23976 tbn, 23976 tbc
Metadata:
creation_time : 2012-01-04 21:32:19
handler_name : ?Apple Alias Data Handler
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s
Metadata:
creation_time : 2012-01-04 21:32:19
handler_name : ?Apple Alias Data Handler
Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s
Metadata:
creation_time : 2012-01-04 21:32:19
handler_name : ?Apple Alias Data Handler
Stream #0:3(eng): Data: none (tmcd / 0x64636D74)
Metadata:
creation_time : 2012-01-04 21:32:24
handler_name : ?Apple Alias Data Handler
OUTPUTTED CLIP
-----------
ffmpeg version git-2012-01-05-7f83db3, Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 4 2012 17:58:18 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
libavutil 51. 34.100 / 51. 34.100
libavcodec 53. 53.100 / 53. 53.100
libavformat 53. 29.100 / 53. 29.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 57.101 / 2. 57.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 5.100 / 0. 5.100
libpostproc 51. 2.100 / 51. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'prores_test_output.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 2012-01-04 21:32:19
encoder : Lavf53.29.100
Duration: 00:00:03.02, start: 0.000000, bitrate: 144974 kb/s
Stream #0:0(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 1920x1080, 146154 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 2997 tbc
Metadata:
creation_time : 2012-01-04 21:32:19
handler_name :
DataHandler
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, s16, 83 kb/s
Metadata:
creation_time : 2012-01-04 21:32:19
handler_name :
DataHandler
Anyone else run into this?
qyot27
January 5th, 2012, 05:04 AM
However, when I brought them back to my mac Final Cut Pro, I notice a slight color shift when compared to the original clip, seems like saturation was bumped up a bit. It is also apparent in the RGB Mixer scopes too.
Sounds like a range issue. I'm not versed in that area well enough to actually figure out what action to take, but it may be a problem on ffmpeg's side (which may or may not have a parameter to adjust how it gets treated), or it could be due to Final Cut having some kind of errant setting regarding range or not liking the bitstream that ffmpeg outputs.
kesten
January 17th, 2012, 12:19 AM
Hi,
Sorry i didn't go through all 208 pages to see if this has been answered already ;)
But i find that generally, ffmpeg and ubuntu change so quickly, unless it's less than 3 months (?weeks) old, a post never works.
I did a sudo apt-get for ffmpeg today (jan 15 2012)
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1024x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads 0 output.mkv
gives errors:
Stream #1.0: Video: rawvideo, bgra, 1024x768, 754974 kb/s, 30 tbr, 1000k tbn, 30 tbc
Unknown encoder 'libx264'
despite the fact that i have them installed...
/usr/lib/libx264.a
/usr/lib/libx264.so
/usr/lib/libx264.so.116
complete error message at
http://paste.ubuntu.com/806805/
thanks,
kesten
FakeOutdoorsman
January 17th, 2012, 01:00 AM
This thread is about using recent, compiled ffmpeg, not the repository version. You probably need to install one more package to enable libx264 in the repository ffmpeg. See Option B here:
HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg (http://ubuntuforums.org/showthread.php?t=1117283)
mc4man
January 26th, 2012, 02:33 AM
Just to note some continuing nonsense & an upcoming change as of 12.04
ffmpeg (the package) is becoming a transitional package that pulls in libavtools.
libavtools contains, among other things, the new 'preferred' commands -
/usr/bin/avconv
/usr/bin/avplay
/usr/bin/avprobe
/usr/bin/avserver
AND symlinks to them using FFmpeg's names
/usr/bin/ffmpeg
/usr/bin/ffplay
/usr/bin/ffprobe
/usr/bin/ffserver
So the 1st section will need to remove ffmpeg & libavtools to achieve what previously was done by removing ffmpeg.
When running ffmpeg from a terminal you not surprisingly get this inaccurate & somewhat misleading message -
This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
Of interest here - when attempting to build a ffmpeg supported current audacious-plugins, (which ffmpeg support is not available in Debian/Ubuntu packages), it appears audacious is basing min shared libavcodec53 version on FFmpeg's, ie. 53.40.0. Even the latest PP package, (libav) of 01/24/12 is only up to 53.34.0, so configure fails (can be fixed but not the point.
I would suspect that aud won't be the only that bases off of FFmpeg....
FakeOutdoorsman
January 26th, 2012, 02:47 AM
So the 1st section will need to remove ffmpeg & libavtools to achieve what previously was done by removing ffmpeg.
Thanks for the update. I haven't investigated 12.04 yet. I hope they iron out some of the Unity issues. Natty's performance was atrocious on some older, yet still useful computers that I recycled for relatives and friends.
When running ffmpeg from a terminal you not surprisingly get this inaccurate & somewhat misleading message -
This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
I'm not very fond of the wording. To general users it may imply that the "ffmpeg" project is dead.
mc4man
January 26th, 2012, 03:05 AM
I'm not very fond of the wording. To general users it may imply that the "ffmpeg" project is dead.
I think, just because, I'll file a bug on that shortly. Want to first find where it is in the source, (upstream or Debian/Ubuntu) & possibly offer a better/truer message of which haven't thought of one yet.
(odds of garnering a response are probably less than 50-50 anyway, the who cares is likely minuscule
FakeOutdoorsman
January 26th, 2012, 03:30 AM
It was upstream in ffmpeg.c, but ffmpeg was removed from libav [1 (http://git.libav.org/?p=libav.git;a=commit;h=0fec2cb15cc6ff1fcc724c774e c36abadcb7b6ad)] a few days ago (along with the message), and FFmpeg removed [2 (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=def678956a19767e4ef714c8f 4d43dd96f4ce967)] avconv [3 (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=935c659c030f7aaf9bd99c19f 2a51863ef83f002)] today. I doubt that Reinhard, the Ubuntu maintainer, will give a rodent's posterior, but don't let that stop you.
Edit: Supplying a patch should give the report some more weight. I've attached one here, but feel free to re-word.
thynan
January 26th, 2012, 11:42 AM
Hi!
First, i want to thank you for this great thread - it really has lots of useful information in it. But unfortunately, after hours and hours of trying, i still am not able to install the following: ffmpeg with ffmpeg-php.
I've seen this discussed before, but none of the solutions helped me. What i'm trying to do now is the following: install ffmpeg with --enable-shared, beacause that seems to be a prerequisite for ffmpeg-php to work.
But i always get an error when i run ./configure for ffmpeg with --enable-shared. The solution in from this forum was, to also run ./configure of x264 and libvpx with --enable-sahred and --enable-pic. But i still cant compile ffmpeg with --enable-shared.
Here is the error message: "LD libavcodec/libavcodec.so.53 /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libtheoraenc.a(encode.o): relocation R_X86_64_32S against `oc_enc_frag_sad_c' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libtheoraenc.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [libavcodec/libavcodec.so.53] Error 1"
My System is Ubuntu Server 10.04 - and i'm following the exact steps from the guid ein this thread.
Has someone successfully installed ffmpeg with --enable-shared on 10.04? And if so - how?
I hope i havent overread a working solution on this board, but i've read and googled for hours and found nothing that worked for me. :(
undercash
January 26th, 2012, 12:22 PM
hi
i m not sure but you need to use the old ffmpeg api to make this works as shared with ffmpeg-php, the FFmpeg 0.7.11 "Peace" I think
and it works best with this last release of ffmpeg-php: http://ffmpeg-php.svn.sourceforge.net/viewvc/ffmpeg-php/trunk/ffmpeg-php/?view=tar
or this: https://groups.google.com/group/ffmpeg-php/browse_thread/thread/ae3d1f2e9ac1e3a9?hl=fr&pli=1
but if you use that ffmpeg-php link I sent you this problem disappear
FakeOutdoorsman
January 26th, 2012, 07:48 PM
But unfortunately, after hours and hours of trying, i still am not able to install the following: ffmpeg with ffmpeg-php.
ffmpeg-php is not a FFmpeg project and I have no experience with it, but I agree with undercash that ffmpeg-php will not work with recent FFmpeg. Most of the ffmpeg-php code is two years old.
An easier solution may be to use the php5-ffmpeg package in the repository.
thynan
January 30th, 2012, 02:27 PM
hi
i m not sure but you need to use the old ffmpeg api to make this works as shared with ffmpeg-php, the FFmpeg 0.7.11 "Peace" I think
and it works best with this last release of ffmpeg-php: http://ffmpeg-php.svn.sourceforge.net/viewvc/ffmpeg-php/trunk/ffmpeg-php/?view=tar
or this: https://groups.google.com/group/ffmpeg-php/browse_thread/thread/ae3d1f2e9ac1e3a9?hl=fr&pli=1
but if you use that ffmpeg-php link I sent you this problem disappear
Thank you very much undercash, that worked for me! I installed FFmpeg 0.7.11 with --enable-shared, and then used the ffmpeg-php release from your first link. I did some tests, and it seems to work fine.
@FakeOutdoorsman: thanks for the tip. I already tried php5-ffmpeg however, and it did not work for me. May well be that the problem was somewhere in my configuration, and not in php5-ffmpeg itself tough - i had a relatively messy ffmpeg installation at the time i tried that version.
So for anybody who reads this post with the same problem than i had: first try to install php5-ffmpeg, because it's real easy to install, and if that doesn't work, try the solution that undercash suggested.
Yokouchi
February 4th, 2012, 08:03 PM
Sorry if it's been posted before (can't find anything); new to Linux.
Running 10.04 LTS and upgraded ffmpeg/x264/etc to be able to better handle watermarking in ffmpeg. Converting MOV files (dvvideo) to h.264.
Since upgrading, my video output is totally grey. Some artefacts appear, but essentially it's a mid-grey.
Where to start troubleshooting? Have tried the manual and scripted approaches to upgrading ffmpeg, each with the same result.
FakeOutdoorsman
February 4th, 2012, 08:37 PM
Where to start troubleshooting?
We need more information. Please show your ffmpeg command and the complete, uncut console output. What player are you using to view the resulting output files? Does ffplay also show gray video?
Yokouchi
February 5th, 2012, 02:10 AM
Thanks for the quick reply.
Command is:
ffmpeg -i stub.mov -an -vcodec libx264 stub.mp4This is a cutdown version of what I was originally using (bash script, preset not valid in the new version):
ffmpeg -i "$file" -map 0:0 -an -vcodec libx264 -vpre hq -s hd720 -b 5000k -threads 0 "h.264Video_""$filestub"".mp4"The console output during conversion is:
ffmpeg version N-37554-g7f8027b Copyright (c) 2000-2012 the FFmpeg developers
built on Feb 4 2012 09:25:22 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libmp3lame
libavutil 51. 37.100 / 51. 37.100
libavcodec 54. 0.102 / 54. 0.102
libavformat 54. 0.100 / 54. 0.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'stub.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 2011-05-22 08:10:18
encoder : Lavf54.0.100
Duration: 00:01:00.05, start: 0.000000, bitrate: 46776 kb/s
Stream #0:0(eng): Video: dvvideo (dvhp / 0x70687664), yuv422p, 960x720 [SAR 4:3 DAR 16:9], 46033 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 59.94 tbc
Metadata:
creation_time : 2011-05-22 08:10:18
handler_name :
DataHandler
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels, s16, 768 kb/s
Metadata:
creation_time : 2011-05-22 08:10:18
handler_name :
DataHandler
File 'stub.mp4' already exists. Overwrite ? [y/N] y
w:960 h:720 pixfmt:yuv422p tb:1/1000000 sar:4/3 sws_param:
[libx264 @ 0xa6c8980] using SAR=4/3
[libx264 @ 0xa6c8980] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0xa6c8980] profile High 4:2:2, level 3.1, 4:2:2 8-bit
[libx264 @ 0xa6c8980] 264 - core 120 r2146 bcd41db - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=23 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'stub.mp4':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
creation_time : 2011-05-22 08:10:18
encoder : Lavf54.0.100
Stream #0:0(eng): Video: h264 (![0][0][0] / 0x0021), yuv422p, 960x720 [SAR 4:3 DAR 16:9], q=-1--1, 2997 tbn, 23.98 tbc
Metadata:
creation_time : 2011-05-22 08:10:18
handler_name :
DataHandler
Stream mapping:
Stream #0:0 -> #0:0 (dvvideo -> libx264)
Press [q] to stop, [?] for help
frame= 1439 fps= 12 q=-1.0 Lsize= 13407kB time=00:00:59.93 bitrate=1832.5kbits/s
video:13400kB audio:0kB global headers:0kB muxing overhead 0.053581%
[libx264 @ 0xa6c8980] frame I:7 Avg QP:21.77 size: 40827
[libx264 @ 0xa6c8980] frame P:1408 Avg QP:24.26 size: 9457
[libx264 @ 0xa6c8980] frame B:24 Avg QP:25.04 size: 4984
[libx264 @ 0xa6c8980] consecutive B-frames: 96.7% 3.3% 0.0% 0.0%
[libx264 @ 0xa6c8980] mb I I16..4: 8.7% 88.1% 3.1%
[libx264 @ 0xa6c8980] mb P I16..4: 0.1% 0.7% 0.0% P16..4: 66.2% 8.4% 14.8% 0.0% 0.0% skip: 9.8%
[libx264 @ 0xa6c8980] mb B I16..4: 0.0% 0.1% 0.0% B16..8: 47.3% 0.5% 0.0% direct: 6.0% skip:46.0% L0:49.2% L1:50.0% BI: 0.8%
[libx264 @ 0xa6c8980] 8x8 transform intra:87.7% inter:93.6%
[libx264 @ 0xa6c8980] coded y,uvDC,uvAC intra: 57.2% 97.2% 50.5% inter: 20.3% 83.7% 3.9%
[libx264 @ 0xa6c8980] i16 v,h,dc,p: 45% 26% 7% 22%
[libx264 @ 0xa6c8980] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 15% 52% 3% 4% 3% 5% 3% 5%
[libx264 @ 0xa6c8980] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 17% 28% 5% 6% 7% 6% 5% 4%
[libx264 @ 0xa6c8980] i8c dc,h,v,p: 59% 14% 21% 6%
[libx264 @ 0xa6c8980] Weighted P-Frames: Y:0.2% UV:0.0%
[libx264 @ 0xa6c8980] ref P L0: 51.0% 6.5% 26.7% 15.9% 0.0%
[libx264 @ 0xa6c8980] ref B L0: 59.8% 40.2%
[libx264 @ 0xa6c8980] kb/s:1828.84
ffplay plays the output OK.
VLC, totem show it up grey.
Quicktime (OS X) black.
mplayer shows it up grey with a slew of errors:
================================================== ========================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
================================================== ========================
Audio: no sound
Starting playback...
[h264 @ 0x6d3cbc0]top block unavailable for requested intra mode at 1 0
[h264 @ 0x6d3cbc0]error while decoding MB 1 0, bytestream (8590)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]concealing 2242 DC, 2242 AC, 2242 MV errors
[h264 @ 0x6d3cbc0]Reference 6 >= 3
[h264 @ 0x6d3cbc0]error while decoding MB 7 0, bytestream (5720)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
VDec: vo config request - 960 x 720 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 960x720 => 1280x720 Planar YV12
[h264 @ 0x6d3cbc0]Reference 4 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 3 0, bytestream (9085)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]concealing 2696 DC, 2696 AC, 2696 MV errors
[h264 @ 0x6d3cbc0]Reference 7 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 32 0, bytestream (8538)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 4 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 17 0, bytestream (7921)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 5 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 6 0, bytestream (8144)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]top block unavailable for requested intra mode at 44 0
[h264 @ 0x6d3cbc0]error while decoding MB 44 0, bytestream (5371)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 4 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 4 0, bytestream (7648)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 5 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 32 0, bytestream (5450)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 4 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 39 0, bytestream (7800)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 4 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 27 0, bytestream (7561)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 4 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 3 0, bytestream (7715)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 4 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 5 0, bytestream (5907)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 4 >= 4
[h264 @ 0x6d3cbc0]error while decoding MB 29 0, bytestream (7606)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]top block unavailable for requested intra4x4 mode -1 at 2 0
[h264 @ 0x6d3cbc0]error while decoding MB 2 0, bytestream (6086)
[h264 @ 0x6d3cbc0]concealing 2700 DC, 2700 AC, 2700 MV errors
[h264 @ 0x6d3cbc0]Reference 7 >= 4
This goes on throughout playback of the complete file.
It's replicable on both my 10.04 machines.
Interestingly when I transcode one of MP4 files I'd made prior to upgrading ffmpeg (e.g. making versions with lesser bitrates) they play fine.
FakeOutdoorsman
February 5th, 2012, 02:48 AM
Thanks for the quick reply.
Command is:
ffmpeg -i stub.mov -an -vcodec libx264 stub.mp4
This command will use default settings. The default settings used to be fairly atrocious in terms of quality, but now it will provide good quality output.
This is a cutdown version of what I was originally using (bash script, preset not valid in the new version):
ffmpeg -i "$file" -map 0:0 -an -vcodec libx264 -vpre hq -s hd720 -b 5000k -threads 0 "h.264Video_""$filestub"".mp4"
Some comments about this command:
-vpre hq has been replaced with -preset slow
-threads 0 is now automatically applied
-crf is recommended instead of -b for single-pass encoding. Use -crf if you care about quality. The encoder will keep a constant quality with crf. Use -b if you are attempting to target a particular output file size. Generally you use the highest crf value that still has an acceptable quality. A good starting value is 24.
I suspect your players (other than ffplay) have a problem decoding 4:2:2 color sampling, which is what your input and output use:
Stream #0:0(eng): Video: dvvideo (dvhp / 0x70687664), yuv422p, 960x720 [SAR 4:3 DAR 16:9], 46033 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 59.94 tbc
Try adding -pix_fmt yuv420p to your command and see if that provides an output that works with your players.
Yokouchi
February 5th, 2012, 04:20 AM
My idiot gear kicks in.
-b 5000 and
-b 5000k are two different things (duh).
With nothing specified as to how to work, it'd seem it was defaulting to something very, very low quality as you suggested. All is well now.
5000k seems a bit excessive against the performance in -crf though seems to be what Vimeo wants for HD content (where this is headed)...
...thanks again for your help. Feel a bit silly... though to be fair I still don't understand why things rendered fine in ffplay and not anywhere else. With -crf things played fine everywhere. The -pix_fmt argument didn't improve things.
No doubt specifying valid bitrates help, but I still feel I'm missing something with respect to some streams being able to play in ffplay, but not elsewhere.
qyot27
February 5th, 2012, 03:12 PM
I suspect your players (other than ffplay) have a problem decoding 4:2:2 color sampling, which is what your input and output use:
Stream #0:0(eng): Video: dvvideo (dvhp / 0x70687664), yuv422p, 960x720 [SAR 4:3 DAR 16:9], 46033 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 59.94 tbc
Try adding -pix_fmt yuv420p to your command and see if that provides an output that works with your players.
Lack of 4:2:2 support is precisely the issue, since I've seen it do the same thing under Windows using various solutions, and if I recall correctly, 4:2:2 decoding ended up getting added much later than the 4:4:4 decoding support (and I think RGB was just added recently).
One possibility would be to recompile the media players against a new version of libavcodec (or find yourself a PPA with bleeding edge builds). The repository versions of these players are probably too old to support the additional H.264 colorspaces.
popper
February 5th, 2012, 03:18 PM
My idiot gear kicks in.
-b 5000 and
-b 5000k are two different things (duh).
With nothing specified as to how to work, it'd seem it was defaulting to something very, very low quality as you suggested. All is well now.
5000k seems a bit excessive against the performance in -crf though seems to be what Vimeo wants for HD content (where this is headed)...
...thanks again for your help. Feel a bit silly... though to be fair I still don't understand why things rendered fine in ffplay and not anywhere else. With -crf things played fine everywhere. The -pix_fmt argument didn't improve things.
No doubt specifying valid bitrates help, but I still feel I'm missing something with respect to some streams being able to play in ffplay, but not elsewhere.
no reason to feel silly , we all need to start somewhere....
i forget now as its been a while but i think explicitly setting -profile main works fine with Vimeo, but i also thought adding -profile high to ffmpeg works for Vimeo HD content too.
for encoding for any on-line streaming or over wireless content for that matter. where the total bandwidth is restricted you are probably better to set the max restriction's yourself like so if you want quality as well as a far smaller file size.
-vcodec libx264 -crf 18 -minrate 800k -maxrate 1200k -bufsize 1200k -refs 3 .....
for a far better and consistent quality, 1100k seems to be the average min/max in general end user streaming web use today, although i like to use -vcodec libx264 -crf 18 -minrate 1300k -maxrate 1300k -bufsize 1300k (or slightly higher up to 1600k or even as high as 2000k for one off web streams, as most people have ISP's that can do consistent 2Mbit/s or greater throughput download streaming today) plus 128k for 2 channel audio (-strict experimental -acodec aac -ac 2 -ab 128k) for the larger 720p stuff etc.
you're ffmpeg is compiled for 10bit colour space and your using greater than 8bit input content so only ffplay can decode it properly given that's also got the 10bit patches (and the other nice filters etc included).
i forget if you can make the other linux players also play 10bit encoded content without a re-compile of each, but i also thought setting -pix_fmt yuv420p produced the older standard 8bit output in the 10bit compiles anyway, perhaps not.... so simplest answer is re-compile ffmpeg for 8bit for now as Vimeo cant use 10bit AFAIK
"With nothing specified as to how to work, it'd seem it was defaulting to something very, very low quality" yeah, they should change that to a good generic x264 -profile high output as it used to drive me mad when first starting out doing a simple ffmpeg -i "input.hd.mkv" "output.mp4/.mpeg" and getting a crap super low bit rate divx/xvid or mpeg2 encode ;)
qyot27
February 5th, 2012, 11:59 PM
you're ffmpeg is compiled for 10bit colour space and your using greater than 8bit input content so only ffplay can decode it properly given that's also got the 10bit patches (and the other nice filters etc included).
i forget if you can make the other linux players also play 10bit encoded content without a re-compile of each, but i also thought setting -pix_fmt yuv420p produced the older standard 8bit output in the 10bit compiles anyway, perhaps not.... so simplest answer is re-compile ffmpeg for 8bit for now as Vimeo cant use 10bit AFAIK
If it was 10-bit the colorspace would read yuv422p10le, not yuv422p. Also, this guide/thread doesn't even cover compiling x264 in 10-bit mode, so they'd have to have gotten that information somewhere else (although it's not like it's difficult to figure out if one just looks at ./configure --help).
And the decoders are bit-agnostic. A plain compile of FFmpeg can play both 8 and 10 bit, provided it's a build from after 10-bit was committed (although as my previous note, the extra colorspaces+10-bit might not be fully there yet). It's not particularly bleeding edge, but if the repositories are keeping with point releases it might get hairy. If it's a Git build they're practically assured to support 10-bit (and the extra colorspaces, as those are the real issue here) correctly.
Yokouchi
February 6th, 2012, 11:40 PM
First off, many thanks to all. Getting through this. Steep learning curve but scripts sure beat sitting in front of a PC and doing things again... and again... and again with little control over anything. 4:4:2 helped. Don't see that ffmpeg was compiled here w/10-bit support, though it was prescient to check (./configure showed 8-bit, ffmpeg pulled from git. hmm.)
Took the suggestion to play with -crf mode rather than constant bitrate, ended up going this route. Seems logical as what Vimeo can store and what people will reasonably stream are two different things at the extreme end. The dropoff in quality didn't degrade the experience at all. After a bit more research I'm using presets a little more intelligently now.
Again, thanks all.
qyot27
February 7th, 2012, 01:27 AM
Let's see if I can explain this more clearly.
First off, many thanks to all. Getting through this. Steep learning curve but scripts sure beat sitting in front of a PC and doing things again... and again... and again with little control over anything. 4:4:2 helped. Don't see that ffmpeg was compiled here w/10-bit support, though it was prescient to check (./configure showed 8-bit, ffmpeg pulled from git. hmm.)
If you're using a Git build of FFmpeg from after this commit on May 10th 2011 (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=59eb12faff9505da49f54d499 dd43404226e37f6), and especially after July 2011, it supports decoding both 8-bit and 10-bit H.264. No configure option to switch them, because such an option is irrelevant. It's not FFmpeg that needs to be specifically built as 10-bit (heck, some of the formats FFmpeg supports are 16-bit, or 1-bit, and they're all available in the same build anyway).
It's x264, and only x264, that has to be built specifically as 10-bit, and that's only to be able to encode 10-bit H.264 files. Not play them back or convert them to some other bit depth (because x264 doesn't do any decoding; if a build of x264 is doing any decoding, it's because the decoding is supplied by the FFmpeg libraries directly or by FFmpegSource2). x264 does not default to building in 10-bit mode because the vast majority of consumer hardware is only designed to support the original 8-bit implementation. 10-bit is primarily useful right now when the user actually has the file and wants to play it back locally on their PC. It hasn't made its way into electronics nearly as much as the regular 8-bit version of H.264, if it has at all.
Likewise, the normal encoding colorspace of x264 is 4:2:0 (aka YV12). The extra colorspaces of 4:4:4 and RGB were added on July 9th 2011 (http://git.videolan.org/?p=x264.git;a=commit;h=c07df2f77dacfec444785bf6022 9f804dc43c10b) (4:4:4) and July 10th 2011 (http://git.videolan.org/?p=x264.git;a=commit;h=ffc41542d73811dffbe5814a23e dda65db0e6aea) (RGB). 4:2:2 encoding was added on September 21st 2011 (http://git.videolan.org/?p=x264.git;a=commit;h=bb9216dc319a39eb6f2a5508a98 e36d6492ffa7e). x264 defaults to 4:2:0 when encoding, because most consumer devices do not support the other modes yet (or never will). However, unlike the bit depth situation, x264 has support for all of these colorspaces within a single build and can encode any of them if the --output-csp option is used when encoding (although builds can now be focused on one colorspace by using the --chroma-format option during the ./configure step; it still defaults to enabling all of them, though).
Short version, assuming you are using a fresh Git clone of both x264 and FFmpeg:
x264 supports encoding all colorspaces unless the --chroma-format option was used to restrict it to just one of them when it was compiled.
x264 builds as 8-bit. If you want 10-bit, you have to use the --bit-depth option when compiling. 10-bit x264 builds cannot output 8-bit files, and vice-versa. If you give 10-bit x264 a file encoded as 8-bit, it converts it to 10-bit before encoding.
FFmpeg decodes both 8-bit and 10-bit H.264 files, and it supports decoding all colorspaces. No specific enabling or disabling of colorspaces or bit depths occurs when compiling FFmpeg, and it does not even have options to permit such.
dudefire
February 9th, 2012, 12:56 PM
can anybody help me with the command to encode a video to webm/vp8 format ?
andrew.46
February 10th, 2012, 12:25 AM
can anybody help me with the command to encode a video to webm/vp8 format ?
Perhaps this might be a starter:
http://ubuntuforums.org/showpost.php?p=11308924&postcount=17
bricedebrignaisplage
February 23rd, 2012, 04:47 AM
I am having a problem with linking:
$ ffmpeg
ffmpeg: relocation error: ffmpeg: symbol avformat_network_init, version LIBAVFORMAT_53 not defined in file libavformat.so.53 with link time reference
I already had avformat installed from Ubuntu package repository. Apparently there is a mix up in the link up:
$ ldd ffmpeg | grep av
libavdevice.so.53 => /usr/lib/i686/cmov/libavdevice.so.53 (0xb7738000)
libavfilter.so.2 => /usr/local/lib/libavfilter.so.2 (0xb76af000)
libavformat.so.53 => /usr/lib/i686/cmov/libavformat.so.53 (0xb75a9000)
libavcodec.so.53 => /usr/lib/i686/cmov/libavcodec.so.53 (0xb6a3c000)
libavutil.so.51 => /usr/lib/i686/cmov/libavutil.so.51 (0xb69aa000)
I am under Oneiric. I did not follow this guide exactly, I installed x264 and ffmpeg from tarballs instead. And since my goal is to build OpenCV 2.3.1 (because it's the one supported by ROS Electric) with GPU support (CUDA), I used the --enable-shared and --enable-pic options.
I searched this thread (and google in general) for a while but could not find any definite solution.
I am a bit confused by the build process and package management in general: I have the libav* packages installed from synaptic, as they are dependencies of some other general multimedia packages (kdenlive, clementine, etc...), and I am installing a different version from source. I am a bit puzzled on how to ensure that things don't get messed up. Same with OpenCV: I am installing from source, and I have opencv2.3 installed as a dependency of ROS, so how do I make sure that the system is going to use my built from source lib...?
mc4man
February 24th, 2012, 12:02 AM
Possibly a question with no good answer or doesn't need an answer... -
Do users here that use ffmpeg directly consider FFmpeg superior to Libav or is it just a matter of personal preference & both are pretty much equal?
mysoogal
February 24th, 2012, 12:19 AM
already build debs for ubuntu 10.10 win32 - built on burst EU VPS servers
ffmpeg_201202240142-git-1_i386.deb
x264_0.120.2164+gitda19765-1_i386.deb
libvpx_201202240126-git-1_i386.deb
qt-faststart_201202240145-git-1_i386.deb
http://www.mediafire.com/?ycshcfhcrfbaiz2
http://www.crocko.com/9E70522461A841D3A4BE3178DFD62E54/debs.zip
andrew.46
February 24th, 2012, 01:27 AM
Do users here that use ffmpeg directly consider FFmpeg superior to Libav or is it just a matter of personal preference & both are pretty much equal?
I have to admit to laziness in that I started with FFmpeg and have never actually tried Libav :). Allied with this laziness is a certain disquiet over the fork process and thus an ideological unwillingless to jump ship but perhaps more to the point is the knowledge that Libav changes are for the most part incorporated into the FFmpeg code base.
Interesting to hear what others think :).
mc4man
February 24th, 2012, 04:36 AM
I have to admit to laziness in that I started with FFmpeg and have never actually tried Libav :). Allied with this laziness is a certain disquiet over the fork process and thus an ideological unwillingless to jump ship but perhaps more to the point is the knowledge that Libav changes are for the most part incorporated into the FFmpeg code base.
Interesting to hear what others think :).
Anyway I decided to file a bug on what is shown in 12.04 when someone runs 'ffmpeg ...'
https://bugs.launchpad.net/ubuntu/+source/libav/+bug/939863
FakeOutdoorsman
February 24th, 2012, 06:56 AM
I attached a patch to the bug that re-words the completely misleading statement. It will be interesting to see what the maintainer says if he decides not to change it even when presented with an easy, simple patch.
I can't say much about libav. I have little experience with it and have similar feelings about the whole thing as Andrew. FFmpeg does regularly merge commits from it, so there shouldn't be too many differences for a general user as Andrew mentioned. The FFmpeg developers are friendly and helpful to me so there's that too.
mc4man
February 24th, 2012, 07:35 AM
I attached a patch to the bug that re-words the completely misleading statement. It will be interesting to see what the maintainer says if he decides not to change it even when presented with an easy, simple patch.
.
Interesting indeed, I believe the maintainer was in the orig. break away group.
This came back into my thinking about because of a unreasonably extended break in audacious's ffmpeg decoding. In terms of 11.10 & 12.04 with the aud 3.14/3.2 source, the only reason the plugin wasn't being built was due to aud basing it's libavcodec ect. version numbers on FFmoeg's, which always higher for the same major
In the case of 12.04 the req. was libavcodec >= 53.40.0 & libav provides libavcodec53.34.0 which does support the ffaudio plugin fine.
(- It's almost fixed in 12.04's aud, the source was patched, built, & due to a small omission still was missing the plugin.
The patch used seemed to unnecessarily complicated for the Aud source being used & was consequently 'discussed' for quite some time.
andrew.46
February 24th, 2012, 10:18 AM
It will be very interesting to see the progress of the fork and the effects on FFmpeg itself. A great wikipedia article here discusses some of the possibilities:
Forking free and open source software (http://en.wikipedia.org/wiki/Fork_%28software_development%29#Forking_free_and_o pen_source_software)
The 'four possible outcome of a fork' certainly puts the potential end-game very neatly...
qyot27
February 24th, 2012, 10:56 AM
Do users here that use ffmpeg directly consider FFmpeg superior to Libav or is it just a matter of personal preference & both are pretty much equal?
During the upheaval period, I used the ffmpeg.org 'main' repo, which differed from the Videolan repo in ways that Libav still differs. Since the site properly went back to FFmpeg and the fork went off on their own, I've switched to using the master (Videolan) repo. The only exception is that when I build mplayer2, I go into the clone of Libav it uses and then specifically pull in the changes from FFmpeg master, although sometimes I have actually just deleted the directory and done a regular clone of FFmpeg to use (especially in a couple of cases where the pull didn't cleanly merge and I didn't want to mess with resolving it).
Personally, my distaste for the fork is due to the blow-up, as well as the behavior exhibited by the group* and their supporters (including some of those involved with a few software projects that use the libraries, including x264) in the time since. I see it from a slightly different angle because it also seems to be a certain, dare I say 'clique', of users that also have a presence in the fansubbing scene, and this - pardon the expression - ******* match that the fork revels in is just one part of a trend I've witnessed growing in that scene over the last 3 or 4 years. It's extremely annoying there too (to where I now attempt to actively avoid groups that participate in such behavior), and while the software side doesn't seem as inflammatory as those using it, I haven't seen any attempt to defuse the situation.
*Look at the Download page on libav.org and the Download page on ffmpeg.org - the fork provides no links to the original project, while FFmpeg acknowledges Libav's existence and provides links to their repo. That's simply one example of many where the fork just makes itself look completely childish and petty.
As far as the code itself goes, FFmpeg merges in work done in the fork anyway (which, if the release posts are to be believed, FFmpeg includes all changes from the fork, although I know from following the git repo that either not all commits to the fork need to be merged because they're duplicates, or occasionally they get reverted), along with what seems to be increased activity on FFmpeg's part beyond what gets merged in from Libav, or also now from additional forks I've seen spring up in the merge messages. I can't say much for anything special that exists only in Libav, since I couldn't figure out a good method to find only the unique commits and just gave up. I should probably try to do so again, even if just for curiosity's sake.
skyjuice88
February 25th, 2012, 12:03 PM
I am a new user here. May I know if I wanna test x264 codec, how do I put in a short video sequence in the the code. I tried steps 1-3 but have no idea how to put in the video. Anyone here kind enough to give me some guidance?
piotao
February 26th, 2012, 01:24 PM
Man, dear... author of the first post in this thread.
I, hereby, admit, that your work is greatly appreciated, to unbelivelable extent. Your work and information given in this post saves me.
I worked hard on screencasting using a number of diffrent apps, like recordmydesktop, istanbul, winff, wink, kazam and vlc. Only recordmydesktop gave me some results, but again, youtube stopped processing them. So I was stuck. I struggled for half a month, with no luck, being constantly more stressed and pissed off.
After reading your post, I compiled and installed all ffmpeg related software and they were working. Then I started to record my screen and this was working too. Finally I converted them into mkv format and they worked brilliantly! Also, youtube uploaded them with no problems, so now I'm so happy and relaxed because of you! YOU!
So I would like to say big THANK YOU and with this let me express my love to the open source community and all *unix related world!
You give me outstanding help and thank's to you I've do awesome job. LOVE YOU! :)
I wish all of you the best!
Here's the story:
:-k ](*,) :???: :-( 8) =D> \\:D/
lucasterra
February 27th, 2012, 09:06 PM
Ubuntu 11.10 - 3.2.0-17-generic
Hello,
First of all. Thanks for the guide, it was really helpful for installing the FFmpeg with all the libs included.
I've been trying to stream my webcam using stream-m (http://code.google.com/p/stream-m/)
No success so far. I have the server running... but I can't stream my webcam to the server.
I'm using this:
ffmpeg -f video4linux2 -s 320x240 -r 16 -i /dev/video0 -f oss -i /dev/dsp -g 52 -acodec libvorbis -ab 64k -vcodec libvpx -vb 448k -f webm http://localhost:8080/publish/first?password=secret
I get this:
ffmpeg version git-2012-02-27-a4c22e3 Copyright (c) 2000-2012 the FFmpeg developers
built on Feb 27 2012 13:32:57 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-libvpx
libavutil 51. 41.100 / 51. 41.100
libavcodec 54. 4.100 / 54. 4.100
libavformat 54. 1.100 / 54. 1.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 62.101 / 2. 62.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100
[video4linux2,v4l2 @ 0xa141c40] The driver changed the time per frame from 1/16 to 1/15
[video4linux2,v4l2 @ 0xa141c40] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 12783.292514, bitrate: 18432 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 18432 kb/s, 15 tbr, 1000k tbn, 15 tbc
[oss @ 0xa1427e0] /dev/dsp: No such file or directory
/dev/dsp: Input/output error
It's probably some compatibility issue with OSS and Ubuntu, but I couldn't figure out how to solve that problem. I would be happy if someone can help me.
TheHippy
February 28th, 2012, 02:10 PM
hi, great tutorial and its been very helpful (many times).
However, when i use -acodec libfaac i seem to end up with a broken sound bite about half a second long at the start of the video and then silence for the rest.
I was wondering if anyone else had the same issue and/or how to fix it?
Many thanks
katya_sehgal
February 28th, 2012, 04:37 PM
Why does ffmpeg automatically make a clip 'progressive' from 'interlaced'. Kindly aid me in keeping it interlaced. Here is an example command I am using
for f in *.MTS; do ffmpeg -i "$f" -ab 320k -b:v 10000k -c:v mpeg2video -r 25 -sn "${f%.MTS}.mkv"; done
To this I had added -ilme. But it clashes with -sn and gives an error. I believe there must be a way to rectify this.
I saw this thread but didn't get it.
http://forum.videohelp.com/threads/303398-WinFF-ffmpeg-Unwanted-Deinterlacing
My original clip is in m2ts format and is interlaced.
Solution/s?
qyot27
February 28th, 2012, 06:07 PM
Why does ffmpeg automatically make a clip 'progressive' from 'interlaced'. Kindly aid me in keeping it interlaced. Here is an example command I am using
FFmpeg encodes progressive as default because that's what most people work with, or should be working with these days. Pragmatism. It just does so regardless of what the input is detected to be, which is a little problematic, but understandable if there's no mechanism to accurately detect that something is interlaced in the first place without user intervention.
To this I had added -ilme. But it clashes with -sn and gives an error. I believe there must be a way to rectify this.
I saw this thread but didn't get it.
-ilme is a motion estimation-related flag option, and I can't fathom for what reason it would conflict with disabling subtitles. It doesn't inherently control whether the output is interlaced, that's what the -top option (as mentioned by said thread, as well as the output of ffmpeg -h) apparently does. -top 1 for TFF, -top 0 for BFF, -top -1 for autodetection. Also from that thread:
The -top command only works when you also set the following interlace flags;
-flags ildct+ilme -top 1 (or -top 0)
katya_sehgal
February 28th, 2012, 06:40 PM
see next post below. duplicated, better.
katya_sehgal
February 28th, 2012, 06:42 PM
FFmpeg encodes progressive as default because that's what most people work with, or should be working with these days. Pragmatism. It just does so regardless of what the input is detected to be, which is a little problematic, but understandable if there's no mechanism to accurately detect that something is interlaced in the first place without user intervention.
-ilme is a motion estimation-related flag option, and I can't fathom for what reason it would conflict with disabling subtitles. It doesn't inherently control whether the output is interlaced, that's what the -top option (as mentioned by said thread, as well as the output of ffmpeg -h) apparently does. -top 1 for TFF, -top 0 for BFF, -top -1 for autodetection. Also from that thread:
You have pointed correctly about progressive scan, as I have read on this page
http://www.digitalphotographywriter.com/2010/08/hd-1080p-vs-1080i-videos-progressive.html
A technology person has been pestering me for interlaced, which is why the doubt.
I would like to learn a bit about top field and bottom field, in terms of coding; what to use for what. In the case I decide to go for interlaced, should I just add -flags ildct+ilme -top 1 (or -top 0) to the existing code?
qyot27
February 28th, 2012, 08:45 PM
A technology person has been pestering me for interlaced, which is why the doubt.
I would like to learn a bit about top field and bottom field, in terms of coding; what to use for what. In the case I decide to go for interlaced, should I just add -flags ildct+ilme -top 1 (or -top 0) to the existing code?
That seems correct, but I don't use FFmpeg for MPEG-2 encoding, so that's just what I glean from looking at the help documentation.
HitomiKun
February 29th, 2012, 04:41 AM
I was able to build a x264 with ffms2 support from your instructions the last month. I tried to configure the newest ffms2 for x264 just now and BAM, ffms2 error:
configure: error: in `/home/hitomilinus/ffms2':
configure: error: cannot build ffms2 as a shared library
That's the tutorial I followed (thx btw. for your awesome help):
http://ubuntuforums.org/showpost.php?p=11025444&postcount=1781
I have all libraries up to date, and I compiled/installed the minimal ffmpeg right before I got into the ffms2 problem. The problem just got up recently, since the newest ffms2 revision.
FlipeGarcia
February 29th, 2012, 10:36 AM
Thanks for this great tutorial, that keeps helping newbies like me to get some important programs to work in Ubuntu.
I would like to ask a question: is there a way to set in ffmpeg the default audio codec to libaacplus so that HE-AAC is used as default when encoding audio. I guess it might be a compilation option, but I have not found it. I use VLC transcoding with ffmpeg as audio encoder and there is way to pass to ffmpeg a parameter with the audio codec to be used.
Thanks in advance for the help!
qyot27
February 29th, 2012, 11:42 PM
I was able to build a x264 with ffms2 support from your instructions the last month. I tried to configure the newest ffms2 for x264 just now and BAM, ffms2 error:
That's the tutorial I followed (thx btw. for your awesome help):
http://ubuntuforums.org/showpost.php?p=11025444&postcount=1781
I have all libraries up to date, and I compiled/installed the minimal ffmpeg right before I got into the ffms2 problem. The problem just got up recently, since the newest ffms2 revision.
Add '--enable-static --disable-shared' to FFMS2's configure step. Like so:
./configure --prefix=$HOME/ffms2_build PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig --enable-static --disable-shared
FakeOutdoorsman
March 1st, 2012, 01:01 AM
hi, great tutorial and its been very helpful (many times).
However, when i use -acodec libfaac i seem to end up with a broken sound bite about half a second long at the start of the video and then silence for the rest.
I was wondering if anyone else had the same issue and/or how to fix it?
Many thanks
Please show your ffmpeg command and the complete console output.
mpbb77
March 1st, 2012, 08:25 PM
hi, it seems I'm the only one really having troule to get aac encoding ...
I've tried 3 methods:
- method A. I get: ./ffmpeg -formats | grep aac
ffmpeg version git-2012-02-29-a77c8ad Copyright (c) 2000-2012 the FFmpeg developers
built on Mar 1 2012 19:52:28 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
libavutil 51. 41.100 / 51. 41.100
libavcodec 54. 4.100 / 54. 4.100
libavformat 54. 1.100 / 54. 1.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 62.101 / 2. 62.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100
D aac raw ADTS AAC
- method C: ffmpeg -formats | grep aac
ffmpeg version 0.7.3-4:0.7.3-0ubuntu0.11.10.1, Copyright (c) 2000-2011 the Libav developers
built on Jan 4 2012 16:21:50 with gcc 4.6.1
configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
avutil configuration: --extra-version='4:0.7.3ubuntu0.11.10.1+medibuntu1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
avcodec configuration: --extra-version='4:0.7.3ubuntu0.11.10.1+medibuntu1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
avformat configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
avdevice configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
avfilter configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
swscale configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
postproc configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavutil 51. 7. 0 / 51. 7. 0
libavcodec 53. 6. 0 / 53. 6. 0
libavformat 53. 3. 0 / 53. 3. 0
libavdevice 53. 0. 0 / 53. 0. 0
libavfilter 2. 4. 0 / 2. 4. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 52. 0. 0 / 52. 0. 0
D aac raw ADTS AAC
- method using vlc-git. This one apparently uses the mplayer codecs which are fine since I'm on 32 bits. But the result is the same.
all of them compile fine but I can't get encoding AAC. I'm really clueless, how can I check that ffmpeg can see the codec libraries (I can only think for now that there is some mismatch though I've removed ffmpeg and started from scratch).
I'm on Oneiric and Mediuntu repo is enabled. Apt-cache says libfaac0 is installed (version 1.28-0ubuntu1). Tx in advance for any hint
FakeOutdoorsman
March 1st, 2012, 09:09 PM
FFmpeg can support four AAC encoders: the native AAC encoder (I'll call it ffaacenc), libfaac, libvo_aacenc, and libaacplus, but this guide only supports ffaacenc and libfaac. Installing the others isn't too hard; maybe I'll add separate instructions for the others later this week.
You should see ffmpeg -codecs instead of ffmpeg -formats to see a list of supported encoders and decoders:
$ ffmpeg -codecs | grep aac
...
DEA D aac Advanced Audio Coding
D A D aac_latm AAC LATM (Advanced Audio Codec LATM syntax)
EA libfaac libfaac AAC (Advanced Audio Codec)
libav-ffmpeg from the repository with libraries from Medibuntu (instructions here (http://ubuntuforums.org/showthread.php?t=1117283)) should also include ffaacenc and libfaac.
To encode with libfaac. This example will output VBR:
ffmpeg -i input -c:a libfaac -q:a 100 -vn output.mp4
This example will output ABR (or maybe CBR):
ffmpeg -i input -c:a libfaac -b:a 128k -vn output.mp4
To encode with ffaacenc:
ffmpeg -i input -strict experimental -c:a aac -b:a 128k -vn output.mp4
You can also probably use -q:a with ffaacenc, but I'm not sure of the supported values or if it even works.
You can also pipe from ffmpeg to any encoder that accepts piped input:
ffmpeg -i input -f wav - | faac -o output.mp4 -
This is effective if you don't feel like compiling FFmpeg if your version doesn't support your desired encoder.
mpbb77
March 1st, 2012, 09:21 PM
Tx FakeOutdoorsman
I probably had aac encoding all the time:
ffmpeg -codecs | grep aac
ffmpeg version git-2012-02-29-a77c8ad Copyright (c) 2000-2012 the FFmpeg developers
built on Mar 1 2012 19:52:28 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
libavutil 51. 41.100 / 51. 41.100
libavcodec 54. 4.100 / 54. 4.100
libavformat 54. 1.100 / 54. 1.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 62.101 / 2. 62.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100
DEA D aac Advanced Audio Coding
D A D aac_latm AAC LATM (Advanced Audio Codec LATM syntax)
EA libfaac libfaac AAC (Advanced Audio Codec)
I was following blindly other posts by polling formats.
Tx also for the very quick feedback
tanoloco
March 2nd, 2012, 02:38 PM
main purpose:
how to solve
ffmpeg: relocation error: /usr/local/lib/libswresample.so.0: symbol av_opt_set_int, version LIBAVUTIL_51 not defined in file libavutil.so.51 with link time reference
alternatively how to solve:
segmentation fault
Hello,
I recently installed the last ffmpeg and x264 following this howto with the only difference that I used the following configuration
./configure --enable-gpl --enable-libgsm --enable-libxvid \
--enable-libmp3lame --enable-libvorbis --enable-libfaac \
--enable-shared --enable-libopencore-amrnb --enable-libvpx \
--enable-libopencore-amrwb --enable-libtheora --enable-libx264 \
--enable-nonfree --enable-version3 --enable-x11grab
I'm trying to convert a h264 video file using this code
ffmpeg -i "input.mp4" -ar 44100 -ac 2 -ab 192k -acodec libmp3lame -s 1280x544 -vcodec libxvid -r 23.98 -b 2500k "output.avi"
I get this error
ffmpeg: relocation error: /usr/local/lib/libswresample.so.0: symbol av_opt_set_int, version LIBAVUTIL_51 not defined in file libavutil.so.51 with link time reference
However the above error is prompted for any ffmpeg command such
$ ffmpeg -v
For reference I have:
$ ldd /usr/local/bin/ffmpeg | grep libavutil
libavutil.so.51 => /usr/lib/i686/cmov/libavutil.so.51 (0x00269000)
$ dpkg --get-selections | grep libavutil
libavutil-dev install
libavutil-extra-51 install
libavutil51 deinstall
$ uname -a
Linux my-pc 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:50:54 UTC 2012 i686 i686 i386 GNU/Linux
Looking at the release file note of ffmpeg I've installed the 0.9.1.git and I'm using lubuntu oneiric 32bit
My doubt is that I don't have any libswresample at all :(
$ ls -lrt /usr/local/bin | grep libswresample
$
$ ls -lrt /usr/bin | grep libswresample
$
and I don't have it listed in the repository either :(
$ dpkg -l | grep libswres
$
I also tried to download a deb package of libswresample from here (http://debian-multimedia.org/dists/unstable/main/binary-i386/package/libswresample0.php) but I cannot install it as it says me
Error: Dependency is not satisfiable: libavutil51 (>= 5:0.10)
I installed libavutil51 which was in conflict but it's a previous version:
$ dpkg -s libavutil51
Package: libavutil51
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 352
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Source: libav
Version: 4:0.7.3-0ubuntu0.11.10.1
Depends: libc6 (>= 2.4)
Description: Libav utility library
This is the common utility library from Libav. It contains shared code
used by all other Libav libraries.
Homepage: http://libav.org/
Original-Maintainer: Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
So I still cannot go ahead .. must I search, compile and install a newer version of libavutil51?
I'm afraid I'm going to have and endless list of troubles going this way ...
Any suggestions on how to solve this?
The reason why I'trying to install a newer version of ffmpeg and x264 is that running the code I firstly wrote, which is
ffmpeg -i "input.mp4" -ar 44100 -ac 2 -ab 192k -acodec libmp3lame -s 1280x544 -vcodec libxvid -r 23.98 -b 2500k "output.avi"
on a video file I downloaded from the net I got a
Segmentation fault error so I thought I need a newer version of ffmpeg/x264 from the one I have in my repository
Thanks in advance for any help
FakeOutdoorsman
March 2nd, 2012, 08:53 PM
I recently installed the last ffmpeg and x264 following this howto with the only difference that I used the following configuration
./configure --enable-gpl --enable-libgsm --enable-libxvid \
--enable-libmp3lame --enable-libvorbis --enable-libfaac \
--enable-shared --enable-libopencore-amrnb --enable-libvpx \
--enable-libopencore-amrwb --enable-libtheora --enable-libx264 \
--enable-nonfree --enable-version3 --enable-x11grab
How else did you deviate from the guide? Why did you add --enable-shared? Are you using Ubuntu 11.10?
on a video file I downloaded from the net I got a Segmentation fault error
Did you get the segmentation fault with "ffmpeg" from the repository? Can you provide a sample so I can attempt to duplicate the segmentation fault? Also provide the complete console output that includes the seg fault.
tanoloco
March 2nd, 2012, 11:32 PM
SOLVED: see point B!
Are you using Ubuntu 11.10?
Did you get the segmentation fault with "ffmpeg" from the repository? Can you provide a sample so I can attempt to duplicate the segmentation fault? Also provide the complete console output that includes the seg fault.
Hello and thank you so much for your quick reply!
So I divide my question into two points:
A) Segmentation fault:
Yes I'm using Ubuntu 11.10 ... actually lubuntu oneiric flavour :)
$ uname -a
Linux my-pc 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:50:54 UTC 2012 i686 i686 i386 GNU/Linux
To reproduce the segmentation fault:
1. I started removing everything I've installed following your (very nice) guide, to install them again from the repository
$ sudo apt-get remove ffmpeg x264 libx264-dev
$ sudo apt-get install ffmpeg x264 libx264-dev
Which gave me the following versions of:
ffmpeg
$ dpkg -s ffmpeg
Package: ffmpeg
Status: install ok installed
Priority: optional
Section: video
Installed-Size: 1340
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Source: libav
Version: 4:0.7.3-0ubuntu0.11.10.1
Replaces: libavcodec-extra-53 (<< 4:0.6~), libavcodec53 (<< 4:0.7.3-0ubuntu0.11.10.1)
Depends: libavcodec53 (>= 4:0.7.3-0ubuntu0.11.10.1) | libavcodec-extra-53 (>= 4:0.7.3), libavcodec53 (<< 4:0.7.3-99) | libavcodec-extra-53 (<< 4:0.7.3.99), libavdevice53 (>= 4:0.7.3-0ubuntu0.11.10.1) | libavdevice-extra-53 (>= 4:0.7.3), libavdevice53 (<< 4:0.7.3-99) | libavdevice-extra-53 (<< 4:0.7.3.99), libavfilter2 (>= 4:0.7.3-0ubuntu0.11.10.1) | libavfilter-extra-2 (>= 4:0.7.3), libavfilter2 (<< 4:0.7.3-99) | libavfilter-extra-2 (<< 4:0.7.3.99), libavformat53 (>= 4:0.7.3-0ubuntu0.11.10.1) | libavformat-extra-53 (>= 4:0.7.3), libavformat53 (<< 4:0.7.3-99) | libavformat-extra-53 (<< 4:0.7.3.99), libavutil51 (>= 4:0.7.3-0ubuntu0.11.10.1) | libavutil-extra-51 (>= 4:0.7.3), libavutil51 (<< 4:0.7.3-99) | libavutil-extra-51 (<< 4:0.7.3.99), libc6 (>= 2.7), libpostproc52 (>= 4:0.7.3-0ubuntu0.11.10.1) | libpostproc-extra-52 (>= 4:0.7.3), libpostproc52 (<< 4:0.7.3-99) | libpostproc-extra-52 (<< 4:0.7.3.99), libsdl1.2debian (>= 1.2.10-1), libswscale2 (>= 4:0.7.3-0ubuntu0.11.10.1) | libswscale-extra-2 (>= 4:0.7.3), libswscale2 (<< 4:0.7.3-99) | libswscale-extra-2 (<< 4:0.7.3.99)
Conflicts: ffprobe
Conffiles:
/etc/ffserver.conf d4d0a77d594735af0d92e12e2b74aa15
Description: Multimedia player, server, encoder and transcoder
This package contains the ffplay multimedia player, the ffserver streaming
server and the ffmpeg audio and video encoder. They support most existing
file formats (AVI, MPEG, OGG, Matroska, ASF...) and encoding formats (MPEG,
DivX, MPEG4, AC3, DV...).
Homepage: http://libav.org/
Original-Maintainer: Debian multimedia packages maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
x264
$ dpkg -s x264
Package: x264
Status: install ok installed
Priority: optional
Section: graphics
Installed-Size: 656
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Version: 2:0.116.2042+git178455c-1ubuntu1
Replaces: x264-bin
Depends: libavutil51 (>= 4:0.7-1) | libavutil-extra-51 (>= 4:0.7-1), libc6 (>= 2.7), libffms2-2, libswscale2 (>= 4:0.7-1) | libswscale-extra-2 (>= 4:0.7-1), libx264-116
Conflicts: x264-bin
Description: video encoder for the H.264/MPEG-4 AVC standard
x264 is an advanced commandline encoder for creating H.264 (MPEG-4 AVC)
video streams.
.
x264 supports the following features:
* CABAC (context-based adaptive binary arithmetic coding) and CAVLC
(context-based adaptive variable length coding
* multiple reference frames
* 16x16, 8x8 and 4x4 intra-predicted macroblocks
* all P-frame inter-predicted macroblock types
* B-Inter-predicted macroblock types from 16x16 down to 8x8
* rate distortion optimization
* multiple rate control modes (constant quantizer, constant quality, single
or multipass ABR with the option of VBV)
* scene cut detection
* adaptive B-frame placement, with the option of keeping B-frames as
references / arbitrary frame order
* 8x8 and 4x4 adaptive spatial transform (high profile)
* lossless mode (high 4:4:4 profile)
* custom quantization matrices (high profile)
* parallel encoding on multiple CPUs
* interlaced streams
Original-Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Homepage: http://www.videolan.org/developers/x264.html
libx264-dev
$ dpkg -s libx264-dev
Package: libx264-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 1324
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Source: x264
Version: 2:0.116.2042+git178455c-1ubuntu1
Depends: libx264-116 (= 2:0.116.2042+git178455c-1ubuntu1)
Description: development files for libx264
libx264 is an advanced encoding library for creating H.264 (MPEG-4 AVC)
video streams.
.
This package contains the static library and headers used to build programs
that use libx264.
Original-Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Homepage: http://www.videolan.org/developers/x264.html
2. You can download a sample of the video I'm trying to convert here (https://rapidshare.com/files/159558855/sample.mp4) it's a file of about 9 Mb.
3. I'm trying to convert it using the following command
$ ffmpeg -i "sample.mp4" -ar 44100 -ac 2 -ab 192k -acodec libmp3lame -s 1280x544 -vcodec libxvid -r 23.98 -b 2500k "output.avi"
I get the following error
ffmpeg version 0.7.3-4:0.7.3-0ubuntu0.11.10.1, Copyright (c) 2000-2011 the Libav developers
built on Jan 4 2012 16:21:50 with gcc 4.6.1
configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
WARNING: library configuration mismatch
avutil configuration: --extra-version='4:0.7.3ubuntu0.11.10.1+medibuntu1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
avcodec configuration: --extra-version='4:0.7.3ubuntu0.11.10.1+medibuntu1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-vaapi --enable-libopenjpeg --enable-libfaac --enable-nonfree --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdirac --enable-libmp3lame --enable-librtmp --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
avformat configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
avdevice configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
avfilter configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
swscale configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
postproc configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=i386 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --disable-static --disable-ffmpeg --disable-ffplay
libavutil 51. 7. 0 / 51. 7. 0
libavcodec 53. 6. 0 / 53. 6. 0
libavformat 53. 3. 0 / 53. 3. 0
libavdevice 53. 0. 0 / 53. 0. 0
libavfilter 2. 4. 0 / 2. 4. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 52. 0. 0 / 52. 0. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isomavc1
creation_time : 2011-04-20 03:55:11
encoder : HandBrake 0.9.5 2011010300
Duration: 00:00:30.03, start: 0.000000, bitrate: 2530 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1280x544, 2141 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Metadata:
creation_time : 2011-04-20 03:55:11
Stream #0.1(eng): Audio: aac, 48000 Hz, 5.1, s16, 383 kb/s
Metadata:
creation_time : 2011-04-20 03:55:11
[buffer @ 0x89fb020] w:1280 h:544 pixfmt:yuv420p
Output #0, avi, to 'output.avi':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isomavc1
creation_time : 2011-04-20 03:55:11
ISFT : Lavf53.3.0
Stream #0.0(und): Video: mpeg4, yuv420p, 1280x544, q=2-31, 2500 kb/s, 23.98 tbn, 23.98 tbc
Metadata:
creation_time : 2011-04-20 03:55:11
Stream #0.1(eng): Audio: libmp3lame, 44100 Hz, 2 channels, s16, 192 kb/s
Metadata:
creation_time : 2011-04-20 03:55:11
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press ctrl-c to stop encoding
Segmentation Fault
B) Following your howto:
Why --enable-shared ? you asked ..
The only params changing from your guide are --enable-shared --enable-libgsm --enable-libxvid .. actually the only one I really need is libxvid so I discarded the others and recompiled ffmpeg.
So following your guide I completed point 1 (with sudo apt-get autoremove too), 2, 3, 4 and 5 (installing ffmpeg) with
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab --enable-libxvid --enable-libvpx
and then everything went ok! :D
So now I can convert my sample.mp4 with the same command as above! (see point A.3)
So you were right: the problem was --enable-shared!
Thank you very much for your support!
andrew.46
March 3rd, 2012, 03:57 AM
Exciting times for FFmpeg and MPlayer users: Windows Media Audio Lossless decoder (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=9d25f1f6194dba9cfd60c0596 aa59ad145d61382).
FakeOutdoorsman
March 3rd, 2012, 05:30 AM
...and another for today: bluray protocol (http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23a5bf9db06d9f55fe0d38d49bdea91be1795a b3).
rahul_bhise
March 12th, 2012, 11:01 AM
thanks i was searchig for a perfict screencast which ended hear. Thanks a lot for this good work of yours.
varagrawal
March 15th, 2012, 01:18 PM
When I try installing FFmpeg from Git as you have given and then I try to install OpenCV, I keep getting these undefined reference errors.
I then downloaded the version 0.10 source and compiled from there and OpenCV installed without issue.
Why is this discrepancy present?
FakeOutdoorsman
March 15th, 2012, 06:59 PM
Why is this discrepancy present?
It's hard to give a reason without seeing the errors.
qyot27
March 15th, 2012, 07:23 PM
Since the libutvideo wrapper supports encoding now too, are there any plans to include it in the tutorial as well?
FakeOutdoorsman
March 15th, 2012, 09:56 PM
What is the general use case for UT Video? I have the impression that it's used among the anime community, but I'm not sure how they are using it. I don't know who else uses it, but I might suggest my Windows friends to try it as an intermediate for editing instead of huffyuv simply because it's easier to install, IIRC.
FakeOutdoorsman
March 15th, 2012, 11:20 PM
For those of you who want to try UT Video:
wget http://umezawa.dyndns.info/archive/utvideo/utvideo-10.2.4-src.zip
unzip utvideo-10.2.4-src.zip
cd utvideo-10.2.4
make
sudo checkinstall --pkgname=utvideo --pkgversion="10.2.4" --backup=no --deldoc=yes --fstrans=no --default
Then configure ffmpeg with --enable-gpl --enable-libutvideo. This will provide the libutvideo encoder and decoder. FFmpeg also comes with a native utvideo decoder but I don't know how it compares to libutvideo.
qyot27
March 16th, 2012, 12:18 PM
What is the general use case for UT Video? I have the impression that it's used among the anime community, but I'm not sure how they are using it. I don't know who else uses it, but I might suggest my Windows friends to try it as an intermediate for editing instead of huffyuv simply because it's easier to install, IIRC.
Both ffdshow and LAV Filters provide support for HuffYUV decoding (ffdshow can also encode ffvhuff through the VFW interface, dunno if LAV Filters can), so I don't know if I'd say Ut Video is necessarily easier to install - although it is if you're comparing it to the reference HuffYUV inf/dll package (but that package doesn't support YV12 encoding/decoding or the Adaptive Huffman tables option...those are both ffvhuff features).
Use case is usually toted as an editing/storage codec instead of Lagarith* (or FFV1) - Lagarith has issues sometimes with frame corruption, and both it and FFV1 are rather slow to encode. Primarily it's because Ut Video is faster to decode, although this is highly highly subject to the processor used - Ut is SSE2 optimized, so it might be capable of running circles around HuffYUV when editing or previewing or whatall (on non-SSE2 processors, there's not much a difference in speed between it and Lagarith, at least since Lagarith got a performance update a couple versions ago). It also gets compression somewhere between regular HuffYUV and Lagarith.
*and this is of course under the situation that you're running Windows or Wine, since Lagarith support in FFmpeg is still incomplete and limited to decoding. So on Linux it's more of a 'faster than HuffYUV on decode, faster than FFV1 on encode' issue.
In my tests of the native utvideo decoder vs. using libutvideo's decoder, the native decoder was faster (this was through the FFMS2 AviSynth plugin and clocked using avsmeter). But this is also considering that I don't have an SSE2 processor, and I don't know if the native decoder is optimized for that the way that libutvideo is. So on newer processors, it could still come down to speed.
My personal reason for asking was mainly for the checkinstall line, but also that I don't know how likely it is to end up in the repositories, since it strictly is FFmpeg that supports libutvideo. I'd say it's pretty likely it might get caught up in the politics of the situation concerning the fork and not be included for that reason. I'm not aware of anything other than FFmpeg (or by extension, things that link to FFmpeg) that can use it at the moment.
I actually have a script that checks the official site and automatically downloads the latest version, rather than the user needing to know what the specific version is. A simpler portion of the same script can be used strictly for checking versions rather than also downloading.
Check & download:
#!/bin/bash
LATEST=$(wget http://umezawa.dyndns.info/archive/utvideo/ -O - | grep "src.zip" - | tail -1 | cut -f7 -d ">" | sed -e "s/zip.*/zip/g" -e "s/^/http\:\/\/umezawa.dyndns.info\/archive\/utvideo\//g")
wget $LATEST
Check only:
wget http://umezawa.dyndns.info/archive/utvideo/ -O - | grep "src.zip" - | tail -1 | cut -f7 -d ">" | sed "s/zip.*/zip/g"
kevdog
March 17th, 2012, 03:02 PM
Not that I'm any expert on using ffmpeg at all, however I thought I would just add possibly an update script as based on the original directions on the tutorial:
#!/bin/bash
#PLEASE MODIFY THE FOLLOWING LINE DEPENDING ON YOUR INSTALLATION
BASEDIR=~/src
#Updating x264
echo "....Updating x264"
cd $BASEDIR/x264
if [[ $(git rev-list --max-count=1 master) != $(git rev-list --max-count=1 origin/master) ]]; then
make distclean
git pull
./configure --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion=""3:$(./version.sh | \
awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
--fstrans=no --default"
fi
#Updating libvpx
echo "....Updating libvpx"
cd $BASEDIR/libvpx
if [[ $(git rev-list --max-count=1 master) != $(git rev-list --max-count=1 origin/master) ]]; then
make clean
git pull
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no \
--deldoc=yes --fstrans=no --default
fi
#Updating ffmpeg
echo "....Updating ffmpeg"
cd $BASEDIR/ffmpeg
if [[ $(git rev-list --max-count=1 master) != $(git rev-list --max-count=1 origin/master) ]]; then
make distclean
git pull
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 \
--enable-nonfree --enable-version3 --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no \
--deldoc=yes --fstrans=no --default
hash x264 ffmpeg ffplay ffprobe
fi
echo "....Updating Done"
exit
prupert
March 17th, 2012, 05:03 PM
Not that I'm any expert on using ffmpeg at all, however I thought I would just add possibly an update script as based on the original directions on the tutorial:
I wrote something similiar here:
http://code.google.com/p/x264-ffmpeg-up-to-date/
Looks like it does the same as yours, but allows for some configuration. It use to support all the various distros that Faeke's guide supported, but not any more as it was such a headache to keep updated. It's hosted at google code, but since the update mechanism isn't as good as git, I've moved the code to git.
I found keeping up to date with Fake's updates was difficult, so I don't tend to update it that often (though it is currently up to date).
Feel free to fork and use and abuse in your script as you please.
Akovia
March 17th, 2012, 09:01 PM
Just wanted to give a big Thank You for keeping the guide up to date for Lucid. It would have been a huge undertaking without your guide, and trying to find any guides for Lucid anymore is almost a losing battle.
(LTS = misnomer)
Anyway, it went flawlessly and your work is greatly appreciated.
Cheers
FakeOutdoorsman
March 18th, 2012, 06:58 AM
Just wanted to give a big Thank You for keeping the guide up to date for Lucid. It would have been a huge undertaking without your guide, and trying to find any guides for Lucid anymore is almost a losing battle.
(LTS = misnomer)
Anyway, it went flawlessly and your work is greatly appreciated.
Cheers
I'm glad it worked for you. I try to have an up-to-date guide for all supported versions of Ubuntu. Luckily I use virtual machines which makes this a much easier task.
Adrian98
March 27th, 2012, 12:23 PM
thanks for the simple and straight forward way of usage of FFmpeg and x264 !! Initially it was tough for me but eventually it was easy to follow!!!
hufemj
April 1st, 2012, 05:57 PM
Not having any luck with the installation. I'm running 11.10. The goal is to use recordmydesktop to create ogv videos and then post them to the web as mp4's. This was working fine under a previous version of ubuntu, I think 10.04.
After doing the first 7 steps, I tried the first 'one pass CRF' example, substituting my ogv file for 'input'. The error message that comes back is "Unrecognized option 'preset' "
If I take out "-preset slow", the error message that comes back is: "Unknown encoder 'libx264' "
I tried re-installing without any of the optional steps and got the same behavior.
If I do a 'which ffmpeg', I get /usr/local/bin/ffmpeg. Checking the date and time created, shows that it is the one I just built.
Any suggestions?
qyot27
April 1st, 2012, 10:39 PM
Not having any luck with the installation. I'm running 11.10. The goal is to use recordmydesktop to create ogv videos and then post them to the web as mp4's. This was working fine under a previous version of ubuntu, I think 10.04.
After doing the first 7 steps, I tried the first 'one pass CRF' example, substituting my ogv file for 'input'. The error message that comes back is "Unrecognized option 'preset' "
If I take out "-preset slow", the error message that comes back is: "Unknown encoder 'libx264' "
I tried re-installing without any of the optional steps and got the same behavior.
If I do a 'which ffmpeg', I get /usr/local/bin/ffmpeg. Checking the date and time created, shows that it is the one I just built.
Any suggestions?
which x264
It's not recognizing libx264 or the preset option because it didn't find x264, and therefore could not link to it.
hufemj
April 2nd, 2012, 03:07 AM
which x264
It's not recognizing libx264 or the preset option because it didn't find x264, and therefore could not link to it.
'which x264' returns /usr/local/bin/x264
So, it's there. But ffmpeg is clearly not finding it.
Not sure what to do.
FakeOutdoorsman
April 2nd, 2012, 08:34 PM
Any suggestions?
Can you show your command and the complete console output?
hufemj
April 3rd, 2012, 08:24 PM
Can you show your command and the complete console output?
Here goes. The command from the first post in this thread under "Using FFmpeg and x264" for "One Pass CRF" appears first with screencast.ogv as the input.
Then the same command with '-preset slow' removed is tried, followed by 'which x264' and 'which ffmpeg'.
mark@mark-desktop:~/testit$ ffmpeg -i screencast.ogv -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 output.mp4
FFmpeg version SVN-r22813, Copyright (c) 2000-2010 the FFmpeg developers
built on Apr 7 2010 14:02:08 with gcc 4.4.1
configuration:
libavutil 50.14. 0 / 50.14. 0
libavcodec 52.66. 0 / 52.66. 0
libavformat 52.61. 0 / 52.61. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
[ogg @ 0x18a6420]max_analyze_duration reached
Input #0, ogg, from 'screencast.ogv':
Duration: 00:00:34.00, start: 0.000000, bitrate: 349 kb/s
Stream #0.0: Data: skeleton
Stream #0.1: Video: theora, yuv420p, 800x608, PAR 1:1 DAR 25:19, 15 fps, 15 tbr, 15 tbn, 15 tbc
Stream #0.2: Audio: vorbis, 48000 Hz, mono, s16, 239 kb/s
Unrecognized option 'preset'
mark@mark-desktop:~/testit$
mark@mark-desktop:~/testit$
mark@mark-desktop:~/testit$
mark@mark-desktop:~/testit$ ffmpeg -i screencast.ogv -acodec libfaac -aq 100 -vcodec libx264 -crf 22 output.mp4
FFmpeg version SVN-r22813, Copyright (c) 2000-2010 the FFmpeg developers
built on Apr 7 2010 14:02:08 with gcc 4.4.1
configuration:
libavutil 50.14. 0 / 50.14. 0
libavcodec 52.66. 0 / 52.66. 0
libavformat 52.61. 0 / 52.61. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
[ogg @ 0x1301420]max_analyze_duration reached
Input #0, ogg, from 'screencast.ogv':
Duration: 00:00:34.00, start: 0.000000, bitrate: 349 kb/s
Stream #0.0: Data: skeleton
Stream #0.1: Video: theora, yuv420p, 800x608, PAR 1:1 DAR 25:19, 15 fps, 15 tbr, 15 tbn, 15 tbc
Stream #0.2: Audio: vorbis, 48000 Hz, mono, s16, 239 kb/s
Unknown encoder 'libx264'
mark@mark-desktop:~/testit$
mark@mark-desktop:~/testit$
mark@mark-desktop:~/testit$ which libx264
mark@mark-desktop:~/testit$ which x264
/usr/local/bin/x264
mark@mark-desktop:~/testit$ which ffmpeg
/usr/local/bin/ffmpeg
mark@mark-desktop:~/testit$
FakeOutdoorsman
April 3rd, 2012, 09:16 PM
FFmpeg version SVN-r22813, Copyright (c) 2000-2010 the FFmpeg developers
built on Apr 7 2010 14:02:08 with gcc 4.4.1
configuration:
There's the issue. Your FFmpeg is old and contains no configure options. I'm guessing that you compiled FFmpeg two years ago when FFmpeg used SVN instead of Git while keeping your home directory contents during Ubuntu upgrades.
Remove x264 and FFmpeg and also delete the x264 and ffmpeg directories in your home directory then follow the guide.
hufemj
April 4th, 2012, 04:37 AM
There's the issue. Your FFmpeg is old and contains no configure options. I'm guessing that you compiled FFmpeg two years ago when FFmpeg used SVN instead of Git while keeping your home directory contents during Ubuntu upgrades.
Remove x264 and FFmpeg and also delete the x264 and ffmpeg directories in your home directory then follow the guide.
Awesome analysis. That totally explained why it worked for everybody but me. I looked in the ffmpeg directory in my home account and, sure enough, there were a bunch of files dated from 2010. I deleted both the ffmpeg and x264 directories in my home account and then simply followed the directions in the first posting of this thread and it worked like a charm.
Thanks!
Lucas Malor
April 7th, 2012, 09:36 PM
If I need only ogg/theora/vorbis, are some of these packages not needed?
libjack-jackd2-dev
libsdl1.2-dev
libva-dev
libvdpau-dev
libx11-dev
libxfixes-dev
texi2html
yasm
zlib1g-dev
qyot27
April 8th, 2012, 09:49 AM
If I need only ogg/theora/vorbis, are some of these packages not needed?
libjack-jackd2-dev
libsdl1.2-dev
libva-dev
libvdpau-dev
libx11-dev
libxfixes-dev
texi2html
yasm
zlib1g-dev
You're mixing up format support and build support. Most of that list of packages has nothing to do with specific formats (except for some that need zlib), but they are necessary - or at least highly recommended - for ffmpeg to set up correctly (texi2html) or interact with your video/sound card or peripherals (libjack, libva, libvdpau, libsdl, libx11, libxfixes) or not be deathly slow because you've turned off assembly optimizations (yasm).
FenrirX
April 10th, 2012, 09:48 AM
Thanks for your great guide!
FakeOutdoorsman
April 10th, 2012, 11:04 PM
This guide has been moved to the official FFmpeg wiki:
How to Compile FFmpeg and x264 on Ubuntu (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide)
I will attempt to migrate the guides for older Ubuntu versions later this week.
andrew.46
April 10th, 2012, 11:38 PM
Bookmarked :)
AlexOnVinyl
April 14th, 2012, 10:10 AM
When you compile x264 it should create the same files that libx264 and libx264-dev would create. If you add "--prefix=/usr" to the x264 configure line then these files will also install in the same location as the repo versions instead of the default /usr/local/lib. I'm unsure how to get Synaptic or apt to recognize this. I'm out of town until July 4 and can't test anything until then.
Will this guide work with 12.04LTS - I'm just running the commands now, and it seems to be doing its job, but then again, I'm a little clueless about whether or not its going to work.
Worst case scenario - how do I get rid of these and undo everything?
FakeOutdoorsman
April 14th, 2012, 06:07 PM
Wow, that's an old quote of mine with questionable information (I prefer to keep compiled stuff in /usr/local and don't really recommend /usr).
I haven't tested the guide in 12.04 yet. I should do that soon, but I assume it should work just fine.
mc4man
April 14th, 2012, 09:42 PM
I haven't tested the guide in 12.04 yet. I should do that soon, but I assume it should work just fine.
Just did a new 64 bit install of 12.04 - all's well with the guide, the vpx build was probably 90% warnings but went ok
A footnote of no concern - they finally spent 10 sec's adjusting the checkinstallrc so fstrans=no is now the default, probably best to just leave in the command for other users..
Jose Catre-Vandis
April 29th, 2012, 01:37 AM
Just followed the 11.10 guide (32 bit) for 12.04 Xubuntu. Works a treat. Many thanks :)
FakeOutdoorsman
April 29th, 2012, 03:42 AM
Just followed the 11.10 guide (32 bit) for 12.04 Xubuntu. Works a treat. Many thanks :)
I'm glad it worked for you. Coincidentally I updated the guide to 12.04: How to Compile FFmpeg and x264 on Ubuntu (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide)
"Updated" is an overstatement since the same instructions work for 12.04, 11.10, 11.04, and 10.10. All I did was download 12.04 and made sure everything worked (although mc4man already confirmed that).
andrew.46
April 29th, 2012, 10:56 AM
Coincidentally I updated the guide to 12.04: How to Compile FFmpeg and x264 on Ubuntu (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide)
Good to see the new location is working out :). Do you need --enable-libvpx in the FFmpeg ./configure string or is that still an optional extra?
FakeOutdoorsman
April 29th, 2012, 08:13 PM
Good catch. Fixed. I decided to dump the "optional" junk as it was probably confusing some users.
AlexOnVinyl
April 29th, 2012, 11:27 PM
Ok, I need a solid way to get the latest FFMpeg and x264 - because last time I followed the guide the way it was setup for Oneiric and then screwed up my whole gconf and had to reinstall everything.
I'm on 12.04LTS
Using: ffmpeg version 0.8.1-4:0.8.1-0ubuntu1
as far as x264 goes, I just grabbed what was off of the Medibuntu repo.
So please, for the safety of my system, and not having the grueling issues of using AptonCD to restore my .deb files without their dependencies in case of emergency, let's make a proper guide tailored towards 12.04.. otherwise I'm not going to take my chances again.
FakeOutdoorsman
April 30th, 2012, 02:55 AM
Ok, I need a solid way to get the latest FFMpeg and x264 - because last time I followed the guide the way it was setup for Oneiric and then screwed up my whole gconf and had to reinstall everything.
Compiling ffmpeg and x264 should not do anything to gconf, and without detailed information about the issue and how to duplicate it I can not provide any useful suggestions.
I'm on 12.04LTS
The guide for Oneiric and Precise are the same.
Using: ffmpeg version 0.8.1-4:0.8.1-0ubuntu1
as far as x264 goes, I just grabbed what was off of the Medibuntu repo.
If the repository version works for you then you probably don't need to compile. Medibuntu does not provide x264, but it does provide libavcodec-extra-53 which can enable the libx264 encoder in the repository ffmpeg.
So please, for the safety of my system, and not having the grueling issues of using AptonCD to restore my .deb files without their dependencies in case of emergency, let's make a proper guide tailored towards 12.04.. otherwise I'm not going to take my chances again.
Again, I'm unsure what the issue is, but see How To Compile FFmpeg and x264 on Ubuntu (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide) for a guide suitable for 12.04. If there is anything wrong with it then let me know and I (or possibly someone else because it is a wiki) will try to fix it.
eichenkranz
April 30th, 2012, 11:15 AM
sorry for my bad english
hello ..... Today I have a new problem
My first server had Ubuntu 10.04 LTS Lucid Lynx + a
Videoprotal ... :-) I have installed FFMPEG na this guide
...... http://ubuntuforums.org/showpost.php?p=9 ... & postcount = 1289
The user has uploaded a video and in the admin area where I must specify only which can be found ffmpeg (Flash
video mode configuration / Path to ffmpeg: / usr / local / bin / ffmpeg) ....
The video has been converted to. Flv + preview
now
I am moved by the video portal ... The new server 10.04.4 LTS ... So I reinstalled the FFMEPG according to the instructions .... and specify the path .... The video is converted but without the preview pics ..... but the image is necessary for the Protal .... one can help me?
AlexOnVinyl
April 30th, 2012, 02:53 PM
Compiling ffmpeg and x264 should not do anything to gconf, and without detailed information about the issue and how to duplicate it I can not provide any useful suggestions.
The guide for Oneiric and Precise are the same.
If the repository version works for you then you probably don't need to compile. Medibuntu does not provide x264, but it does provide libavcodec-extra-53 which can enable the libx264 encoder in the repository ffmpeg.
Again, I'm unsure what the issue is, but see How To Compile FFmpeg and x264 on Ubuntu (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide) for a guide suitable for 12.04. If there is anything wrong with it then let me know and I (or possibly someone else because it is a wiki) will try to fix it.
You're very polite good sir, thank you for understanding my ails.
robdocmagic
May 1st, 2012, 05:24 AM
Hi all,
I am interested in converting some files to mp4.
In some examples I find on the web they reference using the baseline profile with the "slow" preset (or ipod640 preset), but I can't seem to find the slow preset.
Is there a specific "Configure" option I need to do that installs all of the presets? I followed the latest instructions for installing ffmpeg.
Thanks a lot!
[~ffmpeg/presets]$ ls
libvpx-1080p50_60.ffpreset libvpx-360p.ffpreset libvpx-720p.ffpreset libx264-ipod640.ffpreset
libvpx-1080p.ffpreset libvpx-720p50_60.ffpreset libx264-ipod320.ffpreset
FakeOutdoorsman
May 1st, 2012, 08:08 AM
one can help me?
Sorry, but I do not know what "portal" you are using. I guess that the portal does not work with recent FFmpeg due to syntax differences and you should use ffmpeg from the repository.
In some examples I find on the web they reference using the baseline profile with the "slow" preset (or ipod640 preset), but I can't seem to find the slow preset.
FFmpeg now directly uses the x264 presets instead of emulating them with a text file (the ipod presets are an exception because they are non-standard). This is a good thing because the text files could not 100% duplicate the x264 presets. The downside is that the syntax is different, so many examples on the web will not work for you. A current example using the slow preset, animation tune, and baseline profile (you probably won't need to use a tune or profile but I just wanted to show how to use them if you want to):
ffmpeg -i input -c:v libx264 -c:a copy -crf 24 -preset slow -tune animation -profile baseline output.mkv
It might be hard to tell what resources on the web are outdated or just plain wrong, so if you tell us more details of what you want to do and how you plan on using your outputs we can provide more specific examples.
robdocmagic
May 1st, 2012, 05:24 PM
FFmpeg now directly uses the x264 presets instead of emulating them with a text file (the ipod presets are an exception because they are non-standard). This is a good thing because the text files could not 100% duplicate the x264 presets. The downside is that the syntax is different, so many examples on the web will not work for you. A current example using the slow preset, animation tune, and baseline profile (you probably won't need to use a tune or profile but I just wanted to show how to use them if you want to):
ffmpeg -i input -c:v libx264 -c:a copy -crf 24 -preset slow -tune animation -profile baseline output.mkv
It might be hard to tell what resources on the web are outdated or just plain wrong, so if you tell us more details of what you want to do and how you plan on using your outputs we can provide more specific examples.
Thanks for your quick response. I am looking to convert files to MP4 (h264) that can be viewed in Android and iOS devices.
I came across this "cheat sheet":
https://develop.participatoryculture.org/index.php/ConversionMatrix
And if references the slow preset.
Do you by chance have the syntax that I can use to convert to MP4 for iOS and Andriod? It would be much appreciated. :)
Thanks again for keeping these boards up-to-date. We all really appreciate it.
-Rob
FakeOutdoorsman
May 1st, 2012, 11:13 PM
I came across this "cheat sheet":
https://develop.participatoryculture.org/index.php/ConversionMatrix
The author must not have tested some of the Android examples. The preset names should be case sensitive so "-vpre iPod640" should not work. Also, the ipod preset is meant to be used after a standard preset because it is supposed to overwrite the settings from the standard preset. Placement is important and using it before "-vpre slow" may not allow it to work as expected. I can't remember the details of the old ipod preset so it may not be an issue.
Do you by chance have the syntax that I can use to convert to MP4 for iOS and Andriod? It would be much appreciated.
I don't own any of these devices but you can try one of these:
ffmpeg -i input -c:v libx264 -crf 24 -preset slow -vpre libx264-ipod640 -c:a libfaac -q:a 100 output.mp4
or
ffmpeg -i input -c:v libx264 -crf 24 -preset slow -profile:v baseline -level 30 -c:a libfaac -q:a 100 output.mp4
Both examples are very similar. The only difference is that the ipod preset just sets the additional bufsize and maxrate options that are probably not really needed. The only thing you may need to adjust is the crf value. Choose the highest value that still gives you an acceptable quality. You can add "-t 60" if you just want to test the first 60 seconds so you don't have to encode the whole thing to get a rough idea of what the rest of the movie could look like (of course it depends on the complexity of the various scenes) and to quickly see if it even works on your device.
You don't need to only use "slow" either. The general method is to use the slowest preset you have patience for. If "slow" is too slow ("slow" is unsurprisingly slow) then use a faster preset. See x264 --fullhelp for a list of presets and ignore the "placebo" preset as it is a joke and a waste of time.
You may want to resize your video for your device. If that is the case then add:
-filter:v scale="640:-1"
What this does it tell FFmpeg to use the scale filter to resize the video to 640 pixels wide. The -1 means to make the height whatever value it needs to be to preserve the aspect ratio. Unfortunately, depending on the size of your input, the -1 can often provide an odd numbered value which is not acceptable for libx264. Therefore I usually recommend using:
-filter:v scale="640:trunc(ow/a/2)*2"
It's basically similar to -1 but should return an even value. Alternatively, if you know a specific height instead, such as 360, you can use:
-filter:v scale="trunc(oh*a*2)/2:360"
So in the end your command may look like:
ffmpeg -i input -c:v libx264 -crf 24 -preset slow -profile:v baseline -level 30 -filter:v scale="640:trunc(ow/a/2)*2" -c:a libfaac -q:a 100 output.mp4
Redwol
May 4th, 2012, 10:53 AM
Hi FakeOutdoorsman,
I have followed the guide on the wiki for my ubuntu 12.04 LTS and successfully installed ffmpeg with optional components. However, I noticed that adobe flash plugin on youtube(seems to be only site with this issue) with firefox 12 seems to have distorted hue levels and the videos are blue (everyone looks like a smurf).
Is there a way for me to fix this hue setting? I have seen 2 working workarounds, first is to revert changes made by your tutorial or disable hardware acceleration.
Does anyone else have the same problem?
Thanks
Jose Catre-Vandis
May 4th, 2012, 11:11 AM
Hi FakeOutdoorsman,
I have followed the guide on the wiki for my ubuntu 12.04 LTS and successfully installed ffmpeg with optional components. However, I noticed that adobe flash plugin on youtube(seems to be only site with this issue) with firefox 12 seems to have distorted hue levels and the videos are blue (everyone looks like a smurf).
Is there a way for me to fix this hue setting? I have seen 2 working workarounds, first is to revert changes made by your tutorial or disable hardware acceleration.
Does anyone else have the same problem?
Thanks
Install the Flash Aid extension in Firefox, then run it to update/change your flash plugin. This fixed it for me.
AlexOnVinyl
May 4th, 2012, 12:34 PM
Hi FakeOutdoorsman,
I have followed the guide on the wiki for my ubuntu 12.04 LTS and successfully installed ffmpeg with optional components. However, I noticed that adobe flash plugin on youtube(seems to be only site with this issue) with firefox 12 seems to have distorted hue levels and the videos are blue (everyone looks like a smurf).
Is there a way for me to fix this hue setting? I have seen 2 working workarounds, first is to revert changes made by your tutorial or disable hardware acceleration.
Does anyone else have the same problem?
Thanks
Actually, I can help with this. The reason why everything looks all Orange and Blue is due more to the fact that Adobe dropped Linux support - the best work around - in my experience has been to open the video in full screen, then open the options and disable the Hardware Acceleration from there, assuming that it wasn't functional when you tried it at normal youtube video resolution.
Try this and let me know if it works.
Jose Catre-Vandis
May 5th, 2012, 01:13 PM
Just carried out installation on headless server. Required reboot to enable functionality (e.g. didn't recognise "c:v libx264" option). After reboot all worked as expected :)
Redwol
May 5th, 2012, 03:30 PM
Install the Flash Aid extension in Firefox, then run it to update/change your flash plugin. This fixed it for me.
Thanks! This fixed my issue.
edit: I also noticed there was a update to flash plugin so it might have fixed the issue but I installed both nonetheless. Also I am using Nouveau, instead of NVIDIA driver.
FakeOutdoorsman
May 5th, 2012, 06:16 PM
Just carried out installation on headless server. Required reboot to enable functionality (e.g. didn't recognise "c:v libx264" option). After reboot all worked as expected :)
Good timing. I recently modified the guide a few days ago to support headless servers by excluding some needless dependencies. I also wikified the Lucid and Hardy versions but haven't linked to them yet.
A reboot? Inconceivable! I don't understand why it wouldn't recognize "c:v libx264" without a reboot. Do you remember the particular message you got when you did try?
Thanks! This fixed my issue.
Good, because I had no idea.
Jose Catre-Vandis
May 5th, 2012, 08:11 PM
A reboot? Inconceivable! I don't understand why it wouldn't recognize "c:v libx264" without a reboot. Do you remember the particular message you got when you did try?
Just that IIRC. Same report you get when you put an incorrect parameter in the chain ....
Didn't have to reboot when I installed to desktop 12.04 though....
(Must confess I didn't spot your headless server section (to quote a song from Beauty and the Beast: "there was something there that wasn't there before ;)) until I had run the desktop install, so maybe this didn't help?
liam.bliss
May 11th, 2012, 10:42 AM
Hello all, I'm trying to build FFmpeg with h254 support on my headless Ubuntu 12.04 server, as per https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
h264 builds fine, but when i try to build FFmpeg it fails every time at the "CC libavcodec/h254" step.
$ make
CC libavdevice/alldevices.o
CC libavdevice/alsa-audio-common.o
CC libavdevice/alsa-audio-dec.o
CC libavdevice/alsa-audio-enc.o
[...SNIP...]
CC libavcodec/h263.o
CC libavcodec/h263_parser.o
CC libavcodec/h263dec.o
CC libavcodec/h264.o
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
make: *** [libavcodec/h264.o] Error 4
$
I followed the instructions to the letter, with the exception that I apt-get installed FFmpeg and libx264-dev beforehand and then apt-get removed them when they didn't work.
Does anyone have any idea why the build might be failing? Apologies if this has been asked before, there's a lot of posts to read through in this thread!
- Liam
andrew.46
May 11th, 2012, 02:26 PM
This could be a ram access problem rather than an FFmpeg issue. Have you had a look at available ram / swap file?
ron999
May 14th, 2012, 11:58 AM
Hi FakeOutdoorsman
I've used the guide with Pangolin.
:)
No problems...
...but afterwards when I compiled MEncoder, config couldn't find x264.
:(
So I've had to re-compile x264 with "--enable-shared". :)
With Natty, MEncoder found x264 OK with "--enable-static".
Maybe something has changed since then.
(Or maybe I was compiling against some other x264 or libx264-dev that it found somewhere).:confused:
FakeOutdoorsman
May 14th, 2012, 06:49 PM
...but afterwards when I compiled MEncoder, config couldn't find x264.
I haven't compiled MEncoder in years. Maybe Andrew will have an idea?
mc4man
May 15th, 2012, 06:55 AM
Hi FakeOutdoorsman
I've used the guide with Pangolin.
:)
No problems...
...but afterwards when I compiled MEncoder, config couldn't find x264.
:(
So I've had to re-compile x264 with "--enable-shared". :)
With Natty, MEncoder found x264 OK with "--enable-static".
Maybe something has changed since then.
(Or maybe I was compiling against some other x264 or libx264-dev that it found somewhere).:confused:
This is likely caused by gcc > 4.4 which uses "as-needed". So if you were to check your configure log the x264 section would probably have quite a number of 'undefined references'
How you could change this in a mplayer build not sure, possibly ask in the compiling subforum
Otherwise you could just as well build x264 as both static & shared, won't matter much, the libx264 version # is going to be higher than the ubuntu repo's one so they can co-exist
Otherwise you could install gcc-4.4 & configure mplayer with --cc=gcc-4.4
andrew.46
May 15th, 2012, 08:56 AM
I haven't compiled MEncoder in years. Maybe Andrew will have an idea?
I too have not looked at MEncoder for a long while. But config.log should give a meaningful error message?
ron999
May 15th, 2012, 01:05 PM
Hi mc4man
I've done some experiments.
It seems that now with Pangolin...
IF x264 is not installed
THEN MEncoder is happy to build with libx264-dev
ELSE
IF x264 is installed
THEN MEncoder won't build with libx264-dev
Maybe it's possible to force the compiler to ignore a static x264 and allow MEncoder to build with libx264-dev.
In the meantime, I've compiled x264 'shared' and removed libx264-dev.
:cool:
mc4man
May 15th, 2012, 02:24 PM
Hi mc4man
I've done some experiments.
It seems that now with Pangolin...
IF x264 is not installed
THEN MEncoder is happy to build with libx264-dev
ELSE
IF x264 is installed
THEN MEncoder won't build with libx264-dev
Maybe it's possible to force the compiler to ignore a static x264 and allow MEncoder to build with libx264-dev.
In the meantime, I've compiled x264 'shared' and removed libx264-dev.
:cool:
Any which way you go should be ok. As far as using the x264 build as typical to this how-to for a mplayer/mencoder build with gcc > 4.4 -
If you add this to your mplayer configure then should go ok w/ the static only x264 -
--extra-libs-mencoder=-lx264
Though as mentioned see no real reason against building x264 as shared
ron999
May 15th, 2012, 02:57 PM
Thanks mc4man but "--extra-libs-mencoder=-lx264" has not solved the issue. :(
When x264 static is installed the MPlayer config message still shows:-
Checking for x264 ... no (in FFmpeg: no)
mc4man
May 15th, 2012, 03:09 PM
Ron - you're right - I was on a 12.10 install but then switched to 12.04 & forgot that I'd installed x264 as shared yesterday to ck.
(There are a couple of people frequenting the compiling forum that know the gcc changes fairly well if you are curious to pursue
active1
June 2nd, 2012, 10:41 AM
can anyone tell me the difference between make and make fprofiled ?
+what is the advantage from --enable-win32thread ? (i know it is for windows)
thanx
rh10023
June 14th, 2012, 02:20 AM
Where is the usage part of this guide? Need to look up something on audio offsets.
FakeOutdoorsman
June 14th, 2012, 03:12 AM
There was a small usage section of the guide but I removed it. It didn't address audio offsets though. I do plan on adding a new usage section, but it's low priority right now. So for now just consider this thread an interactive usage section or refer to "ffmpeg -h" or "man ffmpeg".
Jose Catre-Vandis
June 16th, 2012, 10:36 AM
+1 for a usage guide, with all the changes to syntax recently I have got lost :(
cantormath
June 17th, 2012, 03:17 PM
It appears that this file may have been moved:
:~$ git clone --depth 1 http://git.chromium.org/webm/libvpx.git
Initialized empty Git repository in /opt/ffmpeg/libvpx/.git/
error: The requested URL returned error: 501 while accessing http://git.chromium.org/webm/libvpx.git/info/refs
fatal: HTTP request failed
Jose Catre-Vandis
June 17th, 2012, 05:05 PM
It appears that this file may have been moved:
:~$ git clone --depth 1 http://git.chromium.org/webm/libvpx.git
Initialized empty Git repository in /opt/ffmpeg/libvpx/.git/
error: The requested URL returned error: 501 while accessing http://git.chromium.org/webm/libvpx.git/info/refs
fatal: HTTP request failed
You seem to have snuck a "--depth 1" in there - not in the tut ?
git clone http://git.chromium.org/webm/libvpx.git
FakeOutdoorsman
June 17th, 2012, 11:37 PM
Works for me:
$ git clone --depth 1 http://git.chromium.org/webm/libvpx.git
Cloning into 'libvpx'...
remote: Counting objects: 5011, done.
remote: Compressing objects: 100% (2386/2386), done.
remote: Total 5011 (delta 3626), reused 3710 (delta 2501)
Receiving objects: 100% (5011/5011), 3.89 MiB | 355 KiB/s, done.
Resolving deltas: 100% (3626/3626), done.
Perhaps it is a temporary error with the server? What Ubuntu version are you using? The libvpx ($ git clone --depth 1 http://git.chromium.org/webm/libvpx.git
Cloning into 'libvpx'...
WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-7zRwxY/pkcs11: No such file or directory
remote: Counting objects: 5011, done.
remote: Compressing objects: 100% (2386/2386), done.
remote: Total 5011 (delta 3626), reused 3710 (delta 2501)
Receiving objects: 100% (5011/5011), 3.89 MiB | 355 KiB/s, done.
Resolving deltas: 100% (3626/3626), done.
) site shows the same repository address.
andrew.46
June 18th, 2012, 10:17 AM
There is always a release snapshot:
http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2
which gets released every 2 months or so....
CaptainSlower
July 4th, 2012, 01:06 PM
Just wondering whether anybody else has experienced difficulty compiling ffmpeg on Ubuntu 10.04 using the instructions at:
https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideLucid
I've followed them carefully, but when I come to run make on the ffmpeg as downloaded from git, I get the following error(s):
makefile:2: config.mak: No such file or directory
Makefile:47: /common.mak: No such file or directory
Makefile:89: /libavutil/Makefile: No such file or directory
Makefile:89: /library.mak: No such file or directory
Makefile:169: /doc/Makefile: No such file or directory
Makefile:170: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
Am I correct in thinking that this means that some of the required make for ffmpeg files simply are not present in the repository?
SL666
July 4th, 2012, 10:35 PM
At a guess i'd say your ./configure command did not complete successfully.
FakeOutdoorsman
July 5th, 2012, 08:08 PM
At a guess i'd say your ./configure command did not complete successfully.
Seems like a good guess to me. I followed the guide today on Lucid and it worked as expected.
Redwol
July 12th, 2012, 06:55 PM
I get this error:
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
ERROR: librtmp not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
looks like librtmp is split from ffmpeg project: http://forum.serviio.org/viewtopic.php?f=5&t=6039
edit: I am on ubuntu 12.04 desktop (x64)
according to link above
sudo apt-get install pkg-config libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libvorbis-dev libvpx-dev libx264-devshould work but they are from the repo not git... can cause problems
ron999
July 12th, 2012, 07:15 PM
I get this error:
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
ERROR: librtmp not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
looks like librtmp is split from ffmpeg project: http://forum.serviio.org/viewtopic.php?f=5&t=6039
edit: I am on ubuntu 12.04 desktop (x64)
according to link above
sudo apt-get install pkg-config libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libvorbis-dev libvpx-dev libx264-devshould work but they are from the repo not git... can cause problems
Looks like you're making up your own commands instead of working to the Compilation Guide here ---> https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
FakeOutdoorsman
July 12th, 2012, 08:12 PM
I added librtmp stuff to the guide yesterday and it worked for me in 12.04. Did you check to see that librtmp-dev is actually installed? Does the tail end of ~/ffmpeg/config.log show anything of interest?
sudo apt-get install librtmp-dev
cd ~/ffmpeg
make distclean
git pull
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis \
--enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no \
--deldoc=yes --fstrans=no --default
hash x264 ffmpeg ffplay ffprobe
Redwol
July 12th, 2012, 10:38 PM
I added librtmp stuff to the guide yesterday and it worked for me in 12.04. Did you check to see that librtmp-dev is actually installed? Does the tail end of ~/ffmpeg/config.log show anything of interest?
sudo apt-get install librtmp-dev
cd ~/ffmpeg
make distclean
git pull
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis \
--enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no \
--deldoc=yes --fstrans=no --default
hash x264 ffmpeg ffplay ffprobe
Sorry! I must have missed the top half of the guide that mentions dependencies.
I thought I installed them yesterday and wanted to work on rest of the guide today, huh must be the hot weather.
Thanks!
robdocmagic
July 16th, 2012, 07:42 PM
Hi All,
I am using the filters to put text in the top/bottom left and logos in the top/bottom right of my converted videos. It has been working perfectly for many months.
Here is my command:
/usr/local/bin/ffmpeg -i 4384.mts -vf "movie=/home/bigwayvideos/processing/bottom_right_watermark.png [logo];movie=/home/bigwayvideos/processing/top_right_watermark.png [logo2];[in][logo] overlay=W-w-8:H-h-8 [in+logo];[in+logo][logo2] overlay=W-w-8:8 [in+logo2]; [in+logo2] drawtext=fontfile=/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf:text='test (Jul 2012) - Day\: 1\, Jump\: 5':fontsize=24:fontcolor=black:x=10:y=10,drawtext= fontfile=/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf:text='Videographer\: Rob Desilets - skydivingphotography.com':fontsize=24:fontcolor=bl ack:x=10:y=H-th-10 [final];[final]yadif=1[out]" -vol 0 -y -c:v libx264 -crf 24 -preset slow -profile:v baseline -level 30 -c:a libfaac -q:a 100 -r 30 -s 480x320 test-071612-rd-4384-9.mp4
The output looks like this:
http://legacy.skydivingphotography.com/old.png
Notice the size of the logo in top right/bottom right.
About 3 weeks ago I upgraded my ffmpeg (using the steps outlined in this thread) and now when I process the videos my logos are super small.
The new output looks like this:
http://legacy.skydivingphotography.com/new.png
Note the [small] size of the logos in top/bottom right.
The video input is the same size and so are the logos themselves; the only thing different is the ffmpeg I am using.
Does anyone know if I need to pass any additional/new flags into ffmpeg or what I need to do to get them the same size they were?
As always, thanks for your time :)
-Rob
roysoft
July 17th, 2012, 12:05 PM
while converting a generic h264 video with:
ffmpeg -i <input-file> -vcodec libx264 -vpre lossless_slow -profile baseline
-tune zerolatency <output-file.mp4>
This command i get the error
[h264 @ 0x2fc8500] Too many slices (68 >= 16), increase MAX_SLICES and recompile
[h264 @ 0x2fc6400] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (2997/50) -> 29.97 (2997/100)
Input #0, h264, from 'wilson/ns-allinone-3.14.1/ns-3.14.1/scratch/figure5.264':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: h264 (High), yuv420p, 1920x1080, 29.97 fps, 29.97 tbr, 1200k tbn, 59.94 tbc
[NULL @ 0x2fc9000] [Eval @ 0x7fff8fcfe2f0] Undefined constant or missing '(' in 'baseline'
[NULL @ 0x2fc9000] Unable to parse option value "baseline"
Invalid value 'baseline' for option 'profile'
how this error can be solved " Invalid value 'baseline' for option 'profile' "
Could you please help me solving this issue...
rulet
July 18th, 2012, 11:49 AM
I used a batch command for conversion all avi to mp4 in one folder:
mkdir output ; for file in *.avi ; do ffmpeg -i $file -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 output/$file.mp4 ; done
This command produce files like 001.avi.mp4.
How to change this command to remove .avi part from the names of final files?
... Well, I found the answer. The command in this case will be:
mkdir output ; for file in *.avi ; do ffmpeg -i $file -acodec copy -vcodec libx264 -preset slow -tune film -profile main -crf 29 output/${file%.avi}.mp4 ; done
By the way the output of this command warns about;
Please use -profile:a or -profile:v, -profile is ambiguous
So I used -profile:v instead -profile. I don't know if it is right or what is better option for -profile.
FakeOutdoorsman
July 19th, 2012, 10:47 PM
Does anyone know if I need to pass any additional/new flags into ffmpeg or what I need to do to get them the same size they were?
I am currently travelling, but I can take a look at this after July 23.
while converting a generic h264 video with:
ffmpeg -i <input-file> -vcodec libx264 -vpre lossless_slow -profile baseline -tune zerolatency <output-file.mp4>
Your command is outdated. There is no lossless_slow preset anymore (file based presets have been replaced with the actual presets in x264) and the baseline profile doesn't support lossless. The zerolatency tune shouldn't do much for lossless except use sliced threads. A current example based on yours is:
ffmpeg -i <input-file> -vcodec libx264 -preset veryslow -qp 0 -tune zerolatency <output-file.mp4>
how this error can be solved " Invalid value 'baseline' for option 'profile' "
You need to change -profile to -profile:v. This is because -profile by itself is ambiguous and I believe there is also an audio -profile option.
So I used -profile:v instead -profile. I don't know if it is right or what is better option for -profile.
Yes, -profile:v is correct.
FakeOutdoorsman
July 25th, 2012, 11:16 PM
fdk-aac mini guide
FFmpeg now supports the Fraunhofer AAC encoder library (fdk-aac (http://sourceforge.net/projects/opencore-amr/)) which increases FFmpeg support to five AAC encoders: ffaacenc (the native FFmpeg AAC encoder), libfaac, libvo-aacenc, libaacplus, and libfdk-aac. Here's how to compile fdk-aac.
1. Get a few build dependencies:
sudo apt-get install build-essential checkinstall
2. Compile fdk-aac:
wget http://downloads.sourceforge.net/opencore-amr/fdk-aac-0.1.0.tar.gz
tar xzvf fdk-aac-0.1.0.tar.gz
cd fdk-aac-0.1.0
./configure --enable-shared=no
make
sudo checkinstall --pkgname=fdk-aac --pkgversion="0.1.0" --backup=no --deldoc=yes --fstrans=no --default
3. Configure and compile ffmpeg:
cd ~/ffmpeg
make distclean
git pull
./configure --enable-libfdk-aac
make, checkinstall, etc as shown in FFmpeg compile guide (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide).
4. Usage. Some examples can be found at Open Source Fraunhofer AAC Encoder (fdk-aac) (www.hydrogenaudio.org/forums/index.php?showtopic=95989).
FakeOutdoorsman
July 25th, 2012, 11:33 PM
libcaca mini guide
FFmpeg now supports libcaca (http://caca.zoy.org/wiki/libcaca), a graphics library that outputs text instead of pixels.
1. Get a few build dependencies:
sudo apt-get install build-essential checkinstall libcaca-dev
2. Configure and compile ffmpeg:
cd ~/ffmpeg
make distclean
git pull
./configure --enable-libcaca
make, checkinstall, etc as shown in FFmpeg compile guide.
3. Usage:
ffmpeg -i INPUT -vcodec rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -
FakeOutdoorsman
August 6th, 2012, 08:42 PM
The FFmpeg and x264 Encoding Guide (https://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide) is now available.
Merrattic
August 8th, 2012, 04:01 PM
Many thanks for the encoding guide.
Did I read somewhere that if using "-ss" to place it before the "-i" to speed up the seek? e.g.
ffmpeg -ss 00:30:00 -i input.avi
FakeOutdoorsman
August 8th, 2012, 07:09 PM
You are correct, but it may not be as accurate as using -ss as an output option (after -i).
mmstick
August 31st, 2012, 04:53 PM
I am having problems with getting this to work. After following all the directions in my Ubuntu 12.04 server system, if I try to use x264 it returns:
x264: error while loading shared libraries: libfdk-aac.so.0: cannot open shared object file: No such file or directory
Edit:
Fixed by purging x264 and recompiling it.
cannon_dt
September 2nd, 2012, 12:51 PM
I followed your guide over at https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide.
Everything went through fine, I run 12.04.
But when I type in ffmpeg in the cl, I get the following:
ffmpeg: error while loading shared libraries: libfdk-aac.so.0: cannot open shared object file: No such file or directory
What do I do?
mc4man
September 2nd, 2012, 06:26 PM
I followed your guide over at https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide.
Everything went through fine, I run 12.04.
But when I type in ffmpeg in the cl, I get the following:
ffmpeg: error while loading shared libraries: libfdk-aac.so.0: cannot open shared object file: No such file or directory
What do I do?
This will likely fix itself the next time you install a proper .deb package which will do an ldconfig
For future reference -
whenever installing a checkinstall package that contains shared libs one should run this after install
sudo ldconfig
So if still affected run that command & all will be ok
The fdk-aac build is doing as shared so it should end with the above command
Edit; the alt. would be to build fdk-aac as static only, don't know enough about it to say
(./configure --disable-shared
FakeOutdoorsman
September 2nd, 2012, 07:00 PM
Edit; the alt. would be to build fdk-aac as static only, don't know enough about it to say
(./configure --disable-shared
It should be static like the others. I'll test and update it later today.
cannon_dt
September 2nd, 2012, 07:18 PM
mc4man, that sudo ldconfig resolved it. Thanks a ton.
Maybe the guide needs to be updated with this
FakeOutdoorsman
September 2nd, 2012, 09:31 PM
I updated the guide. It is now static so running ldconfig or monkeying with any environment variables are now not required.
cannon_dt
September 3rd, 2012, 03:45 PM
One more thing FakeOutdoorsman
Under the FFmpeg compile section, in ./configure --enable-x11grab is missing. It only says to omit for servers but I did it for a desktop and now I got a
"Unknown input format: 'x11grab'
FakeOutdoorsman
September 3rd, 2012, 07:50 PM
One more thing FakeOutdoorsman
Under the FFmpeg compile section, in ./configure --enable-x11grab is missing.
Thanks for the notification. It was listed in the configure originally, but it appears someone removed it (it is a wiki) and I didn't notice when I cleaned up their mess. I'll add it again.
...I did it for a desktop and now I got a
"Unknown input format: 'x11grab'
Can you show your ffmpeg command and the complete console output?
cannon_dt
September 4th, 2012, 07:52 AM
Sorry fakeoutdoorsman.
I fixed the problem by reinstalling ffmpeg. So I dont have the complete console output :(
However the command I used is
ffmpeg -f alsa -ac 2 -i hw:0,0 -f x11grab -r 30 \
-s $(xwininfo -frame | grep -oEe 'geometry [0-9]+x[0-9]+' | grep -oEe '[0-9]+x[0-9]+') \
-i :0.0+$(xwininfo -frame | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' \
| grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/\+/,/' ) \
-acodec pcm_s16le -vcodec libx264 -preset ultrafast -crf 0 -threads 0 \
-y ~/Public/screencast/aa_screencast_baking.mkv
ron999
September 6th, 2012, 03:02 AM
Hi
In the wiki for FFmpeg it shows:-
./configure... --enable-libopencore-amrnb --enable-libopencore-amrwb ...
I think that libopencore-amrwb is only a DEcoder, not an ENcoder.
ffmpeg -codecs shows:-
DEA D libopencore_amrnb OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band)
D A D libopencore_amrwb OpenCORE AMR-WB (Adaptive Multi-Rate Wide-Band)
Doesn't it need vo-amrwbenc to be compiled and installed to enable amr-wb encoding?
I have compiled from here ---> http://sourceforge.net/projects/opencore-amr/files/vo-aacenc/
But it looks as though there's a git version here ---> https://github.com/mstorsjo/vo-aacenc
(libvo-amrwbenc-dev is in the repo for Oneiric-Pangolin-Quantal)
FakeOutdoorsman
September 6th, 2012, 09:24 PM
I think that libopencore-amrwb is only a DEcoder, not an ENcoder.
Yes, I believe it is a decoder only, but I've never used it personally.
Doesn't it need vo-amrwbenc to be compiled and installed to enable amr-wb encoding?
You can use vo-amrwbenc as an encoder in ffmpeg. Just compile it and then add "--enable-libvo-amrwbenc --enable-version3" to your ffmpeg ./configure. I haven't checked to see if it is in an Ubuntu(+1) repository yet.
I have compiled from here ---> http://sourceforge.net/projects/opencore-amr/files/vo-aacenc/
But it looks as though there's a git version here ---> https://github.com/mstorsjo/vo-aacenc
vo-aacenc is another AAC encoder. Did you mean this: https://github.com/mstorsjo/vo-amrwbenc.
(libvo-amrwbenc-dev is in the repo for Oneiric-Pangolin-Quantal)
Thanks for the tip. Maybe I'll add it as a dependency, but I don't know how useful it would be for the general public.
ron999
September 6th, 2012, 09:37 PM
Did you mean this: https://github.com/mstorsjo/vo-amrwbenc.
Yes, that's the one. :)
I posted the wrong links, my bad. :confused:
jgcsd
September 14th, 2012, 04:13 PM
x11grab isn't working for me. I've installed ffmpeg using the tutorial on the wiki, and ffmpeg seems to work, except for x11grab
For example, if I try
ffmpeg -f x11grab -i hw:0 test.mkvI get this
ffmpeg version N-35113-g509f502 Copyright (c) 2000-2012 the FFmpeg developers
built on Sep 14 2012 15:44:58 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration:
libavutil 51. 73.100 / 51. 73.100
libavcodec 54. 55.100 / 54. 55.100
libavformat 54. 27.100 / 54. 27.100
libavdevice 54. 2.100 / 54. 2.100
libavfilter 3. 16.103 / 3. 16.103
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
Unknown input format: 'x11grab'
Any help?
ron999
September 14th, 2012, 04:51 PM
Any help?
Show full unedited output from command:-
ffmpeg -version
FakeOutdoorsman
September 14th, 2012, 06:12 PM
x11grab isn't working for me. I've installed ffmpeg using the tutorial on the wiki, and ffmpeg seems to work, except for x11grab
I get this
ffmpeg version N-35113-g509f502 Copyright (c) 2000-2012 the FFmpeg developers
built on Sep 14 2012 15:44:58 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration:
Any help?
Your ffmpeg configure line is blank. Did you skip the step with the configure options? The minimum you need to enable x11grab is "--enable-gpl --enable-x11grab".
boturk
December 20th, 2012, 10:58 AM
I am trying to install ffmpeg on my ubuntu 12.04 server using the Ubuntu Compilation Guide linked to from here. When I do the configure step for ffmpeg I keep getting ERROR: libaacplus not found or ERROR: fdk-aac not found or ERROR: libvpx not found, even though I installed all those like the guide said.
I also noticed in the configure log this line "ffmpeg /usr/bin/ld: error: cannot find -laacplus", and I think my laacplus files are in /usr/local/lib/ I thought maybe if I re-installed all the components using --enable-shared it might fix the issue. Any help with this issue would be greatly appreciated. Thank you in advanced.
FakeOutdoorsman
December 20th, 2012, 09:30 PM
Did you follow the guide word-for-word, or did you modify any steps? Someone else added the libaacplus and libopus sections, and I haven't tested those instructions yet.
You shouldn't need to add --enable-shared.
Are you sure libaacplus, fdk-aac, and libvpx were installed successfully? You can check with dpkg:
$ dpkg -L libaacplus
/.
/usr
/usr/local
/usr/local/bin
/usr/local/bin/aacplusenc
/usr/local/lib
/usr/local/lib/pkgconfig
/usr/local/lib/pkgconfig/aacplus.pc
/usr/local/lib/libaacplus.a
/usr/local/lib/libaacplus.la
/usr/local/lib/libaacplus.so.2.0.2
/usr/local/include
/usr/local/include/aacplus.h
/usr/local/share
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man1/aacplusenc.1.gz
/usr/share
/usr/share/doc
/usr/share/doc/libaacplus
/usr/share/doc/libaacplus/NEWS
/usr/share/doc/libaacplus/COPYING
/usr/share/doc/libaacplus/INSTALL
/usr/share/doc/libaacplus/ChangeLog
/usr/share/doc/libaacplus/docs
/usr/share/doc/libaacplus/docs/aacplusenc.1
/usr/share/doc/libaacplus/README
/usr/share/doc/libaacplus/AUTHORS
/usr/share/doc/libaacplus/TODO
/usr/local/lib/libaacplus.so.2
/usr/local/lib/libaacplus.so
If you don't need libaacplus, fkd-aac, and libvpx you can simply omit --enable-libaacplus, --enable-libfdk-aac, and --enable-libvpx from the ffmpeg configure line. The instructions to add these external libraries are optional. If you don't plan on using them then it is recommended not to install them.
boturk
December 21st, 2012, 08:33 AM
Thanks for responding FakeOutdoorsman, I actually do plan on using the aac+ and aac codecs, and would like to try out the new vp8 codec. I compared my output from dpkg -L libaacplus to yours and it matches perfectly. I remember getting success from each of these installs when I ran the commands from the guide. I just copy and pasted directly from the guide. I also tried setting up an ubuntu 12.04 vm, followed the same steps, and everything worked. Its just not working on my Ubuntu 12.04 server for some reason.
I pasted the error part from the configure log below. I did notice something interesting in the configure log. FFmpeg appears to be looking in '/usr/bin/ld' for some reason, then failing. I dont have this directory on my machine.
/usr/bin/ld: error: cannot find -laacplus
/tmp/ffconf.2DUaOkun.o:ffconf.qEzF9ZAK.c:function main: error: undefined reference to 'aacplusEncOpen'
collect2: ld returned 1 exit status
ERROR: libaacplus >= 2.0.0 not found
I also tried running 'sudo ldconfig -v' and did see it listed like below.
/usr/local/lib:
libaacplus.so.2 -> libaacplus.so.2.0.2
I hope this information is useful. I have no idea whats causing this. Thanks for the help.
andrew.46
December 21st, 2012, 08:37 AM
Debate over sound quality never ends but arguable you would get better aac sound with neroAacEnc, not part of FFmpeg of course..
boturk
December 22nd, 2012, 02:22 AM
So I was able to get FFmpeg to configure and install by omitting --enable-libfdk-aac and --enable-libaacplus in my configure command. I did install these libraries, but the configure wouldn't see them no mater how many times I removed and reinstalled them.
klein de usa
December 22nd, 2012, 03:00 AM
good day
i have been following your guide for ubuntu 10.04 https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideLucid everything goes well until i get to installing ffmpeg i do :
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \
--enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
and it tells me :
Unknown option "--enable-libopencore-am"
--enable-libopencore-amrwb: command not found
--enable-libx264: command not found
any one have a clue what i have missed or done wrong ?
klein de usa
December 22nd, 2012, 05:01 AM
good day
i have been following your guide for ubuntu 10.04 https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideLucid everything goes well until i get to installing ffmpeg i do :
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
--enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx \
--enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
and it tells me :
Unknown option "--enable-libopencore-am"
--enable-libopencore-amrwb: command not found
--enable-libx264: command not found
any one have a clue what i have missed or done wrong ?
i found my problem all is good
FakeOutdoorsman
December 22nd, 2012, 05:07 AM
So I was able to get FFmpeg to configure and install by omitting --enable-libfdk-aac and --enable-libaacplus in my configure command. I did install these libraries, but the configure wouldn't see them no mater how many times I removed and reinstalled them.
I removed libaacplus instructions. I think it is unnecessary with fdk-aac (also capable of HE-AACv2 with the bonus of LC-AAC encoding too), I encountered some other issues compiling it on 12.04 server, and its download-and-patch functionality wasn't consistent for me causing unpatched files.
I also have a vague recollection of libaacplus having issues when fdk-aac and/or vo-aacenc were either installed or during the ffmpeg configure, but I don't know if it is still a problem, so maybe try again and ffmpeg configure with fdk-aac might work as expected.
and it tells me :
Unknown option "--enable-libopencore-am"
--enable-libopencore-amrwb: command not found
--enable-libx264: command not found
any one have a clue what i have missed or done wrong ?
Looks like a bad paste. Try again:
cd ~/ffmpeg
make distclean
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
I tried it in Lucid and it worked fine for me.
klein de usa
December 22nd, 2012, 03:03 PM
thank you FakeOutdoorsman
i figured that out, i did my research and read everything twice though i'd be smart and make the web page a .pdf file with firefox. so print to .pdf in firefox doesn't make a perfect .pdf file, lesson learned.
sudhakarRedi
January 3rd, 2013, 12:54 PM
I tried using both nasm and yasm from the repos, and x264 would compile but it would say it was building without support for yasm and nasm.
Then, when I used it to convert a file it would say that it was using no cpu extensions, as opposed to saying "MMX SSE ...". It would also take significantly longer (like 2-5 times as long).
But just installing the yasm from source fixed it, and it wasn't very difficult to do.
when I try to enable yasm in ffmpeg it is giving me an error that "yasm not found" how can I solve this problem..? Any one please suggest me
FakeOutdoorsman
January 3rd, 2013, 08:31 PM
Did you install yasm first?
Jesua
January 25th, 2013, 10:20 PM
Good guide..
This guide has been moved to the official FFmpeg wiki:
How to Compile FFmpeg and x264 on Ubuntu (https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide)
The guide will be kept up to date and all supported Ubuntu versions will be included.
heyup
February 12th, 2013, 05:36 PM
Using the guide I got installation errors installing fdk-acc and ffmpeg sections; the other sections installed OK.
fdk-acc and ffmpeg folders appear in /home directory, but are not shown as installed in Synaptic.
I'm using 12.04 (Precise) Classic No Effects.
Error installing fdk-acc
richard@base-desktop:~/fdk-aac$ autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
richard@base-desktop:~/fdk-aac$ ./configure --disable-shared
bash: ./configure: No such file or directory
richard@base-desktop:~/fdk-aac$ make
make: *** No targets specified and no makefile found. Stop.
richard@base-desktop:~/fdk-aac$ sudo checkinstall --pkgname=fdk-aac --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \
> --deldoc=yes --fstrans=no --default
Installation results
make: *** No rule to make target `install'. Stop.
**** Installation failed. Aborting package creation.
Error installing ffmpeg
richard@base-desktop:~/ffmpeg$ ./configure --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame \
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora \
> --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
ERROR: libfdk_aac not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
richard@base-desktop:~/ffmpeg$ make
Makefile:2: config.mak: No such file or directory
Makefile:49: /common.mak: No such file or directory
Makefile:92: /libavutil/Makefile: No such file or directory
Makefile:92: /library.mak: No such file or directory
Makefile:178: /doc/Makefile: No such file or directory
Makefile:179: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
richard@base-desktop:~/ffmpeg$ sudo checkinstall --pkgname=ffmpeg --pkgversion="7:$(date +%Y%m%d%H%M)-git" --backup=no \
> --deldoc=yes --fstrans=no --default
Installation results
Makefile:2: config.mak: No such file or directory
Makefile:49: /common.mak: No such file or directory
Makefile:92: /libavutil/Makefile: No such file or directory
Makefile:92: /library.mak: No such file or directory
Makefile:178: /doc/Makefile: No such file or directory
Makefile:179: /tests/Makefile: No such file or directory
make: *** No rule to make target `/tests/Makefile'. Stop.
**** Installation failed. Aborting package creation.
Can you help fix this.
As aside, it would helpful to beginners if you added instructions to the guide to show how to install source snapshot tar.bz2 files.
FakeOutdoorsman
February 12th, 2013, 08:30 PM
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
That's strange. Installation of autoconf should have installed automake which should have installed aclocal. Are you sure autoconf and automake are installed?
$ dpkg -s automake | grep Status
Status: install ok installed
$ dpkg -s autoconf | grep Status
Status: install ok installed
As aside, it would helpful to beginners if you added instructions to the guide to show how to install source snapshot tar.bz2 files.
I'll keep this in mind. Is git just too annoying to use? I'm planning on changing the guides so they no longer perform any system installation, so changes will be coming...eventually.
heyup
February 13th, 2013, 12:23 AM
That's strange. Installation of autoconf should have installed automake which should have installed aclocal. Are you sure autoconf and automake are installed?
autoconf was installed, but automake wasn't.
I'm using a custom build of Precise desktop; automake wasn't installed by default, and I had disabled 'consider recommended packages as dependencies' in Synaptic settings (to avoid unnecessary bloat).
In Synaptic autoconf lists automake as a recommendeded package not a dependency of autoconf, so automake wasn't installed!
No errors after installing automake.
Is git just too annoying to use? I'm planning on changing the guides so they no longer perform any system installation, so changes will be coming...eventually.
No problem with using git. I just thought that it might useful to include instructions on how to install a snapshot.
Great guide. Thanks for your help solving this problem.
tL0z
March 29th, 2013, 04:14 PM
Hey guys,
I have installed everything successfully, but kdenlive does not detect the new codecs.
How do I get kdenlive to work with the new codecs?
Thank you!
tL0z
April 8th, 2013, 08:31 PM
Anyone?!
qyot27
April 9th, 2013, 09:18 PM
Case 1: kdenlive uses shared libs (which is the most likely scenario).
Solution: Build FFmpeg as shared; this guide builds it as static. May also require installing to /usr rather than /usr/local, but I'm not sure on how that's handled.
Case 2: kdenlive uses static libs.
Solution: Recompile kdenlive so it sees/uses the new static libs.
andrew.46
April 14th, 2013, 02:14 AM
It is possible to install a local only copy of FFmpeg and direct the ./configure process of an application to find this specific copy by manipulating the PKG_CONFIG_PATH variable. An example here:
https://help.ubuntu.com/community/CompileVLC#FFmpeg...
which shows the local copy and for vlc the ./configure process is altered to include:
PKG_CONFIG_PATH="$HOME/vlc_build/vlcdeps/usr/lib/pkgconfig" \
Once this is scripted it is not so painful :). Hopefully something similar will work for kdenlive...
qyot27
April 14th, 2013, 02:17 PM
True, although I'd hardly call having to use PKG_CONFIG_PATH painful. It's pretty much a necessity for cross-compiling.
In other news, x264's AviSynth input module now also supports using AvxSynth (as of February 26th). FFmpeg has a rewritten AviSynth demuxer (initial commit on March 20th) that acts in the same way as x264's, by dynamically loading the library itself; previously, it was tied to Video for Windows. On Linux and OSX, it also supports AvxSynth. x264 automatically enables the support, FFmpeg requires the --enable-avisynth option to do so. This also means that media players that rely on libavformat can play .avs scripts on non-Windows (like mpv, my preferred mplayer variant and mencoder replacement).
The issue of not having AviSynth's large library of external plugins is a drawback, but up until now it was much more difficult to work with AvxSynth, and therefore, also trying to get any of those plugins ported would seem like a waste. Now that both x264 and FFmpeg (and through FFmpeg, anything that relies on libavformat) can use it, hopefully the process will be accelerated.
FakeOutdoorsman
April 14th, 2013, 06:24 PM
It is possible to install a local only copy of FFmpeg and direct the ./configure process of an application to find this specific copy by manipulating the PKG_CONFIG_PATH variable.
That is the direction the guide will evolve to. No more system install or messing with the package management system. I haven't been able to work on it lately, and probably will not be able to for some time, but if anyone would like to contribute that would be fine with me.
FakeOutdoorsman
May 13th, 2013, 02:16 AM
Here's a start to the new version of the guide that will provide a "local" install (is there a more common or more accurate term for this?) of ffmpeg and x264. This should avoid any system installation and will also allow users to install the crappy fake-ffmpeg/libav junk from the repo with no conflict. As an added bonus this will fit well with andrew.46's VLC guide (http://ubuntuforums.org/showthread.php?t=2141949). Also, by changing the custom locations users can install multiple versions. Users without root access can use a similar method provided they at least have build-essentials. Binaries go to "$HOME/bin" since Ubuntu by default has this in the $PATH in ~/.profile and issuance of ffmpeg in console will use the local version and trump the repo version.
sudo apt-get update
sudo apt-get -y install autoconf automake build-essential git libass-dev libfaac-dev libgpac-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libvpx-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html yasm zlib1g-dev
cd
git clone --depth 1 git://git.videolan.org/x264.git
cd x264
./configure --prefix=$HOME/ffmpeg_build --bindir=$HOME/bin --enable-static
make
make install
make distclean
cd
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
autoreconf -fiv
./configure --prefix=$HOME/ffmpeg_build --disable-shared
make
make install
make distclean
cd
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
cd ffmpeg
./configure --prefix=$HOME/ffmpeg_build --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir=$HOME/bin --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree
make
make install
make distclean
source ~/.profile
Questions/Comments:
How should "man ffmpeg" be implemented? There is the "--mandir" standard configure option, but I haven't actually tried anything or looked beyond that.
What about "--datadir"? Generally this is default to "/usr/(local)/share/ffmpeg". For general users the only somewhat useful contents are the presets. I suppose "$HOME/.ffmpeg" could work, since ffmpeg looks there for presets (or at least used to) but I haven't tried anything.
Does everything, such as the external encoders, actually work? Again, I haven't tried.
Making a shallow repository with "--depth 1" seems to screw with the commit number in the ffmpeg console output such as "N-37392-gbc63a76" when it should be at least "N-52966-ga9705e4", but I didn't rule out user error.
I pruned some "lesser" dependencies (libjack, libspeex, opencore-amr, librtmp [native support should suffice]) for no real reason other than making a slimmer guide, but looks like I forgot opus...
To "uninstall" just delete "~/ffmpeg_build" and "~/bin/[ffmpeg,ffplay,ffprobe,ffserver,x264]".
Tested in 13.04. Worksforme™ but I'm open to any suggestions of course. Thanks to andrew.46 and mc4man for the motivation and hints. Once it looks good enough I'll change the ffmpeg guide to use this method.
mc4man
May 13th, 2013, 04:58 AM
As far as the man pages -
Works out fine here having them go to /usr/local/share/man/man1/, checked in both terminal & thru manpage scope, screens from 12.04
(guide works fine here 12.04 & 13.04, the extra flags work well, I'd tried them first, must of been mistyping or an errant space..
So that's -
--mandir=/usr/local/share/man
datadir don't know, haven't used what's in it. Would just use same location as previous guide produced (easy to check, though haven't done so here, just took a guess.. /usr/local/share/ffmpeg
(- here I'll still send the binaries to /usr/local/bin, also available to all from there
andrew.46
May 13th, 2013, 08:41 AM
. Thanks to andrew.46 and mc4man for the motivation and hints.
Thanks for introducing me to FFmpeg in the first place :). BTW it may be a very stupid question but do you actually have to build the x264 executable for FFmpeg? (by building x264 with --disable-cli).
FakeOutdoorsman
May 13th, 2013, 06:24 PM
...do you actually have to build the x264 executable for FFmpeg? (by building x264 with --disable-cli).
No, but I like to include it for users who may want to use it directly...although without lavf support in x264, by simply compiling x264 again after ffmpeg, I don't know how easy it is to use for the general user. Maybe I'll add it to the instructions. It used to be a separate optional section, but I wanted to reduce the verbosity/noise of the guide.
FakeOutdoorsman
May 14th, 2013, 02:50 AM
As far as the man pages -
Works out fine here having them go to /usr/local/share/man/man1/
Probably the way I'll go, but for now I did nothing since I got impatient and updated the wiki page as is. I'd prefer to keep everything in the home directory, and to avoid checkinstall and/or "make uninstall" (and export), but apart from messing with $MANPATH or whatever I don't know of other options yet.
monkeybrain2012
May 14th, 2013, 03:39 AM
Hi, actually I am trying to build ffmpeg as a shared library, I tried to do that on 13.04 basically following your guide but with shared enabled for all the libs and got this error
ffmpeg: symbol lookup error: /usr/local/lib/libavcodec.so.55: undefined symbol: vpx_codec_vp9_dx_algo
If libvpx is disabled then it works. Is this a conflict between libvbx1 and the built version? Thanks in advance for your advice.
andrew.46
May 19th, 2013, 03:42 AM
I see ftp support (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=c86d3a54dedc4dbf37a84a355 9facb7e7ad8ef9f) is in place for FFmpeg, has anybody got it working? I have tried and failed several times :(
qyot27
July 31st, 2013, 10:04 PM
On July 23rd, x265 (http://forum.doom9.org/showthread.php?p=1637971#post1637971) was announced (also here (http://forum.doom9.org/showthread.php?p=1637970#post1637970) for more discussion). This has the tentative blessing of the x264 devs, and the hope is to eventually integrate it with the other projects on Videolan. It's still in an early stage (and pretty slow at the moment), and actively in the process of taking the HM reference code and rewriting/optimizing it to properly be GPL rather than the 3-clause BSD, but it is possible to generate samples with it that Mediainfo recognizes as HEVC/H.265.
[snipped out]
The remaining pieces that need to fall into place for proper support of the format are the decoder currently in OpenHEVC's libav branch (https://github.com/OpenHEVC/libav) to get committed (and then make its way into FFmpeg, most likely through qatar), and for the draft that MPEG put out for putting HEVC into MP4 to be officially approved, which will allow L-SMASH to implement it (GPAC already has somewhat, but they aren't known for being absolutely spec-compliant; plus, GPAC is ridiculously bloated and finicky to cross-compile). The method for storing it in MP4 will also be necessary for it being officially added to Matroska.
2013-08-04: Removed the -DNO_EARLY_RDO_EXIT option; it's been removed from x265's build system too.
2013-10-15: Updated instructions here (http://ubuntuforums.org/showthread.php?t=786095&p=12817042#post12817042). There's proper install rules now.
FakeOutdoorsman
July 31st, 2013, 10:12 PM
Interesting post, and thanks for the info. Admittedly I haven't been following this very closely...yet.
jgcsd
September 9th, 2013, 09:21 AM
I tried the compilation guide on the ffmpeg website, but it fails on the fdk-aac step.
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 195.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 195.
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
Makefile.am:31: Libtool library used but `LIBTOOL' is undefined
Makefile.am:31: The usual way to define `LIBTOOL' is to add `LT_INIT'
Makefile.am:31: to `configure.ac' and run `aclocal' and `autoconf' again.
Makefile.am:31: If `LT_INIT' is in `configure.ac', make sure
Makefile.am:31: its definition is in aclocal's search path.
autoreconf: automake failed with exit status: 1
Anybody know what's up, or how I can fix it?
FakeOutdoorsman
September 10th, 2013, 06:55 PM
What's your Ubuntu version? The "Get the Dependencies" step installs libtool. Did this not get installed? Try this:
sudo apt-get update
sudo apt-get install libtool
cd ~/ffmpeg_sources/fdk-aac
make distclean
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
make distclean
qyot27
October 15th, 2013, 03:53 PM
x265 recently got proper install rules (finally) and some of the asm-related commits seemed to speed things up pretty well on my ancient PIII-era Celeron (I was pulling about 0.20 fps with the default settings, up from something like 0.04 fps some time ago), so here's a new set of instructions:
EDIT 2014-02-13: Updated instructions here. (http://ubuntuforums.org/showthread.php?t=786095&p=12928004#post12928004)
The decoder is getting closer and closer to being committed, as frustrating as it is having to wait for it. Testing with the development branches, though, x265's output can be decoded just fine. L-SMASH and GPAC both support muxing HEVC into MP4 now, and the Matroska devs are fleshing it out also (although the mailing list is still silent since the last posts on this topic back in September; the DivX team's branch of mkvmerge has a draft of it). Part of the dev branches for getting the decoder in libav include patches for playing it from MP4 and MKV. The MP4-related ones weren't working when I tested, but MKV did (as did playing back the .265 files straight out of the encoder). There is also a patch that adds libx265 to libavcodec's external libs, but I have a feeling that it'll be held back even further than the decoder is and won't get committed at the same time.
qyot27
October 16th, 2013, 01:32 AM
Speak of the devil...
So, the HEVC decoder got committed on FFmpeg's side first, just about an hour or so ago. It's there in git right now.
mc4man
January 3rd, 2014, 01:05 AM
For a small personal project that will likely stay that way, (personal ppa), am curious about some other deps that i've see in various places.
The one I can't figure is there any real use to libbz2 in ffmpeg? (libbz2-dev
The other thing that does come up is texi2html is being obsoleted in favor of textinfo. It appears that to use textinfo some change would be needed in ffmpeg source ??, though atm it doesn't really matter as texi2html is still available.
FakeOutdoorsman
January 3rd, 2014, 01:28 AM
...is there any real use to libbz2 in ffmpeg? (libbz2-dev
As far as I know it is suggested, but not required, by the Matroska demuxer. I'm guessing it's for compressed (data) streams but I'm not totally sure. I don't have any samples with these characteristics but I'm not really into "the scene".
The other thing that does come up is texi2html is being obsoleted in favor of textinfo. It appears that to use textinfo some change would be needed in ffmpeg source ??, though atm it doesn't really matter as texi2html is still available.
See ticket #3232: Use texi2any instead of texi2html for documentation generation (https://trac.ffmpeg.org/ticket/3232).
mc4man
January 3rd, 2014, 03:00 AM
As far as I know it is suggested, but not required, by the Matroska demuxer. I'm guessing it's for compressed (data) streams but I'm not totally sure. I don't have any samples with these characteristics but I'm not really into "the scene".
See ticket #3232: Use texi2any instead of texi2html for documentation generation (https://trac.ffmpeg.org/ticket/3232).
Thanks, may or may not include it (bz2
(- for various reasons have decided to let LP build/store/organize most changes or add. things I want rather to do so locally. FFmpeg (binary) was the exception so am exploring what a static FFmpeg debian ppa package (https://launchpad.net/~mc3man/+archive/trusty-prop) entails. Actually works out ok, the libs/includes are somewhat worthless as is & while I've no intention of using them because ppa's are public may go ahead & make them usable by adding a static x264 package
Better current option for no build users are the FFmpeg standalone binaires or there are a couple of ffmpeg shared ppa's
Side note -
not sure if anyone actually reads manpages anymore, I do but not thru a terminal (too many lines, ect.) & I assume there is an online version somewhere or users can open the .html files in a browser instead.
Another option for those following the current wiki who want access, - I've found non standard man locations can be easily added to /etc/manpath.config in various ways
FakeOutdoorsman
January 3rd, 2014, 03:37 AM
I assume there is an online version somewhere or users can open the .html files in a browser instead.
HTML formatted documentation should be available in ~/ffmpeg_build/share/doc/ffmpeg for those who compile. Or you can get the FFmpeg source code and run "make doc" after configuring (assuming you have texi2html). Or simply refer to the online docs if you're using a very recent build (these docs are re-generated and synced to code nightly).
Another option for those following the current wiki who want access, - I've found non standard man locations can be easily added to /etc/manpath.config in various ways
This is something I meant to deal with but never did altough it isn't really a complicated task...I just keep forgetting or putting it off. I wanted "man ffmpeg" and such to work without too much trouble. I was messing around with adding MANPATH to .pam_environment instead of .profile, but AFAICT it required a re-login as opposed to using .profile and just sourcing it. pam was also annoying because it was no longer accepting $PATH (http://askubuntu.com/questions/304976/path-is-not-affected-by-pam-environment) as expected resulting in different behavior between Ubuntu releases. Admittedly, I don't remember why I was trying .pam_environment.
I didn't use /etc/manpath because I wanted to limit the need for superuser and I didn't want to mess with system stuff.
mc4man
January 3rd, 2014, 01:45 PM
For local builds make install or checkinstall don't mind split up prefixes so I've used this to put the mans in an accessible place (the .html go to ffmpeg's install dir.
--mandir=/usr/local/share/man
--datadir=/usr/local/share/ffmpeg
qyot27
January 5th, 2014, 10:37 PM
Only thing I'd suggest is to use --enable-avisynth. There's really not much of a reason not to include it, IMO.
In other news, x264 mainlined support for L-SMASH (http://git.videolan.org/?p=x264.git;a=commitdiff;h=7664b45570e4262c4d22bb8 9f4d395edcb4a639e) with the big commit push back in October, so MP4 muxing doesn't have to rely on GPAC anymore. It prefers L-SMASH if it finds it, and only links to GPAC if L-SMASH isn't present or the user disables it with the --disable-lsmash option.
spvkgn
January 6th, 2014, 05:56 PM
Hello! I'm a newbie and looking for some help. I've compiled latest ffmpeg, x264, ffms2 and avxsynth from git. Is there a way to input .avs with ffmpeg and x264 ? I've tried as follows but have no success.
$ x264 --preset ultrafast --crf 18 -v -o out.mkv ./test.avs
avs [error]: failed to load avisynth
x264 [error]: could not open input file `./test.avs'
$ x264 --version
x264 0.140.2 1ca7bb9
(libswscale 2.5.101)
(libavformat 55.22.102)
(ffmpegsource 2.18.0.0)
built on Jan 6 2014, gcc: 4.6.3
configuration: --bit-depth=8 --chroma-format=all
x264 license: GPL version 2 or later
libswscale/libavformat/ffmpegsource license: GPL version 3 or later
$ ffmpeg -i ./test.avs -v debug
ffmpeg version N-40499-g4ced5d7 Copyright (c) 2000-2014 the FFmpeg developers
built on Jan 6 2014 13:16:27 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/home/pavel/apps/ffmpeg_build --extra-cflags=-I/home/pavel/apps/ffmpeg_build/include --extra-ldflags=-L/home/pavel/apps/ffmpeg_build/lib --bindir=/home/pavel/apps/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab --enable-avisynth --enable-libbluray --enable-libquvi
libavutil 52. 62.100 / 52. 62.100
libavcodec 55. 47.100 / 55. 47.100
libavformat 55. 22.102 / 55. 22.102
libavdevice 55. 5.102 / 55. 5.102
libavfilter 4. 0.103 / 4. 0.103
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument './test.avs'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file ./test.avs.
Successfully parsed a group of options.
Opening an input file: ./test.avs.
[avisynth @ 0x9d3dec0] Format avisynth probed with size=2048 and score=50
[AVIOContext @ 0x9d47fc0] Statistics: 180 bytes read, 0 seeks
./test.avs: Unknown error occurred
AVS script file contains:
FFVideoSource("/path/to/file.mkv")
And the script works fine when I launch it with avxsynth as "avxFrameServer ./test.avs"
Sorry, English is not my native language. Thanks.
qyot27
January 7th, 2014, 03:45 AM
Did you run 'sudo ldconfig' after installing AvxSynth? Did you build FFMS2 as static (it has to be built as shared)? And there's no reason to use ./ before the name of the script - AviSynth scripts aren't executed like shell scripts.
andrew.46
January 7th, 2014, 08:09 AM
In other news, x264 mainlined support for L-SMASH (http://git.videolan.org/?p=x264.git;a=commitdiff;h=7664b45570e4262c4d22bb8 9f4d395edcb4a639e) with the big commit push back in October, so MP4 muxing doesn't have to rely on GPAC anymore. It prefers L-SMASH if it finds it, and only links to GPAC if L-SMASH isn't present or the user disables it with the --disable-lsmash option.
Thanks for that tip, I have built l-smash and recompiled x264:
andrew@skamandros~$ x264 --help | head -n 12
x264 core:140 r2377 1ca7bb9
Syntax: x264 [options] -o outfile infile
Infile can be raw (in which case resolution is required),
or YUV4MPEG (*.y4m),
or Avisynth if compiled with support (yes).
or libav* formats if compiled with lavf support (yes) or ffms support (no).
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC or L-SMASH support (lsmash)
and now I will have a closer look at it. The muxer for l-smash is simply called 'muxer' I note :)
andrew.46
January 12th, 2014, 11:06 AM
Perhaps this might be a starting point for anybody interested in exploring l-smash?
sudo apt-get -y install build-essential git-core checkinstall && \
mkdir -pv $HOME/l-smash_build && cd $HOME/l-smash_build && \
git clone https://code.google.com/p/l-smash/ && cd l-smash && \
./configure && make && \
mkdir -vp doc-pak && cp -v LICENSE doc-pak && \
sudo checkinstall --pakdir "$HOME/l-smash_build" --backup=no --deldoc=yes --pkgname lsmash \
--pkgversion "0:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--fstrans=no --deldesc=yes --delspec=yes --default --strip=yes --stripso=yes \
--addso=yes && \
make distclean
Edit: Altered the checkinstall syntax as suggested by qyot27 && FO......
qyot27
January 12th, 2014, 03:47 PM
IMO, it's preferable to stop using the the wc -l method and just use git itself:
git rev-list --count HEAD
returns the revision number, and
git rev-parse --short HEAD
returns the 7-character abbreviated git hash.
For example (slightly adapted from my cross-compiling instructions for it),
sudo checkinstall --pkgname=lsmash --pkgversion="0:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" --backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes --fstrans=no --default
(if I'm not mistaken, --addso will automatically run sudo ldconfig)
FakeOutdoorsman
January 12th, 2014, 07:26 PM
git rev-list --count HEAD
returns the revision number, and
git rev-parse --short HEAD
returns the 7-character abbreviated git hash.
I use the same commands in PKGBUILD files for Arch Linux.
andrew.46
January 12th, 2014, 11:33 PM
Sounds like a great improvement so I have not only altered the checkinstall syntax as suggested but I will use the git commands for my slackbuild script of l-smash:). I am typing this surreptitiously from work on a Windows computer so I will test when I get home just to be sure...
qyot27
January 13th, 2014, 12:09 AM
I use the same commands in PKGBUILD files for Arch Linux.
Truth be told, I initially found out about the --count parameter from seeing it used in either some of your PKGBUILD files or from divVerent's PKGBUILD for mpv-git. One of these days I'll have to actually do something with Arch...probably when I finally manage to get my hands on a Raspberry Pi.
andrew.46
January 13th, 2014, 01:25 AM
One of these days I'll have to actually do something with Arch...
Don't forget the real action is with Slackware :)
andrew.46
January 24th, 2014, 04:51 AM
L-SMASH and GPAC both support muxing HEVC into MP4 now, [...]
Hmmm... I have just tried to use l-smash with a raw hevc file into mp4:
andrew@ilium~/shared/youtube$ muxer -i hero.h265 -o test.mp4
MP4 muxing mode
[HEVC: Info]: IDR: 1, I: 168, P: 2444, B: 3782, Unknown: 0
Error: there is no media that can be stored in output movie.
Error: failed to open input files.
This is an hevc file I created myself, ffprobe identifies it as:
Input #0, hevc, from 'hero.h265':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: hevc (Main), yuv420p(tv), 320x240, 25 fps, 25 tbr, 1200k tbn, 25 tbc
Could be I have missed something here, so my apologies in advance...
qyot27
January 24th, 2014, 07:58 AM
Yeah, the HEVC support in L-SMASH got disabled a couple weeks after that post in October (http://repo.or.cz/w/L-SMASH.git/commit/153572b12eed094fbf68c6770c753810d49e5a3a), since the official specs for putting it in MP4 hadn't come out (I still don't know if they've been published). So it's sort of a case where work is being done on it, but the users are kept away from it for the time being.
Muxing it with mp4box is currently the only method I know of at the moment to put HEVC into MP4. So long as it's built from SVN, anyway.
andrew.46
January 24th, 2014, 08:40 AM
OIC! Thanks for guiding me to my first muxed h.265 file:
andrew@ilium~/shared/youtube$ muxer -i hero.h265 -o hero.mp4
MP4 muxing mode
[HEVC: Info]: IDR: 1, I: 103, P: 2281, B: 4010, Unknown: 0
Track 1: H.265 High Efficiency Video Coding (for testing purposes only)
Muxing completed!
andrew@ilium~/shared/youtube$
It is very exciting to see the whole hevc experience growing...
andrew.46
January 27th, 2014, 10:51 AM
Slow work on a big file, even with my newish build:
andrew@ilium~/media/lossless$ x265 --preset veryslow --crf 30 --threads 8 elephants_dream_480p24.y4m -o elephant.hevc
y4m [info]: 704x480 24Hz C420, frames 0 - 15690 of 15691
x265 [info]: using cpu capabilities: MMX2 SSE SSE2Fast SSSE3 SSE4.2 AVX XOP FMA4 FMA3 LZCNT BMI1
x265 [info]: HEVC encoder version 0.6+324-237bf6667405
x265 [info]: build info [Linux][GCC 4.8.2][64 bit] 8bpp
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: WPP streams / pool / frames : 8 / 8 / 3
x265 [info]: CU size : 64
x265 [info]: Max RQT depth inter / intra : 3 / 3
x265 [info]: ME / range / subpel / merge : star / 60 / 4 / 4
x265 [info]: Keyframe min / max : 250 / 250
x265 [info]: Rate Control / AQ-Strength / CUTree : CRF-30.0 / 1.0 / 1
x265 [info]: Lookahead / bframes / badapt : 40 / 8 / 2
x265 [info]: b-pyramid / weightp / refs : 1 / 1 / 5
x265 [info]: tools: rect amp rd=6 lft sao-lcu sign-hide
x265 [info]: frame I: 144 kb/s: 1633.08
x265 [info]: frame P: 15532 kb/s: 174.87
x265 [info]: frame B: 15 kb/s: 35.85
x265 [info]: global : 15691 kb/s: 188.11
x265 [info]: 3329 of 15532 (21.43%) P frames weighted
encoded 15691 frames in 8045.54s (1.95 fps), 188.11 kb/s
A little over 2 hours for this effort.
@qyot27 I read your question on Doom 9 about the 16bit internal depth setting, have you experimented with this? I will recompile and compare over the next few days but my eye is not sharp for what will probably be fine detail :(
qyot27
January 27th, 2014, 01:11 PM
If memory serves, I never got an actual answer. But that was also before 10bit encoding was actually added to the HIGH_BIT_DEPTH build. Now that it has the ability to output in 10bit, the question of the internal processing is not really relevant.
Unless they've rejiggered the crf scale like x264 did so that the crf values are the same across bit depths, the difference in crf values between 8bit and 10bit is something like 12 points. So if you use --crf 30 for 8bit, you'd have to use --crf 18 for a comparable encode in 10bit (or in my case, since I'd normally use --crf 18 or --crf 14, it'd be --crf 6 or --crf 2 for 10bit). Yes, this means that 10bit would take negative crf values for some quality levels, and I'm sure the weirdness of that is what prompted x264 to adjust the crf scaling for 10bit so that you can use the same values you would for 8bit. I wonder if/when x265 will do the same.
Also, there are more caveats involved with high bit depth content. Notably, x265 still hasn't added support for FFmpeg's extended y4m format from what I can see from my RSS feeds, so the only way to input >8bit content is to pipe it in raw or use a raw .yuv stream, and then specify the resolution, bit depth, and framerate parameters manually.
I expect that, as with x264, inputting 8bit and outputting with 10bit will still provide a benefit in filesize reduction@same quality or quality increase@same bitrate. But no, I haven't done any real testing with x265's high bit depth stuff; it's probably still not comparable to x264's 10bit abilities right now because there are things like the psy optimizations and AQ that may not be totally up to speed yet. The encode time will also be slower than on 8bit due to less assembly optimizations for high bit depths.
The biggest benefit (aside from being able to save bits) is the effect on banding artifacts - the higher the bit depth, the less obvious/severe the banding will be, or can even possibly be avoided. The problem, though, is that the average user doesn't have access to real high bit depth content - Xiph's media archives (http://media.xiph.org/) for Sintel and Tears of Steel (or the SVT samples (http://media.xiph.org/svt/)) are notable exceptions as they provide 16bit TIFF or 16bit SGI files, but understandably, the filesizes are monstrous.
For normal consumer content that's only available in 8bit, you'd have to dither and upsample it first to try and eliminate any banding that might be present in the source, and then give the dithered upsampled file to x265 (or x264) for encoding in 10bit. This does have the benefit of not needing to download a huge amount of data since you can accomplish the dithering/upsampling with either AviSynth under Wine or VapourSynth (AvxSynth isn't an option here since the dithering filters were never ported for it). The AviSynth method actually requires the use of a patched x264 to take the result of the upsampled script and encode it to lossless H.264 @ 10bit first, and then you can give that file to ffmpeg to pipe to x265 as a high bit depth input. VapourSynth can just output right to the extended y4m format, so you'd still need to pipe over to ffmpeg and then pipe it raw to x265, but it can be done that way I guess.
The dithering/upsampling isn't actually necessary to output in 10bit. Giving it 8bit and telling it to output in 10bit is fine; giving it 10bit and telling it to output in 10bit is simply a nice flourish and can have some additional benefit because you did pre-processing to try and eliminate banding.
FakeOutdoorsman
January 27th, 2014, 07:57 PM
Unless they've rejiggered the crf scale like x264 did so that the crf values are the same across bit depths...
I must have missed this. When did x264 do this?
qyot27
January 28th, 2014, 08:57 AM
I'm guessing it was this commit (http://git.videolan.org/?p=x264.git;a=commit;h=d0406d4e3dc2b0953390857ac6e fa0b5a9d5ba8f). There's also multiple threads that bring up the subject on Doom9, like this one (http://forum.doom9.org/showthread.php?t=165072&highlight=crf+10bit).
Although, maybe I'm remembering the exact details (RE: negative crf) incorrectly for x264. But the quant scale is different between them (8bit is 0-51, 10bit is 0-63), and --crf 0 ceased to be equivalent to --qp 0. The more I try to think about it, the more confused I end up getting; all I know is that on some recent encodes that I did (back in July), crf14 in 10bit looked roughly equal or better than crf14 in 8bit while hitting just about the same filesize, so that's part of what I was considering.
qyot27
February 13th, 2014, 09:57 AM
...And now FFmpeg officially has the ability to use libx265. Use the --enable-libx265 option to tell FFmpeg to link it in.
hg clone https://bitbucket.org/multicoreware/x265
cd x265/source
cmake . -DENABLE_SHARED:bool=off
make
sudo checkinstall --pkgname=x265 --pkgversion="$(grep \
X265_VERSION common/CMakeFiles/common.dir/flags.make | \
cut -f3 -d =)" --backup=no --deldoc=yes --delspec=yes --deldesc=yes \
--strip=yes --stripso=yes --addso=yes --fstrans=no --default
# Use -DHIGH_BIT_DEPTH:bool=on to enable builds that can output 10-bit and (in the future) 12-bit.
The big caveat is that if you build the high bit depth version and link that in, you can't encode 8-bit content with it - it actually stops you and tells you so. This is something carried over from x265 itself, as you can't output 8-bit encodes with a 16bpp build (and because x265 doesn't do internal upsampling, it requires high bit depth input into such a build anyway). Of course, this all just means that if you need to input 8-bit and output 10-bit, use -pix_fmt to upsample it.
So the issue of not having AviSynth input or support for FFmpeg's extended Y4M format are partially resolved now - you just have to use FFmpeg with libx265 support enabled. It would still be nice to have it in the x265 CLI too, but at least this is something.
FakeOutdoorsman
February 13th, 2014, 07:56 PM
-crf hasn't been mapped (yet) as a private option for libx265, but it is still possible via -x265-params:
-x265-params crf=22
andrew.46
February 28th, 2014, 12:29 AM
I am searching for a reliable way to download a specific FFmpeg revision for the vlc guide (http://ubuntuforums.org/showthread.php?t=2141949)that I run. Currently running with the nightly snapshot but of course this will change every 24 hours and potentially lead to breakages when compiling with vlc. I have been looking at something like the following:
wget "http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=fbf9837;sf=tgz" -O \
ffmpeg.fbf9837.tgz
and of course this will be able to be checked directly from git-web with the following address:
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=fbf9837
What I am a little unsure about is:
Is there a better way to do this?
Is it safe enough to use the short hash rather than the long?
More importantly will this gather the correct versions of libavcodec / libavformat / libavfilter / libavutil / libswscale / libswresample etc even when this particular revision is weeks old?
Thanks for any input...
qyot27
February 28th, 2014, 04:13 AM
FFmpeg 2.2 shouldn't be too far off, judging from the mailing list. If it needs to be newer than 2.1.3 (2.1.4 now) due to API changes, then 2.2 would be sufficient whenever it's released.
Otherwise, to be best of my knowledge, the short hash should be safe to use.
As to whether there's a better way, it is possible to use 'git checkout <hash>' to jump to a particular commit in the extant cloned git repo. I prefer to use the long hash when doing this, but the short hash has worked whenever I've been pressed for time. You can branch this to a specific name with 'git checkout -b <newbranchname> <hash>', which makes it more resilient for general managing. And yes, this will result in the versions of lib[avcodec|avformat|avfilter|avutil|avresample|swscal e|swresample] that were current at the time of the commit in question (whether the version numbers are high enough for a particular use is a question of whether they were at that time; it'll use the versions from that commit, not the current versions @ HEAD).
Of course, the question of if a full clone and then checking out a specific revision is preferable to grabbing a snapshot tarball from git-web is a separate issue.
As an aside, regarding x265's instructions, the YASM patch is no longer needed because YASM applied a fix to their git repo which increases it 8x more than the patch did (patch = 511, git = 4096). I've also taken to using Ninja (http://martine.github.io/ninja/manual.html), although I've yet to do any conclusive speed tests - that change seemed to make it fly in comparison to make -j4 on the OSX machine I have access to, though. Ninja is supposed to use multiple cores more efficiently than plain old Make does, as well as being better about inter-dependent source files (again, supposedly). I'd always wondered what it was whenever I saw it listed in CMake's Generator list, but it took a couple years before I actually looked into it more closely. Seems it was initially written for Chrom[e|ium] to use. An example of usage with x265:
sudo apt-get install ninja-build
cd x265/source
cmake -G "Ninja" <other options>
ninja
sudo ninja install
(as with other alternate install systems, you can use it with checkinstall by appending 'ninja install' to the end of the checkinstall command)
umithaz
February 28th, 2014, 03:56 PM
Thanks for the guide guys.
andrew.46
March 1st, 2014, 04:11 AM
FFmpeg 2.2 shouldn't be too far off, judging from the mailing list.
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=e4a6310cce5c1663f68253c50 f364fc0c055f05a
:)
andrew103
March 17th, 2014, 03:34 PM
after trying with yasm , managed to fix the issue. great tip...thanks
andrew.46
March 21st, 2014, 02:50 AM
Latest x265 and FFmpeg seem at the very least usable, a sample here:
http://www.datafilehost.com/d/18528ddd
The encoder likes a fast cpu for sure :)
mc4man
March 21st, 2014, 11:24 PM
Latest x265 and FFmpeg seem at the very least usable, a sample here:
http://www.datafilehost.com/d/18528ddd
The encoder likes a fast cpu for sure :)
Actually looks pretty good for the bitrate, at least at default size.
Was getting some h tearing in players other than mplayer though have fixed that.
(was that from the dvd source?
andrew.46
March 22nd, 2014, 12:03 AM
(was that from the dvd source?
Bluray :)
FakeOutdoorsman
March 22nd, 2014, 07:12 PM
The FFmpeg releases (and occassional usage tip) are also announced on Twitter (https://twitter.com/FFmpeg) (but instead of using releases, general users are still recommended to use the most recent ffmpeg they can from git master via compiling (http://trac.ffmpeg.org/wiki/UbuntuCompilationGuide) or downloading a recent build (http://ffmpeg.org/download.html#LinuxBuilds)).
andrew.46
April 29th, 2014, 07:24 AM
I have compiled my copy of FFmpeg against libsoxr (https://trac.ffmpeg.org/wiki/FFmpeg%20and%20the%20SoX%20Resampler)and started using it for re-sampling. Is anybody else using this, any comments about its usage?
mc4man
May 18th, 2014, 06:05 AM
Just to mention (& possibly not all that useful..
In preparing a new x264 package I noticed Ubuntu now builds x264 for both 8 & 10 bit, the 10 bit .so goes into for example -
/usr/lib/x86_64-linux-gnu/x264-10bit/libx264.so.142
The question here was how to use it when desired (with a static ffmpeg built off of
Using an exported LIBRARY_PATH=blah,blah or starting ffmpeg with an env is ineffectual, ffmpeg uses the default 8 bit .so, but this does seem to work ok
export LD_PRELOAD='/usr/lib/x86_64-linux-gnu/x264-10bit/libx264.so.142'
ffmpeg -i ect., ect.
oleg2
June 5th, 2014, 11:26 PM
I was getting an ld error that 'dlopen' is not found. I had to add -ldl to ld flags to fix that:
./configure --prefix=$HOME/ffmpeg_build --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-ldl -L$HOME/ffmpeg_build/lib" --bindir=$HOME/bin --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree
After that I was able to configure and compile ffmpeg and use it for x264 codecs. My OS is Debian/Sid.
andrew.46
June 21st, 2014, 03:59 AM
Had another look at FFmpeg and x265 and I have to say that things ae looking very nice at the moment. Most striking thing since last time I had a decent look is that there has been a huge encoding speed increase, the following took 47m32.668s:
ffmpeg -y -ss 00:48:58 -t 00:04:42 -i matrix_working_version.mkv \
-map_metadata -1 \
-metadata title="Matrix: Sparring Scene" \
-metadata comment="FFmpeg with libx265 1.1+170-c2ebebb66bf4" \
-metadata date="June 21, 2014" \
-metadata encoded_by="andrew.46" \
-c:v libx265 -preset veryslow -x265-params crf=28 -threads 0 \
-vf "yadif=0:-1:0,crop=1920:784:0:148,scale=1024:trunc(ow/a/2)*2" \
-c:a libfdk_aac -b:a 128k -ac 2 \
-af aresample=resampler=soxr -ar 44100 \
-af "volume=1.25" \
sparring_1.1+170-c2ebebb66bf4.mkv
Feel free to pick holes in the syntax I have used, still looking at making the audio filters syntax a little cleaner :). I have left the output file here for any who are interested:
http://www.datafilehost.com/d/80ef585f
Looks pretty reasonable on my system...
FakeOutdoorsman
June 21st, 2014, 05:57 AM
Hi Andrew,
...still looking at making the audio filters syntax a little cleaner
Since I know little of libx265 I'll try to help with the filters with an untested example:
ffmpeg -y -ss 00:48:58 -t 00:04:42 -i matrix_working_version.mkv \
-map_metadata -1 \
-metadata title="Matrix: Sparring Scene" \
-metadata comment="FFmpeg with libx265 1.1+170-c2ebebb66bf4" \
-metadata date="June 21, 2014" \
-metadata encoded_by="andrew.46" \
-filter_complex "[0:v]yadif=0:-1:0,crop=1920:784:0:148,scale=1024:-2[vid]; [0:a]aresample=44100:resampler=soxr,volume=1.25[aud]" \
-map "[vid]" -map "[aud]"
-c:v libx265 -preset veryslow -x265-params crf=28 -threads 0 \
-c:a libfdk_aac -vbr 5 -ac 2 \
sparring_1.1+170-c2ebebb66bf4.mkv
I tend to use one instance of -filter_complex instead of -vf and -af. In fact, I've never even tried using both -vf and -af or with multiple instances of each, so I don't know how ffmpeg behaves with multiples.
The "-2" option for scale (https://ffmpeg.org/ffmpeg-filters.html#scale-1) is handy: "If one of the values is -n with n > 1, the scale filter will also use a value that maintains the aspect ratio of the input image, calculated from the other specified dimension. After that it will, however, make sure that the calculated dimension is divisible by n and adjust the value if necessary." For those who don't know, libx264 requires that width and height be divisible by 2 for YUV 4:2:0 chroma subsampled outputs.
Maybe you can declare the audio rate in aresample without the need for -ar and tell it to use soxr, but I didn't get to try and could be wrong.
I prefer to explicitly map my filtergraph inputs and outputs so the defaults don't do something unexpected, but most of the time the defaults work fine for most users.
I changed -b:v 128k to -vbr 5 just for an example to show another method.
andrew.46
June 21st, 2014, 11:02 AM
FakeOutDoorsman you are the man!!
I have not used filter_complex before but I can see that I will from here on in. I presume the [vid] and [aud] labels are simply arbitrary labels that you then map into the output container?
Should I have abandoned the complex maths and been using -2 for the scaling some time ago?
You are perfectly correct with the aresample syntax and it is encoding as we speak.
VBR fdk_aac had a few warnings:
[libfdk_aac @ 0xe07260] Note, the VBR setting is unsupported and only works with some parameter combinations
but I could find no information regarding these parameter combinations, only a few mutterings (https://trac.ffmpeg.org/wiki/Encode/AAC#fdk_vbr) which pretty much echoed the FFmpeg warning.
Thanks for the tips, I am head down and tail up in the filtering documentation at the moment....
digitall.h
August 25th, 2014, 12:09 AM
Hello, and thank you for keep supporting latest ffmpeg compilation.
I followed the guide in: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
I obtained yasm 1.3.0 and compiled it without problems.
I don't know if it was needed, but I copied it under /user/bin, renaming previous version.
I then compiled libx264 (latest x264-r2453 from Videolan) with no problems.
I also compiled libxml2-2.9.1.
I then downloaded libbluray-0.6.0 and compiled it with
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
export PKG_CONFIG_PATH
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/ffmpeg_build/bin" --disable-shared
make
make install
make distclean
And it did also compile without a problem.
But when I then try to compile ffmpeg with libbluray support, it fails.
If I try:
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
export PKG_CONFIG_PATH
./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/ffmpeg_build/bin" --extra-libs=-ldl --enable-gpl \
--enable-libass --enable-libmp3lame --enable-libtheora --enable-libbluray \
--enable-libvorbis --enable-libx264 --enable-nonfree --enable-x11grab
It complains that cannot find libbluray.
And if I use:
--extra-libs='-ldl -lxml2'
instead of just -ldl, as advised in Zeranoe forum some time ago, and adjust libbluray.pc, it then complains taht GCC cannot create an executable...
I also tried with previous libbluray-0.5.0 version with the same result.
I managed some time ago, with libbluray-0.4.0 and Zeranoe's forum recomendation, but it is not working with current versions.
How can I compile latest ffmpeg with --enable-libbluray?.
My ubuntu version is Precise.
:)
SeijiSensei
August 25th, 2014, 04:37 PM
Where did it put libbluray? If it's not in a standard location, you may need to add an entry in /etc/ld.so.conf.d/. You might also try running "sudo ldconfig (http://linux.die.net/man/8/ldconfig)" before compiling ffmpeg.
digitall.h
August 25th, 2014, 06:21 PM
--deleted, wrong post format--
digitall.h
August 25th, 2014, 06:23 PM
Thank you SeijiSensei for your answer.
I have libbluray.a and libbluray.la in HOME/ffmpeg_build/lib folder, and a libbluray folder (with bluray.h and so) in HOME/ffmpeg_build/include folder.
That's where --extra-cflags and --extra-ldflags are pointing in ./configure
And it worked with previous libbluray and ffmpeg versions, locally, without further messing my system.
Did you manage to compile ffmpeg with libbluray?
FakeOutdoorsman
August 25th, 2014, 07:59 PM
Seems to work for me (up to make install at least).
libbluray:
sudo apt-get install libxml2-dev
cd ~/ffmpeg_sources
wget ftp://ftp.videolan.org/pub/videolan/libbluray/0.6.0/libbluray-0.6.0.tar.bz2
tar xjvf libbluray-0.6.0.tar.bz2
cd libbluray-0.6.0
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/ffmpeg_build/bin" --disable-shared
make
make install
ffmpeg:
$ cd ffmpeg
PATH="$PATH:$HOME/bin" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--bindir="$HOME/bin" \
--enable-libbluray
make
make install
I do not own a blu-ray player so I could not test.
Update: Nevermind. I was building in and pointing to unclean and incorrect directories causing it to link to the wrong (shared) libbluray libraries. It's been a long time since I've used Ubuntu and forgot how much of a slob I was in my VM. I ran out of time now, so I'll have to take a look later.
digitall.h
August 25th, 2014, 10:53 PM
@FakeOutdoorsman (http://ubuntuforums.org/member.php?u=162846),
As I was reading your post I was more on the edge of the chair...
I'll wait for your time, thank you.
qyot27
August 26th, 2014, 02:57 AM
It's perfectly fine to disable libxml2 in libbluray and then you won't have to deal with it at all (libxml2 is used in 'metadata parsing', which I assume from other contexts in libbluray's ./configure that it's more relevant to the Java environment being able to display the BD-J menus - but I'm not aware of any libbluray-based media player that even displays menus for Blu-ray...unless VLC can do it, but to my knowledge neither FFplay nor mpv can). Thus obviating the need to use --extra-cflags/ldflags or --extra-libs:
Dependency: libbluray
=====================
cd ~/mpv-build-deps
git clone git://git.videolan.org/libbluray.git
cd libbluray
./bootstrap
CPPFLAGS="-mfpmath=sse -march=pentium3 -msse -mtune=pentium3" \
PKG_CONFIG_PATH=/usr/i686-w64-mingw32/lib/pkgconfig ./configure \
--prefix=/usr/i686-w64-mingw32 --disable-examples --without-libxml2 \
--enable-silent-rules --disable-shared --disable-doxygen-doc \
--disable-doxygen-dot --build=i686-w64-mingw32 --host=i686-w64-mingw32
make
sudo checkinstall --pkgname=libbluray-mingw --pkgversion="$(grep Version \
src/libbluray.pc | sed 's/Version: //g')-git" --backup=no --deldoc=yes \
--delspec=yes --deldesc=yes --strip=yes --fstrans=no --default
(these are, of course, cross-compilation instructions, hence the 'mingw' stuff)
Regarding yasm, the advisable method of installing it would be with checkinstall (assuming that you're using the tarball):
sudo checkinstall --pkgname=yasm --pkgversion="3:$(cat version)-git" --backup=no --deldoc=yes --delspec=yes \
--deldesc=yes --strip=yes --stripso=yes --addso=yes --fstrans=no --default
It installing to /usr/local by default isn't an issue.
And more generally speaking, --bindir isn't necessary to specify unless you're putting it somewhere other than in the --prefix. Setting --prefix to $HOME/ffmpeg_build and then --bindir to $HOME/ffmpeg_build/bin does nothing - the bins are already going to go there anyway. If you wanted the bins in $HOME/bin like FakeOutdoorsman's instructions have, while letting everything else go into their respective subdirs in $HOME/ffmpeg_build, that's when you use --bindir.
digitall.h
August 26th, 2014, 05:09 PM
Hi qyot27, very complete your answer.
Thank you for the advise related to compilation. I understood that it is not needed to specify a bindir when it is inside the prefix path.
I was not having any problem regarding yasm compilation, even I'm not sure if I'm really compiling with it. Just the hassle to rename yasm version in /usr/bin
I also had no problem compiling libbluray.
I compiled it like FakeOutdoorsman's instructions, but adding before ./configure the PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" instruction.
I did not understand the need of cross-compilation instructions, I'm going to use the binaries in the same computer I'm compiling.
Is it needed to then enable libbluray when compiling ffmpeg?.
I did not understand if after the code you posted you manage to compile ffmpeg with --enable-libbluray.
I will try to compile again libbluray without libxml2 (do I have to add to configure the --without-libxml2 thing?) and try to compile ffmpeg against this libbluray version.
mc4man
August 27th, 2014, 03:03 AM
I understood that it is not needed to specify a bindir when it is inside the prefix path.
I did not understand if after the code you posted you manage to compile ffmpeg with --enable-libbluray.
I will try to compile again libbluray without libxml2 (do I have to add to configure the --without-libxml2 thing?) and try to compile ffmpeg against this libbluray version.
No need for a bindir when compiling a library..
What version of Ubuntu are you using?, libbluray @ 0.6.0 is available for 14.04 & can't see any reason to statically link to ffmpeg (if there is any reason to enable it in ffmpeg in the first place..
Also note the latest libbluray is 0.6.1
(edit: I can assure you that ffmpeg will build with --enable-libbluray if libbluray is shared (libxml2 is not a factor) -
ffmpeg -protocols
ffmpeg version 2.3.3 Copyright (c) 2000-2014 the FFmpeg developers
built on Aug 27 2014 02:08:11 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-x11grab --enable-libpulse --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libbluray --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr
libavutil 52. 92.100 / 52. 92.100
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.100 / 55. 48.100
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.100 / 4. 11.100
libavresample 1. 3. 0 / 1. 3. 0
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Supported file protocols:
Input:
bluray
cache
..ect
ldd /usr/bin/ffmpeg |grep libbluray.so.1
libbluray.so.1 => /usr/lib/x86_64-linux-gnu/libbluray.so.1 (0x00007fa4a64d1000
digitall.h
August 27th, 2014, 08:03 PM
No need for a bindir when compiling a library..
What version of Ubuntu are you using?, libbluray @ 0.6.0 is available for 14.04 & can't see any reason to statically link to ffmpeg (if there is any reason to enable it in ffmpeg in the first place..
Also note the latest libbluray is 0.6.1 (edit: I can assure you that ffmpeg will build with --enable-libbluray if libbluray is shared (libxml2 is not a factor) -
Ubuntu 12.04 here :(
But the problem was not with libluray compilation, it compiled apparently well, with --bindir="$HOME/ffmpeg_build/bin" and --disable-shared.
And as result I find under $HOME/ffmpeg_build/bin the bd_info binary, and under $HOME/ffmpeg_build/lib the files libbluray.a and libbluray.la and pkgconfig folder with libbluray.pc, and finally under $HOME/ffmpeg_build/include a libbluray folder.
I prefer to keep everything locally because I'm afraid that a newer version of libbluray or yasm or ffmpeg can be incompatible with the rest of my system.
And in this link https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu it's explained the way to compile everything locally.
I just want to add latest libbluray support to the compiling process detailed in that link.
qyot27
August 28th, 2014, 05:50 AM
A) There's no reason to go around renaming the yasm binary. 'which yasm' will tell you which one is being used if there's more than one installed. The PATH environment variable prefers /usr/local over /usr, so compiling yasm yourself means that since it goes into /usr/local, it would pick up on that one first.
B) The point of posting those instructions was to illustrate the --without-libxml2 option. Not a recommendation to cross-compile things.
C) Building everything/multiple parts as static very often leads to needing to use the --pkg-config-flags="--static" option when configuring ffmpeg. A static libbluray may need this if it links to a shared libxml2, and the option might not be necessary for libbluray if it was built without libxml2. Or, like mc4man pointed out, building libbluray as shared causes no conflict with a shared libxml2.
mc4man
October 13th, 2014, 08:43 PM
In Debian sid ffmpeg has comeback as binaires & shared though to what actual advantage I really can't see.
As it stands nothing will use the shared libs other than the ffmpeg binaires, to do so they'd need to be rebuilt against FFmpeg. (libavcodec-ffmpeg-dev, ect.
Are they going to offer 'dual' packaging? (I doubt that), so users would need to build themselves or use some semi outside pre-built packages. (deb-multimedia or ppa's
As far as the binaires this is for example the config on ffmpeg (plus 2 added by me, --enable-nonfree, - libfdk-aac, feels like kitchen sink minus decent aac
$ ffmpeg
ffmpeg version 2.4.2-1 Copyright (c) 2000-2014 the FFmpeg developers
built on Oct 10 2014 15:27:21 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr --extra-version=1 --build-suffix=-ffmpeg --toolchain=hardened --extra-cflags= --extra-cxxflags=
--libdir=/usr/lib/x86_64-linux-gnu --shlibdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
--enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-fontconfig
--enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcaca --enable-libcdio
--enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug
--enable-libmp3lame --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp
--enable-libschroedinger --enable-libshine --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-openal --enable-opengl --enable-x11grab --enable-libxvid --enable-nonfree --enable-libfdk-aac
--enable-libdc1394 --enable-libiec61883 --enable-libzvbi --enable-libzmq --enable-libbs2b
Are there any enables here that are to good advantage over what's typically used for static builds?
(am curious about the --enable-opengl one - what for?, (ffplay?
FakeOutdoorsman
October 13th, 2014, 09:23 PM
I'm not sure what the packaging plans are. I haven't been paying attention.
Looks like a lof of extra fluff in there. For example I doubt general users need WebPee support among several others, but I guess they want to be on the "safe side" since you never know what users really want. Personally I haven't used half of those options.
As for the opengl output device (http://ffmpeg.org/ffmpeg-devices.html#opengl) I'm not really familiar with that. Could be useful or interesting for a few application developers I guess. Not a very helpful answer...
mc4man
October 13th, 2014, 11:26 PM
I'm not sure what the packaging plans are. I haven't been paying attention.
Looks like a lof of extra fluff in there. For example I doubt general users need WebPee support among several others, but I guess they want to be on the "safe side" since you never know what users really want. Personally I haven't used half of those options.
As for the opengl output device (http://ffmpeg.org/ffmpeg-devices.html#opengl) I'm not really familiar with that. Could be useful or interesting for a few application developers I guess. Not a very helpful answer...
Yeah, seems like safe side, ect. though don't get their aac deal, only native encoder (maybe it's gotten better?
overall they state - (from rules file
# Enable as many features as possible, as long as the result is still GPLv2+ (and not only GPLv3+).
Also don't get the --enable-libopencv option, both as in value being enabled & because of deps
(- to enable then libopencv-highgui-dev will be installed which deps on libavcodec-dev, libavformat-dev, ect. so the ffmpeg shared libs will dep on libav shared libs
FakeOutdoorsman
October 14th, 2014, 01:33 AM
though don't get their aac deal, only native encoder (maybe it's gotten better?
It's better than libvo_aacenc at least. Improvements have been made in the "AAC mega thread" (https://trac.ffmpeg.org/ticket/2686), but I don't think they've been squashed and committed.
Also don't get the --enable-libopencv option, both as in value being enabled & because of deps
AFAIK this is for the dilate, erode, and smooth filters via the ocv filter (http://ffmpeg.org/ffmpeg-filters.html#ocv). I've never used it and I've never seen any users try it. Almost like the frei0r stuff but probably less useful. I'm guessing, due to your rules file observation, that it was possibly enabled without evaluating its actual usefulness.
(- to enable then libopencv-highgui-dev will be installed which deps on libavcodec-dev, libavformat-dev, ect. so the ffmpeg shared libs will dep on libav shared libs
Might be bug report worthy.
George Heine
October 22nd, 2014, 09:44 PM
First, thanks to Fake O. for maintaining this great tutorial - have used it several times now.
QUESTION: Assuming you've got three non-networked systems with the same version of the same OS (e.g., Ubuntu 14.04 LTS), and you've
compiled ffmpeg on one system, what do you need to copy, besides the file in ~/bin, to the other systems to give them a working ffmpeg?
dannyboy79
October 26th, 2014, 06:14 AM
If i follow this guide how do I make kdenlive (or any other software which relies on ffmpeg, obs-studio etc etc) use this version of ffmpeg which is installed in my home directory?
FakeOutdoorsman
October 26th, 2014, 08:56 PM
Assuming you've got three non-networked systems with the same version of the same OS (e.g., Ubuntu 14.04 LTS), and you've
compiled ffmpeg on one system, what do you need to copy, besides the file in ~/bin, to the other systems to give them a working ffmpeg?
Sorry for the delay; I was traveling. Give it a try, but I can't say for sure if it will work or not due to potential differences between each computer. You will only need ~/bin/ffmpeg unless you also want the man pages. If it doesn't work just post the error here and we can try to help.
If i follow this guide how do I make kdenlive (or any other software which relies on ffmpeg, obs-studio etc etc) use this version of ffmpeg which is installed in my home directory?
Do they use the FFmpeg libraries and/or the binary? I think Kdenlive uses the ffmpeg binary to export files. Does it use your PATH to find ffmpeg, or does it look in a specific directory? Has it been patched by the maintainers to specifically look for avconv instead? Maybe it has a setting to allow you to choose where the binary is? Sorry, I'm away from my usual computer and can't test.
If they require the libraries then it will be more challenging because:
there may be major API differences between the repository offerings and your new, compiled FFmpeg
the repo package may be old and may require an older API version
this guide does not install (shared) libraries to the system
You would probably have to compile each program, or maybe there is a PPA that offers a solution. I may be wrong, but I don't think there is one. This type of more cutting-edge/customized-compiled usage may be better suited with a different distro.
mc4man
October 26th, 2014, 09:53 PM
First, thanks to Fake O. for maintaining this great tutorial - have used it several times now.
QUESTION: Assuming you've got three non-networked systems with the same version of the same OS (e.g., Ubuntu 14.04 LTS), and you've
compiled ffmpeg on one system, what do you need to copy, besides the file in ~/bin, to the other systems to give them a working ffmpeg?
As a bit of an add-on to FO's reply -
On your other installs you'll need to have installed any packages that provide whatever shared libs your current FFmpeg source binaries are using. It's quite possible your transferred to installs will have most, if not all, already installed. Easily checked by - after copying over run
ldd /path/to/ffmpeg
(if copying over the other ffmpeg binaries ck. them also
Anything that shows => not found will have to be rectified by installing whatever package provides the missing .so
mc4man
October 26th, 2014, 10:04 PM
If i follow this guide how do I make kdenlive (or any other software which relies on ffmpeg, obs-studio etc etc) use this version of ffmpeg which is installed in my home directory?
Again as an add-on -
I don't use kdenlive but what you may need to look at is mlt (libmlt6 specifically), it is a dep of kdenlive that does depend on ffmpeg/libav shared libs. If it is a factor for your task(s) then mlt had to be rebuilt for the libav10/11 API , ect.
(and may only work with shared libs..
mc4man
November 2nd, 2014, 03:05 AM
With the addition of 3 options in configure -
--enable-libxcb enable X11 grabbing using XCB [auto]
--enable-libxcb-shm enable X11 grabbing shm communication [auto]
--enable-libxcb-xfixes enable X11 grabbing mouse rendering [auto]
wonder if anyone has tried & to what extent should be enabled (all 3 ?
library versions should all be supported in 14.04+
FakeOutdoorsman
November 2nd, 2014, 08:55 PM
I haven't tried it yet.
I suppose it's autodetected, so you may not need to add any of those options if the deps are available: libxcb1-dev, libxcb-shm0-dev, ibxcb-xfixes0-dev.
From Nicolas George in [FFmpeg-cvslog] xcbgrab: XCB-based screen capture (https://ffmpeg.org/pipermail/ffmpeg-cvslog/2014-October/082585.html):
Technically, XCB is slightly lower-level but more efficient than Xlib.
From an user's point of view, whether an application uses XCB or Xlib should
not matter. This is even truer nowadays, because most users have X.org's
implementation of Xlib, which is a wrapper around XCB.
mc4man
November 2nd, 2014, 09:40 PM
I haven't tried it yet.
I suppose it's autodetected, so you may not need to add any of those options if the deps are available: libxcb1-dev, libxcb-shm0-dev, ibxcb-xfixes0-dev.
From Nicolas George in [FFmpeg-cvslog] xcbgrab: XCB-based screen capture (https://ffmpeg.org/pipermail/ffmpeg-cvslog/2014-October/082585.html):
The autodetect works ok, min. I guess would be libxcb1-dev. So then the previous option, --enable-x11grab, would override the auto.. if included in configure
(seems to work ok here, same runtime command, same result.
mc4man
November 18th, 2014, 04:11 PM
So should be showing up in vivid (proposed) shortly, -
https://bugs.launchpad.net/ubuntu/+bug/1393522
I believe it will be semi-neutered as far as aac encoding as no 'extra' packages atm though extra only adds libvo-aacenc, faac & fdkaac are a no go in Debian
So in that regard and for having the latest self or acquired builds will still be 'soup du jour'.
Initially only benefits the FFmpeg binaries as sources would need to be specifically built off of, ex. of that in test ppa linked in report.
FakeOutdoorsman
November 18th, 2014, 09:36 PM
Interesting info, and thanks for the update and your work on this package.
George Heine
November 21st, 2014, 07:39 PM
As a bit of an add-on to FO's reply -
On your other installs you'll need to have installed any packages that provide whatever shared libs your current FFmpeg source binaries are using. It's quite possible your transferred to installs will have most, if not all, already installed. Easily checked by - after copying over run
ldd /path/to/ffmpeg
(if copying over the other ffmpeg binaries ck. them also
Anything that shows => not found will have to be rectified by installing whatever package provides the missing .so
Here is what I've found out so far. On System A, Compiled a working ffmpeg about 30 days ago:
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developersR
built on Oct 23 2014 10:19:13 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Copied ~/bin/ffmpeg from System A to System B. (Both systems have Ubuntu 14.04 LTS, updated within the last two weeks). Using ldd on System B as suggested provides a "not found" for one library, libass.so.4. Back to System A, libass.so.4 is in /usr/lib/i386-linux-gnu, (and is actually a link to libass.so.4.1.0 in the same directory.) Running dpkg -S shows that this library is available as part of the repo package libass4:i386. Checking dates, it appears to have been installed at the same time as a previous compilation of ffmpeg, back in 2013. Presumably when I did a new compile in October, one of the "make" scripts found this library already installed, and skipped that process.
I'm guessing the next step would be to install the libass4 repo package on System B. Or is there a custom build of this library that would be
more appropriate?
Thanks for your assistance.
JoeGibken
November 21st, 2014, 09:16 PM
Hi! Thank you for the tutorial. I'm using Linux Mint 13 Xfce which is a variant of Ubuntu 12.04, so the tutorial should hypothetically also work. I have a few questions though:
1. I am not sure what directory should I ran ". ~/.profile" to make a Persistent Evaluation Variables as written here. (https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu#Conclusion) Can you just run that command anywhere to make it a Persistent Evaluation Variable? Or is there a specific directory where the command ". ~/.profile" should be run? Also, does making it Persistent Evaluation Variable mean that you can now run the newly compiled ffmpeg anywhere and doesn't matter what directory you are currently working on?
2. Having read this documentation about (https://trac.ffmpeg.org/wiki/Encode/H.265) H.265 / libx265 (https://trac.ffmpeg.org/wiki/Encode/H.265) in (https://trac.ffmpeg.org/wiki/Encode/H.265) the FFmpeg site (https://trac.ffmpeg.org/wiki/Encode/H.265), and compiling x265 from source with these instructions (https://bitbucket.org/multicoreware/x265/wiki/Home), will compiling ffmpeg adding the flag "--enable-libx265" in the final step of the Compilation and Installation section of the tutorial, will now include libx265 and can also be used for encoding?
Thank you in advance.
mc4man
November 22nd, 2014, 03:58 PM
Hi! Thank you for the tutorial. I'm using Linux Mint 13 Xfce which is a variant of Ubuntu 12.04, so the tutorial should hypothetically also work. I have a few questions though:
1. I am not sure what directory should I ran ". ~/.profile" to make a Persistent Evaluation Variables as written here. (https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu#Conclusion) Can you just run that command anywhere to make it a Persistent Evaluation Variable? Or is there a specific directory where the command ". ~/.profile" should be run? Also, does making it Persistent Evaluation Variable mean that you can now run the newly compiled ffmpeg anywhere and doesn't matter what directory you are currently working on?
2. Having read this documentation about (https://trac.ffmpeg.org/wiki/Encode/H.265) H.265 / libx265 (https://trac.ffmpeg.org/wiki/Encode/H.265) in (https://trac.ffmpeg.org/wiki/Encode/H.265) the FFmpeg site (https://trac.ffmpeg.org/wiki/Encode/H.265), and compiling x265 from source with these instructions (https://bitbucket.org/multicoreware/x265/wiki/Home), will compiling ffmpeg adding the flag "--enable-libx265" in the final step of the Compilation and Installation section of the tutorial, will now include libx265 and can also be used for encoding?
Thank you in advance.
Users of Ubuntu have no need for that ~./profile deal as it's already in your ~/.profile
After ~/bin is created just restart or run
. ~/.profile
Whether that also applies to Mint don't know - read your existing file to see...
mc4man
November 22nd, 2014, 04:02 PM
Here is what I've found out so far. On System A, Compiled a working ffmpeg about 30 days ago:
Copied ~/bin/ffmpeg from System A to System B. (Both systems have Ubuntu 14.04 LTS, updated within the last two weeks). Using ldd on System B as suggested provides a "not found" for one library, libass.so.4. Back to System A, libass.so.4 is in /usr/lib/i386-linux-gnu, (and is actually a link to libass.so.4.1.0 in the same directory.) Running dpkg -S shows that this library is available as part of the repo package libass4:i386. Checking dates, it appears to have been installed at the same time as a previous compilation of ffmpeg, back in 2013. Presumably when I did a new compile in October, one of the "make" scripts found this library already installed, and skipped that process.
I'm guessing the next step would be to install the libass4 repo package on System B. Or is there a custom build of this library that would be
more appropriate?
Thanks for your assistance.
Just install libass4
(- If you are building on i386 then I wouldn't bother trying to use on amd64 or vice-versa
JoeGibken
November 22nd, 2014, 10:13 PM
Users of Ubuntu have no need for that ~./profile deal as it's already in your ~/.profile
After ~/bin is created just restart or run
. ~/.profile
Whether that also applies to Mint don't know - read your existing file to see...
So it does not matter if I ran ". ~/.profile" anywhere?
And also, this is what is written my .profile:
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
Re-asking this question:
2. Having read this documentation about (https://trac.ffmpeg.org/wiki/Encode/H.265) H.265 / libx265 (https://trac.ffmpeg.org/wiki/Encode/H.265) in (https://trac.ffmpeg.org/wiki/Encode/H.265) the FFmpeg site (https://trac.ffmpeg.org/wiki/Encode/H.265), and compiling x265 from source with these instructions (https://bitbucket.org/multicoreware/x265/wiki/Home), will compiling ffmpeg adding the flag "--enable-libx265" in the final step of the Compilation and Installation section of the tutorial, will now include libx265 and can also be used for encoding?
So libx265 can also be added in ffmpeg if I compiled x265 adding the flag --enable-libx265?
FakeOutdoorsman
November 23rd, 2014, 04:10 AM
x265 isn't really worth using yet except maybe in very low bitrate situations (but it will still look crappy). You would have to use placebo preset and max almost everything out so it will take a very long time to encode. It is very early, and this implementation isn't there yet.
JoeGibken
November 23rd, 2014, 02:27 PM
x265 isn't really worth using yet except maybe in very low bitrate situations (but it will still look crappy). You would have to use placebo preset and max almost everything out so it will take a very long time to encode. It is very early, and this implementation isn't there yet.
But I would like to experiment still.
As mentioned at this ffmpeg page of h265 (https://trac.ffmpeg.org/wiki/Encode/H.265), I have compiled a binary of x265 using this tutorial (https://bitbucket.org/multicoreware/x265/wiki/Home). I followed your guide and added a --enable-libx265 as mentioned in the ffmpeg page of h265 (https://trac.ffmpeg.org/wiki/Encode/H.265), but it throws out this error:
ERROR: x265 not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
I don't think I can find the config.log in the working directory (~/ffmpeg_sources/ffmpeg).
Any help in fixing this would be appreciated.
mc4man
November 23rd, 2014, 05:25 PM
But I would like to experiment still.
As mentioned at this ffmpeg page of h265 (https://trac.ffmpeg.org/wiki/Encode/H.265), I have compiled a binary of x265 using this tutorial (https://bitbucket.org/multicoreware/x265/wiki/Home). I followed your guide and added a --enable-libx265 as mentioned in the ffmpeg page of h265 (https://trac.ffmpeg.org/wiki/Encode/H.265), but it throws out this error:
ERROR: x265 not found
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
I don't think I can find the config.log in the working directory (~/ffmpeg_sources/ffmpeg).
Any help in fixing this would be appreciated.
The guide you linked to ends instructions at make, you'd need to install (sudo make install && sudo ldconfig
Or - check here as an example of how to build/install x265 (obviously you're not using vlc_build folder, used twice in command
http://ubuntuforums.org/showthread.php?t=2141949
Or -
While I do provide x265 thru some ppa's it's possible I'm going to drop it as currently don't see the value & don't want to keep up on. In any event this ppa has builds, he seems to know what's he's doing (more than me for sure). I'm not recommending using the ppa itself though it could be ok, (maybe, the ffmpeg build there may not work with other source's current packages other than the inc. vlc), just to get x265 packages from.. (the lib & dev packages
https://launchpad.net/~djcj/+archive/ubuntu/vlc-stable/+packages
JoeGibken
November 23rd, 2014, 06:11 PM
The guide you linked to ends instructions at make, you'd need to install (sudo make install && sudo ldconfig
Or - check here as an example of how to build/install x265 (obviously you're not using vlc_build folder, used twice in command
http://ubuntuforums.org/showthread.php?t=2141949
Or -
While I do provide x265 thru some ppa's it's possible I'm going to drop it as currently don't see the value & don't want to keep up on. In any event this ppa has builds, he seems to know what's he's doing (more than me for sure). I'm not recommending using the ppa itself though it could be ok, (maybe, the ffmpeg build there may not work with other source's current packages other than the inc. vlc), just to get x265 packages from.. (the lib & dev packages
https://launchpad.net/~djcj/+archive/ubuntu/vlc-stable/+packages
Thanks! The first instructions did the trick :) Will try and consider your other suggestions maybe next time :)
andrew.46
November 25th, 2014, 04:01 AM
Thanks! The first instructions did the trick :)
Mind you whoever runs that vlc guide is a little behind the times as x265 has a 1.4 'release' version in place now...
mc4man
November 28th, 2014, 04:22 AM
This could be a dumb question but here goes -
What does building x264 off of either gpac or l-smash accomplish?
Asking because if built shared libx264 does not link to either of those sources libs. (neither does the x264 binary
andrew.46
November 28th, 2014, 04:57 AM
Certainly allows muxing output to mp4 from the x264 commandline but ldd shows no link and strace gives no secrets away either during a successful output to mp4.... The source shows the 2 muxers in /output as mp4.c for gpac and mp4_lsmash.c for l-smash where it uses lsmash.h.
qyot27
November 29th, 2014, 06:49 AM
libx264 only contains the relevant bits for encoding the H.264 streams themselves, it's the x264 CLI application that links to liblsmash or libgpac. In the same way, libx264 wouldn't contain anything related to Matroska.
And as already stated, GPAC and L-SMASH are MP4 muxers. The difference between them is in their organization: both are mature libraries, but generally the pressure is to switch to L-SMASH because it's a lightweight, far easier to build library that sticks closer to the MP4 standard than GPAC (which is incredibly bulky and often difficult to build) does. There were some cases where audio sync was not being honored if GPAC was used, but L-SMASH would handle it correctly (although this is also sometimes dependent on the particular audio format or audio encoder). That may have been fixed in the months since, but still. The reason both of them are options is because GPAC has been around for a long time, while L-SMASH only appeared back in...2010? I think it was 2010 (the support for using it in x264 wasn't merged upstream until October 2013, though). And the concern is that a lot of distros may not have suitable L-SMASH packages yet, so the solution is to support both, at least for the time being.
andrew.46
November 29th, 2014, 08:16 AM
I see some debian packaging in the multimedia place (http://multimedia.debian.cergy.eisti.fr/dists/stable-backports/main/binary-kfreebsd-amd64/package/l-smash) but I don't know how the path goes from there to mainstream debian and then to Ubuntu. Slackware does not have a mainstream build script but most will make their own anyway :)
frank90
December 3rd, 2014, 03:15 AM
How come the wiki guide URL at the front page no longer works?
FakeOutdoorsman
December 3rd, 2014, 05:21 AM
Works for me. Do you get an error message? Anyway, I updated the link to the actual page.
mc4man
December 4th, 2014, 03:02 PM
I see it's still built in ffmpeg (not libav
Do people still use, eg. is there any value there?
FakeOutdoorsman
December 4th, 2014, 08:34 PM
I've never used ffserver myself. It seems that some people are using it, or at least I often see questions involving ffserver. Unfortunately, due to my ignorance of ffserver, I am unable to provide help. It would be interesting to read about some successful use cases.
As for development there has been some recent (http://git.videolan.org/?p=ffmpeg.git;a=history;f=ffserver_config.c;hb=302 ed9c43f2d2a0764a9f9d2a4b2e512d2c9592f) activity (http://git.videolan.org/?p=ffmpeg.git;a=history;f=ffserver.c;hb=8b0226f2a6 d71d47c7578681e2580cb6b337adb9) and a few bug (https://trac.ffmpeg.org/ticket/1275) fixes (https://trac.ffmpeg.org/ticket/1461). There is a listed maintainer; not too much ffserver specific coding activity lately, but is occassionally active on the mailing-list and IRC.
mc4man
December 5th, 2014, 12:43 AM
I've never used ffserver myself. It seems that some people are using it, or at least I often see questions involving ffserver. Unfortunately, due to my ignorance of ffserver, I am unable to provide help. It would be interesting to read about some successful use cases.
As for development there has been some recent (http://git.videolan.org/?p=ffmpeg.git;a=history;f=ffserver_config.c;hb=302 ed9c43f2d2a0764a9f9d2a4b2e512d2c9592f) activity (http://git.videolan.org/?p=ffmpeg.git;a=history;f=ffserver.c;hb=8b0226f2a6 d71d47c7578681e2580cb6b337adb9) and a few bug (https://trac.ffmpeg.org/ticket/1275) fixes (https://trac.ffmpeg.org/ticket/1461). There is a listed maintainer; not too much ffserver specific coding activity lately, but is occassionally active on the mailing-list and IRC.
Thanks, - I decided to to ahead & directly link it (/usr/bin) for that static release build I provide.
Though I suspect not many use as I've never received any query's as to where it is from a user base of about 15k on the static.
andrew.46
December 10th, 2014, 01:02 PM
Hmmm... I am getting consistent segfault with libilbc, anybody can duplicate this? I am using libilbc 2.0.0.
FakeOutdoorsman
December 10th, 2014, 07:39 PM
I can give it a try. How can I duplicate this issue?
mc4man
December 10th, 2014, 08:15 PM
Does every time.
sample backtrace though may be useless
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff3418d25 in WebRtcSpl_AutoCorrelation () from /usr/local/lib/libilbc.so.1
#2 0x00007ffff3416c2e in WebRtcIlbcfix_SimpleLpcAnalysis () from /usr/local/lib/libilbc.so.1
#3 0x00007ffff3415522 in WebRtcIlbcfix_LpcEncode () from /usr/local/lib/libilbc.so.1
#4 0x00007ffff34126f2 in WebRtcIlbcfix_EncodeImpl () from /usr/local/lib/libilbc.so.1
#5 0x000000000087bc16 in ilbc_encode_frame (avctx=<optimized out>, avpkt=0x7fffffffd620, frame=0x19571c0,
got_packet_ptr=0x7fffffffd61c) at /home/doug/Desktop/ffmpeg/2.5/ffmpeg/ffmpeg/libavcodec/libilbc.c:172
#6 0x00000000009f26a0 in avcodec_encode_audio2 (avctx=avctx@entry=0x199fc40, avpkt=avpkt@entry=0x7fffffffd620,
frame=frame@entry=0x19571c0, got_packet_ptr=got_packet_ptr@entry=0x7fffffffd61c )
at /home/doug/Desktop/ffmpeg/2.5/ffmpeg/ffmpeg/libavcodec/utils.c:1872
#7 0x0000000000492386 in do_audio_out (frame=0x19571c0, ost=0x199faa0, s=0x199ebc0)
at /home/doug/Desktop/ffmpeg/2.5/ffmpeg/ffmpeg/ffmpeg.c:780
#8 reap_filters () at /home/doug/Desktop/ffmpeg/2.5/ffmpeg/ffmpeg/ffmpeg.c:1278
#9 0x00000000004786b2 in transcode_step () at /home/doug/Desktop/ffmpeg/2.5/ffmpeg/ffmpeg/ffmpeg.c:3721
#10 transcode () at /home/doug/Desktop/ffmpeg/2.5/ffmpeg/ffmpeg/ffmpeg.c:3764
#11 main (argc=<optimized out>, argv=<optimized out>) at /home/doug/Desktop/ffmpeg/2.5/ffmpeg/ffmpeg/ffmpeg.c:3941
mc4man
December 10th, 2014, 08:34 PM
I can give it a try. How can I duplicate this issue?
Andrew would know better so in general -
get the source ( i choose this, maybe more suitable?? - https://github.com/TimothyGu/libilbc
unpack, cd to source, then a cmake build, (build deps, again no clue, seemed ok with what I've already got
Then
mkdir build && cd build
cmake ..
build ffmpeg with --enable-libilbc
ffmpeg command ?? used this -
-i /home/doug/Music/luckynight.wav -c:a libilbc -b:a 15k -ar 8000 -ac 1 test.lbc (& test.caf, same thing
andrew.46
December 10th, 2014, 09:42 PM
mc4man has done exactly as I have done, although I was lazy with libilbc and used autotools rather than cmake:
mkdir $HOME/Desktop/testing && cd $HOME/Desktop/testing && \
wget https://github.com/TimothyGu/libilbc/releases/download/v2.0.0/libilbc-2.0.0.tar.gz && \
tar xvf libilbc-2.0.0.tar.gz && cd libilbc-2.0.0 && \
./configure && make && \
mkdir -vp doc-pak && cp -v COPYING INSTALL doc-pak && \
sudo checkinstall --pakdir "$HOME/Desktop/testing" --backup=no --deldoc=yes \
--pkgname libilbc --pkgversion "2.0.0" --fstrans=no \
--deldesc=yes --delspec=yes --default && \
sudo ldconfig
This builds static and shared by default. The seg fault comes with the syntax that mc4man has suggested:
andrew@ilium~/media/luckynight$ ffmpeg -i luckynight.wav -ac 1 -ar 8000 -b:a 12k test.lbc
ffmpeg version N-68362-gae93965 Copyright (c) 2000-2014 the FFmpeg developers
built on Dec 11 2014 07:32:16 with gcc 4.8.2 (GCC)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/doc/ffmpeg --mandir=/usr/man --enable-postproc --enable-avfilter --enable-pthreads --enable-shared --disable-static --disable-ffserver --enable-libvorbis --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libopus --enable-libfdk-aac --enable-libilbc --enable-zlib --enable-libfreetype --disable-x11grab --enable-nonfree --enable-gpl --enable-version3 --enable-libsoxr
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 14.100 / 56. 14.100
libavformat 56. 15.103 / 56. 15.103
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'luckynight.wav':
Duration: 00:01:00.48, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
Output #0, ilbc, to 'test.lbc':
Metadata:
encoder : Lavf56.15.103
Stream #0:0: Audio: ilbc (libilbc), 8000 Hz, mono, s16, 12 kb/s
Metadata:
encoder : Lavc56.14.100 libilbc
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> ilbc (libilbc))
Press [q] to stop, [?] for help
Segmentation fault
andrew@ilium~/media/luckynight$
I am in the process of resurrecting my old web site and for the MPlayer page I used to have instructions for building libillbc + a link to a sample ilbc file, which I created myself. Exasperatingly enough the FFmpeg seg fault has prevented this, I was hoping that somebody would see something that I have missed rather than having to jump through the hoops for an FFmpeg bug report :(.
andrew.46
December 10th, 2014, 10:00 PM
Interestingly enough an older version of libilbc works fine. On my other distro (http://slackbuilds.org/repository/14.1/libraries/libilbc/) I have used an earlier git version (git20131002) and this has produced a working file. I attach it to this post...
FakeOutdoorsman
December 10th, 2014, 11:37 PM
Thank you both for the info. This should be reported as a bug (using both a minimally configured ffmpeg and libilbc from current git master, check if there is an exisiting report first). Do you know if this a regression? The ffbisect tool may help with that. I believe it helps deal with the merges somehow and skips revisions that don't include the needed tools. I think this is how to use it:
cd ffmpeg
tools/bisect-create
tools/ffbisect start
tools/ffbisect need ffmpeg
Then you need to specify one bad commit:
tools/ffbisect bad master
...and one good commit (that can be the hard part) :
tools/ffbisect good <commit hash>
or
git checkout <hash>
tools/ffbisect good
Then continue like a normal git-bisect (http://git-scm.com/docs/git-bisect) (but with ffbisect tool).
If you want to report the bug and find that it is a regression please add the keyword "regression", set priority as important, version to git-master, and include your command, complete console output, (or gdb output as shown in http://ffmpeg.org/bugreports.html).
mc4man
December 11th, 2014, 01:40 AM
I'm in no position to do local builds to any extent due to my only means of Ubuntu is on what was a high performing ext. ssd drive that I likely screwed up. Being it's usb3 vs. esata(ata) there's nothing I can do to fix or force garbage collection.
Anyway - I think you could assume based on commit title that on & about 09/18/14 the current git masters of both sources worked.
If so then between then & now in one or the other
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=59af5383c18c8cf3fe2a4b5cc 1ebf2f3300bdfe5
andrew.46
December 11th, 2014, 07:43 AM
Hmmmm.... not exactly a small job.....
FakeOutdoorsman
December 11th, 2014, 09:24 PM
This is now bug #4181 (https://trac.ffmpeg.org/ticket/4181). Thanks for reporting it.
andrew.46
December 11th, 2014, 11:07 PM
This is now bug #4181 (https://trac.ffmpeg.org/ticket/4181). Thanks for reporting it.
Thanks for going to the trouble of putting the bug report together, I will admit to not relishing the often bruising task of reporting a bug. Perhaps the FFmpeg developers are less irascible than others :)
Edit: And so quickly, with a point release for iLBC the issue is resolved! Thanks Fakeoutdoorsman for going in to bat on this one :).
mc4man
December 12th, 2014, 03:47 AM
Seems fixed now (used the git ilbc with the commit)
(-only weird thing was the libilbc.pc file was strangely empty in the path section, edited in though didn't ck. if it needed..
Can't figure how to get a good configure from configure.ac, autoconf doesn't work right
andrew.46
December 12th, 2014, 04:07 AM
Seems fixed now (used the git ilbc with the commit)
(-only weird thing was the libilbc.pc file was strangely empty in the path section, edited in though didn't ck. if it needed..
Can't figure how to get a good configure from configure.ac, autoconf doesn't work right
Indeed works fine now and the update is on my MPlayer web page :). I used the release version 2.0.1 and autotools works fine there although I errored out with cmake (I did not pursue this as ./configure .. make works fine).
mc4man
December 12th, 2014, 04:38 AM
Indeed works fine now and the update is on my MPlayer web page :). I used the release version 2.0.1 and autotools works fine there although I errored out with cmake (I did not pursue this as ./configure .. make works fine).
Yeah , the whole thing & your recent mplayer thread post reminded me about " Winds of change". Then I noticed we'd gone thru some ilbc stuff some time ago concerning cmake, ect
(releases come with files needed for ./configure, git doesn't
andrew.46
December 12th, 2014, 06:06 AM
Yeah , the whole thing & your recent mplayer thread post reminded me about " Winds of change".
Indeed, I am assembling some of my old guides for posterity as time moves on (http://www.andrews-corner.org/ubuntu/)... Mind you I love mucking around with html / css and I am having a great time rebuilding this site!
Great to see the ilbc issue is resolved, I will be a little less wary of bug reports and terse developers next time perhaps :)
FakeOutdoorsman
December 12th, 2014, 06:25 AM
Can't figure how to get a good configure from configure.ac, autoconf doesn't work right
I just ran "autoreconf -fiv" and then the resulting configure seemed to work for me.
Great to see the ilbc issue is resolved, I will be a little less wary of bug reports and terse developers next time perhaps :)
I still managed to report it to the wrong project since I wasn't sure where the problem was, and was short of time and knowhow to properly figure that out.
andrew.46
December 12th, 2014, 06:54 AM
I still managed to report it to the wrong project since I wasn't sure where the problem was, and was short of time and knowhow to properly figure that out.
But when iLBC takes over the InterWebs you will have your name in the changelogs :).
mc4man
December 15th, 2014, 01:27 AM
I just ran "autoreconf -fiv" and then the resulting configure seemed to work for me.
Thanks - I tend to forget about such things, in this case the f & i options
andrew.46
January 18th, 2015, 06:08 AM
I see some debian packaging in the multimedia place (http://multimedia.debian.cergy.eisti.fr/dists/stable-backports/main/binary-kfreebsd-amd64/package/l-smash) but I don't know how the path goes from there to mainstream debian and then to Ubuntu. Slackware does not have a mainstream build script but most will make their own anyway :)
But now Slackware does:
http://slackbuilds.org/repository/14.1/multimedia/l-smash/
:)
gralfus2
May 30th, 2015, 06:26 PM
I just finished purging and reinstalling ffmpeg based on the guide but enabling shared. It all seems to configure and make fine, but then I get an error about a shared library when I try to run ffmpeg.
"ffmpeg: error while loading shared libraries: libavdevice.so.56"
The library doesn't seem to exist at all on my system, so I'm not sure where I'm supposed to get it (or how to tell ffmpeg to not use it)
Ubuntu 14.04 LTS (Trusty)
/usr/local/lib contains
libavdevice.a
libavdevice.so
libavdevice.so.55
libavdevice.so.55.1.0
but no reference to 56
ldd `which ffmpeg` yields the following not found:
libavdevice.so.56 => not found
libpostproc.so.53 => not found
libswresample.so.1 => not found
mc4man
June 1st, 2015, 04:30 AM
I just finished purging and reinstalling ffmpeg based on the guide but enabling shared. It all seems to configure and make fine, but then I get an error about a shared library when I try to run ffmpeg.
"ffmpeg: error while loading shared libraries: libavdevice.so.56"
The library doesn't seem to exist at all on my system, so I'm not sure where I'm supposed to get it (or how to tell ffmpeg to not use it)
Ubuntu 14.04 LTS (Trusty)
/usr/local/lib contains
libavdevice.a
libavdevice.so
libavdevice.so.55
libavdevice.so.55.1.0
but no reference to 56
ldd `which ffmpeg` yields the following not found:
libavdevice.so.56 => not found
libpostproc.so.53 => not found
libswresample.so.1 => not found
You would have needed to alter that how-to a bit more than just enabling shared. Maybe you did once before but not last time? Or didn't yet run an ldconfig which isn't needed in the guide?
(the guide as is installs to $HOME/ffmpeg_build & $HOME/bin..
What are you planning to gain with a shared ffmpeg anyway?
gralfus2
June 12th, 2015, 06:31 AM
Originally enabling shared had something to do with another error I was getting, and all advice pointed to enabling certain flags. But after much beating my head against this, I simply followed the guide using static and it seems to be working just fine now. The other part of the issue was that I didn't understand the meanings of static and shared libraries, but have a much better understanding now, so not a total waste of time.
mc4man
June 29th, 2015, 07:32 PM
Seems good arguments here, figure Debian will not maintain both so a decision will have to be made at some point
https://wiki.debian.org/Debate/libav-provider/ffmpeg
hotel_Peru_hostal
July 7th, 2015, 12:24 AM
Great in depth job on this one.
FakeOutdoorsman
July 8th, 2015, 10:18 PM
Seems good arguments here, figure Debian will not maintain both so a decision will have to be made at some point
https://wiki.debian.org/Debate/libav-provider/ffmpeg
"Debian Multimedia Maintainers team, have finally decided to switch from Libav to FFmpeg as provider for the libav* multimedia libraries".
https://lists.debian.org/debian-devel-announce/2015/07/msg00001.html
andrew.46
July 9th, 2015, 01:12 AM
"Debian Multimedia Maintainers team, have finally decided to switch from Libav to FFmpeg as provider for the libav* multimedia libraries".
https://lists.debian.org/debian-devel-announce/2015/07/msg00001.html
So perhaps the whole sorry saga is coming to an end?
mc4man
July 9th, 2015, 03:06 AM
So perhaps the whole sorry saga is coming to an end?
It will be interesting, the next decision of some curiosity will be what does gstreamer do. Currently they use libav. If they switch back then how does libav react?
One good thing for Debian/Ubuntu is once the switch occurs then the build-deps for FFmpeg will no longer include some libav headers (seems crazy but true..
And then maybe they'll see fit to have ffmpeg-extra packages & not totally neuter aac encoding
QDR06VV9
July 9th, 2015, 01:34 PM
It will be interesting, the next decision of some curiosity will be what does gstreamer do. Currently they use libav. If they switch back then how does libav react?
One good thing for Debian/Ubuntu is once the switch occurs then the build-deps for FFmpeg will no longer include some libav headers (seems crazy but true..
And then maybe they'll see fit to have ffmpeg-extra packages & not totally neuter aac encoding
+1;)
mc4man
July 9th, 2015, 06:14 PM
It will be interesting, the next decision of some curiosity will be what does gstreamer do. Currently they use libav. If they switch back then how does libav react?
Seems gstreamer already decided to also go back to FFmpeg -
https://bugzilla.gnome.org/show_bug.cgi?id=751607
mc4man
July 13th, 2015, 05:40 PM
Is there a command to print (display in terminal), for example from today -
N-73602-g39bbdeb
git rev-parse --short HEAD gives the 39bbdeb
FakeOutdoorsman
July 13th, 2015, 06:59 PM
version.sh may have some clues.
mc4man
July 14th, 2015, 12:35 AM
version.sh may have some clues.
Thanks - was quite simple
(- cd to ffmpeg source > run version.sh, it prints it out in terminal.
edit: just for clarification to no one in particular -
if a full clone then it prints as above - ex. - N-73632-g39a04eb
if a depth 1 clone then - git-2015-07-13-39a04eb
andrew.46
July 14th, 2015, 03:45 AM
Installed FFmpeg version extraction:
andrew@ilium:~$ ffmpeg -version | head -n 1 | cut -d ' ' -f 3
N-73541-g944a1aa
but looks like this is not really what you are after. Using the 'space' delimiter for cut means it may also work for ' git-2015-07-13-39a04eb' ( if the string generated by head -n 1 is similar).
mc4man
July 14th, 2015, 04:37 AM
Installed FFmpeg version extraction:
andrew@ilium:~$ ffmpeg -version | head -n 1 | cut -d ' ' -f 3
N-73541-g944a1aa
but looks like this is not really what you are after. Using the 'space' delimiter for cut means it may also work for ' git-2015-07-13-39a04eb' ( if the string generated by head -n 1 is similar).
It is in regards to a ppa build I provide. Atm I use a 'modular' script based build method, it currently just uses whatever is in the ffmpeg source > RELEASE file for what is shown when ffmpeg is run from cli. Currently git clones have 2.6.git in that file which is a little misleading to anyone using that package.
So rather than figure out how to get the build to use version.sh I just edit that file to suit. I figure maybe when there is more free time i'll look into, (I've taken on caring for an old best friend whose time is sadly ending...), the script based build is easier atm then more traditional methods.
Also makes it easy to add or remove static elements, currently just dcadec & libvpx-1.4 - screen
So this is the terminal
$ ffmpeg
ffmpeg version N-73632-g39a04eb Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
ect...
andrew.46
July 14th, 2015, 08:44 AM
"Debian Multimedia Maintainers team, have finally decided to switch from Libav to FFmpeg as provider for the libav* multimedia libraries".
https://lists.debian.org/debian-devel-announce/2015/07/msg00001.html
And doubtless buoyed up by this change of heart in the Debian camp I see that one of the abcde developers has added in FFmpeg to abcde:
http://git.einval.com/cgi-bin/gitweb.cgi?p=abcde.git;a=commit;h=c2bb8c913716dfe7 e2d0fd855c9d949a03538c15
with a nod towards avconv as well...
FakeOutdoorsman
July 18th, 2015, 12:10 AM
Thanks - was quite simple
(- cd to ffmpeg source > run version.sh, it prints it out in terminal.
Good. I couldn't remember what exactly it outputs and I was, and still am, unable to test. I'm on a fishing trip.
Currently git clones have 2.6.git in that file which is a little misleading to anyone using that package.
This is a known issue; there may be a ticket in trac.
edit: just for clarification to no one in particular -
if a full clone then it prints as above - ex. - N-73632-g39a04eb
if a depth 1 clone then - git-2015-07-13-39a04eb
IIRC, it changes to something different once you git pull the shallow repo.
And doubtless buoyed up by this change of heart in the Debian camp I see that one of the abcde developers has added in FFmpeg to abcde
Good to see work on abcde continues.
sudodus
July 18th, 2015, 08:12 AM
... I'm on a fishing trip.
...
Enjoy the fishing, RealOutdoorsman :-)
mc4man
July 30th, 2015, 01:45 PM
As of 15.10 the -dev packages (libavcodec-dev, libavformat-dev, ect) will be based on ffmpeg. So all new builds of sources using such will use ffmpeg over libav.
(the actual shared libs will remain suffixed -ffmpeg for a bit longer.
mc4man
September 7th, 2015, 01:45 AM
I see 2.8 was cut yesterday, how long generally till an official release?
FakeOutdoorsman
September 7th, 2015, 02:16 AM
Historically, a day or two. However, there is a lot of other activity going on right now (that won't be in the release, AFAIK), such as removing Libav ABI compatibility workarounds and merging the recent Libav major bump, that may case a delay.
In other news the native AAC encoder should soon be out of experimental status. I'm guessing 2-4 weeks, but who knows.
andrew.46
September 7th, 2015, 09:10 AM
In other news the native AAC encoder should soon be out of experimental status..
Looks like a huuuuge amount of work (http://git.videolan.org/?p=ffmpeg.git&a=search&h=HEAD&st=commit&s=aac) has been done on the aac encoder lately, it will be interesting to sample this work once the dust has settled!
andrew.46
October 3rd, 2015, 11:37 PM
abcde version 2.7.1 will be out in a few days and as mentioned previously in this thread it now features support for FFmpeg or avconv. Some excerpts from the changelog:
* Support added for encoding to MPEG-1 Audio Layer II (mp2)
with either twolame or FFmpeg / avconv. Tagging with mid3v2.
* Encoding to WavPack with FFmpeg. Some slight changes to WavPack
syntax with backward compatibility built in for abcde 2.7.
* Encoding to m4a container with FFmpeg or avconv. This allows
for alac encoding with FFmpeg's reverse engineered alac encoder.
There are not so many native FFmpeg audio encoders as I found, although I would like to add support for the FFmpeg aac encoder when it is officially declared non-experimental.
mc4man
February 8th, 2016, 09:21 PM
Is there any reason to continue to enable the external dcadec?
(- thought maybe I saw some instances where the ext. 'acted' better..
FakeOutdoorsman
February 8th, 2016, 11:01 PM
Not that I know of, and I was told the new native decoder (based on libdcadec and by the same author, foo86), should be faster. There is no more substantial development planned for libdcadec (https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2016-January/186366.html).
mc4man
February 9th, 2016, 02:27 AM
Not that I know of, and I was told the new native decoder (based on libdcadec and by the same author, foo86), should be faster. There is no more substantial development planned for libdcadec (https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2016-January/186366.html).
Thanks, am going to get rid of the external support
(- turns out 'issue' was not ffmpeg's.
lewdposter
March 9th, 2016, 05:31 AM
Any news?
FakeOutdoorsman
March 9th, 2016, 06:39 PM
See https://trac.ffmpeg.org/wiki/HWAccelIntro
goofprog
March 9th, 2016, 08:30 PM
there is one. When AC3 is used on the original file, I am forced to use the experimental one. AAC is default for a MP4 file.
mc4man
April 25th, 2016, 08:34 PM
Have gotten some requests about providing for 16.04, I'm a bit ambivalent about that atm. 16.04 has FFmpeg already in a reasonable state & likely some sources that use the binary are also in decent shape.
A 3.x.x ffmpeg, while obviously superior, would possibly break those sources that use the binary & would break qt-faststart which is in the ffmpeg package. (now FFmpeg has 3 packages not including the shared ones, ffmpeg, ffmpeg-doc & ffmeg-dbg, qt-faststart in in the ffmpeg package.
So for myself have decided to allow both ffmpeg repo & ffmpeg master to co-exist & both be available without any PATH changes. For a little bit the master will be in the below ppa in case anyone wants to check out & comment on method. I'm not too sure how it will 'fly' so to speak.
Basically ffmpeg master is installed completely to /opt, (no change there from previous except for manpages).
The binaries & man's are linked to /usr
To allow both FFmpeg sources the links are named differently, eg. - ffmpeg2, ffprobe2, ffplay2, ffserver2 & man's are called from those names, ie. man ffmpeg2 ect.
The master package is named ffmpeg-static.
No changes to the ffmpeg source except may alter the man comment shown in terminal to reflect how to open the proper man for ffmpeg master.
Ex. in same terminal, the ffmpeg in example is the same as 16.04 repo with a few small changes (added libfaac, libfdkaac, removed ext. info on mpc as it messes with audacious & mpc8 -
~$ ffmpeg
ffmpeg version 2.8.6-1ubuntu2.1~ppa3 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2) 20160413
configuration: --prefix=/usr --extra-version='1ubuntu2.1~ppa3' --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-nonfree --enable-libfdk-aac --enable-libfaac --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
doug@doug-HP-Pavilion-Notebook:~$ ffmpeg2
ffmpeg version N-79593-g2063f3e Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2) 20160413
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
libavutil 55. 22.101 / 55. 22.101
libavcodec 57. 38.100 / 57. 38.100
libavformat 57. 34.103 / 57. 34.103
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 44.100 / 6. 44.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg2'
Any comments on this use method welcome.
https://launchpad.net/~mc3man/+archive/ubuntu/ffmpeg-test
FakeOutdoorsman
April 27th, 2016, 06:19 PM
A 3.x.x ffmpeg, while obviously superior, would possibly break those sources that use the binary & would break qt-faststart which is in the ffmpeg package.
qt-faststart could possibly be dropped because ffmpeg has the "-movflags +faststart" option. I don't know anyone who uses the qt-faststart tool which is probably not really maintained anymore.
To allow both FFmpeg sources the links are named differently, eg. - ffmpeg2, ffprobe2, ffplay2, ffserver2 & man's are called from those names, ie. man ffmpeg2 ect.
The master package is named ffmpeg-static.
"ffmpeg2" may confuse users into thinking that it is part of the 2.x release branch. Maybe ff*-git? Not great either...
Ex. in same terminal, the ffmpeg in example is the same as 16.04 repo with a few small changes (added libfaac, libfdkaac, removed ext. info on mpc as it messes with audacious & mpc8 -
libfaac support will be removed once the native encoder gets a speedup. As usual there is no timeline for that, however. I see no need for it with aac and libfdk_aac available.
mc4man
April 27th, 2016, 10:21 PM
qt-faststart could possibly be dropped because ffmpeg has the "-movflags +faststart" option. I don't know anyone who uses the qt-faststart tool which is probably not really maintained anymore.
"ffmpeg2" may confuse users into thinking that it is part of the 2.x release branch. Maybe ff*-git? Not great either...
libfaac support will be removed once the native encoder gets a speedup. As usual there is no timeline for that, however. I see no need for it with aac and libfdk_aac available.
I think you're correct, the hope most users would read a ppa page first is wishful. So will just do as before & in 16.04 a master FFmpeg package will replace the current repo ffmpeg package.
Any app that uses the binary & fails on master - if I can fix will present rebuilds, if not then that's a user choice/decision.
or
Set up as install one the other is removed & vice-versa, in other words use a different package name, still undecided there... The upside of that is don't have to care about breaking other sources as they'll be removed. The downside is maybe some would actually still work, at least for a while.
While I'm leaning towards using the same name & presenting replacements as & when possible the other way is much easier & less work..
(- the official list isn't that extensive, not all listed have ffmpeg as an actual depend either. -
~$ apt-cache rdepends ffmpeg
ffmpeg
Reverse Depends:
ffmpeg-dbg
ffmpeg:i386
videotrans
ffmpeg:i386
devede
ffmpeg:i386
|zoneminder
ffmpeg:i386
|youtube-dl
ffmpeg:i386
xwax
ffmpeg:i386
|winff-qt
ffmpeg:i386
|winff-gtk2
ffmpeg:i386
vokoscreen
ffmpeg:i386
view3dscene
ffmpeg:i386
ubuntustudio-video
ffmpeg:i386
stopmotion
ffmpeg:i386
qnapi
ffmpeg:i386
python3-woo
ffmpeg:i386
|python3-pafy
ffmpeg:i386
python3-matplotlib
ffmpeg:i386
python-woo
ffmpeg:i386
python-scitools
ffmpeg:i386
python-matplotlib
ffmpeg:i386
performous-tools
ffmpeg:i386
pencil2d
ffmpeg:i386
pacpl
ffmpeg:i386
multimedia-video
ffmpeg:i386
|mps-youtube
ffmpeg:i386
motion
ffmpeg:i386
mediathekview
ffmpeg:i386
libav-tools
ffmpeg:i386
kphotoalbum
ffmpeg:i386
kmplayer
ffmpeg:i386
kino
ffmpeg:i386
kdenlive
ffmpeg:i386
jsymphonic
ffmpeg:i386
imagination
ffmpeg:i386
|get-iplayer
ffmpeg:i386
imagemagick-6.q16
ffmpeg:i386
connectome-workbench
ffmpeg:i386
As far as libfaac - that was just for a personal rebuild of 2.8.6 as at least one app has not moved off of faac via ffmpeg & I was testing it (the app)
Good to know about faststart as wasn't possible to do in a ppa statically linked binaries ffmpeg
andrew.46
April 28th, 2016, 12:04 AM
libfaac support will be removed once the native encoder gets a speedup. As usual there is no timeline for that, however. I see no need for it with aac and libfdk_aac available.
That is big news, faac has been grumbling along for a long time now....
goofprog
April 28th, 2016, 02:14 AM
It is easy to install the latest ffmpeg by downloading it from ffmpeg.org and adding ffmpeg to /usr/sbin.
Well that is when I believe they use to compile it too but now it is a source code thing. Oh well. I just use wine and ffmpeg like so wine ffmpeg -i thefile.mkv -vf scale=-1:720 thefile.mp4
FakeOutdoorsman
April 28th, 2016, 05:38 PM
It is easy to install the latest ffmpeg by downloading it from ffmpeg.org and adding ffmpeg to /usr/sbin.
Well that is when I believe they use to compile it too but now it is a source code thing.
FFmpeg has never released binaries; just source code. Binaries are available from volunteers and third-parties however. For example, Linux users can get binaries from:
http://johnvansickle.com/ffmpeg/
Oh well. I just use wine and ffmpeg like so wine ffmpeg -i thefile.mkv -vf scale=-1:720 thefile.mp4
There is no need to use Wine to run ffmpeg. Since you're apparently using 15.10, just install ffmpeg from the repo, or download the binary from the link above.
andrew.46
October 1st, 2016, 10:39 AM
I am a little puzzled about nvenc and FFmpeg. I have a GeForce GTX 750 Ti with the binary blob drivers 367.44 and I note that I have access with no further effort to nvenc:
andrew@ilium~$ ffmpeg -encoders 2>/dev/null | grep nvenc
V..... h264_nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc_h264 NVIDIA NVENC H.264 encoder (codec h264)
V..... nvenc_hevc NVIDIA NVENC hevc encoder (codec hevc)
V..... hevc_nvenc NVIDIA NVENC hevc encoder (codec hevc)
andrew@ilium~$
and certainly seems to work well enough although I have not tested efficiency. Why do I have access to this without going through the athletics of downloading the NVidia Codec SDK, manually copying headers etc?
I suspect I am missing something here...
FakeOutdoorsman
October 1st, 2016, 08:24 PM
Unfortunately my hardware is too old to try nvenc so I have no experience with it and am unable to try it.
As a starting point I recommend rooting around in the FFmpeg configure file to see what header files are required, and then see what packages provide these files.
Not very helpful.
Edit: I just remembered that "rooting" is Oz slang for something entirely different. Not what I meant...
andrew.46
October 1st, 2016, 10:40 PM
Edit: I just remembered that "rooting" is Oz slang for something entirely different. Not what I meant...
It is indeed :)
qyot27
October 3rd, 2016, 03:40 AM
It's because the correct header for nvenc got added to compat/ a little over a month ago. (http://git.videolan.org/?p=ffmpeg.git;a=tree;f=compat;hb=HEAD) In other words, FFmpeg supplies their own local copy of it now, removing the need for end users to go spelunking for mystery headers and fiddle with precarious system setups to make sure the headers can be found when required.
The commit itself. (http://git.videolan.org/?p=ffmpeg.git;a=commit;h=325e56479ff64c884f3bcccf9 22a7f7163488b89)
andrew.46
October 3rd, 2016, 04:20 AM
@qyot27 Thanks for that information, you have made my day!! Now to experiment with FFmpeg and nvenc encoding, I knew there was a reason I picked up a decent graphics card! My only regret is that I did not shell out for one of the newer ones with hevc hardware support...
FakeOutdoorsman
October 3rd, 2016, 04:30 PM
That is big news, faac has been grumbling along for a long time now....
libfaac has now been removed. (http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dc0f711459e0c682bf9f94ba38d26736e90cff 45)
It's because the correct header for nvenc got added to compat/ a little over a month ago. (http://git.videolan.org/?p=ffmpeg.git;a=tree;f=compat;hb=HEAD)
Makes sense. Didn't even notice that commit.
andrew.46
October 15th, 2016, 05:04 AM
So I have created a little time now in which I would like to test out nvenc and perhaps write up a page of the comparison. I am a little lucky in having a GTX 750 Ti GM107-400-A2 which for me means I have a card with Maxwell microarchitecture and a good run at nvenc.
How to test could get a good start here:
http://developer.download.nvidia.com/compute/redist/ffmpeg/1511-patch/FFMPEG-with-NVIDIA-Acceleration-on-Ubuntu_UG_v01.pdf
but I am curious to know if anybody here has already done some testing?
FakeOutdoorsman
October 15th, 2016, 06:57 AM
I can't contribute much due to being in the Pleistocene epoch (NVIDIA GT 240...queue laugh track).
I'm not sure how much of that patch mentioned in the PDF is outdated. It does provide a scaling filter, nvresize, which was submitted to ffmpeg-devel (see "have some major changes for nvenc support") but never went anywhere, AFAIK.
If you are interested the FFmpeg Wiki could use some more user friendly NVENC related info at:
https://trac.ffmpeg.org/wiki/HWAccelIntro
mc4man
October 18th, 2016, 01:17 AM
So I have created a little time now in which I would like to test out nvenc and perhaps write up a page of the comparison. I am a little lucky in having a GTX 750 Ti GM107-400-A2 which for me means I have a card with Maxwell microarchitecture and a good run at nvenc.
How to test could get a good start here:
http://developer.download.nvidia.com/compute/redist/ffmpeg/1511-patch/FFMPEG-with-NVIDIA-Acceleration-on-Ubuntu_UG_v01.pdf
but I am curious to know if anybody here has already done some testing?
Minor as I'm waiting for a replacement laptop (the vendor was unable to honor orig. warranty in timely fashion so I choose full refund in store credit vs. prorated cash.
So atm only a 775m which seems a bit hobbled here.
Noticed that both a ffmpeg wiki & pdf have some parameters that don't work or don't work on this hardware. Also hardware doesn't seem to support hevc_nvenc so only tried h264. For similar quality encodings nvenc was usually twice as fast though not exactly sure what nvenc full parameters used are as they aren't reported or tagged, at least looking via mediainfo.
ffmpeg reports these for h264_nvenc
Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:
General capabilities: delay
Threading capabilities: none
Supported pixel formats: yuv420p nv12 p010le yuv444p yuv444p16le bgr0 rgb0
h264_nvenc AVOptions:
-preset <int> E..V.... Set the encoding preset (from 0 to 11) (default medium)
default E..V....
slow E..V.... hq 2 passes
medium E..V.... hq 1 pass
fast E..V.... hp 1 pass
hp E..V....
hq E..V....
bd E..V....
ll E..V.... low latency
llhq E..V.... low latency hq
llhp E..V.... low latency hp
lossless E..V....
losslesshp E..V....
-profile <int> E..V.... Set the encoding profile (from 0 to 3) (default main)
baseline E..V....
main E..V....
high E..V....
high444p E..V....
-level <int> E..V.... Set the encoding level restriction (from 0 to 51) (default auto)
auto E..V....
1 E..V....
1.0 E..V....
1b E..V....
1.0b E..V....
1.1 E..V....
1.2 E..V....
1.3 E..V....
2 E..V....
2.0 E..V....
2.1 E..V....
2.2 E..V....
3 E..V....
3.0 E..V....
3.1 E..V....
3.2 E..V....
4 E..V....
4.0 E..V....
4.1 E..V....
4.2 E..V....
5 E..V....
5.0 E..V....
5.1 E..V....
-rc <int> E..V.... Override the preset rate-control (from -1 to INT_MAX) (default -1)
constqp E..V.... Constant QP mode
vbr E..V.... Variable bitrate mode
cbr E..V.... Constant bitrate mode
vbr_minqp E..V.... Variable bitrate mode with MinQP
ll_2pass_quality E..V.... Multi-pass optimized for image quality (only for low-latency presets)
ll_2pass_size E..V.... Multi-pass optimized for constant frame size (only for low-latency presets)
vbr_2pass E..V.... Multi-pass variable bitrate mode
-rc-lookahead <int> E..V.... Number of frames to look ahead for rate-control (from -1 to INT_MAX) (default -1)
-surfaces <int> E..V.... Number of concurrent surfaces (from 0 to INT_MAX) (default 32)
-cbr <boolean> E..V.... Use cbr encoding mode (default false)
-2pass <boolean> E..V.... Use 2pass encoding mode (default auto)
-gpu <int> E..V.... Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)
any E..V.... Pick the first device available
list E..V.... List the available devices
-delay <int> E..V.... Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)
-no-scenecut <boolean> E..V.... When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)
-b_adapt <boolean> E..V.... When lookahead is enabled, set this to 0 to disable adaptive B-frame decision (default true)
-spatial-aq <boolean> E..V.... set to 1 to enable Spatial AQ (default false)
-temporal-aq <boolean> E..V.... set to 1 to enable Temporal AQ (default false)
-zerolatency <boolean> E..V.... Set 1 to indicate zero latency operation (no reordering delay) (default false)
-nonref_p <boolean> E..V.... Set this to 1 to enable automatic insertion of non-reference P-frames (default false)
-strict_gop <boolean> E..V.... Set 1 to minimize GOP-to-GOP rate fluctuations (default false)
-aq-strength <int> E..V.... When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)
-cq <int> E..V.... Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.