
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (48)
-
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (5463)
-
How To Install FFMPEG on Elastic Beanstalk
13 avril 2017, par Nick LynchThis is not a duplicate, I have found one thread, and it is outdated and does not work :
Install ffmpeg on elastic beanstalk using ebextensions config.I have been trying to install this for some time, nothing seems to work.
Please share the config.yml that will make this work.I am using 64bit Amazon Linux 2016.03 v2.1.6 running PHP 7.0 on Elastic Beanstalk
My current file is
branch-defaults:
default:
environment: Default-Environment
master:
environment: Default-Environment
global:
application_name: "My First Elastic Beanstalk Application"
default_ec2_keyname: ~
default_platform: "64bit Amazon Linux 2016.03 v2.1.6 running PHP 7.0"
default_region: us-east-1
profile: eb-cli
sc: git
packages: ~
yum:
ImageMagick: []
ImageMagick-devel: []
commands:
01-wget:
command: "wget -O /tmp/ffmpeg.tar.gz http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-03-05.tar.gz"
02-mkdir:
command: "if [ ! -d /opt/ffmpeg ] ; then mkdir -p /opt/ffmpeg; fi"
03-tar:
command: "tar -xzf ffmpeg.tar.gz -C /opt/ffmpeg"
cwd: /tmp
04-ln:
command: "if [[ ! -f /usr/bin/ffmpeg ]] ; then ln -s /opt/ffmpeg/ffmpeg /usr/bin/ffmpeg; fi"
05-ln:
command: "if [[ ! -f /usr/bin/ffprobe ]] ; then ln -s /opt/ffmpeg/ffprobe /usr/bin/ffprobe; fi"
06-pecl:
command: "if [ `pecl list | grep imagick` ] ; then pecl install -f imagick; fi" -
'ffmpeg' is not recognized as an internal or external command in Hapi js(Node js)
15 mai 2020, par EswarI want to add on watermark image to while uploading a video. I tried to use node ffmpeg but unluckily the git base command line says *"ffmpeg"** not recognized.



'ffmpeg' is not recognized as an internal or external command,operable program or batch file.



const createVideoWatermark = async () =>{
 try {
 const ffmpeg = require("ffmpeg");
 var process = new ffmpeg('./uploads/video1.mp4');
 process.then(async function (video) {
 console.log('The video is ready to be processed');
 var watermarkPath = './uploads/watermark.jpg',
 newFilepath = './uploads/video-com-watermark.mp4',
 settings = {
 position : "SE" // Position: NE NC NW SE SC SW C CE CW
 , margin_nord : null // Margin nord
 , margin_sud : null // Margin sud
 , margin_east : null // Margin east
 , margin_west : null // Margin west
 };
 var callback = async function (error, files) {
 if(error){
 console.log('ERROR: ', error);
 }
 else{
 console.log('Waiting', files);
 }
 }
 //add watermark
 await video.fnAddWatermark(watermarkPath, newFilepath, settings, callback);
 return watermarkPath; 
 }, function (err) {
 console.log('Error: ' + err);
 return err;
 });
 } catch (e) {
 console.log(e.code);
 console.log(e.msg);
 return e.msg;
 }




}



Please help me to solve this. I am not sure where i did the mistake. Kindly correct me guys.


-
AWS Lambda in Node JS with FFMPEG Lambda Layer
29 mars 2023, par mwcwge23I'm trying to make a Lambda that takes a video and puts a watermark image on it.
I'm using Lambda with NodeJS and FFMPEG Lambda Layer I took from here :
https://serverlessrepo.aws.amazon.com/applications/us-east-1/145266761615/ffmpeg-lambda-layer


I got these two errors and I don't have a clue what do I did wrong :
errors


Please help me :)


(by the way, if you have an easier solution to put a watermark image on video that'll also be great)


That's my code (trying to put a watermark image on a video file) :


const express = require("express");
const childProcess = require("child_process");
const path = require("path");
const fs = require("fs");
const util = require("util");
const os = require("os");
const { fileURLToPath } = require("url");
const { v4: uuidv4 } = require("uuid");
const bodyParser = require("body-parser");
const awsServerlessExpressMiddleware = require("aws-serverless-express/middleware");
const AWS = require("aws-sdk");
const workdir = os.tmpdir();

const s3 = new AWS.S3();

// declare a new express app
const app = express();
app.use(bodyParser.json());
app.use(awsServerlessExpressMiddleware.eventContext());

// Enable CORS for all methods
app.use(function (req, res, next) {
 res.header("Access-Control-Allow-Origin", "*");
 res.header("Access-Control-Allow-Headers", "*");
 next();
});

const downloadFileFromS3 = function (bucket, fileKey, filePath) {
 "use strict";
 console.log("downloading", bucket, fileKey, filePath);
 return new Promise(function (resolve, reject) {
 const file = fs.createWriteStream(filePath),
 stream = s3
 .getObject({
 Bucket: bucket,
 Key: fileKey,
 })
 .createReadStream();
 stream.on("error", reject);
 file.on("error", reject);
 file.on("finish", function () {
 console.log("downloaded", bucket, fileKey);
 resolve(filePath);
 });
 stream.pipe(file);
 });
};

const uploadFileToS3 = function (bucket, fileKey, filePath, contentType) {
 "use strict";
 console.log("uploading", bucket, fileKey, filePath);
 return s3
 .upload({
 Bucket: bucket,
 Key: fileKey,
 Body: fs.createReadStream(filePath),
 ACL: "private",
 ContentType: contentType,
 })
 .promise();
};

const spawnPromise = function (command, argsarray, envOptions) {
 return new Promise((resolve, reject) => {
 console.log("executing", command, argsarray.join(" "));
 const childProc = childProcess.spawn(
 command,
 argsarray,
 envOptions || { env: process.env, cwd: process.cwd() }
 ),
 resultBuffers = [];
 childProc.stdout.on("data", (buffer) => {
 console.log(buffer.toString());
 resultBuffers.push(buffer);
 });
 childProc.stderr.on("data", (buffer) => console.error(buffer.toString()));
 childProc.on("exit", (code, signal) => {
 console.log(`${command} completed with ${code}:${signal}`);
 if (code || signal) {
 reject(`${command} failed with ${code || signal}`);
 } else {
 resolve(Buffer.concat(resultBuffers).toString().trim());
 }
 });
 });
};

app.post("/api/addWatermark", async (req, res) => {
 try {
 const bucketName = "bucketName ";
 const uniqeName = uuidv4() + Date.now();
 const outputPath = path.join(workdir, uniqeName + ".mp4");
 const key = "file_example_MP4_480_1_5MG.mp4";
 const localFilePath = path.join(workdir, key);
 const watermarkPngKey = "watermark.png";
 const watermarkLocalFilePath = path.join(workdir, watermarkPngKey);

 downloadFileFromS3(bucketName, key, localFilePath)
 .then(() => {
 downloadFileFromS3(bucketName, watermarkPngKey, watermarkLocalFilePath)
 .then(() => {
 fs.readFile(localFilePath, (err, data) => {
 if (!err && data) {
 console.log("successsss111");
 }
 });
 fs.readFile(watermarkLocalFilePath, (err, data) => {
 if (!err && data) {
 console.log("successsss222");
 }
 });

 fs.readFile(outputPath, (err, data) => {
 if (!err && data) {
 console.log("successsss3333");
 }
 });

 spawnPromise(
 "/opt/bin/ffmpeg",
 [
 "-i",
 localFilePath,
 "-i",
 watermarkLocalFilePath,
 "-filter_complex",
 `[1]format=rgba,colorchannelmixer=aa=0.5[logo];[0][logo]overlay=5:H-h-5:format=auto,format=yuv420p`,
 "-c:a",
 "copy",
 outputPath,
 ],
 { env: process.env, cwd: workdir }
 )
 .then(() => {
 uploadFileToS3(
 bucketName,
 uniqeName + ".mp4",
 outputPath,
 "mp4"
 );
 });
 });
 });
 } catch (err) {
 console.log({ err });
 res.json({ err });
 }
});

app.listen(8136, function () {
 console.log("App started");
});

module.exports = app;