Page 176 of 241 FirstFirst ... 76126166174175176177178186226 ... LastLast
Results 1,751 to 1,760 of 2402

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

  1. #1751
    Join Date
    Dec 2006
    Beans
    7,314

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

    Quote Originally Posted by FakeOutdoorsman View Post
    Perhaps you could use a local installation of FFmpeg for AirVideo as andrew.46 shows in Howto: Build the development version of vlc under Ubuntu.
    That technique works well for builds apart from FFmpeg, I have just finished updated another guide:

    Howto: Build the BitTorrent client Transmission under the latest Ubuntu release
    http://ubuntuforums.org/showthread.php?p=10896413

    and I have used the same idea when building libevent, that is to install the library locally and add the path to PKG_CONFIG_PATH for the compiler to find. libevent is not such a hot potato as FFmpeg when building Ubuntu packages but I am sure doing it this way will avoid breakages on some systems...
    You think that's air you're breathing now?

  2. #1752
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

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

    EDIT
    This patch is now obsolete.
    See post #1768 here:-
    http://ubuntuforums.org/showpost.php...postcount=1768

    (Another) Update for libvpx patches

    Hi
    It looks like those libvpx presets have changed again.
    When I tried to apply the presets from "ffmpeg-HEAD-VP8_param_mapping-7.tar.gz" it produced an error.

    This time I've used these commands:-

    Code:
    wget http://webm.googlecode.com/files/ffmpeg-presets.diff.gz
    gzip -d ffmpeg-presets.diff.gz
    git apply -v ffmpeg-presets.diff
    Result:-
    ron@ubuntu:~/ffmpeg$ git apply -v ffmpeg-presets.diff
    Checking patch ffpresets/libvpx-1080p.ffpreset...
    Checking patch ffpresets/libvpx-1080p50_60.ffpreset...
    Checking patch ffpresets/libvpx-360p.ffpreset...
    Checking patch ffpresets/libvpx-720p.ffpreset...
    Checking patch ffpresets/libvpx-720p50_60.ffpreset...
    Applied patch ffpresets/libvpx-1080p.ffpreset cleanly.
    Applied patch ffpresets/libvpx-1080p50_60.ffpreset cleanly.
    Applied patch ffpresets/libvpx-360p.ffpreset cleanly.
    Applied patch ffpresets/libvpx-720p.ffpreset cleanly.
    Applied patch ffpresets/libvpx-720p50_60.ffpreset cleanly.
    Last edited by ron999; June 23rd, 2011 at 11:52 AM.

  3. #1753
    Join Date
    Mar 2006
    Beans
    Hidden!

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

    Followed guide successfully on Xubuntu 11.04. Everything works fine. Have an odd problem with mp4 playback using mplayer (no-gui).

    If I encode a bit of recorded tv (.ts file, PAR 64:45, DAR 16/9) using the first crf example, the encode works fine and retains the PAR and DAR, but when I go to playback in mplayer (nothing in config file) mplayer seems to think the video has an aspect ratio of 2.53:1, making a wide thin video.

    If I encode using the same command line but replace with mkv instead of mp4, mplayer plays back at the correct aspect of 16/9.

    mplayer plays back avi/xvid (encoding the same piece of recorded tv) at the correct aspect ratio.

    Screen is a 1920x1080 24". No similar problems on 10.04 LTS

    I can fix this with a profile in mplayer's config:
    Code:
    [extension.mp4]
    profile-desc="Profile for HD mp4 files"
    aspect="16/9"
    but this will affect all mp4 extensions.

    If I use parole, I have to use the "none" setting in Aspect menu to get the correct resolution.

    Can anyone shed any light on this issue? I have tried encoding with all sorts of different parameters but with no success.
    Last edited by Jose Catre-Vandis; June 12th, 2011 at 12:07 PM.
    No longer participating......

  4. #1754
    Join Date
    Dec 2005
    Location
    St. Petersburg, FL
    Beans
    543
    Distro
    Lubuntu

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

    Quote Originally Posted by Jose Catre-Vandis View Post
    Followed guide successfully on Xubuntu 11.04. Everything works fine. Have an odd problem with mp4 playback using mplayer (no-gui).

    If I encode a bit of recorded tv (.ts file, PAR 64:45, DAR 16/9) using the first crf example, the encode works fine and retains the PAR and DAR, but when I go to playback in mplayer (nothing in config file) mplayer seems to think the video has an aspect ratio of 2.53:1, making a wide thin video.

    If I encode using the same command line but replace with mkv instead of mp4, mplayer plays back at the correct aspect of 16/9.

    mplayer plays back avi/xvid (encoding the same piece of recorded tv) at the correct aspect ratio.

    Screen is a 1920x1080 24". No similar problems on 10.04 LTS

    I can fix this with a profile in mplayer's config:
    Code:
    [extension.mp4]
    profile-desc="Profile for HD mp4 files"
    aspect="16/9"
    but this will affect all mp4 extensions.

    If I use parole, I have to use the "none" setting in Aspect menu to get the correct resolution.

    Can anyone shed any light on this issue? I have tried encoding with all sorts of different parameters but with no success.
    It's clearly interpreting the PAR as the file's SAR value. The two are not the same, and SAR values can mess up aspect display (they do have a reason for their existence, but I simply find it easier to encode to 1:1 and then do after-the-fact flagging if I need to).

    Case in point:
    64/45 * 1920 = ~2730
    ~2730/1080 = ~2.53

    If you have the SAR or DAR at 1/1 (like it should be for files that actually are 1920 pixels wide and 1080 pixels tall), then it works out correctly to a normal ~1.78 ratio. Aspect flagging should only be used for files whose storage resolutions differ from their displayed resolutions. If the files were 1440x1080, then the 64:45 ratio would work out correctly to 2048, which is close enough to 1920 (to be pedantic, 2048 width is a studio format known as 2K, roughly equivalent to the difference between 'proper' anamorphic widescreen used for Hollywood movies and the 16:9 standard used on TVs).

    With Matroska, aspect is handled a bit differently and the internal aspect ratios are set to match the reality of the files if they aren't specifically overridden by the user. MP4 isn't quite as straight-forward many times.

    In essence,
    PAR (Pixel aspect ratio) simply exists as the natural ratio of width to height
    SAR (Sample aspect ratio) is a bitstream-level flag that indicates the internally-correct display ratio of the pixels
    DAR (Display aspect ratio) is a container-level flag that matches the display ratio.

    Whatever is happening in the encoder, the PAR and SAR are being mixed up. It might have to do with the TS container of the source file, but I'm not confident about that.

    At least, that's how I understand the whole PAR, SAR, DAR situation. It's probably overly simplistic, but as long as you know what it should be displayed as and if the source resolution is a correct reduction of that value, then you're good.
    Last edited by qyot27; June 12th, 2011 at 09:22 PM.

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

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

    Quote Originally Posted by Jose Catre-Vandis View Post
    Can anyone shed any light on this issue?
    Perhaps the setdar or setpar FFmpeg filters would be useful here. There's some info on these filters in man ffmpeg. I haven't actually tried them though. Does ffplay show the video correctly?

  6. #1756
    Join Date
    Mar 2006
    Beans
    Hidden!

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

    Quote Originally Posted by FakeOutdoorsman View Post
    Perhaps the setdar or setpar FFmpeg filters would be useful here. There's some info on these filters in man ffmpeg. I haven't actually tried them though. Does ffplay show the video correctly?
    Yes it plays at the correct aspect ratio in ffplay.

    I'll have a go with the setsar and setdar filters....thanks to qyot27 for the detailed and informative explanation and to fakeoutdoorsman for the pointers.

    [EDIT] getting unrecognised option for both of them - do they need to be compiled in? (Doh! you need to use -vf in front)

    Bingo!

    ffmpeg -i input.ts -vf setdar=16:9 -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 -threads 0 -deinterlace output.mp4
    Sorted out the playback aspect ratio in mplayer (doesn't fix parole but I wasn't expecting that )

    Seems advice is to put the filter at the front of the chain
    Last edited by Jose Catre-Vandis; June 14th, 2011 at 12:31 AM. Reason: Dang - left the config setting in place
    No longer participating......

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

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

    Quote Originally Posted by Jose Catre-Vandis View Post
    [EDIT] getting unrecognised option for both of them - do they need to be compiled in?
    They should be available if you followed the guide, but not in the repository FFmpeg (as of Natty). Sparse example:
    Code:
    -vf setdar=16:9
    Edit: I'm a slow typer. Looks like you figured it out.

  8. #1758
    Join Date
    Mar 2006
    Beans
    Hidden!

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

    Spoke to soon - I had left my config file setting in place!!

    However, by trial and error, I found that setting the DAR to 3:2 worked:
    ffmpeg -i input.ts -vf setdar=3:2 -acodec libfaac -aq 100 -vcodec libx264 -preset slow -crf 22 -threads 0 -deinterlace output.mp4
    I'll need to tweak a bit more as mplayer reports an aspect ratio of 1.80:1 !!!

    Doesn't make any sense. Other mp4 files (e.g. iPlayer) work fine.
    Last edited by Jose Catre-Vandis; June 14th, 2011 at 12:39 AM.
    No longer participating......

  9. #1759
    Join Date
    Nov 2008
    Location
    UK
    Beans
    106

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

    I had a problem updating ffmpeg (Hardy).

    When updating ffmpeg, I got to 'git pull', but the update aborted with this error meassge:

    Your local changes to 'libavformat/avformat.h' would be overwritten by merge. Please, commit your changes or stash them before you can merge.
    I had saved a change to ffmpeg/libavformat/avformat.h to test a patch, then decided to undo the change, and update ffmpeg instead.

    How do I commit or stash my changes?

  10. #1760
    Join Date
    Sep 2006
    Beans
    3,713

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

    I'm fairly new to Git myself, but I think this will do it:
    Code:
    git stash
    git pull

Page 176 of 241 FirstFirst ... 76126166174175176177178186226 ... 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
  •