
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (19)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (2061)
-
Script bash to compress .mp4 with subfolders and another destination folder
28 octobre 2017, par Aurélien PéruchonI’m trying to create a script to convert all .mp4 videos into subfolders.
My hierarchy is :Folder_1/
Videos_encoded/
Videos_orig/
first-video.mp4
video_2/
video-in-folder-video_2.mp4I want to compress all .mp4 (with into subfolders) are in the Videos-orig/ to the videos_encoded as the destination folder.
I tried :
find /home/user/Folder_1/videos_orig/ -type d | while read ligne
do
cd "$ligne"
for i in *.mp4;
do
ffmpeg -y -i "$i" -ar 44100 -c:v libx265 -b:v 1000 -c:a mp3 -b:a 128k /home/user/Folder_1/videos_encoded"$(basename "${i/.mp4}").mp4"
done
doneBut I have the error message : **.mp4 no such file or directory* (result of ffmpeg command).
I don’t understand ...
There is it a better way to perform this project ?
Thanks you very much in advance for your help :)
Regards
-
Converting video with ffmpeg from a script not in the root folder
30 octobre 2017, par Daniel OrmerodI am using ffmpeg to convert videos, create thumbnails etc.
I made the below function to convert a video and when I run it in a script in the root folder it converts ok.
However, I am using ajax to upload the video and the script is located /ajax/upload-video.php and when I run it in that folder it fails to convert.
I have tried sending the $src and $dest up with ../ before the filenames to go back a folder but it isn’t working.
Can anybody help ?
Do I need to add something to the $command line to tell it to go back a folder ?
These are the variables being used in the function :
$ffmpegpath = 'ffmpeg.exe';
$src = 'videos/video1.wmv';
$dest = 'videos/video1.mp4';I have tried :
$ffmpegpath = 'ffmpeg.exe';
$src = '../videos/video1.wmv';
$dest = '../videos/video1.mp4';And the function :
function convert_video($src, $dest) {
global $ffmpegpath;
if (!file_exists($src)) {
echo '<p>The file does not exist</p>';
} else {
$command = "$ffmpegpath -i $src $dest";
@exec($command, $ret);
if (!file_exists($dest)) {
echo '<p>The file failed to create</p>';
} else {
if (filesize($dest)==0) {
echo '<p>The file created but has not filesize</p>';
} else {
echo '<p>File Created Successfully</p>';
}
}
}
} -
do something with script output
3 novembre 2017, par Opolo WebdesignI’m lazy :) so I would like to automate some things on my network. Currently I’m running a script that automatically downloads the series I watch every week. Based on what is downloaded another script searches the web for subtitles. Some downloads however have subtitles with them, so searching for subtitles is not necessary. I would like to check every download for subtitles and get notified (or better move the file) if the file has the correct subtitles.
I started with the following :
find /volume2/Downloads/ -type f -mmin -30 | while IFS= read -r file; do
ffmpeg -i "${file}"
doneThis works and shows me the output of the ffmpeg command for each file newer than 30 minutes. I would like to work with the result given by ffmpeg so that when certain characters are present in the output, I’m notified via mail. My Linux scripting skills however stop at the script I got. I’m a web developer so I understand the logic behind a script like this, but not the specific code or commands.
Characters that I’m looking for :
- (eng) : Subtitle :
- (dut) : Subtitle :
Can this be done ?
Edit :
I did some more research and did some changes to my script :
find /volume2/Downloads/ -type f -mmin -60 | while IFS= read -r file; do
if ffmpeg -i "${file}" | grep -q '(dut): Subtitle:'; then
echo "matched"
fi
doneInstead of "matched" it shows the ffmpeg output, but it’s probably a step in the right direction ?