aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/blog/freebsd-14-on-the-desktop/index.md2
-rw-r--r--src/misc/ffmpeg/index.md18
2 files changed, 20 insertions, 0 deletions
diff --git a/src/blog/freebsd-14-on-the-desktop/index.md b/src/blog/freebsd-14-on-the-desktop/index.md
index 6526c66..a29212d 100644
--- a/src/blog/freebsd-14-on-the-desktop/index.md
+++ b/src/blog/freebsd-14-on-the-desktop/index.md
@@ -463,6 +463,8 @@ Finally, create the following script at `/usr/local/libexec/thinkpad-brightness`
# /usr/local/libexec/thinkpad-brightness
+cur=$(/usr/bin/backlight -q)
+
case $1 in
up)
if [ "$cur" -ge 50 ]; then
diff --git a/src/misc/ffmpeg/index.md b/src/misc/ffmpeg/index.md
index 956b0c3..a1b8fd3 100644
--- a/src/misc/ffmpeg/index.md
+++ b/src/misc/ffmpeg/index.md
@@ -21,3 +21,21 @@ Crop 200px from the bottom of a video, maintaining aspect ratio:
```bash
ffmpeg -i in.mp4 -filter:v 'crop=iw-200:ih-200:(iw-ow)/2:0' -c:a copy out.mp4
```
+
+Convert a landscape video to portrait (crop to center):
+
+```bash
+ffmpeg -i in.mp4 -filter:v 'crop=ih*9/16:ih:(iw-ow/2):0' -c:a copy out.mp4
+```
+
+Trim video using start and end timestamps:
+
+```bash
+ffmpeg -i in.mp4 -ss 00:01:00 -to 00:02:00 -c copy out.mp4
+```
+
+Scale a video down to 720p (keep aspect ratio):
+
+```bash
+ffmpeg -i in.mp4 -vf "scale=-2:720" out.mp4
+```