
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (111)
-
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 (...) -
Que fait exactement ce script ?
18 janvier 2011, parCe script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
Installation de dépendances de MediaSPIP
Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...) -
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 (9055)
-
Matomo Launches Global Partner Programme to Deepen Local Connections and Champion Ethical Analytics
25 juin, par Matomo Core Team — Press Releases -
How to install Ffmpeg fluent in LAMBDA ?
9 octobre 2020, par Jhony codeHi, can you help how did you set up the library (node-fluent-ffmpeg) in a lambda function correctly ?


Because i already set up the :


- 

- Serverless file with it's layer parameters
- Uploaded the binaries to the lambda function as a layer
- Already set up the FFPROBE_PATH AND FFMPEG_PATH from the lambda function








Also the weird thing is that : the lambda function just finish working, like sending a normal response.


https://user-images.githubusercontent.com/35440957/95387637-ff99a580-08be-11eb-9fc9-1498aea2e2c1.png


I mean also if you could show me step by step how did you make it work in a lambda function ?


You will see the following example of how i have everything setup and it still does not work :


1- This is from the lambda console


https://user-images.githubusercontent.com/35440957/95386867-ee03ce00-08bd-11eb-91ae-29b45bd90471.png


https://user-images.githubusercontent.com/35440957/95386217-f60f3e00-08bc-11eb-9fd8-b51d1b04a81e.png


2- My json dependencies


"dependencies": {
 "aws-sdk": "^2.764.0",
 "aws-serverless-express": "^3.3.8",
 "fluent-ffmpeg": "^2.1.2",
 "lambduh-execute": "^1.3.0"
 }



3- My serverless file


`service: functionName

provider:
 name: aws
 runtime: nodejs12.x
 memorySize: 3008
 timeout: 300
 stage: live
 region: us-east-1
 environment:
 FFMPEG_PATH: /opt/ffmpeg/ffmpeg
 FFPROBE_PATH: /opt/ffmpeg/ffprobe

functions:
 api:
 handler: lambda.handler
 events:
 - s3: ${self:custom.bucket}
 layers:
 - { Ref: FfmpegLambdaLayer }

layers:
 ffmpeg:
 path: layer

custom:
 bucket: buckename




4- The directory of the layer


https://user-images.githubusercontent.com/35440957/95386502-6918b480-08bd-11eb-95e6-1b0b78f3a230.png


5- Javascript file



const fs = require("fs");
const AWS = require("aws-sdk");
const ffmpeg = require("fluent-ffmpeg");
const s3 = new AWS.S3();

exports.handler = async (event, context, callback) => {

ffmpeg({
 source: `**Object file which i already verified it exists**`
 })
 .on("filenames", async (filenames) => {
 console.log("Uploading please wait");
 })
 .on("error", function (err) {
 console.log("Error in filenames section: " + JSON.stringify(err));
 })
 .on("end", function () {
 console.log("Screenshots taken");
 })
 .screenshots({
 count: 10,
 folder: "tmp/",
 filename: "thumbnail-at-%i.png",
 size: "1600x900",
 })
 .on("end", function (stdout, stderr) {


 })
 .on("error", function (err) {
 console.log("Error writing video to disk: " + JSON.stringify(err));
 throw "An error: " + err.message;
 });

};




Expected results


The dependecy must work as expected in a AWS lambda function.


Observed results


When using enviroment variables


https://user-images.githubusercontent.com/35440957/95548905-154cbf00-09d4-11eb-8f46-f06cd012b05b.png


When not using enviroment variables


Lambda function just finish it's job without showing any log (Error) messages
In the cloudwatch console it just show the log that lambda finished de function succesfully (Not the expected from the dependency)


I already used this dependecy locally, and it works ! but in LAMBDA it is too hard


Checklist


- 

- [ X] I have read the FAQ
- [ X] I have included full stderr/stdout output from ffmpeg
- [ X] I have included the binaries from the static build and deployed it to the lambda function
- [ X] I have set the enviroment variables
FFMPEG_PATH : /opt/ffmpeg/ffmpeg
FFPROBE_PATH : /opt/ffmpeg/ffprobe










Version information


- 

- fluent-ffmpeg version : ^2.1.2
- ffmpeg version or build : ffmpeg-git-20190925-amd64-static.tar.xz
- OS : Lambda (Linux enviroment) / Node 12.x








-
A Guide to Bank Customer Segmentation
18 juillet 2024, par Erin