
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (97)
-
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 (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 is the first MediaSPIP stable release.
Its official release date is June 21, 2013 and is announced here.
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (14711)
-
Getting "OSError : [Errno 32] Broken pipe" while saving a numpy array using imageio.mimwrite into io.BytesIO() object
10 novembre 2020, par green_hunter434I am trying to save a numpy array (array of frames) as a video using imageio.mimwrite .


Operation like this works fine -


imageio.mimwrite('./temp4.mp4', frames, fps=fps, format='.mp4')



But, when I try something like this -


fo = io.BytesIO()
imageio.mimwrite(fo, frames, fps=fps, format='.mp4')



OR


writer = imageio.get_writer(fo, fps=fps, format='.mp4')

for im in frames:
 writer.append_data(imageio.imread(im))
writer.close()



I get the following error -


---------------------------------------------------------------------------
BrokenPipeError Traceback (most recent call last)
c:\program files (x86)\python38-32\lib\site-packages\imageio_ffmpeg\_io.py in write_frames(path, size, pix_fmt_in, pix_fmt_out, fps, quality, bitrate, codec, macro_block_size, ffmpeg_log_level, ffmpeg_timeout, input_params, output_params)
 478 try:
--> 479 p.stdin.write(bb)
 480 except Exception as err:

BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

OSError Traceback (most recent call last)
 in <module>
 1 for im in ret3:
----> 2 writer.append_data(im)
 3 writer.close()

c:\program files (x86)\python38-32\lib\site-packages\imageio\core\format.py in append_data(self, im, meta)
 500 im = asarray(im)
 501 # Call
--> 502 return self._append_data(im, total_meta)
 503 
 504 def set_meta_data(self, meta):

c:\program files (x86)\python38-32\lib\site-packages\imageio\plugins\ffmpeg.py in _append_data(self, im, meta)
 572 
 573 # Write. Yes, we can send the data in as a numpy array
--> 574 self._write_gen.send(im)
 575 
 576 def set_meta_data(self, meta):

c:\program files (x86)\python38-32\lib\site-packages\imageio_ffmpeg\_io.py in write_frames(path, size, pix_fmt_in, pix_fmt_out, fps, quality, bitrate, codec, macro_block_size, ffmpeg_log_level, ffmpeg_timeout, input_params, output_params)
 484 "OUTPUT:\n".format(err, cmd_str)
 485 )
--> 486 raise IOError(msg)
 487 
 488 nframes += 1

OSError: [Errno 32] Broken pipe

FFMPEG COMMAND:
c:\program files (x86)\python38-32\lib\site-packages\imageio_ffmpeg\binaries\ffmpeg-win32-v4.2.2.exe -y -f rawvideo -vcodec rawvideo -s 256x256 -pix_fmt rgb24 -r 29.97 -i - -an -vcodec libx264 -pix_fmt yuv420p -crf 25 -v warning C:\Users\pramu\AppData\Local\Temp\imageio_fh1fqkgc

FFMPEG STDERR OUTPUT:
</module>


I get the same error using anaconda ffmpeg and non-anaconda ffmpeg.


Is there a way to fix this error ?


Also, is there a better way to convert list of frames into .mp4 or serializing it for sending through an API ?.


Thank you !


-
"Could not demultiplex stream" in loading Video recorded by Opencv's VideoWriter
21 novembre 2020, par batumanMy program is



int main(){
 cout << "Start the process" << endl;
 cv::VideoCapture vcap("rtsp://root:pass@192.168.0.90/axis-media/media.amp?camera=1");
 cout << "Camera connection done!" << endl;
 cv::Mat image, small;
 //Output video
 cv::Size S = cv::Size((int) vcap.get(CV_CAP_PROP_FRAME_WIDTH), (int) vcap.get(CV_CAP_PROP_FRAME_HEIGHT));
 int ex = static_cast<int>(vcap.get(CV_CAP_PROP_FOURCC));
 int fps = vcap.get(CV_CAP_PROP_FPS);
 cout << "fps " << fps << " ex " << ex << endl;
 cv::VideoWriter outputVideo;
 outputVideo.open("TEST.avi", ex/*CV_FOURCC('X', '2', '6', '4')*/, vcap.get(CV_CAP_PROP_FPS), S, true);
 if(!outputVideo.isOpened()){
 cout << "Could not open the output video for write" << endl;
 return -1;
 }

 for(;;){
 if(!vcap.read(image)){
 std::cout << "No frame" << std::endl;
 cv::waitKey(0);
 }

 cv::resize(image, small, image.size()/2, 0, 0 , cv::INTER_LINEAR);
 cv::imshow("Display", small);
 cv::waitKey(1);
 outputVideo.write(small);
 if(getkey() == '\n')
 break;
 }
 cout << "Camera release" << endl;
 outputVideo.release();
 vcap.release();
 image.release();
 small.release();
 return 0;
}
</int>



int ex = static_cast<int>(vcap.get(CV_CAP_PROP_FOURCC));</int>
ex is 0 here.


I can record the TEST.avi, but can't be read by cv::VideoCapture vcap("TEST.avi") ; or VLC player or Videos in Ubuntu.
The error is
"Could not demultiplex stream"
.


If I changed to



outputVideo.open("TEST.avi", CV_FOURCC('X', '2', '6', '4'), vcap.get(CV_CAP_PROP_FPS), S, true);
outputVideo.open("TEST.avi", CV_FOURCC('P','I','M','1'), vcap.get(CV_CAP_PROP_FPS), S, true);
outputVideo.open("TEST.avi", CV_FOURCC('M', 'P', '4', '2'), vcap.get(CV_CAP_PROP_FPS), S, true);
etc.




all have same problem.



If I set



outputVideo.open("TEST.avi", CV_FOURCC('i', 'Y', 'U', 'V'), vcap.get(CV_CAP_PROP_FPS), S, true);




I have error as
Opencv: FFMPEG iYUV is not supported with codec id 14



For



outputVideo.open("TEST.avi", CV_FOURCC('M', 'J', 'P', 'G'), vcap.get(CV_CAP_PROP_FPS), S, true);


OpenCV Error: Assertion failed (img.cols == width && img.rows == height && chann
els == 3) in write, file /home/Softwares/opencv/opencv/modules/videoio/src/
cap_mjpeg_encoder.cpp, line 829
terminate called after throwing an instance of 'cv::Exception'
 what(): /home/Softwares/opencv/opencv/modules/videoio/src/cap_mjpeg_enco
der.cpp:829: error: (-215) img.cols == width && img.rows == height && channels =
= 3 in function write




What could be wrong ? Is that my FFMPEG has problem ?


-
audio/mp4 ; codecs="mp4a.40.2" not playing in Chrome and Firefox
19 octobre 2020, par Stefan FalkIt seems I want to convert audios, which I want to stream on my website, to
audio/mp4; codecs="mp4a.40.2"
.

Using
ffmpeg-cli-wrapper
, I am converting my uploaded audio files with this command here :

ffmpeg -i /tmp/input.any -acodec aac -b:a 256000 /tmp/output.aac



On the client I am creating a SourceBuffer like this :


this.sourceBuffer = this.mediaSource.addSourceBuffer('audio/mp4; codecs="mp4a.40.2"');



The errors are :


Chrome :


NotSupportedError: Failed to load because no supported source was found.



Firefox :


NotSupportedError: The media resource indicated by the src attribute or assigned media provider object was not suitable.



Here comes the fun part :


If I create the SourceBuffer using
audio/aac
as mime-type :

this.sourceBuffer = this.mediaSource.addSourceBuffer('audio/aac');



the audio gets played correctly on Chrome but Firefox says :


MediaSource.addSourceBuffer: Type not supported in MediaSource




Update


After changing the command to


ffmpeg -i /tmp/input.any -acodec aac -b:a 256000 /tmp/output.mp4
 ^^^ 



Chrome/Firefox do not give an error when using
audio/mp4; codecs="mp4a.40.2"
, but the audio is not being played.


See


- 

- https://stackoverflow.com/a/64432478/826983