Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the procedure for centos installation ffmpeg to add ogg audio support

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you how to install centos and add ogg audio support to ffmpeg. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

A brief introduction

FFmpeg is a free software that can run audio and video recording, conversion and streaming functions in multiple formats [1], including libavcodec ─, a decoder library for audio and video in multiple projects, as well as libavformat-- an audio and video format conversion library. (from Wikipedia)

Installation premise

Since you cannot find the installation package using yum install ffmpeg under centos, you need to install it in other ways:

First, install ffmpeg

Operating system: centos 5.6

(1) install the compilation environment

The code is as follows:

# yum install-y automake autoconf libtool gcc gcc-c++

(2) install the RPM package of the required library to centos (because there is no ffmpeg package in the library included with centos, this is equivalent to an extension)

The code is as follows:

# rpm-Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

(3) install Install ffmpeg and other modules

The code is as follows:

Yum-y install ffmpeg ffmpeg-devel

Of course, you can also choose to compile the source code installation, as long as the support libraries needed by ffmpeg are installed before installation. I chose this installation method because I don't want to compile various libraries one by one.

After installation, you can use the following command to view:

The code is as follows:

. / configure-- prefix=/usr

Once installed, your machine adds support for ogg audio. Here you need to install libogg first, because libvorbis needs libogg support.

Recompile ffmpeg

Next, you need to recompile and install ffmpeg. At this point, you need to download a ffmpeg source package.

Running

The code is as follows:

Ffmpeg

Copy the following information

The code is as follows:

Configuration:-- prefix=/usr-- libdir=/usr/lib64-- shlibdir=/usr/lib64-- mandir=/usr/share/man-- incdir=/usr/include-- disable-avisynth-- extra-cflags='-O2-g-pipe-Wall-Wp -D_FORTIFY_SOURCE=2-fexceptions-fstack-protector-- param=ssp-buffer-size=4-M64-mtune=generic-fPIC'-- enable-avfilter-- enable-libdirac-- enable-libfaac-- enable-libfaad-- enable-libfaadbin-- enable-libgsm-- enable-libmp3lame-- enable-libopencore-amrnb-- enable-libopencore-amrwb-- enable-libx264-- enable-gpl-enable-nonfree-- enable-postproc-- enable-pthreads-- enable-shared-- enable-swscale-- enable-vdpau-- enable-version3-- enable-x11grab

Of course, you can remove what you don't need.

Run under the ffmpeg source directory

The code is as follows:

. / configure-- prefix=/usr-- libdir=/usr/lib64-- shlibdir=/usr/lib64-- mandir=/usr/share/man-- incdir=/usr/include-- disable-avisynth-- extra-cflags='-O2-g-pipe-Wall-Wp -D_FORTIFY_SOURCE=2-fexceptions-fstack-protector-- param=ssp-buffer-size=4-M64-mtune=generic-fPIC'-- enable-avfilter-- enable-libdirac-- enable-libfaac-- enable-libfaad-- enable-libfaadbin-- enable-libgsm-- enable-libmp3lame-- enable-libopencore-amrnb-- enable-libopencore-amrwb-- enable-libx264-enable-gpl-enable-nonfree-- enable-postproc-- enable-pthreads-- enable-shared-- enable-swscale-- enable-vdpau-- enable-version3-- enable-x11grab-- enable-libvorbis

The last one is enable-libvorbis, which is the audio support for adding ogg.

After the compilation is complete, run

The code is as follows:

Make & & make install

The installation of ffmpeg is completed.

Simple test

You can test amr-to-ogg transcoding using the following command:

The code is as follows:

Ffmpeg-I xxx.amr-f ogg-acodec libvorbis-ac 2-ab 128k-ar 44100 xxx.ogg

You can test amr-to-mp3 transcoding using the following command:

The code is as follows:

Ffmpeg-I xxx.amr xxx.mp3

It can be seen that ffmpeg's support for mp3 is still much better.

After successful transcoding, you can see output similar to the following:

The above is how centos installs ffmpeg and adds ogg audio support. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report