
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (38)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (4184)
-
NodeJS - piping multiple FFMPEG processes
8 février 2017, par AlaskaI am trying to programm an converter which can take any video source and convert it to mp3. The mp3 should be saved on my hard drive, or in an buffer to send it via telegram.
It works good so far, the only problem I am facing is that it can only take one video at a time, and I don’t know why.
// IMPORTS
var fs = require('fs');
var https = require('https');
var child_process = require('child_process');
// EVENTEMITER (Not used so far)
var util = require('util');
var EventEmitter = require('events').EventEmitter;
// STREAMHANDLER
var StreamHandler = function(url, name){
// VARIABLES
self = this;
this.url = url;
this.name = name;
// CREATE FFMPEG PROCESS
var spawn = child_process.spawn;
var args = ['-i', 'pipe:0', '-f', 'mp3', '-ac', '2', '-ab', '128k', '-acodec', 'libmp3lame', 'pipe:1'];
this.ffmpeg = spawn('ffmpeg', args);
// GRAB STREAM
https.get(url, function(res) {
res.pipe(self.ffmpeg.stdin);
});
// WRITE TO FILE
this.ffmpeg.stdout.pipe(fs.createWriteStream(name));
//DEBUG
this.ffmpeg.stdout.on("data", function (data) {
console.error(self.name);
});
}
util.inherits(StreamHandler, EventEmitter);
// TESTING
var test1 = new StreamHandler(vidUrl, "test1.mp3");
test1.ffmpeg.on("exit", function (code, name, signal) {
console.log("Finished: " + test1.name);
});
var test2 = new StreamHandler(vidUrl, "test2.mp3");
test2.ffmpeg.on("exit", function (code, name, signal) {
console.log("Finished: " + test2.name);
});It skips test1.mp3 and only converts test2.mp3, but 2 ffmpeg processes were created :
After test2.mp3 is converted the other ffmpeg thread stays open, but does nothing, and the node program gets stuck waiting (i guess so) for it to send something.
I hope someone can help me :)
-
NodeJS server that converts m4a audio blobs into mp3 files works locally, but not on server
14 juillet 2023, par Joris508I'm experiencing issues when running my NodeJS server on a remote host. The server is supposed to convert webm and m4a audio files to mp3 files using the ffmpeg-installer and fluent-ffmpeg (npm) packages.


The original files are created using the MediaRecorder Web API. Chrome supports the 'audio/webm' (webm) mimeType, but Safari only supports 'audio/mp4' (m4a). When I run my node server locally, it converts both the m4a files and the webm files just fine. When I host my node server, the webm files are converted without problems, but the m4a files specifically return as 1 second audio files. They're all 8398 bytes in size. You can hear the start of the recording in the 1 second file as well. I'm completely lost on what the issue could be, especially since it works fine when the node server runs locally (through the terminal).


Does anyone have any ideas ? I checked both the node version as well as all the packages ; they are identical. The server doesn't give any errors or feedback. It behaves as if everything is going fine.


I simplified the code and selected just the part that converts the file. Here's the code that converts the m4a file to an mp3. It's triggered 2 seconds after the server starts up (the file is already there on startup in this testing scenario) :


const convertFunc = () => {
 ffmpeg('./public/testfile.m4a')
 .output('./public/testfile.mp3')
 .on('error', (err) => {
 console.error('Error: ' + err.message);
 })
 .on('end', () => {
 console.log('Conversion completed successfully');
 })
 .run()
}



-
Generate a thumbnail from a stream with NodeJs
12 octobre 2020, par Pedro ZenhaSo I've been banging my head with this issue that I'm facing at the moment. Basically my Node API is handling video/images upload and saving those to a S3 bucket. What I want to do now is generate a thumbnail for each of the uploaded videos and also save them to the S3.


I'm using FFMPEG to generate the thumbnails, more specifically the 'simple-thumbnail' package [https://github.com/ScottyFillups/simple-thumbnail][1]


The problem is that I cannot pass a readable Stream as an argument, if I pass the S3 URL for the video it generates the thumbnail but if I pass the input stream of the same video it just gets stuck with no errors. Also FFMPEG does not accept readable Streams to its method "screenshots" that is meant to generate thumbnails.


thumbS3 = createWriteStorage(`tmp/thumbnail-${upload._id}-${filename}`, {'Content-Type': 'image/png'})
 try{
 await genThumbnail(source,thumbS3,'250x?')
 }catch(err){
 console.log(err)
 }



I also tried the following according to the package documentation :


source.pipe(genThumbnail(null,null,'250x?')).pipe(thumbS3)



But get the following error :


Error: write EPIPE
 at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)
Emitted 'error' event on Duplexify instance at:
 at errorOrDestroy (internal/streams/destroy.js:108:12)
 at Duplexify.onerror (_stream_readable.js:752:7)
 at Duplexify.emit (events.js:315:20)
 at Duplexify.EventEmitter.emit (domain.js:483:12)



I also tried using only FFMPEG but dont really understand why it doesnt work and why it doesnt return any type of error


const args = [
 '-vframes 1',
 `~/output/image4.jpg`
 ]
 ffmpeg(input)
 .inputOptions(args)
 .then((thumb) => console.log(thumb))
 .catch((err) => console.log(err))



If someone knows how to work with readable streams to generate thumbails I would appreciate a lot. Thank you
[1] : https://github.com/ScottyFillups/simple-thumbnail