Page 142 of 241 FirstFirst ... 4292132140141142143144152192 ... LastLast
Results 1,411 to 1,420 of 2402

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

  1. #1411
    Join Date
    Dec 2010
    Beans
    1

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

    All:

    I have followed the directions given in the post "Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04" ( http://ubuntuforums.org/showpost.php...postcount=1289 ) to the letter and have failed to get a fully functional build of ffmpeg. If anyone has the time, can you review my issue and shoot a few ideas my way.

    History:
    1. Not knowing that ffmpeg was stripped, I installed the ffmpeg package and the libavcodec-extra-52 package (possibly a few more; I was liberal with the package manager on day one of the install). This failed to produce a version of ffmpeg that could transcode audio with libfaac.
    2. I removed those packages and added the medibuntu repository and installed the same packages but ran into some sort of error when trying to convert an mkv (sorry, I can't remember the error)
    3. [Currently hung on this one] Building components from source, as noted in the introduction, has provided a copy of ffmpeg that doesn't encode with the libx264 codec

    Issue:
    I compiled and installed all of the packages (including optional lame and vpx). There weren't any issues, save for the apparently innocuous warnings which inexorably appear during a compile.

    To test the build, I ran a basic test command that works on my mac (installed with macports):

    ffmpeg -i ./pp.mkv -vcodec libx264 -acodec libfaac -t 15 ./a.mp4

    The job fails immediately with the following error:
    Code:
    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
    Google... and I came across this mail indicating a similar issue ( http://mailman.videolan.org/pipermai...st/006123.html ), which says "This error *CANNOT APPEAR* unless ffmpeg has been miscompiled."

    OK. I had an issue with the compile. I tried the suggestion of comparing the header build spec (turns out to be 122) with the shared library linked in the ffmpeg binary (given by ldd). But, when I issued the ldd command on the ffmpeg binary, there was no reference, at all, to x264.

    Now, I wanted to see if my libx264 files really were placed when I built the x264 package. So, I ran mlocate to see what exists:

    Code:
    mlocate 264
    /home/brucew/.mozilla/firefox/83cf7lv6.default/Cache/2644ADC7d01
    /usr/lib/libx264.so.85
    /usr/lib/gstreamer-0.10/libgsth264parse.so
    /usr/lib/i686/sse2/libx264.so.85
    /usr/local/bin/x264
    /usr/local/include/x264.h
    /usr/local/include/x264_config.h
    /usr/local/lib/libx264.a
    /usr/local/lib/pkgconfig/x264.pc
    ...
    So, a little problem there--I built 122, but I have an 85 module out there, for some reason. "No problem," I thought. "I will just specify the include and lib paths with the CFLAGS and LDFLAGS environment variables:
    Code:
    export CFLAGS=-I/usr/local/include:$CFLAGS
    export LDFLAGS=-L/usr/local/lib:$LDFLAGS
    So, I removed the old checkinstall package and did the ffmpeg build again by
    make distclean, ./configure..., make... The outcome was identical.

    My impression was that it ignored the CFLAGS and LDFLAGS that I set (or the default paths superseded). My next attempt involved renaming the /usr/lib/libx264.so.85 module to aaaaaa.so.85 and then creating the following symlinks in /usr/lib pointing to /usr/local/lib/libx264.a
    Code:
    libx264.a
    libx264.so
    libx264.so.122
    I repeated the ffmpeg rebuild procedure and ran into the same issue AGAIN!

    ARRRRGGGHGHHHH!

    Does anyone have a firm understanding of what is happening here, what is interfering with my build, or where I could have made a mistake? What is the best way for me to get an ffmpeg build that is pretty well loaded with prominent codecs (like my macports version).

    I'm willing to try just about anything.

    Thanks.

  2. #1412
    Join Date
    Jun 2007
    Beans
    17,337

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

    . But, when I issued the ldd command on the ffmpeg binary, there was no reference, at all, to x264.
    If you followed this guide. which it appears you did, then you've statically linked x264 w/ ffmpeg - so there should be no reference in ldd
    (if you had built x264 as shared there would be

    Your orig. issue most likely was your ffmpeg command, (and at this point possibly any of the things you've done to 'fix' something that wasn't 'broke' to begin with

  3. #1413
    Join Date
    Sep 2006
    Beans
    3,713

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

    Quote Originally Posted by smtkr View Post
    To test the build, I ran a basic test command that works on my mac (installed with macports):

    Code:
    ffmpeg -i ./pp.mkv -vcodec libx264 -acodec libfaac -t 15 ./a.mp4
    The job fails immediately with the following error:
    Code:
    Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
    You simply need to use a preset (with the -vpre option) when using -vcodec libx264. See the Using FFmpeg and x264 section of the guide for examples. Also see the FFmpeg x264 encoding guide.

  4. #1414
    Join Date
    Dec 2006
    Beans
    348

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

    Is there any advantage (in terms of performance or compatibility) for choosing MKV over MP4 for generating lossless H.264?


    Thanks for the excellent guide FakeOutdoorsman
    Cheers,

  5. #1415
    Join Date
    Sep 2006
    Beans
    3,713

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

    I doubt there is much of a performance difference when encoding. I also doubt decoding would be much different, but I'm not totally sure because I don't have much experience with hardware accelerated decoding such as with VDPAU.

    I tend to use MKV on the rare occasion that I do use lossless H.264 simply because it can handle more audio formats.

  6. #1416
    Join Date
    Mar 2007
    Location
    Outer Milky Way
    Beans
    Hidden!
    Distro
    Kubuntu 12.04 Precise Pangolin

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

    Oh good. Does FFMPEG finally have audio and video synch'd?

    I've been with mencoder for some time due to the synch problems.

    UbuntuGuide/KubuntuGuide

    Right now the killer is being surrounded by a web of deduction, forensic science,
    and the latest in technology such as two-way radios and e-mail.

  7. #1417
    Join Date
    Sep 2006
    Beans
    3,713

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

    Sorry, but I'm not exactly sure of what you're asking without any context. If you post your MEncoder command or tell me what output format(s) you are interested in I can give you a FFmpeg equivalent for you to try.

  8. #1418
    Join Date
    Dec 2006
    Beans
    348

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

    Quote Originally Posted by FakeOutdoorsman View Post
    I doubt there is much of a performance difference when encoding. I also doubt decoding would be much different, but I'm not totally sure because I don't have much experience with hardware accelerated decoding such as with VDPAU.

    I tend to use MKV on the rare occasion that I do use lossless H.264 simply because it can handle more audio formats.
    Sounds good. Thanks for the clarification

  9. #1419
    Join Date
    Sep 2006
    Beans
    3,713

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

    Quote Originally Posted by pwnedd View Post
    Sounds good. Thanks for the clarification
    Of course it all depends on what you're doing, and I don't really know what that is. I've used lossless on a few occasions:
    1. Capturing the screen as shown here: HOWTO: Proper Screencasting on Linux.
    2. Creating an intermediate format (such as above). This would also be a nice alternative to huffyuv when using Adobe Premiere or some other editors, but I haven't tried to get that working yet.
    3. Messing around with lossless for the hell of it.

    A good lossy encode with a proper crf value usually gets the job done though.

  10. #1420
    Join Date
    Dec 2006
    Beans
    348

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

    Quote Originally Posted by FakeOutdoorsman View Post
    Of course it all depends on what you're doing, and I don't really know what that is. I've used lossless on a few occasions:
    I'm using it for something a bit non-standard: on-the-fly generation of relatively small (~100-300 frame) videos of solar images. Since the videos are short, and since they need to be created on the fly, I am optimizing for speed and quality.

    The approach I've taken up until now has been to generate two different versions of each video: one for in-browser viewing (which should be around ~10M or less for decent streaming) and another "high-quality" download version which could be much larger. Recently I began experimenting with lossless encoding for the downloadable version (with files from ~50-300M), but as I'm doing some more testing it looks like it is really not all the necessary; simply choosing a low enough CRF results in a very high-quality video with a smaller filesize. Further, it seems like Quicktime doesn't support the lossless H.264 out-of-the-box, and since a large number of our users are likely to be using that, it's not really a good option. I'm still doing some testing with different presets and CRF values but it looks like what I may end up doing is something like -crf 18 for the in-browser videos and -crf 10 or 15 for the high-quality download version.
    Last edited by khughitt; January 1st, 2011 at 02:44 PM. Reason: Expanding on explanation a bit..

Page 142 of 241 FirstFirst ... 4292132140141142143144152192 ... 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
  •