FFmpeg push Stream, error may occur: Unknown encoder ' libx264 '

Source: Internet
Author: User

When you use the following command to push a stream:

Ffmpeg-re-i a.mp4-vcodec libx264-acodec aac-f flv rtmp://172.31.102.165:1935/myapp

The following error may occur:

Unknown encoder ' libx264 '

That is, the library needs to be installed if the libx264 library is missing:

1. Git clone git://git.videolan.org/x264.git

2. CD x264

3../configure--enable-static--enable-share

4. Make

5. Sudo make install

Need to recompile installation FFmpeg

1. When configuring FFmpeg, add x264, such as:

./configure--ENABLE-GPL--enable-libx264

2. Make clean

3. Make

4. Make install

At this point, an error may occur when you enter FFmpeg:

Ffmpeg:error while loading shared libraries:libavdevice.so.57:cannot open Shared object file:no such file or directory

*****************************************

Modify the Ld.so.conf file

1. $ sudo vi/etc/ld.so.conf

2. Modify the following

Include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib///usr/local/ffmpeg Directory is my ffmpeg installation directory, change it according to your installation directory

3. Making it effective

$ sudo ldconfig

*****************************************

Adding environment variables for Ffmpeg
Vi/etc/profile
Add the following content:
Export path= "/usr/local/ffmpeg/bin: $PATH"

Then save and run Source/etc/profile

FFmpeg push Stream, error may occur: Unknown encoder ' libx264 '

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.