diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | _includes/webring.html | 4 | ||||
| -rw-r--r-- | _posts/2023-11-04-using-ffmpeg-to-combine-video-side-by-side.md | 41 | ||||
| -rw-r--r-- | assets/notes/trigraphs.gif | bin | 0 -> 1293557 bytes |
4 files changed, 44 insertions, 3 deletions
| @@ -3,7 +3,7 @@ MAKEFLAGS+=-j3 | |||
| 3 | dev: watch server | 3 | dev: watch server |
| 4 | 4 | ||
| 5 | webring: | 5 | webring: |
| 6 | ruby bin/webring.py | 6 | ruby bin/webring.rb |
| 7 | 7 | ||
| 8 | watch: | 8 | watch: |
| 9 | jekyll b --watch | 9 | jekyll b --watch |
diff --git a/_includes/webring.html b/_includes/webring.html index 2ef29b8..7eb5332 100644 --- a/_includes/webring.html +++ b/_includes/webring.html | |||
| @@ -43,10 +43,10 @@ | |||
| 43 | <div>For over 10 years now, I run two self-built NAS (Network Storage) devices which serve media (currently via Jellyfin) and run daily backups of all my PCs and servers. In this article, I describe my goals, which hardware I picked for my new build (and why) and how I set it up. Design Goals I use my network storage device...</div> | 43 | <div>For over 10 years now, I run two self-built NAS (Network Storage) devices which serve media (currently via Jellyfin) and run daily backups of all my PCs and servers. In this article, I describe my goals, which hardware I picked for my new build (and why) and how I set it up. Design Goals I use my network storage device...</div> |
| 44 | </li> | 44 | </li> |
| 45 | <li> | 45 | <li> |
| 46 | <a href="https://utcc.utoronto.ca/~cks/space/blog/tech/FirewallsAndMACs" target="_blank" rel="noopener">Network firewalls and Ethernet addresses</a> | 46 | <a href="https://utcc.utoronto.ca/~cks/space/blog/sysadmin/OurVaryingPhysicalSecurityLevels" target="_blank" rel="noopener">Our varying levels of what you could charitably call 'physical security'</a> |
| 47 | — | 47 | — |
| 48 | <a href="https://utcc.utoronto.ca/~cks/space/blog/" target="_blank" rel="noopener">Chris's Wiki :: blog</a> | 48 | <a href="https://utcc.utoronto.ca/~cks/space/blog/" target="_blank" rel="noopener">Chris's Wiki :: blog</a> |
| 49 | <div>Over on the Fediverse I mentioned that on some networks we authorize machines by controlling what Ethernet addresses ('MACs') get what IP addresses. In response, I was asked a very good question about why not have the firewall work by Ethernet address instead of IP. A starting answer is that firewalls have traditionall...</div> | 49 | <div>As I mentioned way back when I discussed how rogue wireless access points are a bigger risk at universities, one of the unusual things about universities is that we usually don't have anywhere near as much physical security as, say, a typical company does. This is because in practice most university buildings are open ...</div> |
| 50 | </li> | 50 | </li> |
| 51 | <li> | 51 | <li> |
| 52 | <a href="https://szymonkaliski.com/writing/2023-10-02-building-a-diy-pen-plotter/" target="_blank" rel="noopener">Building a DIY Pen Plotter</a> | 52 | <a href="https://szymonkaliski.com/writing/2023-10-02-building-a-diy-pen-plotter/" target="_blank" rel="noopener">Building a DIY Pen Plotter</a> |
diff --git a/_posts/2023-11-04-using-ffmpeg-to-combine-video-side-by-side.md b/_posts/2023-11-04-using-ffmpeg-to-combine-video-side-by-side.md new file mode 100644 index 0000000..23d14b7 --- /dev/null +++ b/_posts/2023-11-04-using-ffmpeg-to-combine-video-side-by-side.md | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | --- | ||
| 2 | title: "Using ffmpeg to combine videos side by side" | ||
| 3 | permalink: /using-ffmpeg-to-combine-video-side-by-side.html | ||
| 4 | date: 2023-11-04T09:04:28+02:00 | ||
| 5 | layout: post | ||
| 6 | type: note | ||
| 7 | draft: false | ||
| 8 | --- | ||
| 9 | |||
| 10 | I had a 4 webm videos (each 492x451) that I wanted to combine to be played side | ||
| 11 | by side and I tried [iMovie](https://support.apple.com/imovie) and | ||
| 12 | [Kdenlive](https://kdenlive.org/) and failed to do it in an easy way. I needed | ||
| 13 | this for Github readme file so it also needed to be a GIF. | ||
| 14 | |||
| 15 | The following is the [ffmpeg](https://ffmpeg.org/) version of it. | ||
| 16 | |||
| 17 | ```sh | ||
| 18 | ffmpeg -y \ | ||
| 19 | -i 01.webm \ | ||
| 20 | -i 02.webm \ | ||
| 21 | -i 03.webm \ | ||
| 22 | -i 04.webm \ | ||
| 23 | -filter_complex "\ | ||
| 24 | [0:v] trim=duration=8, setpts=PTS-STARTPTS, scale=492x451, fps=6 [a0]; \ | ||
| 25 | [1:v] trim=duration=8, setpts=PTS-STARTPTS, scale=492x451, fps=6 [a1]; \ | ||
| 26 | [2:v] trim=duration=8, setpts=PTS-STARTPTS, scale=492x451, fps=6 [a2]; \ | ||
| 27 | [3:v] trim=duration=8, setpts=PTS-STARTPTS, scale=492x451, fps=6 [a3]; \ | ||
| 28 | [a0][a1][a2][a3] xstack=inputs=4:layout=0_0|w0_0|w0+w1_0|w0+w1+w2_0, scale=1000:-1 [v]" \ | ||
| 29 | -map "[v]" \ | ||
| 30 | -crf 23 \ | ||
| 31 | -preset veryfast \ | ||
| 32 | trigraphs.gif | ||
| 33 | ``` | ||
| 34 | |||
| 35 | - This will produce `trigraphs.gif` that is also scaled to max 1000px in width | ||
| 36 | (refer to `scale=1000:-1`). | ||
| 37 | - The important part for 4x1 stack is `xstack=inputs=4:layout=0_0|w0_0|w0+w1_0|w0+w1+w2_0`. | ||
| 38 | - This will also cap frame rate to 6 (refer to `fps=6`) since that is enough and | ||
| 39 | this makes playback of GIFs smoother in a browser. | ||
| 40 | |||
| 41 |  | ||
diff --git a/assets/notes/trigraphs.gif b/assets/notes/trigraphs.gif new file mode 100644 index 0000000..f579b9d --- /dev/null +++ b/assets/notes/trigraphs.gif | |||
| Binary files differ | |||
