
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (107)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (10989)
-
Revision 6018 : Afficher le nombre de pages
6 octobre 2011, par kent1 — LogAfficher le nombre de pages
-
Revision 6018 : Afficher le nombre de pages
6 octobre 2011, par kent1 — LogAfficher le nombre de pages
-
Trying to populate video file data to mysql database
7 octobre 2015, par TomI’m trying on a mac to loop through all videos in a directory and add the details (Duration, size and time) of the file to a mysql db. But for some reason every time it fails on the mysql part.
If I take the mysql query generated by the script and run it on the mysql db it works fine. Can anyone help at all ?
#!/bin/bash
OrDir="/Volumes/Misc/video"
find "$OrDir" -type f -exec /bin/bash -c \
'name=$(basename "$1")
name=${name%.*}
duration=$( ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal "$1")
hash=$( md5 "$1" | cut -f 4 -d " ")
size=$( stat -f%z "$1")
QUERY="UPDATE Video SET Duration=\"$duration\", Hash=\"$hash\", Bytes=$size WHERE Name=\"$name\" "
echo "$QUERY \n"
mysql --host=**.**.**.** --user=**** --password=****** **** << EOF
$QUERY;
EOF
' _ {} \;The
*
are omitting sensitive data and are correct (they’re used in another shell script with the same method that runs fine on the same server)This is just part of a larger script which will then be combined once this works properly