Linux MPlayer (ffmpeg) playback HD h264 video via x264 decoding

Source: Internet
Author: User


System environment:

Linux inbank-gz 2.6.24-16-generic #1 SMP Thu Apr 13:23:42 UTC i686 gnu/linux

Ubuntu 8.04

Genuine Intel (R) CPU 1250 @ 1.73GHz * 2

1G Memory


Target: Can play the H264 format HD video with MPlayer


  1. Download related software

    Mplayer1.1 version (includes FFmpeg)

    All kinds of decoding package codes

    x264

    Yasm + FAAC + Faad


You can download all the packages here http://down.51cto.com/data/1861780



2. Compiling related software


  • Copy files to the new/usr/local/lib/codecs directory after extracting all-20110131

  • Compiling yasm + FAAC + Faad

    ./configure && make && make install

  • Compiling x264

./configure--enable-shared && make && make install

  • Compiling MPlayer

    chmod 775-r MPLAYER-1.1.1/

    ./configure--enable-x264--extra-libs= "-LX264-LFAAC" && make && make install



3.mplayer command operation


If the command line operation is in the background, you must first tap the command export display=:0.0

Then Mplayer-vo x11-fixed-vo-geometry 0:0-quiet-slave-demuxer lavf fenggu.mpg


4.FAQ


  • Error

    vo:couldn ' t Open the X11 display ()!

    to first tap export display=:0.0


  • Error"


    /OPT/MP layer-1.0rc4/libavcodec/libx264.c:305:undefined reference to ' x264_encoder_headers '

    Collect2:ld returned 1 Exit status

    Make: * * * [mplayer] Error 1


    Add the appropriate library at compile time  --extra-li bs= "-LX264-LFAAC"


  • Error

    V Ideo:cannot Read Properties

    To add parameters  -demuxer lavf



This article is from the "Chengwei" blog, make sure to keep this source http://licheng1987.blog.51cto.com/9141096/1539020

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.