Skip to content

Commit

Permalink
Update gource and add script
Browse files Browse the repository at this point in the history
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
  • Loading branch information
bensuperpc committed Sep 30, 2021
1 parent 2fbe2e2 commit f9d1d15
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 14 deletions.
13 changes: 12 additions & 1 deletion Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Scripts for Archlinux and Manjaro
Scripts for audio (FFMPEG ...)

- [`extract-audio`](#extract-audio)
- [`merge-audio`](#merge-audio)

## cryptography

Expand Down Expand Up @@ -182,7 +183,17 @@ $ extract archive1.zip archive2.7z archive3.rar
Extract audio from video files, with ffmpeg (without re-encoding)

```bash
$ extract-audio myvideo.mkv myextractedsound.mp3
$ extract-audio <input video file with audio> <output audio file>
```

### merge-audio

Merge multiple audio files, with ffmpeg (with re-encoding)

```bash
$ merge-audio <input audio file 1> <input audio file 2> <output audio file>
$ merge-audio <input audio file 1> <input audio file 2> <input audio file 3> <output audio file>
$ merge-audio <input audio file 1> <input audio file 2> <input audio file 3> <input audio file 4> <output audio file>
```

### digital-signature-check-RSA
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#// //
#// Script, 2021 //
#// Created: 17, June, 2021 //
#// Modified: 31, August, 2021 //
#// Modified: 28, September, 2021 //
#// file: - //
#// - //
#// Source: https://github.com/metal3d/bashsimplecurses //
Expand All @@ -20,7 +20,7 @@
#//////////////////////////////////////////////////////////////
PROJECT_NAME := scripts
SHELL := bash
VERSION := 1.3.13
VERSION := 1.3.14
RM := rm

all: install
Expand Down
39 changes: 39 additions & 0 deletions audio/merge-audio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
#//////////////////////////////////////////////////////////////
#// ____ //
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
#// |_| |_| //
#//////////////////////////////////////////////////////////////
#// //
#// Script, 2021 //
#// Created: 27, September, 2021 //
#// Modified: 27, September, 2021 //
#// file: - //
#// - //
#// Source: https://superuser.com/a/587553/1057976 //
#// OS: ALL //
#// CPU: ALL //
#// //
#//////////////////////////////////////////////////////////////

if (($# == 3)); then
ffmpeg -i "$1" -i "$2" \
-filter_complex '[0:0][1:0]concat=n=2:v=0:a=1[out]' \
-map '[out]' "$3"
elif (($# == 4)); then
ffmpeg -i "$1" -i "$2" -i "$3" \
-filter_complex '[0:0][1:0][2:0][3:0]concat=n=4:v=0:a=1[out]' \
-map '[out]' "$4"
elif (($# == 6)); then
ffmpeg -i "$1" -i "$2" -i "$3" -i "$4" \
-filter_complex '[0:0][1:0][2:0][3:0]concat=n=4:v=0:a=1[out]' \
-map '[out]' "$5"
else
echo "Usage: ${0##*/} <input audio file 1> <input audio file 2> <output audio file>"
echo "Usage: ${0##*/} <input audio file 1> <input audio file 2> <input audio file 3> <output audio file>"
echo "Usage: ${0##*/} <input audio file 1> <input audio file 2> <input audio file 3> <input audio file 4> <output audio file>"
exit 1
fi
11 changes: 6 additions & 5 deletions video/gource-h265.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#// //
#// Script, 2021 //
#// Created: 31, July, 2021 //
#// Modified: 27, September, 2021 //
#// Modified: 28, September, 2021 //
#// file: https://gist.github.com/jhamfler/cb21414d70696ba4a8957db80f186374 //
#// - //
#// Source: - //
Expand All @@ -19,11 +19,12 @@
#// //
#//////////////////////////////////////////////////////////////

if (( $# == 1 )); then
# -2560x1440 # If not --fullscreen --date-format "%Y-%m-%d" --elasticity 0.1 --max-user-speed 500
if (($# == 1)); then
git_url=$(git config --get remote.origin.url)
# -2560x1440 # If not --fullscreen # --date-format "%Y-%m-%d" --elasticity 0.1 --max-user-speed 500
gource --fullscreen --disable-input --multi-sampling --output-framerate 60 --seconds-per-day 0.3 \
--hide mouse --filename-time 5 --max-files 0 --bloom-multiplier 0.8 --highlight-users --file-extension-fallback --path . \
--auto-skip-seconds 0.9 --background-colour 000000 --key --stop-at-end --title "git" --output-ppm-stream - | ffmpeg -y -r 60 \
--hide mouse --filename-time 5 --max-files 0 --bloom-multiplier 0.8 --highlight-users --file-extension-fallback --path . \
--auto-skip-seconds 0.9 --background-colour 000000 --key --stop-at-end --title "$git_url" --output-ppm-stream - | ffmpeg -y -r 60 \
-f image2pipe -vcodec ppm -i - -vcodec libx265 -preset medium \
-pix_fmt yuv420p -crf 18 -bf 0 "$1"
else
Expand Down
13 changes: 7 additions & 6 deletions video/gource-nvenc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#// //
#// Script, 2020 //
#// Created: 21, November, 2020 //
#// Modified: 27, September, 2021 //
#// Modified: 28, September, 2021 //
#// file: - //
#// - //
#// Source: https://gist.github.com/rafi/365926 //
Expand All @@ -19,12 +19,13 @@
#// //
#//////////////////////////////////////////////////////////////

if (( $# == 1 )); then
# -2560x1440 # If not --fullscreen --date-format "%Y-%m-%d" --elasticity 0.1 --max-user-speed 500
if (($# == 1)); then
git_url=$(git config --get remote.origin.url)
# -2560x1440 # If not --fullscreen # --date-format "%Y-%m-%d" --elasticity 0.1 --max-user-speed 500
gource --fullscreen --disable-input --multi-sampling --output-framerate 60 --seconds-per-day 0.1 \
--hide mouse --filename-time 5 --max-files 0 --bloom-multiplier 0.8 --highlight-users --file-extension-fallback --path . \
--auto-skip-seconds 0.1 --background-colour 000000 --key --stop-at-end --title "https://github.com/dockcross/dockcross" --output-ppm-stream - | ffmpeg -y -r 60 \
-f image2pipe -vcodec ppm -i - -vcodec hevc_nvenc -preset:v p7 -tune:v hq -rc:v vbr -cq:v 18 -b:v 0 -minrate:v 5M -maxrate:v 60M -bufsize:v 300M "$1"
--hide mouse --filename-time 5 --max-files 0 --bloom-multiplier 0.8 --highlight-users --file-extension-fallback --path . \
--auto-skip-seconds 0.1 --background-colour 000000 --key --stop-at-end --title "$git_url" --output-ppm-stream - | ffmpeg -y -r 60 \
-f image2pipe -vcodec ppm -i - -vcodec hevc_nvenc -preset:v p7 -tune:v hq -rc:v vbr -cq:v 18 -b:v 0 -minrate:v 5M -maxrate:v 60M -bufsize:v 300M "$1"
else
echo "Usage: ${0##*/} <ouput file>"
exit 1
Expand Down

0 comments on commit f9d1d15

Please sign in to comment.