
Recherche avancée
Médias (3)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (37)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
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 (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (3735)
-
Sinon stun within ffmpeg error event listener
22 juin 2022, par Pedro Eliasconst {writeStream, upload} = S3Service.uploadStream({ Bucket: process.env.BUCKET, Key: s3Path});

 ffmpeg(stream)
 .outputOptions('-copyts')
 .audioCodec("libopus")
 .toFormat("matroska")
 .on('error', (err, stdout, stderr) => {
 if (err) {
 console.log(err.message);
 upload.abort();
 return reject("Error FFMPEG");
 }
 })
 .on('start', (p) => console.log(p))
 .on(`end`, () => console.log("end ffmpeg"))
 .pipe(writeStream);

 upload.promise()
 .then(() => resolve("Successful audio converted transfer"))
 .catch((err) => console.error(err));



I have the code above and I'm writing a unit test for it as follow :


let uploadStreamStub = {
 writeStream: sandbox.stub().returnsThis(),
 upload: {
 promise: sandbox.stub(),
 abort: sandbox.stub()
 }
}

sandbox.stub(s3Service, "uploadStream").returns(uploadStreamStub);



I'd like to stub upload.abort() :


let onStub = sandbox.stub(ffmpeg.prototype, "on").returnsThis();
onStub.withArgs("error").yieldsAsync(new Error("test"));
sandbox.assert.calledOnce(uploadStreamStub.upload.abort);



However, the stub is not working :
AssertError : expected stub to be called once but was called 0 times


When I remove the "yieldsAsync" line and try to stub the promise it works :


// onStub.withArgs("error").yieldsAsync(new Error("test"));
sandbox.assert.calledOnce(uploadStreamStub.upload.promise);



So the stub only doesn't work on('error'...


What I'm doing wrong ?


How can I stub and check if abort has been called ?


-
Sinon stub within ffmpeg error event listener
22 juin 2022, par Pedro Eliasconst {writeStream, upload} = S3Service.uploadStream({ Bucket: process.env.BUCKET, Key: s3Path});

 ffmpeg(stream)
 .outputOptions('-copyts')
 .audioCodec("libopus")
 .toFormat("matroska")
 .on('error', (err, stdout, stderr) => {
 if (err) {
 console.log(err.message);
 upload.abort();
 return reject("Error FFMPEG");
 }
 })
 .on('start', (p) => console.log(p))
 .on(`end`, () => console.log("end ffmpeg"))
 .pipe(writeStream);

 upload.promise()
 .then(() => resolve("Successful audio converted transfer"))
 .catch((err) => console.error(err));



I have the code above and I'm writing a unit test for it as follow :


let uploadStreamStub = {
 writeStream: sandbox.stub().returnsThis(),
 upload: {
 promise: sandbox.stub(),
 abort: sandbox.stub()
 }
}

sandbox.stub(s3Service, "uploadStream").returns(uploadStreamStub);



I'd like to stub upload.abort() :


let onStub = sandbox.stub(ffmpeg.prototype, "on").returnsThis();
onStub.withArgs("error").yieldsAsync(new Error("test"));
sandbox.assert.calledOnce(uploadStreamStub.upload.abort);



However, the stub is not working :
AssertError : expected stub to be called once but was called 0 times


When I remove the "yieldsAsync" line and try to stub the promise it works :


// onStub.withArgs("error").yieldsAsync(new Error("test"));
sandbox.assert.calledOnce(uploadStreamStub.upload.promise);



So the stub only doesn't work on('error'...


What I'm doing wrong ?


How can I stub and check if abort has been called ?


-
Installation of ffmpeg and others on UWAMP
5 juin 2017, par Cudexi try to install clip bucket for making a youtube clone site but the script ask to install ffmpeg and others compression tools on the server and i dont know how to do it .
Lots of online host dont allow those libs for free.
I use UWAMP but dont know how to install ffmpeg on UWAMP ...
Anyone know ?