PDA

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



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

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?