
Recherche avancée
Autres articles (25)
-
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
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 -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)
Sur d’autres sites (6910)
-
How to enable cookies in ffmpeg HLS
13 avril 2018, par Rodrigo Amaro RevecoAnyone know how to enable cookie interaction in ffmpeg ? I have an HLS stream who need save cookies from the server , but actually that doesn’t happen.
-
Convert video to mp3 audio using ffmpeg
24 mai 2021, par Abdull Rahman AdnanI am developing an app for Android that converts video to mp3 audio using ffmpeg.
Found too many commands to convert.
The problem is that all commands work slowly on long videos.
That is 40 minutes in length.



What I want is commands that converts video to mp3 quickly.


-
NodeJS fluent-ffmpeg error : Output stream closed
30 décembre 2020, par Japser36We are running a NodeJS server that does some audio processing. Specifically, we have audio data returned by google's text to speech API, which we have in the form of a Buffer.


In our application, we have to send this audio data through FFMPEG to format it and extract audio duration. We do this by first converting it into a stream, piping it into ffmpeg, and then storing the data in an output buffer :


const toWav = function (input: Buffer): Promise<buffer> {
 return new Promise((res, rej): void => {
 const bufs = [];
 const myReadable = new Readable();
 myReadable._read = (): void => {}; // we already have all data in memory, so no-op this function;
 myReadable.push(input); // stream all data in the buffer to the stream
 myReadable.push(null); // end the stream
 const output = ffmpeg(myReadable)
 .inputFormat('mp3')
 .toFormat('wav')
 .on('start', function (commandLine) {
 console.log('SPAWNED ARG: ' + commandLine);
 })
 .on('error', (err: object): void => {
 console.error('FFMPEG error on wav transform');
 rej(err);
 })
 .on('end', (): void => {
 console.debug('FFMPEG finished wav transform');
 res(Buffer.concat(bufs));
 })
 .pipe();
 output.on('data', (d: object): void => {
 bufs.push(d);
 });
 });
};
</buffer>


This code is one of our functions that does the formatting, that our data gets passed through. Most of the time, this code works fine, but sometimes an error is thrown :


Looking up this error on google, I found an issue on the FFMPEG library we use, that seems to suggest that using an input and output stream just isn't recommended and doesn't work. Rather, one of the two needs to be a file resource.


Some more about this error, it seems to happen consistently when it does happen, but it doesn't happen consistently overall. For me, I got this error every time the code ran, I went and took lunch, and when I came back it was gone.


For us it is important that this error won't pop up randomly in production, so the question is, does anyone have any suggestions on how we can be the most certain this error won't happen ?


For completeness in how this function is being invoked to result in the error in the screenshot, the structure of the code where the error is caught is like so :


await Promise.all(
 myArray.map(async (item, idx) => {
 // ...
 const wavBuffer = await toWav(myBuffer); // toWav is invoked at this level
 })
)
.then(() => {/* ... */})
.catch((e) => {
 // ...
 logger.error('[LOOP CRASH] Error at main promise:', e);
 // ...
});



Any help would be appreciated, thank you ! Please let me know if I can provide more details, though I cannot share a repo or full source code or anything since this is a private repo.