Folgen Sie dem Video unten, um zu sehen, wie Sie unsere Website als Icon auf Ihrem Homescreen erstellen.
Anmerkung: This feature may not be available in some browsers.
#!/bin/bash
#set -vx
[[ "$1" = "-h" ]] && echo "Syntax: ${0##*/} [-t]" && exit 1
theLength=10; #in seconds
theResolution=640; #x in pixels (y=auto aspect ratio)
theFrameRate=8; #frames per second
thePath=$(osascript -e 'tell app "VLC" to get path of current item');
thePos=$(osascript -e 'tell app "VLC" to get current time');
[[ "$thePath" ]] && echo -e "$thePath:$thePos\n" && tmpdir=$(mktemp -d -t "${0##*/}") && \
/usr/local/bin/ffmpeg -i "$thePath" -ss "$thePos" -t "$theLength" -r "$theFrameRate" -vf scale="$theResolution":-1 -f image2 "$tmpdir"/%03d.png && \
/usr/local/bin/convert -delay 1x"$theFrameRate" "$tmpdir"/*.png -coalesce -layers OptimizeTransparency "${thePath%.*}.gif" || \
{ echo "VLC: No file open." && exit 2; }
[[ "$1" = "-t" ]] && exit 0 || rm -rf "$tmpdir"