Page 210 of 241 FirstFirst ... 110160200208209210211212220 ... LastLast
Results 2,091 to 2,100 of 2402

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

  1. #2091
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    569
    Distro
    Ubuntu Budgie

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

    Quote Originally Posted by FakeOutdoorsman View Post
    I suspect your players (other than ffplay) have a problem decoding 4:2:2 color sampling, which is what your input and output use:
    Code:
    Stream #0:0(eng): Video: dvvideo (dvhp / 0x70687664), yuv422p, 960x720 [SAR 4:3 DAR 16:9], 46033 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 59.94 tbc
    Try adding -pix_fmt yuv420p to your command and see if that provides an output that works with your players.
    Lack of 4:2:2 support is precisely the issue, since I've seen it do the same thing under Windows using various solutions, and if I recall correctly, 4:2:2 decoding ended up getting added much later than the 4:4:4 decoding support (and I think RGB was just added recently).

    One possibility would be to recompile the media players against a new version of libavcodec (or find yourself a PPA with bleeding edge builds). The repository versions of these players are probably too old to support the additional H.264 colorspaces.

  2. #2092
    Join Date
    Jul 2006
    Beans
    34

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

    Quote Originally Posted by Yokouchi View Post
    My idiot gear kicks in.

    -b 5000 and
    -b 5000k are two different things (duh).

    With nothing specified as to how to work, it'd seem it was defaulting to something very, very low quality as you suggested. All is well now.

    5000k seems a bit excessive against the performance in -crf though seems to be what Vimeo wants for HD content (where this is headed)...

    ...thanks again for your help. Feel a bit silly... though to be fair I still don't understand why things rendered fine in ffplay and not anywhere else. With -crf things played fine everywhere. The -pix_fmt argument didn't improve things.

    No doubt specifying valid bitrates help, but I still feel I'm missing something with respect to some streams being able to play in ffplay, but not elsewhere.
    no reason to feel silly , we all need to start somewhere....
    i forget now as its been a while but i think explicitly setting -profile main works fine with Vimeo, but i also thought adding -profile high to ffmpeg works for Vimeo HD content too.

    for encoding for any on-line streaming or over wireless content for that matter. where the total bandwidth is restricted you are probably better to set the max restriction's yourself like so if you want quality as well as a far smaller file size.

    -vcodec libx264 -crf 18 -minrate 800k -maxrate 1200k -bufsize 1200k -refs 3 .....
    for a far better and consistent quality, 1100k seems to be the average min/max in general end user streaming web use today, although i like to use -vcodec libx264 -crf 18 -minrate 1300k -maxrate 1300k -bufsize 1300k (or slightly higher up to 1600k or even as high as 2000k for one off web streams, as most people have ISP's that can do consistent 2Mbit/s or greater throughput download streaming today) plus 128k for 2 channel audio (-strict experimental -acodec aac -ac 2 -ab 128k) for the larger 720p stuff etc.

    you're ffmpeg is compiled for 10bit colour space and your using greater than 8bit input content so only ffplay can decode it properly given that's also got the 10bit patches (and the other nice filters etc included).

    i forget if you can make the other linux players also play 10bit encoded content without a re-compile of each, but i also thought setting -pix_fmt yuv420p produced the older standard 8bit output in the 10bit compiles anyway, perhaps not.... so simplest answer is re-compile ffmpeg for 8bit for now as Vimeo cant use 10bit AFAIK

    "With nothing specified as to how to work, it'd seem it was defaulting to something very, very low quality" yeah, they should change that to a good generic x264 -profile high output as it used to drive me mad when first starting out doing a simple ffmpeg -i "input.hd.mkv" "output.mp4/.mpeg" and getting a crap super low bit rate divx/xvid or mpeg2 encode
    Last edited by popper; February 5th, 2012 at 05:51 PM.

  3. #2093
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    569
    Distro
    Ubuntu Budgie

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

    Quote Originally Posted by popper View Post
    you're ffmpeg is compiled for 10bit colour space and your using greater than 8bit input content so only ffplay can decode it properly given that's also got the 10bit patches (and the other nice filters etc included).

    i forget if you can make the other linux players also play 10bit encoded content without a re-compile of each, but i also thought setting -pix_fmt yuv420p produced the older standard 8bit output in the 10bit compiles anyway, perhaps not.... so simplest answer is re-compile ffmpeg for 8bit for now as Vimeo cant use 10bit AFAIK
    If it was 10-bit the colorspace would read yuv422p10le, not yuv422p. Also, this guide/thread doesn't even cover compiling x264 in 10-bit mode, so they'd have to have gotten that information somewhere else (although it's not like it's difficult to figure out if one just looks at ./configure --help).

    And the decoders are bit-agnostic. A plain compile of FFmpeg can play both 8 and 10 bit, provided it's a build from after 10-bit was committed (although as my previous note, the extra colorspaces+10-bit might not be fully there yet). It's not particularly bleeding edge, but if the repositories are keeping with point releases it might get hairy. If it's a Git build they're practically assured to support 10-bit (and the extra colorspaces, as those are the real issue here) correctly.
    Last edited by qyot27; February 6th, 2012 at 12:02 AM.

  4. #2094
    Join Date
    Jul 2011
    Beans
    11

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

    First off, many thanks to all. Getting through this. Steep learning curve but scripts sure beat sitting in front of a PC and doing things again... and again... and again with little control over anything. 4:4:2 helped. Don't see that ffmpeg was compiled here w/10-bit support, though it was prescient to check (./configure showed 8-bit, ffmpeg pulled from git. hmm.)

    Took the suggestion to play with -crf mode rather than constant bitrate, ended up going this route. Seems logical as what Vimeo can store and what people will reasonably stream are two different things at the extreme end. The dropoff in quality didn't degrade the experience at all. After a bit more research I'm using presets a little more intelligently now.

    Again, thanks all.
    Last edited by Yokouchi; February 6th, 2012 at 11:42 PM.

  5. #2095
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    569
    Distro
    Ubuntu Budgie

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

    Let's see if I can explain this more clearly.

    Quote Originally Posted by Yokouchi View Post
    First off, many thanks to all. Getting through this. Steep learning curve but scripts sure beat sitting in front of a PC and doing things again... and again... and again with little control over anything. 4:4:2 helped. Don't see that ffmpeg was compiled here w/10-bit support, though it was prescient to check (./configure showed 8-bit, ffmpeg pulled from git. hmm.)
    If you're using a Git build of FFmpeg from after this commit on May 10th 2011, and especially after July 2011, it supports decoding both 8-bit and 10-bit H.264. No configure option to switch them, because such an option is irrelevant. It's not FFmpeg that needs to be specifically built as 10-bit (heck, some of the formats FFmpeg supports are 16-bit, or 1-bit, and they're all available in the same build anyway).

    It's x264, and only x264, that has to be built specifically as 10-bit, and that's only to be able to encode 10-bit H.264 files. Not play them back or convert them to some other bit depth (because x264 doesn't do any decoding; if a build of x264 is doing any decoding, it's because the decoding is supplied by the FFmpeg libraries directly or by FFmpegSource2). x264 does not default to building in 10-bit mode because the vast majority of consumer hardware is only designed to support the original 8-bit implementation. 10-bit is primarily useful right now when the user actually has the file and wants to play it back locally on their PC. It hasn't made its way into electronics nearly as much as the regular 8-bit version of H.264, if it has at all.


    Likewise, the normal encoding colorspace of x264 is 4:2:0 (aka YV12). The extra colorspaces of 4:4:4 and RGB were added on July 9th 2011 (4:4:4) and July 10th 2011 (RGB). 4:2:2 encoding was added on September 21st 2011. x264 defaults to 4:2:0 when encoding, because most consumer devices do not support the other modes yet (or never will). However, unlike the bit depth situation, x264 has support for all of these colorspaces within a single build and can encode any of them if the --output-csp option is used when encoding (although builds can now be focused on one colorspace by using the --chroma-format option during the ./configure step; it still defaults to enabling all of them, though).




    Short version, assuming you are using a fresh Git clone of both x264 and FFmpeg:
    x264 supports encoding all colorspaces unless the --chroma-format option was used to restrict it to just one of them when it was compiled.

    x264 builds as 8-bit. If you want 10-bit, you have to use the --bit-depth option when compiling. 10-bit x264 builds cannot output 8-bit files, and vice-versa. If you give 10-bit x264 a file encoded as 8-bit, it converts it to 10-bit before encoding.

    FFmpeg decodes both 8-bit and 10-bit H.264 files, and it supports decoding all colorspaces. No specific enabling or disabling of colorspaces or bit depths occurs when compiling FFmpeg, and it does not even have options to permit such.

  6. #2096
    Join Date
    Feb 2012
    Beans
    2

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

    can anybody help me with the command to encode a video to webm/vp8 format ?

  7. #2097
    Join Date
    Dec 2006
    Beans
    7,349

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

    Quote Originally Posted by dudefire View Post
    can anybody help me with the command to encode a video to webm/vp8 format ?
    Perhaps this might be a starter:

    http://ubuntuforums.org/showpost.php...4&postcount=17
    You think that's air you're breathing now?

  8. #2098
    Join Date
    Apr 2006
    Beans
    53

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

    I am having a problem with linking:

    Code:
    $ ffmpeg
    ffmpeg: relocation error: ffmpeg: symbol avformat_network_init, version LIBAVFORMAT_53 not defined in file libavformat.so.53 with link time reference
    I already had avformat installed from Ubuntu package repository. Apparently there is a mix up in the link up:

    Code:
    $ ldd ffmpeg | grep av
            libavdevice.so.53 => /usr/lib/i686/cmov/libavdevice.so.53 (0xb7738000)
            libavfilter.so.2 => /usr/local/lib/libavfilter.so.2 (0xb76af000)
            libavformat.so.53 => /usr/lib/i686/cmov/libavformat.so.53 (0xb75a9000)
            libavcodec.so.53 => /usr/lib/i686/cmov/libavcodec.so.53 (0xb6a3c000)
            libavutil.so.51 => /usr/lib/i686/cmov/libavutil.so.51 (0xb69aa000)

    I am under Oneiric. I did not follow this guide exactly, I installed x264 and ffmpeg from tarballs instead. And since my goal is to build OpenCV 2.3.1 (because it's the one supported by ROS Electric) with GPU support (CUDA), I used the --enable-shared and --enable-pic options.

    I searched this thread (and google in general) for a while but could not find any definite solution.

    I am a bit confused by the build process and package management in general: I have the libav* packages installed from synaptic, as they are dependencies of some other general multimedia packages (kdenlive, clementine, etc...), and I am installing a different version from source. I am a bit puzzled on how to ensure that things don't get messed up. Same with OpenCV: I am installing from source, and I have opencv2.3 installed as a dependency of ROS, so how do I make sure that the system is going to use my built from source lib...?

  9. #2099
    Join Date
    Jun 2007
    Beans
    17,337

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

    Possibly a question with no good answer or doesn't need an answer... -
    Do users here that use ffmpeg directly consider FFmpeg superior to Libav or is it just a matter of personal preference & both are pretty much equal?

  10. #2100
    Join Date
    Mar 2009
    Location
    The Moon
    Beans
    130
    Distro
    Ubuntu

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

    already build debs for ubuntu 10.10 win32 - built on burst EU VPS servers

    ffmpeg_201202240142-git-1_i386.deb
    x264_0.120.2164+gitda19765-1_i386.deb
    libvpx_201202240126-git-1_i386.deb
    qt-faststart_201202240145-git-1_i386.deb


    http://www.mediafire.com/?ycshcfhcrfbaiz2

    http://www.crocko.com/9E70522461A841...62E54/debs.zip
    sudo -s

Page 210 of 241 FirstFirst ... 110160200208209210211212220 ... 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
  •