Skip to content

Commit

Permalink
Add utils. Adjust .default in ckin for brown player controls
Browse files Browse the repository at this point in the history
  • Loading branch information
twobob committed Nov 30, 2020
1 parent 96973c1 commit 4de79f9
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/ckin/css/ckin.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
ckin v0.0.1: Custom HTML5 Video Player Skins.
(c) 2017
(c) 2017
MIT License
git+https://github.com/hunzaboy/ckin.git
*/
Expand Down Expand Up @@ -124,6 +124,7 @@ video {
overflow: hidden;
border-radius: 5px;
cursor: pointer;
background-color: bisque;
}

.default:before {
Expand Down
2 changes: 0 additions & 2 deletions docs/ckin/css/ckin.min.css

This file was deleted.

2 changes: 0 additions & 2 deletions docs/ckin/js/ckin.min.js

This file was deleted.

40 changes: 40 additions & 0 deletions util/Fade.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

# Audio + vidéo fade out at the end of mp4 files

# 2015-09-09 19:07:17.0 +0200 / Gilles Quenot
# tweaked by twobob 2020

# length of the fade out
fade_duration=3 # seconds

if [[ ! $2 ]]; then
cat<<EOF
Usage:
${0##*/} <input mp4> <output mp4>
EOF
exit 1
fi

if [[ -f "$2" ]] ; then
echo "$2 already exists. Exiting."
exit 1
fi


for x in bc awk ffprobe ffmpeg; do
if ! type &>/dev/null $x; then
echo >&2 "$x should be installed"
((err++))
fi
done

((err > 0)) && exit 1

duration=$(ffprobe -select_streams v -show_streams "$1" 2>/dev/null |
awk -F= '$1 == "duration"{print $2}')
final_cut=$(bc -l <<< "$duration - $fade_duration")
ffmpeg -n -i "$1" \
-filter:v "fade=out:st=$final_cut:d=$fade_duration" \
-af "afade=t=out:st=$final_cut:d=$fade_duration" \
-c:v libx264 -c:a aac -strict experimental -shortest -pix_fmt yuv420p -preset slower "$2"

0 comments on commit 4de79f9

Please sign in to comment.