
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (63)
-
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 (...) -
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 (...)
Sur d’autres sites (8818)
-
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. -
FFMPEG script to merge all files in a list and make a 1920x1080p 60fps mp4 video
28 février 2021, par BitBitI have a list of 46 videos in a text file. I tried the concat method to merge all of them, which worked but the quality is very poor and the audio is bugged/missing at parts.

Can someone please help me with a script to merge all 46 videos and the output to be 1920x1080 60fps mp4 video ?