-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff --git a/src/capture.sh b/src/capture.sh | ||
index a32b018..82d1f15 100755 | ||
--- a/src/capture.sh | ||
+++ b/src/capture.sh | ||
@@ -103,4 +103,4 @@ capture () { | ||
|
||
|
||
# remove this line if you want to source this file instead | ||
-eval " ${0##*/}" "$@" | ||
+capture "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/src/capture.sh b/src/capture.sh | ||
index a32b018..42f3936 100755 | ||
--- a/src/capture.sh | ||
+++ b/src/capture.sh | ||
@@ -9,7 +9,7 @@ set -e | ||
# | ||
|
||
scale="-1:-1" | ||
-fps="15" | ||
+fps="30" | ||
raw_video="-vf fps=$fps -c:v utvideo -f nut" | ||
raw_video_container=".nut" | ||
|
||
@@ -18,7 +18,7 @@ raw_video_container=".nut" | ||
# https://stackoverflow.com/questions/41372045/vp9-encoding-limited-to-4-threads | ||
webm_video="-pix_fmt yuv420p -c:v libvpx-vp9 -crf 25 -b:v 0 -f webm -tile-columns 6 -frame-parallel 1 -threads 8" | ||
|
||
-tmpdir="/var/tmp" | ||
+tmpdir="/tmp" | ||
|
||
|
||
# capture_raw ./foo.nut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ stdenv, pkgs, slop, ffmpeg, fetchFromGitHub, makeWrapper}: | ||
|
||
stdenv.mkDerivation rec { | ||
name = "capture-${version}"; | ||
version = "1.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "buhman"; | ||
repo = "capture"; | ||
rev = "4be986f17462b8d520559429c74da6bf3a436259"; | ||
sha256 = "172y06vs993x5v78zwl81xma1gkvjq1ad9rvmf3a217fyxsz4nhh"; | ||
}; | ||
|
||
buildInputs = [ makeWrapper ]; | ||
|
||
patches = [ ./0001-eval-fix.patch ./0002-sane-defaults.patch ]; | ||
|
||
installPhase = '' | ||
install -Dm755 src/capture.sh $out/bin/capture | ||
patchShebangs $out/bin/capture | ||
wrapProgram $out/bin/capture \ | ||
--prefix PATH : '${stdenv.lib.makeBinPath [ slop ffmpeg ]}' | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "A no bullshit screen capture tool"; | ||
homepage = "https://github.com/buhman/capture"; | ||
maintainers = [ maintainers.ar1a ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters