[add] use external video encoder
This commit is contained in:
parent
b18a444b79
commit
463c635855
|
@ -9,7 +9,6 @@ nbProcessLauch=$(ps -ef | grep -v grep | grep youtube-dl | wc -l)
|
||||||
|
|
||||||
if [ $nbProcessLauch != 0 ]
|
if [ $nbProcessLauch != 0 ]
|
||||||
then
|
then
|
||||||
echo 'bye'
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -17,19 +16,25 @@ for file in $tempDest*.hash
|
||||||
do
|
do
|
||||||
if [ -f $file ];
|
if [ -f $file ];
|
||||||
then
|
then
|
||||||
while read urlHash url destination
|
while read ddl urlHash url destination
|
||||||
do
|
do
|
||||||
/usr/local/bin/youtube-dl -R 0 -c --write-thumbnail --write-info-json --recode-video webm --no-check-certificate -f 45/46/37/45/22/44/35/34/5 -o "$urlHash.%(ext)s" "$url"
|
if [ ddl != 0 ]
|
||||||
convert "$urlHash.jpg" -resize 260 "$urlHash.thumb.jpg"
|
then
|
||||||
sleep 10
|
/usr/local/bin/youtube-dl -R 0 -c --write-thumbnail --write-info-json --no-check-certificate -f 45/46/37/45/22/44/35/34/5 -o "$urlHash.%(ext)s" "$url"
|
||||||
|
convert "$urlHash.jpg" -resize 260 "$urlHash.thumb.jpg"
|
||||||
|
sleep 2
|
||||||
|
avconv -i $urlHash\.mp4 -codec:v libvpx -cpu-used 0 -b:v 500k -qmin 20 -qmax 42 -maxrate 500k -bufsize 1000k -threads $threads -codec:a libvorbis -b:a 128k $urlHash\.webm
|
||||||
|
sleep 2
|
||||||
|
else
|
||||||
|
wget -O urlHash url
|
||||||
|
fi
|
||||||
if [ ! -f $urlHash.*.part ]
|
if [ ! -f $urlHash.*.part ]
|
||||||
then
|
then
|
||||||
rm $file
|
rm $file
|
||||||
sleep 1
|
sleep 2
|
||||||
mv $urlHash* $destination
|
mv $urlHash* $destination
|
||||||
fi
|
fi
|
||||||
done < $file
|
done < $file
|
||||||
fi
|
fi
|
||||||
rm $pageCache*.html
|
rm $pageCache*.html 2> /dev/null
|
||||||
done
|
done
|
||||||
# -rc_lookahead 16 -g 360 -threads 3
|
|
||||||
|
|
Loading…
Reference in a new issue