FFmpeg is a powerful video and audio codec tool in Ubuntu. X264 can encode high-quality H.264 videos. iPad must be H.264 or MPEG-4 encoded for normal playback. Since the copyright aspect has not been determined, although many websites in China are using h. 264 encoding, but may be subject to copyright issues in the future. Therefore, Ubuntu official source does not provide h by default. 264 encoding, which requires us to manually compile and install FFmpeg h. 264 support to encode mp4 files.
FFmpeg is a powerful video and audio codec tool in Ubuntu. X264 can encode high-quality H.264 videos. iPad must be H.264 or MPEG-4 encoded for normal playback.
Since the copyright aspect has not been determined, although many websites in China are using h. 264 encoding, but may be subject to copyright issues in the future. Therefore, Ubuntu official source does not provide h by default. 264 encoding, which requires us to manually compile and install FFmpeg h. 264 support to encode mp4 files.
The following describes how to install, use, and upgrade FFmpeg in Ubuntu:
1. Install the support package
# Libmp 3lame
Sudo apt-get remove libmp3lame-dev
Sudo apt-get install nasm
Wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
Tar xzvf lame-3.98.4.tar.gz
Cd lame-3.98.4
./Configure -- enable-nasm -- disable-shared
Make
Sudo checkinstall -- pkgname = lame-ffmpeg -- pkgversion = "3.98.4" -- backup = no -- default -- deldoc = yes
# Uninstall the existing x264, libx264-dev, FFmpeg
Sudo apt-get remove ffmpeg x264 libx264-dev
# Install all FFmpeg and x264 support packages
Sudo apt-get update
Sudo apt-get install build-essential subversion git-core checkinstall yasm unzip libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-libdev libtheora-dev libvorbis-dev libvpx- dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
2. Install x264
Cd
Git clone git: // git.videolan.org/x264.git
Cd x264
./Configure
Make
Sudo checkinstall -- pkgname = x264 -- pkgversion "2: 0. 'grep X264_BUILD x264.h-m1 | cut-d'-f3 '. 'git rev-list HEAD | wc-l' + git 'git rev-list HEAD-n 1 | head-c 7' "-- backup = no -- deldoc = yes -- fstrans = no -- default