How to install x264 on Ubuntu 17.04
To install x264 on Ubuntu 17.04
The x264 is a video encoder developed by VideoLAN for encoding video streams into H.264/MPEG AVC format. It provides a command line interface as well as an API. It is really so simple to install x264 on Ubuntu 17.04, and this tutorial covers the ground on the same process.
Installing x264
First, make sure you add the required repositories by making use of the following command.
root@linuxhelp:~# add-apt-repository ppa:djcj/hybrid
Hybrid is a multi platform (Linux/Mac OS X/Windows) Qt based frontend for a bunch of other tools which can convert nearly every input to x264/x265/Xvid/VP9/... + ac3/ogg/mp3/aac/flac inside an mp4/m2ts/mkv/webm/mov/avi container, a Blu-ray or an AVCHD structure.
http://www.selur.de/
https://forum.selur.net/Thread-GUIDE-Ubuntu-repository-maintained-by-djcj
More info: https://launchpad.net/~djcj/+archive/ubuntu/hybrid
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox ' /tmp/tmpo7dn9gl2/pubring.gpg' created
gpg: /tmp/tmpo7dn9gl2/trustdb.gpg: trustdb created
gpg: key 24A5F4FED4B4972B: public key " Launchpad PPA for djcj" imported
gpg: Total number processed: 1
gpg: imported: 1
OK
And then, you need to update your system by making use of the following command.
root@linuxhelp:~# apt-get update
Hit:1 http://in.archive.ubuntu.com/ubuntu zesty InRelease
Get:2 http://ppa.launchpad.net/djcj/hybrid/ubuntu zesty InRelease [15.4 kB]
Hit:3 http://in.archive.ubuntu.com/ubuntu zesty-updates InRelease
Hit:4 http://security.ubuntu.com/ubuntu zesty-security InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu zesty-backports InRelease
Hit:6 http://ppa.launchpad.net/js-reynaud/kicad-4/ubuntu zesty InRelease
Get:7 http://ppa.launchpad.net/djcj/hybrid/ubuntu zesty/main i386 Packages [3,644 B]
Get:8 http://ppa.launchpad.net/djcj/hybrid/ubuntu zesty/main amd64 Packages [4,472 B]
Get:9 http://ppa.launchpad.net/djcj/hybrid/ubuntu zesty/main Translation-en [3,160 B]
Fetched 26.6 kB in 3s (6,671 B/s)
Reading package lists... Done
After that, you shall proceed to the installation process by triggering the following command.
root@linuxhelp:~# apt-get install x264 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libavresample3 libffms2-4 libgpac4
The following NEW packages will be installed:
libavresample3 libffms2-4 libgpac4 x264
0 upgraded, 4 newly installed, 0 to remove and 306 not upgr
.
.
.
.
Unpacking x264 (2:0.148.2748+git97eaef2-1) ...
Setting up libavresample3:amd64 (7:3.2.4-1build2) ...
Setting up libffms2-4:amd64 (2.23-1) ...
Processing triggers for libc-bin (2.24-9ubuntu2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libgpac4:amd64 (0.5.2-426-gc5ad4e4+dfsg5-3) ...
Setting up x264 (2:0.148.2748+git97eaef2-1) ...
Processing triggers for libc-bin (2.24-9ubuntu2) ...
X264 has been installed, and if you want to know all the available options in x264, then run the following command, all the available options are listed as output.
root@linuxhelp:~# x264 --help
x264 core:148 r2748 97eaef2
Syntax: x264 [options] -o outfile infile
Infile can be raw (in which case resolution is required),
or YUV4MPEG (*.y4m),
or Avisynth if compiled with support (yes).
or libav* formats if compiled with lavf support (yes) or ffms support (yes).
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC or L-SMASH support (gpac)
Output bit depth: 8 (configured at compile time)
Options:
-h, --help List basic options
--longhelp List more options
--fullhelp List all options
Example usage:
Constant quality mode:
x264 --crf 24 -o < output> < input>
Two-pass with a bitrate of 1000kbps:
x264 --pass 1 --bitrate 1000 -o < output> < input>
x264 --pass 2 --bitrate 1000 -o < output> < input>
Lossless:
x264 --qp 0 -o < output> < input>
Maximum PSNR at the cost of speed and visual quality:
x264 --preset placebo --tune psnr -o < output> < input>
Constant bitrate at 1000kbps with a 2 second-buffer:
x264 --vbv-bufsize 2000 --bitrate 1000 -o < output> < input>
Presets:
--profile < string> Force the limits of an H.264 profile
Overrides all settings.
- baseline,main,high,high10,high422,high444
--preset < string> Use a preset to select encoding settings [medium]
Overridden by user settings.
- ultrafast,superfast,veryfast,faster,fast
- medium,slow,slower,veryslow,placebo
--tune < string> Tune the settings for a particular type of source
or situation
Overridden by user settings.
Multiple tunings are separated by commas.
Only one psy tuning can be used at a time.
- psy tunings: film,animation,grain,
stillimage,psnr,ssim
- other tunings: fastdecode,zerolatency
Frame-type options:
-I, --keyint < integer or " infinite" > Maximum GOP size [250]
--tff Enable interlaced mode (top field first)
--bff Enable interlaced mode (bottom field first)
--pulldown < string> Use soft pulldown to change frame rate
- none, 22, 32, 64, double, triple, euro (requires cfr input)
Ratecontrol:
-B, --bitrate < integer> Set bitrate (kbit/s)
--crf < float> Quality-based VBR (0-51) [23.0]
--vbv-maxrate < integer> Max local bitrate (kbit/s) [0]
--vbv-bufsize < integer> Set size of the VBV buffer (kbit) [0]
-p, --pass < integer> Enable multipass ratecontrol
- 1: First pass, creates stats file
- 2: Last pass, does not overwrite stats file
Input/Output:
-o, --output < string> Specify output file
--sar width:height Specify Sample Aspect Ratio
--fps < float|rational> Specify framerate
--seek < integer> First frame to encode
--frames < integer> Maximum number of frames to encode
--level < string> Specify level (as defined by Annex A)
--quiet Quiet Mode
Filtering:
--vf, --video-filter < filter0> /< filter1> /... Apply video filtering to the input file
Filter options may be specified in < filter> :< option> =< value> format.
Available filters:
crop:left,top,right,bottom
resize:[width,height][,sar][,fittobox][,csp][,method]
select_every:step,offset1[,...]
With this, the installation of x264 comes to an end.
Comments ( 0 )
No comments available