From 8f26e9dca7b9e9ceaab420665006ec6b5efe4cf9 Mon Sep 17 00:00:00 2001 From: Leo Coogan Date: Wed, 29 Dec 2021 02:09:45 -0500 Subject: [PATCH] New script that should've been added a while a go --- COPYRIGHT.txt | 2 ++ README.md | 1 + bin/ffr | 5 +++++ 3 files changed, 8 insertions(+) create mode 100755 bin/ffr diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt index 604b55f..84c6f31 100644 --- a/COPYRIGHT.txt +++ b/COPYRIGHT.txt @@ -41,3 +41,5 @@ db is licensed under the Unlicense. A license copy is provided in LICENSES/Unlic eliza is licensed under the Unlicense. A license copy is provided in LICENSES/Unlicense.txt. inc is licensed under the Unlicense. A license copy is provided in LICENSES/Unlicense.txt. + +ffr is licensed under diff --git a/README.md b/README.md index 1833026..3641af3 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ A collection of useful scripts. These scripts are written by various authors. At | ffconv | Batch convert mkvs to mp4s. | | ffconv-a | Batch convert from one format to another. | | ffconv-ar | Batch convert from one format to another without preserving metadata. | +| ffr | Record a given window with ffmpeg to the current directory. | | gpltopnm | Convert gpl to ppm. | | inc | Copy one file to the number of files by hex in the current directory. | | makeself | Make self-extractable archives for *nix-likes. | diff --git a/bin/ffr b/bin/ffr new file mode 100755 index 0000000..cd9a5ed --- /dev/null +++ b/bin/ffr @@ -0,0 +1,5 @@ +#!/bin/dash +ffmpeg -f x11grab -framerate 25 \ + $(xwininfo | gawk 'match($0, /-geometry ([0-9]+x[0-9]+).([0-9]+).([0-9]+)/, a)\ + { print "-video_size " a[1] " -i +" a[2] "," a[3] }') \ + $(date +%Y-%m-%d_%H-%M_%S).mp4