
Recherche avancée
Autres articles (35)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
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 (4692)
-
How to access uploaded file from multer ?
13 avril 2017, par SomenameIm able to upload an image to
S3
. Now, if the file selected is.gif
, I want to be able to convert the.gif
file to.mp4
and upload the converted file toS3
. I am able to convert a.gif
to.mp4
withffmpeg
only if I give the path of the file. How do I access the uploaded file fromMulter
? Below is my code :var express = require('express');
var bodyParser = require('body-parser');
var app = express();
var aws = require('aws-sdk');
var multer = require('multer');
var multerS3 = require('multer-s3');
var s3 = new aws.S3();
var ffmpeg = require('fluent-ffmpeg');
var upload = multer({
storage: multerS3({
s3: s3,
bucket: 'myBucket',
key: function (req, file, cb) {
console.log(file);
var extension = file.originalname.substring(file.originalname.lastIndexOf('.')+1).toLowerCase();
if(extension=="gif"){
console.log("Uploaded a .gif file");
ffmpeg(file) //THIS IS NOT WORKING
.setFfmpegPath("C:\\ffmpeg\\bin\\ffmpeg.exe")
.output('./outputs/2.mp4') //TRYING TO UPLOAD LOCALLY, WHICH FAILS
.on('end', function() {
console.log('Finished processing');
})
.run();
}
cb(null, filename);
}
})
});I’m trying to access the uploaded file like this :
ffmpeg(file)
sincefile
is an argument passed in themulter
function.My form :
<form action="/upload" method="post" enctype="multipart/form-data">
<input type="file" /> <br />
<input type="submit" value="Upload" />
</form>In which part of the process do I convert the file ?
Please help. Many thanks.
-
FFmpeg not closing output file
2 février 2016, par peugasI’m using FFmpeg to write video frames to a file.
So far I’m able to create an output file, grab my frames from a camera, encode the frames, write them and close the output file.
Everything works great except that I need to close my program for the output file to be available to be played. Closing the file is not enough.
If I don’t close my program the output file shows as a 0KB file.
This is my output file closing code :
if (outContext)
{
int ret = av_write_frame(outContext, NULL);
ret = av_write_trailer(outContext);
if (outContext->pb)
{
av_freep(&outContext->pb->buffer);
av_freep(&outContext->pb);
avio_close(outContext->pb);
}
avformat_free_context(outContext);
}Am I forgetting to free/close anything ?
-
Segment Broadcast WAVE file with FFMPEG
4 octobre 2018, par yekootmadaI have a Broadcast WAV file that is duration 4 hours with a timecode track starting at 00:00:00 and ending at 04:00:00 (obviously).
I need to extract a section of the file, for example from 01:45:00 to 03:55:00 whilst maintaining the original timecode data for that section of the file.
When i run this FFMPEG script, I get the correction section of the file in "out.wav", however the start timecode of the file is always 00:00:00, and not 01:45:00 as you would expect.
Here is my current code :
ffmpeg -ss 01:45:00 -i in.wav -to 03:55:00 -c copy -write_bext 1 out.wav
How do you tell ffmpeg to take the timecode data from the section of the file and not copy it from the beginning ?
Thanks a lot, hope that is clear.