Add ffmpeg scripts

Add ffmpeg scripts

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
add_docker
Bensuperpc 2 years ago
parent c508be0054
commit 089f078e00
  1. 4
      Makefile
  2. 8
      git/git-create-patch.sh
  3. 2
      git/git-find-big.sh
  4. 2
      internet/spoofpoint
  5. 32
      video/compare-video.sh
  6. 31
      video/extract-part-video.sh
  7. 29
      video/gource-h265.sh

@ -39,8 +39,8 @@ reinstall: uninstall install
update:
@echo "Update submodule..."
git submodule update --init --recursive --jobs=2
git submodule update --recursive --remote --jobs=2
git submodule update --init --recursive
git submodule update --recursive --remote
@echo "Update: done"
dist: clean

@ -11,7 +11,7 @@ set -euo pipefail
#// //
#// Script, 2021 //
#// Created: 21, June, 2021 //
#// Modified: 25, July, 2021 //
#// Modified: 31, July, 2021 //
#// file: - //
#// - //
#// Source: //
@ -27,8 +27,8 @@ elif (( $# == 1 )); then
elif (( $# == 2 )); then
git diff "$1" "$2" -- > "$1"-"$2".patch
else
echo "Usage: ${0##*/} (patch HEAD)"
echo "Usage: ${0##*/} <nbr from HEAD>"
echo "Usage: ${0##*/} <tag or hash 1> <tag or hash 2>"
echo "Usage: ${0##*/} (create patch from HEAD)"
echo "Usage: ${0##*/} <nbr commit from HEAD>"
echo "Usage: ${0##*/} <tag1 or hash 1> <tag2 or hash 2>"
exit 1
fi

@ -11,7 +11,7 @@ set -euo pipefail
#// //
#// Script, 2021 //
#// Created: 28, July, 2021 //
#// Modified: 28, July, 2021 //
#// Modified: 31, July, 2021 //
#// file: - //
#// - //
#// Source: https://stackoverflow.com/a/42544963/10152334 //

@ -1 +1 @@
Subproject commit 75fcab19f031712ccbfa1f52baa6b08f8234973c
Subproject commit e3927214efacee86372e4e129c00ddc100efbfe5

@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail
#//////////////////////////////////////////////////////////////
#// ____ //
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
#// |_| |_| //
#//////////////////////////////////////////////////////////////
#// //
#// Script, 2021 //
#// Created: 31, July, 2021 //
#// Modified: 31, July, 2021 //
#// file: - //
#// - //
#// Source: https://stackoverflow.com/a/29504397/10152334 //
#// OS: ALL //
#// CPU: ALL //
#// //
#//////////////////////////////////////////////////////////////
type ffmpeg >/dev/null 2>&1 || { echo "ffmpeg could not be found" >&2; exit 1; }
if (( $# == 2 )); then
ffmpeg -i "$1" -i "$2" -filter_complex "psnr" -f null /dev/null
ffmpeg -i "$1" -i "$2" -filter_complex "ssim" -f null /dev/null
else
echo "Usage: ${0##*/} <file 1> <file 2>"
exit 1
fi

@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -euo pipefail
#//////////////////////////////////////////////////////////////
#// ____ //
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
#// |_| |_| //
#//////////////////////////////////////////////////////////////
#// //
#// Script, 2021 //
#// Created: 31, July, 2021 //
#// Modified: 31, July, 2021 //
#// file: - //
#// - //
#// Source: - //
#// OS: ALL //
#// CPU: ALL //
#// //
#//////////////////////////////////////////////////////////////
type ffmpeg >/dev/null 2>&1 || { echo "ffmpeg could not be found" >&2; exit 1; }
if (( $# == 4 )); then
ffmpeg -ss "$3" -i "$1" -to "$4" -c copy -copyts "$2"
else
echo "Usage: ${0##*/} <input file> <output file> <start time (ex: 00:09:23 or 383)> <end time (Ex: 00:25:33 or 1533)>"
exit 1
fi

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
#//////////////////////////////////////////////////////////////
#// ____ //
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
#// |_| |_| //
#//////////////////////////////////////////////////////////////
#// //
#// Script, 2021 //
#// Created: 31, July, 2021 //
#// Modified: 31, July, 2021 //
#// file: https://gist.github.com/jhamfler/cb21414d70696ba4a8957db80f186374 //
#// - //
#// Source: - //
#// OS: ALL //
#// CPU: ALL //
#// //
#//////////////////////////////////////////////////////////////
# --highlight-users
if (( $# == 1 )); then
gource --multi-sampling --output-framerate 60 --seconds-per-day 3.0 --auto-skip-seconds 0.2 ./ -1920x1080 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx265 -preset slow -pix_fmt yuv420p -crf 21 -bf 0 "$1"
else
echo "Usage: ${0##*/} <ouput file>"
exit 1
fi
Loading…
Cancel
Save