J’ai fait un programme pour cherhcher les sommets que j’ai fait à partir de mes photos sur NextCloud :
Le résultat est au format Markdown
Le lien pour la contribution : (https://github.com/sponsors/dansup)
Je viens de contribuer a hauteur de 20 $.
C’est suite a ce post : (https://pouet.chapril.org/@dansup@mastodon.social/115910926869681148)
I’ve spent thousands of hours and dollars building platforms, services and tools for the fediverse. I could really use your support to help keep me dedicated to fediverse development! https://pixelfed.org/support-our-project
Enfin j’ai installé Photon :
Pour que cela fonctionne j’ai du prendre Europe à la place de France, donc faire une VM de 200 Go.
- REGION=europe
Maintenant j’ai la synchronisation entre Dawarich & Photon.
PHOTON_API_HOST: 192.168.1.59:2322
PHOTON_API_USE_HTTPS: false
Taille des volumes Docker :
docker system df -v
...
Local Volumes space usage:
VOLUME NAME LINKS SIZE
docker_dawarich_shared 2 31.98MB
docker_dawarich_storage 2 26.98MB
docker_dawarich_watched 2 726B
photon-docker_photon_data 1 103GB
docker_dawarich_db_data 2 637.3MB
docker_dawarich_public 2 23.66MB
A suivre.
Ma commande pour indenter PHP
# find . -name '*.php' -printf "echo -e \"G=gg\n:wq\n\" \
| vim %p\n" | sh
J’ai essayé d’installer :
Mais j’ai pas réussi :
L’erreur :
ERROR - Index extraction failed with return code 2
ERROR - Command: lbzip2 -d -c /photon/data/temp/photon-db-latest.tar.bz2 \
| tar x -C /photon/data/temp
ERROR - Stdout:
ERROR - Stderr: lbzip2: "/photon/data/temp/photon-db-latest.tar.bz2": \
compressed data error: block CRC mismatch
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
FATAL: Update process failed with an error: \
Command 'lbzip2 -d -c /photon/data/temp/photon-db-latest.tar.bz2 \
| tar x -C /photon/data/temp' returned non-zero exit status 2.
CRITICAL - Aborting script.
Je cherche a compresser les vidéos et aussi a les afficher sur Firefox, mais pour l’instant le process ne fonctionne pas …
Le process :
# find /var/www/humhub/uploads/file/ -name 'file' \
-exec file {} + | grep "MP4 " | sed 's/:/ /g' \
| awk '{print $1}' | xargs du -b \
| awk '{ sum += $1 } END { print sum/1024/1024 }'
6690.92
# find /var/www/humhub/uploads/file/ -name 'file' \
-exec file {} + | grep "MP4 " | sed 's/:/ /g' \
| awk '{print $1}' | xargs -I {} \
ffmpeg -i {} -c:v libx264 -preset slow -crf 18 \
-c:a aac -vf format=yuv420p -movflags +faststart {}_tmp7.mp4
# find /var/www/humhub/uploads/file/ -name 'file_tmp7.mp4' \
-exec file {} + | grep "MP4 " | sed 's/:/ /g' \
| awk '{print $1}' | sed 's/_tmp7.mp4//g' \
| xargs -I {} mv {}_tmp7.mp4 {}
# find /var/www/humhub/uploads/file/ -name 'file' \
-exec file {} + | grep "MP4 " | sed 's/:/ /g' \
| awk '{print $1}' | xargs du -b \
| awk '{ sum += $1 } END { print sum/1024/1024 }'
4306.44
# chown -R www-data:www-data /var/www/humhub
# php yii integrity/run
# php yii cache/flush-all
J’ai laissé un commentaire sur (https://github.com/humhub/humhub/issues/6025)
Voici ma commande :
# du -sh /var/www/humhub/
13G /var/www/humhub/
# find /var/www/humhub/uploads/file/ -name 'file' \
-exec file {} + | grep "MP4 " | sed 's/:/ /g' \
| awk '{print $1}' | xargs du -b \
| awk '{ sum += $1 } END { print sum/1024/1024 }'
6690.92
Bref 6,7/13 Go.
J’ai fait une proposition sur Github : (https://github.com/humhub/humhub/issues/7916)
Via une commande du type :
# find /var/www/humhub/uploads/file/ -name 'file' \
-exec file {} + | grep "MP4 " | sed 's/:/ /g' \
| awk '{print $1}' | xargs -I {} \
ffmpeg -i {} -c:v libx264 -crf 23 -preset medium \
-movflags +faststart -c:a aac -b:a 128k {}_tmp.mp4
A suivre.
Je viens de changer la résolution maximum : 1920x1080 => 1280x720 (HD).
Voici ma configuration :
'modules' => [
'file' => [
'imageMaxResolution' => '1280x720',
'imageJpegQuality' => 75,
'imagePngCompressionLevel' => 9,
'imageWebpQuality' => 75,
]
]
Voici les commandes :
# du -sh /var/www/humhub/
13G /var/www/humhub/
# cd /var/www/humhub/protected/
# php yii file/downscale-images
Pour l’instant j’ai pas trouvé de solution pour la compression des vidéos …
Je suis passé de 21 Go a 14 Go, j’ai considéré que la résolution max c’était 1536x .
Voici mes commandes :
# du -sh /var/www/cyber-neurones.org/
21G /var/www/cyber-neurones.org/
# apt update && apt install imagemagick \
libpng-dev libjpeg-dev libtiff-dev
# find /var/www/cyber-neurones.org/wp-content/uploads/. \
-name '*.jpg' \
-exec mogrify -format jpg -resize '1536x>' {} +
# # du -sh /var/www/cyber-neurones.org/
14G /var/www/cyber-neurones.org/