Réécriture du music-convert
This commit is contained in:
parent
821210983d
commit
80d56ee914
10 changed files with 53 additions and 75 deletions
|
@ -86,7 +86,7 @@ URxvt*shading: 25
|
|||
! URxvt.keysym.M-v: perl:clipboard:paste
|
||||
! URxvt.keysym.M-C-v: perl:clipboard:paste_escaped
|
||||
! URxvt*termName: string
|
||||
URxvt*geometry: 400x100
|
||||
! URxvt*geometry: 80x24
|
||||
! URxvt*chdir: string
|
||||
! URxvt*reverseVideo: boolean
|
||||
! URxvt*loginShell: boolean
|
||||
|
|
|
@ -96,7 +96,7 @@ ${color2}${font2}Sylvexplorer $hr$font$color${voffset 2}
|
|||
${texeci 3600 /home/breizh/.config/conky/sylv.sh}
|
||||
|
||||
${color2}${font2}MPD $hr$font$color${voffset 2}
|
||||
$alignc${scroll wait 43 1 2 ${mpd_smart}}
|
||||
$alignc${scroll wait 43 1 2 ${mpd_smart} }
|
||||
$alignc${if_match "$mpd_album"!=""}${scroll wait 48 1 2 ${mpd_album}}$endif
|
||||
|
||||
$alignr$mpd_elapsed / $mpd_length ${goto 140}${if_match "${mpd_status}"=="Playing"}${color 99CC99}$endif${if_match "${mpd_status}"=="Paused"}${color FFCC66}$endif${if_match "${mpd_status}"=="Stopped"}${color F2777A}$endif$mpd_bar$color
|
||||
|
|
|
@ -370,7 +370,7 @@ exec claws-mail --online
|
|||
exec --no-startup-id urxvtc -name newsboat -e newsboat
|
||||
exec --no-startup-id redshift-gtk
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id steam-native -silent -noverifyfiles -language french
|
||||
exec --no-startup-id sleep 2m && steam-native -silent -noverifyfiles -language french
|
||||
#exec --no-startup-id SVPManager
|
||||
#exec --no-startup-id hp-systray -x
|
||||
exec --no-startup-id sleep 5 && play "$HOME/Musique/WELCOME BACK.wav"
|
||||
|
|
|
@ -13,7 +13,7 @@ hwdec=auto-copy
|
|||
hwdec-codecs=all
|
||||
|
||||
# Audio
|
||||
# audio-channels=stereo
|
||||
audio-channels=stereo
|
||||
alang=fr,fre,fra
|
||||
|
||||
# Sous-titres
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
[sync]
|
||||
develpkgsexpiration = 30
|
||||
alwaysshowpkgorigin = no
|
||||
alwaysshowpkgorigin = yes
|
||||
upgradesorting = versiondiff
|
||||
showdownloadsize = yes
|
||||
ignoreoutofdateaurupgrades = no
|
||||
|
||||
[build]
|
||||
keepbuilddir = no
|
||||
keepdevbuilddir = no
|
||||
keepbuilddir = yes
|
||||
keepdevbuilddir = yes
|
||||
keepbuilddeps = no
|
||||
skipfailedbuild = no
|
||||
alwaysusedynamicusers = no
|
||||
ignorearch = no
|
||||
gpgdir = /etc/pacman.d/gnupg
|
||||
dynamicusers = root
|
||||
|
||||
[review]
|
||||
donteditbydefault = no
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
--embed-subs
|
||||
--write-subs
|
||||
--write-auto-subs
|
||||
--sub-langs fr,en,en(-|_)?[A-Z]+,-live_chat
|
||||
--sub-langs fr,en,en(-|_)?.+,-live_chat
|
||||
#--sub-langs en
|
||||
--embed-thumbnail
|
||||
-i
|
||||
|
@ -13,8 +13,8 @@
|
|||
--hls-use-mpegts
|
||||
--compat-options no-keep-subs
|
||||
--download-archive ".yt-dlp_archive"
|
||||
-N 4
|
||||
--netrc
|
||||
-N 1
|
||||
#--netrc
|
||||
|
||||
# For 429 errors
|
||||
--retry-sleep fragment:exp=1:320
|
||||
|
|
|
@ -3,10 +3,18 @@
|
|||
# 1: Temps en minutes
|
||||
# 2: Type d’extinction
|
||||
|
||||
#reset-dpms() {
|
||||
# xset dpms 600 600 600
|
||||
# exit
|
||||
#}
|
||||
|
||||
trap 'exit' INT TERM
|
||||
|
||||
touch /dev/shm/mccount
|
||||
|
||||
#xset dpms 10 10 10
|
||||
#xset dpms force standby
|
||||
|
||||
while true
|
||||
do
|
||||
|
||||
|
|
|
@ -13,28 +13,23 @@ reset=$(tput sgr0)
|
|||
bold=$(tput bold)
|
||||
|
||||
# Répertoire source
|
||||
rootdir="${HOME}/Musique/"
|
||||
rootdir="${HOME}/Vidéos/Musique"
|
||||
|
||||
cd "$rootdir"
|
||||
|
||||
# Pour tous les sous-répertoires, à tous les niveaux
|
||||
for dir in **/ .
|
||||
for dir in **/ ./
|
||||
do
|
||||
# Ignorer les liens symboliques
|
||||
#if [[ -h "${rootdir}/${dir::-1}" && "${dir}" != "Vidéos/" ]]
|
||||
# Converti uniquement les vidéos
|
||||
if [[ "${dir}" != "Vidéos/" ]]
|
||||
if [[ -h "${rootdir}/${dir::-1}" ]]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Affichage du répertoire en cours de traitement
|
||||
echo "$bold$dir$reset"
|
||||
# Répertoire de destination
|
||||
dstdir="${HOME}/Musique/Vidéos/${dir}"
|
||||
|
||||
# Définition du répertoire de destination
|
||||
dstdir="${HOME}/Musique.opus/${dir}"
|
||||
|
||||
# Création de la destination
|
||||
# Création du répertoire de destination
|
||||
mkdir -p "${dstdir}"
|
||||
|
||||
# On entre dans le répertoire à traiter
|
||||
|
@ -49,21 +44,20 @@ do
|
|||
continue
|
||||
fi
|
||||
|
||||
# S’il s’agit de FLAC ou d’une vidéo
|
||||
if [[ "${file}" =~ .flac$ ]] || [[ "${dir}" == "Vidéos/" && "$(file --mime-type -b -e ascii -e compress -e tar -e cdf "$file")" =~ video/ ]]
|
||||
# Converti uniquement les vidéos
|
||||
if [[ "$(file --mime-type -b -e ascii -e compress -e tar -e cdf "$file")" =~ video/ ]]
|
||||
then
|
||||
# Définition du fichier de destination
|
||||
dstfile="$(basename -s .flac "$file").opus"
|
||||
dstfile="${file%.*}.opus"
|
||||
|
||||
# S’il a déjà été traité on passe, pour gagner du
|
||||
# temps.
|
||||
if [[ -f "${dstdir}${dstfile}" ]]
|
||||
# Passe les fichiers déjà traités
|
||||
if [[ "${dstdir}${dstfile}" -nt "${file}" ]]
|
||||
then
|
||||
echo "[${blue}SKIP${reset}] $file"
|
||||
echo "[${blue}SKIP${reset}] ${dir#./}$file"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Parrallélisation des conversions
|
||||
# Parallélisation des conversions
|
||||
declare -a running
|
||||
|
||||
mapfile -t running < <(jobs -p)
|
||||
|
@ -72,37 +66,18 @@ do
|
|||
wait -n
|
||||
fi
|
||||
|
||||
togain="true"
|
||||
|
||||
(
|
||||
echo " $file"
|
||||
ffmpeg -n -loglevel error -i "file:$file" -c:a libopus -b:a 256K "file:${dstdir}${dstfile}"
|
||||
echo "[${green} OK ${reset}] $file"
|
||||
echo " ${dir#./}$file"
|
||||
ffmpeg -n -loglevel error -i "file:$file" -c:a libopus -b:a 256K "file:${dstdir}${dstfile}" && \
|
||||
loudgain -S -r -k -q -s e "${dstdir}${dstfile}" &>/dev/null && \
|
||||
echo "[${green} OK ${reset}] ${dir#./}$file" || \
|
||||
echo "[${red}FAIL${reset}] ${dir#./}$file"
|
||||
) &
|
||||
else
|
||||
# Pour les autres fichiers, les copier tel quels
|
||||
echo "[${green}COPY${reset}] $file"
|
||||
# Copie les autres types de fichiers
|
||||
echo "[${green}COPY${reset}] ${dir#./}$file"
|
||||
cp -n --reflink=auto "${file}" "${dstdir}/" || true
|
||||
fi
|
||||
done
|
||||
wait
|
||||
|
||||
# Si le moindre fichier a été converti, on refait les tags replay gain
|
||||
|
||||
#if ${togain} && [[ "${dir}" != "Vidéos/" ]]
|
||||
#then
|
||||
# (
|
||||
# cd "${dstdir}"
|
||||
# shopt -s nullglob
|
||||
# echo "[${blue}GAIN${reset}] $dir"
|
||||
# loudgain -S -a -k -q -s e -- *.opus &>/dev/null && \
|
||||
# echo "[${green}GAIN${reset}] $dir" || \
|
||||
# echo "[${red}GAIN${reset}] $dir"
|
||||
# shopt -u nullglob
|
||||
# ) & disown $!
|
||||
#
|
||||
# # Réinitialise le tag togain
|
||||
# togain="false"
|
||||
#fi
|
||||
done
|
||||
wait
|
||||
|
|
|
@ -15,4 +15,8 @@ weekday=$($date +%-u)
|
|||
hour=$(( ($($date +%-H)%12)*5 + $($date +%-M)/12))
|
||||
minute=$($date +%-M)
|
||||
|
||||
convert "bg.jpg" "month${month}.png" -composite "day${day}.png" -composite "weekday${weekday}.png" -composite "hour${hour}.png" -composite "minute${minute}.png" -composite "/tmp/output.png"
|
||||
# Avec jour de la semaine
|
||||
#convert "bg.jpg" "month${month}.png" -composite "day${day}.png" -composite "weekday${weekday}.png" -composite "hour${hour}.png" -composite "minute${minute}.png" -composite "/tmp/output.png"
|
||||
|
||||
# Sans jour de la semaine
|
||||
convert "bg.jpg" "month${month}.png" -composite "day${day}.png" -composite "hour${hour}.png" -composite "minute${minute}.png" -composite "/tmp/output.png"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cvlc --loop "$HOME/.wine/drive_c/Maxis/FullTilt/CADET/SOUND/TABA1.MID" &
|
||||
pid=$!
|
||||
|
||||
wine .wine/drive_c/Maxis/FullTilt/CADET/CADET.EXE
|
||||
kill $pid
|
||||
timeout 2 wait $pid || kill -9 $pid
|
||||
|
Loading…
Reference in a new issue