Page 78 of 241 FirstFirst ... 2868767778798088128178 ... LastLast
Results 771 to 780 of 2402

Thread: HOWTO: Install and use the latest FFmpeg and x264

  1. #771
    Join Date
    Sep 2006
    Beans
    3,713

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by Chewbranca View Post
    I was trying to get this installed with x264 support to work with gource video output. I followed the guide and everything installed properly but I was getting the annoying incorrect parameters errors.
    I am unfamiliar with gource. What was the FFmpeg or x264 command the gource was using that resulted in the incorrect parameters error?
    Quote Originally Posted by Chewbranca View Post
    Eventually I found this which works fine:
    Code:
    sudo apt-get install ffmpeg libavcodec-extra-52
    This means that gource is now using ffmpeg and libx264 from the repository and not your compiled versions.

  2. #772
    Join Date
    Oct 2007
    Location
    Auckland, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by FakeOutdoorsman View Post
    Yes, FFmpeg can do this, but you'll have to do some math. The general rule is:
    Code:
    desired output file size = bitrate / file duration
    So, for example, I have a 30 second video and I want it to be roughly 1 megabyte. Remember that 1 MB (megabyte) = 8 Mb (megabits) = 1024 Kb (kilobits):
    Code:
    (8*1024)/30 = ~273 kilobits/s
    I think then you may have to subtract your audio bitrate from this number, so in this example, with a desired audio bitrate of 64k/s I would try: -b 209k -bt 209k -ab 64k. For my test encode I got a final file size of 978K. When I tried -b 273k -ab 64k I got a final file size of 1.2M. Close enough? Not as exact as I thought it would be, but maybe my math or something else is wrong. You'll have to play around with it.

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

    1 MB = (1048576 bytes * 8 to convert to bits)/30 seconds = 279620 bits/s. So you could use -b 279620 or round to -b 280k (FFmpeg "k" equals 1000, not 1024 [I'm not sure if -b will ignore decimal amounts, such as 279.62k]). Minus a 64kbit/s audio file = -b 216k.
    Excellent, nothing too difficult.

    Also, I may look into creating something to automate the process, as it is simple math. Thanks again FakeOutdoorsman
    First they ignore you, then they laugh at you, then they fight you, then you win ~ Mahatma Gandhi

  3. #773
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by talsemgeest View Post
    Excellent, nothing too difficult.

    Also, I may look into creating something to automate the process, as it is simple math. Thanks again FakeOutdoorsman
    There are lots of bitrate calculators around already. I personally uses the one in the VfW Xvid distribution.
    「明後日の夕方には帰ってるからね。」


  4. #774
    Join Date
    Oct 2007
    Location
    Auckland, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by Bachstelze View Post
    There are lots of bitrate calculators around already. I personally uses the one in the VfW Xvid distribution.
    Thanks, I will look into it
    First they ignore you, then they laugh at you, then they fight you, then you win ~ Mahatma Gandhi

  5. #775
    Join Date
    Nov 2006
    Location
    Denmark, Roskilde
    Beans
    15
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by mc4man View Post
    @ DarkFox.DK
    While somewhat off topic to this thread, if you decide to build vlc then i'd follow the instr.'s here ( at least as to method (vlc needs a few changes to ffmpeg configure

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

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

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

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

    From searching a bit I ended up with this..
    Code:
    ./configure --enable-x11 --enable-xvideo \
    --enable-sdl --enable-ffmpeg --with-ffmpeg-mp3lame \
    --enable-mad --enable-libdvbpsi --enable-a52 --enable-dca \
    --enable-libmpeg2 --enable-dvdnav --enable-faad \
    --enable-vorbis --enable-ogg --enable-theora --enable-faac\
    --enable-mkv --enable-freetype --enable-fribidi \
    --enable-speex --enable-flac --enable-caca \
    --enable-skins --enable-skins2 --enable-alsa \
    --disable-qt --enable-wxwindows --enable-ncurses \
    --enable-asa --enable-release --enable-shared --enable-pic --with-x264-tree=/usr/src/x264
    Of course, it fails when I try to compile it.. I'm sure there's stuff that I don't need there, and something I do need, that's missing..

    Make fails with this:
    Code:
    /usr/local/lib/libavcodec.a: could not read symbols: Bad value
    Could anyone point me in the direction of a tutorial on how to do this right?

  6. #776
    Join Date
    Jun 2007
    Beans
    17,337

    Re: HOWTO: Install and use the latest FFmpeg and x264

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

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

    Otherwise

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

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

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

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

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

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

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

    Code:
    ./configure  --enable-libmpeg2 --enable-faad \
    --enable-vorbis --enable-theora \
    --enable-speex --enable-flac   --enable-release
    Another Ex.
    this is what the package vlc I did today shows, I haven't pared it or the rules, install files down yet

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

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

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

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

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

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

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

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

    Configure as such ( the blue is for 32 bit only
    Code:
    ./configure --with-tuning=native --enable-loader --disable-schroedinger --enable-snapshot \
    --disable-fluidsynth  --enable-vorbis --enable-shout --enable-flac \
    --enable-speex --enable-libmpeg2 --enable-theora --enable-twolame --enable-faad \
    --disable-zvbi --enable-realrtsp --enable-real --enable-libass
    If you don't wish shoutcast support or theora then remove, ect.

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

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

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

    If build succeeds, after sudo make install but before running vlc..
    in terminal
    Code:
    sudo ldconfig
    Attached Files Attached Files
    Last edited by mc4man; December 12th, 2009 at 09:09 AM. Reason: blue

  7. #777
    Join Date
    Oct 2007
    Location
    Edinburgh, UK
    Beans
    90
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by _mikec_ View Post
    After, when i try to run ffmpeg i get this error:
    bash: /usr/bin/ffmpeg: No such file or directory
    I had the same problem today (on intrepid) ffmpeg is installed ok to /usr/local/bin but is not found. A reboot fixed it and the system now finds it ok. (It would be nice not to have to reboot though)
    Happily running several flavours of Ubuntu

  8. #778
    Join Date
    Jul 2008
    Location
    Birmingham, England
    Beans
    2,400

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by CoolDreamZ View Post
    I had the same problem today (on intrepid) ffmpeg is installed ok to /usr/local/bin but is not found. A reboot fixed it and the system now finds it ok. (It would be nice not to have to reboot though)
    You might have to change your default PATH to look at /usr/local/bin first

  9. #779
    Join Date
    Oct 2007
    Location
    Edinburgh, UK
    Beans
    90
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Thanks for the tip, $PATH is as follows:

    Code:
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    My guess is that as the default ubuntu ffmpeg package is removed earlier in the session and before installing the compiled version something broke and the system could not find ffmpeg until after a re-boot.
    Happily running several flavours of Ubuntu

  10. #780
    Join Date
    Jun 2006
    Location
    Rockaway, NJ
    Beans
    55
    Distro
    Ubuntu 9.10 Karmic Koala

    Question Re: HOWTO: Install and use the latest FFmpeg and x264

    I'm getting an error when doing the checkinstall part of ffmpeg. The error is:

    Code:
    cmdutils.c:568: undefined reference to `av_filter_next'
    collect2: ld returned 1 exit status
    make: *** [ffmpeg_g] Error 1
    
    ****  Installation failed. Aborting package creation.
    I'm using Karmic 64bit.
    "smooth as seelk"

Page 78 of 241 FirstFirst ... 2868767778798088128178 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •