
Recherche avancée
Autres articles (73)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (11503)
-
How to save youtube audio url (m4a/webm) as mp3 Using php ? [closed]
7 janvier 2020, par Mwt Lakshan -
How can I save an animation from matplotlib as a mp4 video file ? [duplicate]
19 décembre 2018, par ManzaThis question already has an answer here :
-
How can I overcome this key word error ?
4 answers
I’m trying to render a animation.ArtistAnimation object into a 24 fps video file in format mp4.
I have search about and I reached this. However, even after compiling ffmpeg I get this error message :
C:\Users\trite\OneDrive\Documentos\MusiTex\Python\venv\Scripts\python.exe
"C:/Users/trite/OneDrive/Documentos/MusiTex/Python/venv/Saving Animation.py"
Traceback (most recent call last):
File "C:\Users\trite\OneDrive\Documentos\MusiTex\Python\venv\lib\site-
packages\matplotlib\animation.py", line 161, in __getitem__
return self.avail[name]
KeyError: 'ffmpeg'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/trite/OneDrive/Documentos/MusiTex/Python/venv/Saving
Animation.py", line 20, in <module>
FFMpegWriter = manimation.writers['ffmpeg']
File "C:\Users\trite\OneDrive\Documentos\MusiTex\Python\venv\lib\site-
packages\matplotlib\animation.py", line 164, in __getitem__
'Requested MovieWriter ({}) not available'.format(name))
RuntimeError: Requested MovieWriter (ffmpeg) not available
Process finished with exit code 1
</module>What is the problem with ?
I would really appreciate if you can help me. Actually, if there is other ways to saving/render this kind of object into a video file (preferably mp4) I will be delighted to hear them.
Thank you very much
-
How can I overcome this key word error ?
-
openCV save frames from RTSP non blocking
1er janvier 2020, par Jacob nighForI am building an app that records frames from IP camera through RTSP.
My engine is in charge to save a video in mp4 with Opencv VideoWriter working well.
What I am looking for is to create a startRecord and a stopRecord class method that will respectively start and stop recording according to a trigger (it could be an argument that I pass to the thread).
Is anyone know what the best way to do that kind of stuff ?Here is my class :
from threading import Thread
import cv2
import time
import multiprocessing
import threading
class RTSPVideoWriterObject(object):
def __init__(self, src=0):
# Create a VideoCapture object
self.capture = cv2.VideoCapture(src)
# Start the thread to read frames from the video stream
self.thread = Thread(target=self.update, args=())
self.thread.daemon = True
self.thread.start()
def update(self):
# Read the next frame from the stream in a different thread
while True:
if self.capture.isOpened():
(self.status, self.frame) = self.capture.read()
def endRecord(self):
self.capture.release()
self.output_video.release()
exit(1)
def startRecord(self,endRec):
self.frame_width = int(self.capture.get(3))
self.frame_height = int(self.capture.get(4))
self.codec = cv2.VideoWriter_fourcc(*'mp4v')
self.output_video = cv2.VideoWriter('fileOutput.mp4', self.codec, 30, (self.frame_width, self.frame_height))
while True:
try:
self.output_video.write(self.frame)
if endRec:
self.endRecord()
except AttributeError:
pass
if __name__ == '__main__':
rtsp_stream_link = 'rtsp://foo:192.5545....'
video_stream_widget = RTSPVideoWriterObject(rtsp_stream_link)
stop_threads = False
t1 = threading.Thread(target = video_stream_widget.startRecord, args =[stop_threads])
t1.start()
time.sleep(15)
stop_threads = TrueAs you can see in the main I reading frames and store them in a separate thread. Then I am starting to record (record method is with an infinite loop so blocking) and then after 15 sec, I am trying to pass a ’stop_record’ argument to stop recording properly.
A part of the code comes from Storing RTSP stream as video file with OpenCV VideoWriter
Is someone have an idea ?
I read a lot that OpenCV can be very tricky for multithreadingN.