
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (78)
-
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 (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...) -
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 (9465)
-
Revision 39957 : afficher en cas de server down + rangement dans le script
20 août 2010, par fil@… — Logafficher en cas de server down + rangement dans le script
-
ffmpeg / python script - is it actually doing anything ?
13 août 2021, par Mark CornbillI downloaded the following script - it is not my own work ; it came with another Python script which scans through a folder of Rocket League gameplay videos, looking for moments where a goal has been scored (using tesseract-OCR), and then logs the clip filename and frame into a csv file called "detected.csv".


That part has all worked now I've figured it all out ! It is the second part, this script is supposed to read the "detected.csv" list of files and frame numbers, to then trim and create the new video clips and output them to a folder. The code looks like this :


import ntpath
import os

detectedGoalList = []
f = open("detected.csv", "r")
for x in f:
 tup = x.replace("\"[", "").replace("]\"", "").split(", ")
 print(x)
 detectedGoalList.append([tup[0], tup[1]])


for dg in detectedGoalList:
 print(dg[0])
 input_file = "\"{}\"".format(dg[0].replace("'", ""))
 output_path = "../clips/" + ntpath.basename(dg[0]).replace("'", "").replace(
 ".mp4", "").replace("Rocket League®_", "").replace("Rocket League™_", "").replace("Rocket 
 League_", "") + ".clipped.mp4"
 start = (int(dg[1]) - int(30 * 10)) / 30
 if start < 0:
 start = 0
 end = (int(dg[1]) / 30) - 3
 duration = end - start

 os.system("ffmpeg -ss {} -i {} -t {} -c copy {}".format(start, input_file,
 duration, output_path))



The script runs instantly and returns no errors. It doesn't log anything to the terminal. It doesn't output any new clips. I have 5 mp4 files in the "clips" directory that match in the csv file exactly. The "detected.csv" file contains the following :


"['K:/Gameplay Videos/Rocket League/goals/clips\\goal(2).mp4', 1750]"
"['K:/Gameplay Videos/Rocket League/goals/clips\\goal(28).mp4', 1200]"
"['K:/Gameplay Videos/Rocket League/goals/clips\\goal(3).mp4', 3350]"
"['K:/Gameplay Videos/Rocket League/goals/clips\\goal(4).mp4', 3050]"
"['K:/Gameplay Videos/Rocket League/goals/clips\\goal(5).mp4', 3500]"



So I'm pretty sure that the final ffmpeg line is the culprit. I understand basic command line ffmpeg syntax but when it's part of Python code and variables I just can't figure it out. I see reference to the number "30" a lot - maybe the guy who wrote this had 30fps videos as his source (they were after all Playstation replays), I have 60fps videos. I've tried changing those numbers to 60 to no avail.


-
Powershell script finishes after the first ffmpeg call
25 mars 2014, par sk904861The following Powershell script only executes the first ffmpeg call, no matter which one is first. Both the ffmpeg and the powershell processes never finish. Stopping the server, however, leads to the processes finishing and suddenly the second picture also appears.
Param($InputFile, $OutputFile, $Thumbnail, $Sprites)
$ThumbnailWidth = 120
$ThumbnailHeight = 120
# Thumbnail
ffmpeg -i $InputFile -f image2 -vframes 1 -filter:v "crop=min(iw\,ih):min(iw\,ih), scale=$($ThumbnailWidth):$($ThumbnailHeight)" -crf 18 "$($Thumbnail)\150x150.png"
# Poster
ffmpeg -i $InputFile -f image2 -vframes 1 -filter:v "crop=min(iw\,ih):min(iw\,ih), scale=$($PosterWidth):$($PosterHeight)" -crf 18 "$($Thumbnail)\1000x1000.png"The script gets called within an ASP.NET application as follows :
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "powershell.exe";
startInfo.Arguments = String.Format("-executionpolicy RemoteSigned -file \"{0}\" \"{1}\" \"{2}\" \"{3}\" \"{4}\"", scriptPath, fullPath, videoPath, thumbnailPath, sprites);
startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardError = true;
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = true;
Process process = new Process();
process.StartInfo = startInfo;
process.EnableRaisingEvents = true;
process.Exited += delegate
{
// Do some cleaning up
};
process.Start();Does anyone have a clue, why only the first the two ffmpeg calls is working, while each call seems to be correct ?
Adding
process.StandardError.ReadToEnd();
makes the script finish as expected, but also makes it block, which is not acceptable.