
Recherche avancée
Autres articles (39)
-
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...)
Sur d’autres sites (6678)
-
AWS Lambda function, API gateway and ffmpeg timeout issue
3 novembre 2022, par Georgi StoyanovI have created a lambda function, that is extracting the audio stream from a video file using
ffmpeg
. I have also configured API gateway as a trigger, where I am passing the file to the lambda function in the request body.

The lambda function is working perfectly well with small files, but with bigger files, it needs a bit more time and then I am running into the API gateway timeout, which according to my understanding is set to 29 seconds max.


So when I trigger audio extraction from a bigger file, I am hitting this timeout and my API request fails to return any result even though the transcoding still runs in the background and the file is extracted, so I was wondering what is the best approach to handle those cases, where the execution of the lambda function is taking longer ?


I was thinking to start the transcoding in the background and simply return a JSON with a message that the transcoding might take a couple of minutes, depending on the input file duration, but if I try to push the
ffmpeg
to the background I am being presented with an error, that the destination file doesn't exist.

os.system(f"{ffmpeg} -loglevel panic -nostdin -i {in_video} -vn -c:a aac -ar 48000 -b:a 192K {out_audio} 2> /dev/null &")



This is the
ffmpeg
command extracting the audio and transcoding it to AAC.

If I remove the
2> /dev/null &
part of the command, it runs just fine, but if I keep it, I get an error :



"errorMessage" : "[Errno 2] No such file or directory : 'output_audio.aac'"






"errorType" : "FileNotFoundError"




So I was wondering what is the preferred way to run processes in the background.


-
Securely using the PHP exec function
19 janvier 2012, par siberiantigerI am writing a PHP script designed to run an executable file (ffmpeg.exe) via the exec() function. The problem is that I have read that using the exec() function can be a security risk and should be avoided if possible. I have been doing some research into how to run the exec() function securely, and the only thing that I keep coming across is to filter the command string with escapeshellcmd or escapeshellarg. What I want to know is if it is possible to further increase security when using the exec() function or if there is a secure alternative to exec(). Any help would be appreciated.
Here is my code ;
define('FFMPEG_LIBRARY', 'c:\\ffmpeg7\\ffmpeg\\bin\\ffmpeg ');
$transcode_string = FFMPEG_LIBRARY." -i " . $srcFile . " -acodec libmp3lame -ab 64k -ar 22050 -ac 1 -vcodec libx264 -b:v 250k -r 30 -f flv -y " . $destFile;
$transcode_string = escapeshellcmd($transcode_string);
exec($transcode_string);$srcFile is basically the video for transcoding while $destFile is the output file I wish to create.
-
How to upload and overlay animation.html file from system and overlay over video in HTML or ANGULAR
23 septembre 2020, par HirenHey I am trying to build an app which has a functionality of allowing a user to upload a pre-existing .HTML file from his system which contains a simple animation init


I want to get that file and overlay the animation contained in .HTML file on my video and display it to the user.


is that possible please help me if it is.




body {
 background: #;
}

#fullScreenBox {
 height: 500px;
 width: 50%;
 background: #;
 position: absolute;
 top: 0;
 bottom: 0;
 left: 0;
 right: 0;
 margin: auto;
}

#hiddenBox {
 width: 50%;
 height: 500px;
 background: #;
 position: absolute;
 top: 0;
 bottom: 0;
 left: 0;
 right: 0;
 margin: auto;
 overflow: hidden;
}

#title {
 width: 100%;
 height: 150px;
 background: #;
 /*U can also use #*/
 position: absolute;
 top: 200px;
 font-family: arial;
 font-size: 50px;
 color: white;
 text-align: center;
 opacity: 0;
}

#subtitle {
 width: 100%;
 height: 50px;
 background: #;
 /*U can also use #*/
 position: absolute;
 top: 300px;
 font-family: arial;
 font-size: 50px;
 color: red;
 text-align: center;
 opacity: 0;
}

#line01 {
 width: 25%;
 height: 4px;
 background: white;
 /*U can also use #*/
 position: absolute;
 top: 50px;
 bottom: 0;
 left: 0;
 right: 0;
 margin: auto;
 color: white;
 opacity: 0;
}

#overlay {
 position: absolute;
 color: #FFF;
 text-align: center;
 font-size: 20px;
 padding: 10px 0;
 width: 50%;
 height: 500px;
 background: #;
 top: 0;
 bottom: 0;
 left: 0;
 right: 0;
 margin: auto;
}

#v {
 height: 500px;
 width: 100%;
}




 <div>
 <div class="">
 <div class="webvfx" data-animate="'{
">
 LONDON
 </div>
 <div class="webvfx" data-animate="'{
">

 </div>

 <div class="webvfx" data-animate="'{
">
 City of Dreams!
 </div>
 </div>
</div>







This is my HTML file that contains a simple animation for example which is in user system


In my application when user upload this file i want to overlay the animation contained in this file on the video as he uploads it is these any way
Thank you