added a vp9 cpmverter script that handles alpha channel too
This commit is contained in:
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
export IFS=$'\n';
|
||||||
|
for i;
|
||||||
|
do
|
||||||
|
newdir="$(basename "$i")"
|
||||||
|
mkdir ./"$newdir";
|
||||||
|
for j in $( find "$i" -iname *ogg -or -iname *m4v -or -iname *flac -or -iname *wav | sort );
|
||||||
|
do
|
||||||
|
ffmpeg -i "$j" -q 0 "$(basename "$i")/"$(basename "${j%.*}").mp3;
|
||||||
|
done
|
||||||
|
done
|
||||||
+4
-1
@@ -3,6 +3,9 @@
|
|||||||
#makine
|
#makine
|
||||||
#wacom_id="Wacom Intuos Pro M Pen stylus"
|
#wacom_id="Wacom Intuos Pro M Pen stylus"
|
||||||
#wacom_id=$(xsetwacom --list devices | grep stylus | grep -o [0-9]. | sed 's/\t//')
|
#wacom_id=$(xsetwacom --list devices | grep stylus | grep -o [0-9]. | sed 's/\t//')
|
||||||
wacom_id=$(xsetwacom --list devices | grep stylus | grep 'id\: [0-9].' -o | grep [0-9]. -o)
|
#wacom_id=$(xsetwacom --list devices | grep 'stylus' | grep 'id:.[0-9]' -o | grep '[0-9]' -o)
|
||||||
|
wacom_id=$(xsetwacom --list devices | grep 'stylus' | grep -E 'id:.[0-9]{1,3}' -o | grep -E '[0-9]{1,3}' -o)
|
||||||
|
|
||||||
xsetwacom --set "$(($wacom_id + 0))" button 2 3
|
xsetwacom --set "$(($wacom_id + 0))" button 2 3
|
||||||
xsetwacom --set "$(($wacom_id + 0))" button 3 2
|
xsetwacom --set "$(($wacom_id + 0))" button 3 2
|
||||||
|
xsetwacom --set "$(($wacom_id + 0))" threshold 50
|
||||||
|
|||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
for i;
|
||||||
|
do
|
||||||
|
search=$( exiftool -s3 -artist -title "$i" | xargs )
|
||||||
|
echo $search
|
||||||
|
syncedlyrics "$search" --synced-only -o "${i%.*}.lrc"
|
||||||
|
done
|
||||||
+4
-2
@@ -40,14 +40,16 @@ then
|
|||||||
d=$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 "$i");
|
d=$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 "$i");
|
||||||
w=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 "$i");
|
w=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 "$i");
|
||||||
h=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of default=noprint_wrappers=1:nokey=1 "$i");
|
h=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of default=noprint_wrappers=1:nokey=1 "$i");
|
||||||
ffmpeg -i "$i" -filter_complex "[0:v] fps=$fps [refpsd]; gradients=size="$w"x"$h":d=$d:c0=$color:c1=$color [box]; [refpsd] split [a][b];[a] palettegen [p];[box][b] overlay [overlayed];[overlayed][p] paletteuse" -q 0 -strict -2 -vb $vb -y ${i%.*}.gif ;
|
ffmpeg -i "$i" -filter_complex "[0:v] fps=$fps [refpsd];[refpsd] split [a][b];[a] palettegen [p];[borefpsd][b] overlay [overlayed];[overlayed][p] paletteuse" -q 0 -strict -2 -vb $vb -y ${i%.*}.gif ;
|
||||||
|
#ffmpeg -i "$i" -filter_complex "[0:v] fps=$fps [refpsd]; gradients=size="$w"x"$h":d=$d:c0=$color:c1=$color [box]; [refpsd] split [a][b];[a] palettegen [p];[box][b] overlay [overlayed];[overlayed][p] paletteuse" -q 0 -strict -2 -vb $vb -y ${i%.*}.gif ;
|
||||||
done;
|
done;
|
||||||
else
|
else
|
||||||
for i;
|
for i;
|
||||||
do
|
do
|
||||||
echo $size
|
echo $size
|
||||||
d=$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 "$i");
|
d=$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 "$i");
|
||||||
ffmpeg -i "$i" -filter_complex "[0:v] scale=$sizealt,fps=$fps [scaled]; gradients=size=$size:d=$d:c0=$color:c1=$color [box],[box][scaled] overlay [overlayed],[overlayed] split [i1][i2];[i1] palettegen [palette];[i2][palette] paletteuse" -q 0 -strict -2 -vb $vb -y ${i%.*}_$size.gif ;
|
ffmpeg -i "$i" -filter_complex "[0:v] scale=$sizealt,fps=$fps [scaled]; [scaled] split [i1][i2];[i1] palettegen [palette];[i2][palette] paletteuse" -q 0 -strict -2 -vb $vb -y ${i%.*}_$size.gif ;
|
||||||
|
#ffmpeg -i "$i" -filter_complex "[0:v] scale=$sizealt,fps=$fps [scaled]; gradients=size=$size:d=$d:c0=$color:c1=$color [box],[box][scaled] overlay [overlayed],[overlayed] split [i1][i2];[i1] palettegen [palette];[i2][palette] paletteuse" -q 0 -strict -2 -vb $vb -y ${i%.*}_$size.gif ;
|
||||||
done;
|
done;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Executable
+28
@@ -0,0 +1,28 @@
|
|||||||
|
alpha="false"
|
||||||
|
|
||||||
|
while getopts "a" opt; do
|
||||||
|
case ${opt} in
|
||||||
|
a )
|
||||||
|
alpha="true"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
shift "$(($OPTIND -1))"
|
||||||
|
|
||||||
|
for i;
|
||||||
|
do
|
||||||
|
echo $alpha
|
||||||
|
new_name=$(echo $i | sed -Er 's/\_(NL|PR)([_-])/\_VP9\2/');
|
||||||
|
if [ "$alpha" = "true" ]
|
||||||
|
then
|
||||||
|
|
||||||
|
ffmpeg -i "$i" -c:v libvpx-vp9 -pix_fmt yuva420p -b:v 0 -colorspace bt709 -color_trc bt709 -color_primaries bt709 -crf 10 -auto-alt-ref 0 "${new_name%.*}.webm" ##-vf "alphaextract" -c:v libvpx-vp9 -pix_fmt yuva420p -b:v 0 -colorspace bt709 -color_trc bt709 -color_primaries bt709 -crf 5 "${new_name%.*}_ALPHA.webm";
|
||||||
|
echo $new_name "w alpha"
|
||||||
|
else
|
||||||
|
ffmpeg -i "$i" -c:v libvpx-vp9 -pix_fmt yuv420p -b:v 0 -colorspace bt709 -color_trc bt709 -color_primaries bt709 -crf 10 "${new_name%.*}.webm";
|
||||||
|
echo $new_name
|
||||||
|
echo $new_name "no alpha"
|
||||||
|
fi
|
||||||
|
|
||||||
|
done;
|
||||||
+5
-2
@@ -11,16 +11,19 @@ while getopts ":a" opt; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
format=bestvideo+bestaudio
|
||||||
|
|
||||||
export IFS=$'\n';
|
export IFS=$'\n';
|
||||||
for i;
|
for i;
|
||||||
do
|
do
|
||||||
#Audio-->
|
#Audio-->
|
||||||
youtube-dl -x --audio-format vorbis --add-metadata --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestaudio --audio-quality 192k "$i"
|
#yt-dlp -x --audio-format vorbis --add-metadata --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestaudio --audio-quality 192k "$i"
|
||||||
#youtube-dl --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestaudio "$i"
|
#youtube-dl --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestaudio "$i"
|
||||||
#youtube-dl -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f $a "$i"
|
#youtube-dl -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f $a "$i"
|
||||||
#youtube-dl --add-metadata --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestvideo+bestaudio "$i"
|
#youtube-dl --add-metadata --xattrs --embed-subs --embed-thumbnail --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -i -f bestvideo+bestaudio "$i"
|
||||||
#youtube-dl --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f bestvideo+bestaudio "$i"
|
#youtube-dl --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" -f bestvideo+bestaudio "$i"
|
||||||
#VIDEO-->
|
#VIDEO-->
|
||||||
#youtube-dl --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s - %(format)s.%(ext)s" -i -f $format "$i"
|
#yt-dlp --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s - %(format)s.%(ext)s" -i -f $format "$i"
|
||||||
|
yt-dlp --add-metadata --xattrs --embed-subs --all-subs -o "%(playlist)s/%(playlist_index)s - %(title)s - %(format)s.%(ext)s" -i "$i"
|
||||||
|
|
||||||
done;
|
done;
|
||||||
|
|||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
import json
|
||||||
|
import struct
|
||||||
|
|
||||||
|
with open("/yorchnet-guindos/ai/models/Lora/drawix8.safetensors", "rb") as f:
|
||||||
|
length_of_header = struct.unpack('<Q', f.read(8))[0]
|
||||||
|
header_data = f.read(length_of_header)
|
||||||
|
header = json.loads(header_data)
|
||||||
|
|
||||||
|
print(header) # should be a dict that contains what you need
|
||||||
Reference in New Issue
Block a user