@@ -11,6 +11,7 @@ x264 is a mature, free, open-source encoder
1111for the H.264 video format.
1212This guide will focus on x264.
1313
14+
1415## Prerequisites
1516
1617To get started, you'll need two things:
@@ -23,11 +24,13 @@ To get started, you'll need two things:
2324
2425Here's how we get a copy of the x264 encoder:
2526
27+
2628### Windows
2729
2830Official Windows builds are available
2931[ here] ( https://download.videolan.org/pub/x264/binaries/win64/ ) .
3032
33+
3134### Linux/macOS
3235
3336Generally, x264 will be available
@@ -38,6 +41,7 @@ Here are a few examples:
3841- ** Arch Linux** : ` sudo pacman -S x264 `
3942- ** macOS** : ` brew install x264 `
4043
44+
4145## Getting Started
4246
4347x264 is very configurable,
@@ -48,6 +52,7 @@ and understanding a few basic concepts.
4852We'll walk through those concepts
4953with the following examples.
5054
55+
5156## Example 1: General-Purpose Encoding
5257
5358Open up a terminal window,
@@ -61,6 +66,7 @@ vspipe --y4m myvideo.vpy - | x264 --demuxer y4m --preset veryfast --tune animati
6166
6267Let's run through what each of these options means:
6368
69+
6470#### ` vspipe --y4m myvideo.vpy - `
6571
6672This portion loads your VapourSynth script
@@ -74,12 +80,14 @@ In this case, we want to chain `vspipe`,
7480the program that reads VapourSynth scripts,
7581with ` x264 ` , our encoder.
7682
83+
7784#### ` --demuxer y4m `
7885
7986This tells x264 that we're providing it with a y4m file.
8087This matches up with the ` --y4m ` flag
8188that we gave to the ` vspipe ` command.
8289
90+
8391#### ` --preset veryfast `
8492
8593x264 has a set of presets
@@ -114,6 +122,7 @@ Don't worry,
114122this guide will explain later
115123what all of those settings mean.
116124
125+
117126#### ` --tune animation `
118127
119128Beyond the preset chosen,
@@ -131,6 +140,7 @@ You don't need to use a tuning,
131140but it generally helps
132141to produce a better-looking video.
133142
143+
134144#### ` --crf 24 `
135145
136146CRF is a constant-quality, 1-pass encoding mode.
@@ -163,6 +173,7 @@ Here are some guidelines:
163173 in any real-world encoding scenario,
164174 unless you want your videos to look like they were made for dial-up.
165175
176+
166177#### ` -o x264output.mkv - `
167178
168179This last portion tells which files to use for the input and output.
@@ -178,6 +189,7 @@ so it does not need to be last;
178189x264 will recognize it
179190as the only argument without a ` -- ` flag before it.
180191
192+
181193## Example 2: Targeted File Size
182194
183195For the next example,
@@ -226,6 +238,7 @@ to sections of the video that have more detail or motion,
226238but the average bitrate of the video
227239will be close to what we requested.
228240
241+
229242## Example 3: 2-Pass Encoding
230243
231244So far, we've only done 1-pass encodes.
@@ -270,6 +283,7 @@ Therefore, there are still certain use cases
270283where 1-pass, bitrate-targeted video
271284is a good fit, such as streaming.
272285
286+
273287## Recap
274288
275289We covered the basics of how to encode in x264,
@@ -287,6 +301,7 @@ Here is a summary of when to use each encoding mode:
287301 - Good for: Obtaining a certain file size
288302 - Bad for: Streaming
289303
304+
290305## Advanced Configuration
291306
292307Coming Soon
0 commit comments