
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
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 (11454)
-
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