
Recherche avancée
Médias (1)
-
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 (89)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
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 (14943)
-
Opencv cv2.VideoCapture('file.avi') shows first frame then throws exception
3 novembre 2014, par holografixI’m trying to read a .avi included in the OpenCV original package, it’s called 768x576.avi and shows a few people walking around a street.
The code below shows what seems to be the 1st frame and runs for a few seconds before returning an Exception.
import cv2
cap = cv2.VideoCapture('768x576.avi')
cap.isOpened() # returns True
cap.get(3); cap.get(4) # returns 768 and 576
while (True):
ret, frame = cap.read()
cv2.imshow('frame', frame)Hands me this error after a few secs on the cv2.imshow line, I think it means the returned frame had no data associated it in.
error: /tmp/opencv-7y6HHt/opencv-2.4.9/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow
I have no idea why this is happening, I’m running Yosemite, brew installed Python, OpenCv and Ffmpeg.
opencv: stable 2.4.9, HEAD
http://opencv.org/
/usr/local/Cellar/opencv/2.4.9 (219 files, 38M) *
ffmpeg: stable 2.4.2 (bottled), HEAD
https://ffmpeg.org/
/usr/local/Cellar/ffmpeg/2.4.2 (199 files, 40M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/ffmpeg.rb
==> Dependencies
Build: pkg-config ✔, texi2html ✘, yasm ✘
Recommended: x264 ✔, faac ✔, lame ✔, xvid ✔ -
failed to set frame number in opencv in cpp
28 février 2018, par Madhu NadendlaI am trying to set frame position of opened videofile using OpenCV in C++ but it returns 0.
solution 1
bool success = capture.set(CV_CAP_PROP_POS_FRAMES, noFrame);
double frameRate = capture.get(CV_CAP_PROP_FPS); -
Ffmpeg output stream closed
29 novembre 2023, par excaliburThere is one problem in my code that uses ffmpeg to convert webm videos to mp4 and set duration to 10 seconds, it works well but, sometimes returns "output Stream closed" error. What can be a reason of this problem, and how can i solve it ?


My code :


async convertWebmVideoToMp4(buffer: any) {
 try {
 return new Promise((resolve, reject) => {
 const videoMp4Buffer = Buffer.from(buffer);

 const readable = Readable.from(videoMp4Buffer);

 const outputBuffer = [];

 const outputStream = new Writable({
 write(chunk, encoding, callback) {
 outputBuffer.push(chunk);
 callback();
 },
 });

 const ffmpegProcess = ffmpeg()
 .input(readable)
 .outputFormat('mp4')
 .videoCodec('libx264')
 .audioCodec('aac')
 .duration(10)
 .outputOptions([
 '-movflags frag_keyframe+empty_moov',
 '-preset ultrafast',
 '-c:a aac',
 '-r 30',
 '-tune fastdecode',
 ])
 .on('end', () => {
 outputStream.end();
 const finalOutputBuffer = Buffer.concat(outputBuffer);
 resolve(finalOutputBuffer);
 })
 .on('error', (err, stdout, stderr) => {
 console.error(err);
 reject(err);
 });

 outputStream.on('error', err => {
 this.logger.error(err);
 });

 ffmpegProcess.pipe(outputStream, { end: true });
 });
 } catch (error) {
 throw error;
 }
}



My code should return the buffer of video that type is mp4 and length is 10 seconds, but it returns "output stream closed" error.