Browse Your Downloaded Videos on Internet: PHP based video webserver that exposes a local path containing videos to the internet.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
471 B
19 lines
471 B
10 years ago
|
#! /bin/bash
|
||
|
|
||
|
SRC="/var/data/spielfilme"
|
||
|
DST="/var/tmp/spielfilme/webm"
|
||
|
|
||
|
for f in $(find "$SRC" \( -name '*.jpg' -prune \) -o -type f -print); do
|
||
|
t="${f/$SRC/$DST}"
|
||
|
t="${t%.*}.webm"
|
||
|
if test -s "${t}"; then
|
||
|
continue;
|
||
|
fi
|
||
|
test -d "${t%/*}" || mkdir -p "${t%/*}"
|
||
|
#ffmpeg -i "$f" -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 "$t"
|
||
|
avconv -i "$f" "$t"
|
||
|
if ( ! test -s "${t}" ) && ( test -e "$t" ); then
|
||
|
rm "$t"
|
||
|
fi
|
||
|
done
|