
Recherche avancée
Médias (1)
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (50)
-
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 (...) -
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 (...)
Sur d’autres sites (6325)
-
Anomalie #620 : maintenir à jour les fonctions tierces incluses dans SPIP (script externes)
7 février 2021, par b b:)
-
Creating forks of `ffmpeg` in loop inside a shell script "loses" some iterations
19 octobre 2015, par sschaefI have a shell script that takes a directory as input, reads all
mp4
files in it and convert them to amp3
withffmpeg
:#!/bin/bash
dir=$1
while read -rd "" file
do
base=$(basename "$file")
filename=${base%(*}".mp3"
ffmpeg -i "$file" -vn -ar 44100 -ac 2 -ab 192000 -f mp3 "$filename" &
done < <(find $dir -maxdepth 1 -iname "*.mp4" -print0)
wait
exit 0Currently all these calls to
ffmpeg
are forked because when I leave out the&
at the end only the first file in converted and the others are ignored.But this is problematic because somethings this fails on some files error messages like the following :
path/to/file/file name - with spaces(info)(temp_information).mp4 : No such file or directory
All file names normally contain spaces, maybe that is the reason why it fails for some files.
Thus, I have the following questions :
- When I don’t fork the
ffmpeg
calls why is only the first file executed ? I expected that the loop waits until the process is finished and then continues with the next iteration. - Why is the script unable to find some files (maybe it is a problem of
ffmpeg
) ? - How to solve all these problems and make the script to work ?
- When I don’t fork the
-
split the video into five chunks using ffmpeg and batch script
21 janvier 2019, par RJFFI want to split videos into five chunks using ffmpeg
the first chunk represents 20% of the whole video
the second chunk represents 40% of the whole video
the third chunk represents 60% of the whole video
the fourth chunk represents 80% of the whole videothe fifth chunk represents 100% of the whole video
I write the algorithm but I do not know how to write the batch code :
1. find the duration of the video
2. store the duration in variable
3. divided the duration by 5
4. split the videoI want a batch script that takes the duration of the video then store the value of duration in the variable
this is how I can take the duration of the video
ffmpeg -i C:\video-splitter-master\1.avi 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,// | sed 's@\..*@@g' | awk '{ split($1, A, ":"); split(A[3], B, "."); print 3600*A[1] + 60*A[2] + B[1] }'
but how I can store the duration value in the variable ?
can you please help me ?