Page 102 of 241 FirstFirst ... 25292100101102103104112152202 ... LastLast
Results 1,011 to 1,020 of 2402

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

  1. #1011
    Join Date
    May 2007
    Beans
    141
    Distro
    Ubuntu

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

    After much stress, I have written an ffmpeg progress indicator in Bash. It was a right pain in the ****, due to the way ffmpeg prints out its updates without the proper use of Carriage Returns.

    I have written it up here:http://www.prupert.co.uk/2010/05/11/...eg-that-works/

    UPDATE:

    I have now added an ETA indicator (in hours mins and seconds) to show how long there is left, as well as some better error checking to deal with how ffmpeg prints out its updates.
    I plan to convert it to Python, to make it more powerful and flexible and cross platform. As well add a GUI for those command-line hating types, it might even turn into YAFF (yet another ffmpeg frontend - which is what I'll call it once it is big enough).
    Last edited by prupert; May 12th, 2010 at 12:46 PM.

  2. #1012
    Join Date
    May 2007
    Beans
    141
    Distro
    Ubuntu

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

    For those that are intersted. I have updated my scripts, so that they use a config file after first running the ffmpegupv1.4.sh script. This means that in future, the script can be run with no user interaction. So it can be called by cron if you want

    Updates can be found here:
    http://code.google.com/p/x264-ffmpeg-up-to-date/

  3. #1013
    Join Date
    May 2010
    Beans
    3

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

    Hello, I made it through the install and tried it on my first AVI. I am running a fresh install of Ubuntu 10.04 x64. I used your "One-pass CRF" command and I changed my input filename but that is all:
    Code:
    ffmpeg -i IMGP7721.AVI -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mp4
    This is the output that I get:
    Code:
    FFmpeg version SVN-r23149, Copyright (c) 2000-2010 the FFmpeg developers
      built on May 16 2010 23:31:18 with gcc 4.4.3
      configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
      libavutil     50.15. 2 / 50.15. 2
      libavcodec    52.67. 1 / 52.67. 1
      libavformat   52.62. 0 / 52.62. 0
      libavdevice   52. 2. 0 / 52. 2. 0
      libavfilter    1.20. 0 /  1.20. 0
      libswscale     0.10. 0 /  0.10. 0
      libpostproc   51. 2. 0 / 51. 2. 0
    Input #0, avi, from 'IMGP7721.AVI':
      Metadata:
        ISFT            : 
      Duration: 00:00:10.99, start: 0.000000, bitrate: 23891 kb/s
        Stream #0.0: Video: mjpeg, yuvj422p, 1280x720, 30 tbr, 30 tbn, 30 tbc
        Stream #0.1: Audio: pcm_u8, 8000 Hz, 1 channels, u8, 64 kb/s
    [ffmpeg_output @ 0x272eef0]auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
    [scale @ 0x272f1b0]w:1280 h:720 fmt:yuvj422p -> w:1280 h:720 fmt:yuv420p flags:a0000004
    [libx264 @ 0x270f160]using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
    [libx264 @ 0x270f160]profile High, level 3.2
    [libx264 @ 0x270f160]264 - core 94 r1583 7608d73 - H.264/MPEG-4 AVC codec - Copyleft 2003-2010 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:0:0 analyse=0x3:0x113 me=umh subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=22.0 qcomp=0.60 qpmin=10 qpmax=51 qpstep=4 ip_ratio=1.41 aq=1:1.00
    [libfaac @ 0x270f7d0]libfaac doesn't support this output format!
    Output #0, mp4, to 'output.mp4':
        Stream #0.0: Video: libx264, yuv420p, 1280x720, q=10-51, 200 kb/s, 90k tbn, 30 tbc
        Stream #0.1: Audio: aac, 8000 Hz, 2 channels, s16, 128 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
    I am very new at this and am not sure what my options are that I can use.
    My AVI is from straight from a Pentax Optio W80 and the properties of the video are listed below...
    Video:
    Code:
    Dimensions: 1280 x 720
    Codec: Motion JPEG
    Framerate: 30 FPS
    Bitrate: N/A
    Audio:
    Code:
    Codec: Uncompressed 8-bit PCM audio
    Channels: Mono
    Sample Rate: 8000 Hz
    Bitrate: N/A
    Thanks for your time and effort.
    -Jeremy

  4. #1014
    Join Date
    May 2007
    Beans
    141
    Distro
    Ubuntu

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

    The important error message is:

    Code:
    [libfaac @ 0x270f7d0]libfaac doesn't support this output format!
    and more information is given as well:
    Code:
    Stream #0.1: Audio: aac, 8000 Hz, 2 channels, s16, 128 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
    The first quote is telling you that libfaac is the codec used to create the audio stream, in this case aac and that the settings chosen aren't supported in the output format (mp4) that has been chosen.

    The second quote is giving you more info, telling you that stream 0.1 is the Audio stream and what options you chose. It then says when ffmpeg tried to open the encoder you chose for that stream, it failed.

    So, essentially, the settings chosen for the aac audio encoder don't work!

    This is important, and fakeoutdoorsman will have to check to see why it doesn't work - I have no avi files to check it out on. I've just checked the command on a VOB file, and it seems to work fine. So I am wondering if it is to do with the AVI file you are using....

    Sorry, not much help, but I thought I'd explain the error message a little more. Hopefully fakeoutdoorsman can shed some more light....

  5. #1015
    Join Date
    Dec 2006
    Beans
    7,349

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

    Hi towerboy,

    Does adding -ar 44100 to your aac options help?

    Andrew
    You think that's air you're breathing now?

  6. #1016
    Join Date
    May 2007
    Beans
    141
    Distro
    Ubuntu

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

    I was hoping someone with knowledge of compilation can help here. I have asked on the ffmpeg lists, but thought I'd ask here as well.

    I am writing my own little bash transcoder script, that I want to be able to distribute to anyone that wishes to use it. One of the features I want it to have, is to always use the latest versions of ffmpeg and x264. I was thinking, what I'd like to do is download the source and compile x264 and ffmpeg in a local folder, but not to install it. So the script uses these most recent versions, but they don't get installed on the system so as not to mess up any other installs of ffmpeg on the system (and also meaning that the script doesn't need to run as root after the initial run).

    I can compile x264 on its own, but if I want to compile ffmpeg to use x264, how can I tell it where the libx264 sources are located, if I haven't installed them? I have had a look through the ffmpeg configure option and there seems to be no such option. Is what I am trying to do impossible?

  7. #1017
    Join Date
    May 2010
    Beans
    3

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

    Quote Originally Posted by andrew.46 View Post
    Hi towerboy,

    Does adding -ar 44100 to your aac options help?

    Andrew
    Hey Andrew,
    Thanks for that little bit of info. It did convert the file but it wouldn't play smoothly on my netbook so I had to use "-s 640x360" and it plays just fine. When it did convert it though it gave this warning:
    Code:
    Warning, using s16 intermediate sample format for resampling
    I'm not sure if that's good or bad so if anyone knows and can let me know, thanks. Again, thank you Andrew for your help!

    -Jeremy

  8. #1018
    Join Date
    Sep 2006
    Beans
    3,713

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

    Quote Originally Posted by mrfreen View Post
    Thanks! I was trying to use wildcards (e.g. *.png instead of %04d.png).

    Working now. Thanks again!


    Hmmm... new problem...
    Now it's segfaulting when I try to make an x264 file.
    Here's what I'm sending it:
    and here's what it's giving me:


    When I remove the -vpre argument it says:

    ... and doesn't segfault, but doesn't do anything, either...
    Late reply. I've been out of town for a week. Did you ever resolve this issue?

  9. #1019
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    570
    Distro
    Ubuntu Budgie

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

    Quote Originally Posted by prupert View Post
    I was hoping someone with knowledge of compilation can help here. I have asked on the ffmpeg lists, but thought I'd ask here as well.

    I am writing my own little bash transcoder script, that I want to be able to distribute to anyone that wishes to use it. One of the features I want it to have, is to always use the latest versions of ffmpeg and x264. I was thinking, what I'd like to do is download the source and compile x264 and ffmpeg in a local folder, but not to install it. So the script uses these most recent versions, but they don't get installed on the system so as not to mess up any other installs of ffmpeg on the system (and also meaning that the script doesn't need to run as root after the initial run).

    I can compile x264 on its own, but if I want to compile ffmpeg to use x264, how can I tell it where the libx264 sources are located, if I haven't installed them? I have had a look through the ffmpeg configure option and there seems to be no such option. Is what I am trying to do impossible?
    That's what --extra-cflags and --extra-ldflags are for (--extra-cflags is also used to perform C code optimization for the given CPU*). --extra-cflags points to the /include folder for the install, --extra-ldflags points to the /lib directory. Also, x264 and FFMS2's PKG_CONFIG_PATH variables allow for this too, in reference to FFMS2 finding a stripped-down version of ffmpeg and x264 finding both that same ffmpeg and FFMS2.

    The other point, is that 'make install', despite 'install' being in the command, doesn't mean one has to be root or that it mucks with the system libs/apps/etc. For instance, when you compile x264,
    Code:
    ./configure --prefix=$HOME/x264_build
    make
    make install
    because you specified $HOME/x264_build as the prefix, the 'make install' step will install x264 to $HOME/x264_build instead of the system. Now, when compiling ffmpeg, you would do,
    Code:
    ./configure --prefix=$HOME/x264_build [other options] --enable-libx264 --extra-cflags="-I$HOME/x264_build/include" --extra-ldflags="-L$HOME/x264_build/lib"
    make
    make install
    which should allow ffmpeg to find the x264 stuff you just installed AND install ffmpeg to $HOME/x264_build as well. You'd find the ffmpeg executable in $HOME/x264_build/bin, and need to run it by cd-ing into the directory and calling it like so:
    Code:
    ./ffmpeg
    The ./ is required because the executable is not on the system PATH.

    None of that requires root access.



    *Using --extra-cflags for CPU optimization looks like this (for a Pentium 3 and other P3-family CPUs, like the Celeron Coppermine I have in my computer; change this depending on what CPU/family you use - the list of possible options is available in the documentation for GCC):
    Code:
    --extra-cflags="-march=pentium3"
    If you wanted to double this up, like with ffmpeg finding x264's files, it looks like this:
    Code:
    --extra-cflags="-I$HOME/x264_build/include -march=pentium3"

  10. #1020
    Join Date
    Mar 2008
    Location
    Dayton OH USA
    Beans
    63
    Distro
    Ubuntu 16.04 Xenial Xerus

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

    Just adding my voice to the choir of satisfied FFmpeg and x264 users. I installed it last night on my Compaq Presario M2000 laptop running Lucid. it took a while, but it was worth the wait. Sound Converter can now create mp3 files.

    Thank you, FakeOutdoorsman!
    "Do not take life too seriously. You will never get out of it alive." --Elbert Hubbard

Page 102 of 241 FirstFirst ... 25292100101102103104112152202 ... 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
  •