Add link to Rimworld post, rectify codec choice

This commit is contained in:
Florine W. Dekker 2021-07-18 14:56:52 +02:00
parent da60f53a5c
commit ebb5eee244
Signed by: FWDekker
GPG Key ID: 78B3EAF58145AF25
3 changed files with 11 additions and 9 deletions

View File

@ -7,7 +7,7 @@ module.exports = (eleventyConfig) => {
pathPrefix: "/blog/",
dir: {
input: "src/main/",
output: "dist",
output: "dist/",
}
};
};

View File

@ -1,6 +1,6 @@
{
"name": "blog",
"version": "1.2.2",
"version": "1.2.3",
"description": "F.W. Dekker's personal blog.",
"author": "F.W. Dekker",
"browser": "dist/bundle.js",

View File

@ -7,10 +7,12 @@ excerpt: How to create a timelapse of your Rimworld colony using FFmpeg.
---
You may have seen some beautiful timelapses of [⎋ Rimworld](https://rimworldgame.com/) colonies, including
[⎋one](https://www.reddit.com/r/RimWorld/comments/igy7am/the_noemca_people_tribal_to_space_timelapse/)
[⎋of](https://www.reddit.com/r/RimWorld/comments/jxoo49/timelapse_of_my_frostland_colony_before_it_got/)
[⎋these](https://www.reddit.com/r/RimWorld/comments/ewjruc/timelapse_of_final_base_until_ship_launch_what_a/).
I recently did a timelapse of my 20-year-old medieval colony, and want to share how I created the video.
[⎋one](https://www.reddit.com/r/RimWorld/comments/igy7am/)
[⎋of](https://www.reddit.com/r/RimWorld/comments/jxoo49/)
[⎋these](https://www.reddit.com/r/RimWorld/comments/ewjruc/).
I recently did a
[timelapse of my 20-year-old medieval colony](https://www.reddit.com/r/RimWorld/comments/omnsg1/), and want to share how
I created the video.
## 1 Creating screenshots
@ -73,13 +75,13 @@ With the files properly renamed, you can run FFmpeg to create the video for you.
2. Navigate to the directory of screenshots using `cd /d "C:\Users\FWDekker\Rimworld"`.
3. Run the following command:
```shell
"C:\Users\FWDekker\Downloads\ffmpeg\ffmpeg.exe" -f image2 -r 24 -i %3d.png -vcodec libx265 -crf 24 -pix_fmt yuv420p -vf "crop=5120:3680:2384:3296, scale=1280:920, tpad=stop_mode=clone:stop_duration=3" out.mp4
"C:\Users\FWDekker\Downloads\ffmpeg\ffmpeg.exe" -f image2 -r 24 -i %3d.png -vcodec libx264 -crf 24 -pix_fmt yuv420p -vf "crop=5120:3680:2384:3296, scale=1280:920, tpad=stop_mode=clone:stop_duration=3" out.mp4
```
* `-f image2` indicates you're going to work with images.
* `-r 24` sets the frame rate to 24 screenshots per second.
* `-i %3d.png` tells what the files are named: three digits following by `.png`.
* `-vcodec libx265` means that you are using the x265 codec.
You can also use `libx264` which is less CPU-intensive, but creates much larger files.
* `-vcodec libx264` means that you are using the x264 codec.
You can also use `libx265` which takes longer and creates smaller files, but Reddit only accepts x264.
* `-crf 24` is the quality of the video. A lower value means higher quality. Typical values are between 18 and 28.
* `-pix_fmt yuv420p` is the way pixels are encoded.
* `-vf [...]` applies filters to the images, like cropping and scaling.