
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
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 (90)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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
Sur d’autres sites (8792)
-
How to decode the video stream of an mp4 file and save the decoded images to local directory in NodeJs
8 août 2018, par Rohit VermaHow to decode the video stream of an mp4 file and save the decoded images to local directory in NodeJs. I have tried ffmpeg and fluent ffmpeg but didn’t get clear idea how to use,As I was getting error while using fluent ffmpeg
Code snippet :
const ffmpeg = require('fluent-ffmpeg')
const probe = require('ffmpeg-probe')
const info = await probe('input.mp4')and in case of ffmpeg I have tried this,
var ffmpeg = require('ffmpeg');
try {
var process = new ffmpeg("VID_20160805_121411556.mp4");
process.then(function (video) {
// Callback mode
video.fnExtractFrameToJPG('C:/Users/PcName/Documents', {
frame_rate : 1,
number : 5,
file_name : 'my_frame_%t_%s'
}, function (error, files) {
if (!error)
console.log('Frames: ' + files);
});
}, function (err) {
console.log('Error: ' + err);
});
} catch (e) {
console.log(e.code);
console.log(e.msg);
}Nothing is working and I didn’t get any clue how to do so.
-
Invalid data when processing input ogg in ffmpeg
23 mars 2023, par Albert Gomáriz SanchaI am getting an ogg file and I am trying to convert it to a mopo3 file using fluent-ffmpef node library. When trying to convert it, then this error is shown :** An error occurred : Error : ffmpeg exited with code 1 : pipe:0 : Invalid data found when processing input**.


Can someone help me please ?


This is my code :


const input = createReadStream(getPath("temp.ogg"));
 // console.log(input);
 // ffmpeg.setFfmpegPath(ffmpegPath);

 // const output = createWriteStream(getPath("temp.mp3"));
 // spawn(`ffmpeg -i ${getPath("temp.ogg")} ${getPath("temp.mp3")}`);
 ffmpeg(input)
 .setFfmpegPath(ffmpegPath)
 .toFormat("wav")
 .on("data", (data) => {})
 .on("error", (err) => {
 console.log("An error occurred: " + err);
 })
 .on("progress", (progress) => {
 // console.log(JSON.stringify(progress));
 console.log("Processing: " + progress.targetSize + " KB converted");
 })
 .on("end", () => {
 console.log("Processing finished !");
 })
 .save(getPath("temp.mp3")); //path where you want to save your file



-
AWS Lambda for generate thumbnail save empty file
30 octobre 2019, par MilouselI need to create aws lambda for creating thumbnail from video by using ffmpeg, which is saved on S3 and this thumbnail saved into S3 too.
I downloaded ffmpeg from https://johnvansickle.com/ffmpeg/ page, set ffmpeg into nodejs file and send it into .zip. From this zip file I created ffmpeg layer. After that I connect my lambda with this ffmpeg layer. When I test it I receive Success response, but I save empty file (0 B size) into S3.
const AWS = require("aws-sdk");
const { spawn } = require("child_process");
const { createReadStream, createWriteStream } = require("fs");
const s3 = new AWS.S3();
const ffmpegPath = "/opt/nodejs/ffmpeg";
const allowedTypes = ["mov", "mpg", "mpeg", "mp4", "wmv", "avi", "webm"];
const width = process.env.WIDTH;
const height = process.env.HEIGHT;
module.exports.handler = async (event, context) => {
const srcKey = "test/0255f240-efef-11e9-862e-3949600f0ec9.mp4";
const bucket = "video.devel.abc.com";
const target = s3.getSignedUrl("getObject", {
Bucket: bucket,
Key: srcKey,
Expires: 1000
});
let fileType = "mp4";
console.log("srcKey: " + srcKey);
console.log("bucket: " + bucket);
console.log("target: " + target);
if (!fileType) {
throw new Error(`invalid file type found for key: ${srcKey}`);
}
if (allowedTypes.indexOf(fileType) === -1) {
throw new Error(`filetype: ${fileType} is not an allowed type`);
}
function createImage(seek) {
return new Promise((resolve, reject) => {
let tmpFile = createWriteStream(`/tmp/screenshot.jpg`);
const ffmpeg = spawn(ffmpegPath, [
"-ss",
seek,
"-i",
target,
"-vf",
`thumbnail,scale=${width}:${height}`,
"-qscale:v",
"2",
"-frames:v",
"1",
"-f",
"image2",
"-c:v",
"mjpeg",
"pipe:1"
]);
ffmpeg.stdout.pipe(tmpFile);
ffmpeg.on("close", function(code) {
console.log('code: ' + code);
tmpFile.end();
resolve();
});
ffmpeg.on("error", function(err) {
console.log(err);
reject();
});
});
}
function uploadToS3() {
return new Promise((resolve, reject) => {
let tmpFile = createReadStream(`/tmp/screenshot.jpg`);
let dstKey = srcKey
.replace(/\.\w+$/, `.jpg`)
.replace("test/", "test/shots/");
//const screensFile = "test/shots/";
console.log("dstKey: " + dstKey);
var params = {
Bucket: bucket,
Key: dstKey,
Body: tmpFile,
ContentType: `image/jpg`
};
s3.upload(params, function(err, data) {
if (err) {
console.log(err);
reject();
}
console.log(`successful upload to ${bucket}/${dstKey}`);
resolve();
});
});
}
await createImage(1);
await uploadToS3();
return console.log(`processed ${bucket}/${srcKey} successfully`);
};When I test it I receive these logs :
- srcKey : test/0255f240-efef-11e9-862e-3949600f0ec9.mp4
- bucket : video.devel.abc.com
- INFO processed video.devel.abc.com successfully
- code : 1
- bucket : video.devel.abc.com
- dstKey : test/shots/0255f240-efef-11e9-862e-3949600f0ec9.jpg
- successful upload to video.devel.abc.com/test/shots/0255f240-efef-11e9-862e-3949600f0ec9.jpg
- processed video.devel.abc.com/test/0255f240-efef-11e9-862e-3949600f0ec9.mp4 successfully
So file is really created, but it is empty (size is 0 B), which is not ideal.