
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (48)
-
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 (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
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 (...) -
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 (...)
Sur d’autres sites (7100)
-
How to deal ffplay being too slow playing iPhone's videos ?
8 janvier 2020, par Mikhail T.Trying to play a 3840x2160 video recorded by an iPhone 7 (@30fps), I get frequent pauses — in the video, music keeps playing.



This happens both in firefox and when
ffplay
is invoked to play the file directly — from command-line. The CPU is a dual E6700 @3.20GHz — not super fast, but it should be able to play smoothly, shouldn't it ? Video is Intel's "series 4" integrated chipset — again, not a speed-daemon, but it should be adequate... Support for Intel's VA API is included.


I build ffmpeg-4.1 from source using FreeBSD port. As you can see, the port has a maddening amount of options — including several different ones for the 264-codec.



Any suggestions for improving the decoding speed to the point, where it is watchable by a human ? Thank you !


-
How to start and stop saving video frames according to a trigger with OpenCV VideoWriter
11 août 2021, 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 = True





As 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 multithreading



N.


-
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.