
Advanced search
Other articles (60)
-
Le profil des utilisateurs
12 April 2011, byChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 November 2010, byAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 May 2011, byDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
On other websites (4531)
-
Live stream is gets delayed while processing frame in opencv + python
18 March 2021, by Himanshu sharmaI capture and process an IP camera RTSP stream in a OpenCV 4.4.0.46 on Ubuntu.
Unfortunately the processing takes quite a lot of time, roughly 0.2s per frame, and the stream quickly gets delayed.
Video file have to save for 5 min but by this delaying video file is saved for 3-4 min only.


Can we process faster to overcome delays?


I have two IP camera which have two diffrent fps_rate(Camera 1 have 18000 and camera 2 have 20 fps)


I am implementing this code in difference Ubuntu PCs


- 

- Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux
- Django==3.1.2
- Ubuntu = 18.04 and 20.04
- opencv-contrib-python==4.4.0.46
- opencv-python==4.4.0.46












input_stream = 'rtsp://'+username+':'+password+'@'+ip+'/user='+username+'_password='+password+'_channel=0channel_number_stream=0.sdp'
input_stream---> rtsp://admin:Admin123@192.168.1.208/user=admin_password=Admin123_channel=0channel_number_stream=0.sdp

input_stream---> rtsp://Admin:@192.168.1.209/user=Admin_password=_channel=0channel_number_stream=0.sdp

vs = cv2.VideoCapture(input_stream)
fps_rate = int(vs.get(cv2.CAP_PROP_FPS))
I have two IP camera which have two diffrent fps_rate(Camera 1 have 18000 and camera 2 have 20 fps)

video_file_name = 0
start_time = time.time()
while(True):
 ret, frame = vs.read()
 time.sleep(0.2) # <= Simulate processing time (mask detection, face detection and many detection is hapning)


 ### Start of writing a video to disk 
 minute = 5 ## saving a file for 5 minute only then saving another file for 5 min
 second = 60
 minite_to_save_video = int(minute) * int(second)


 # if we are supposed to be writing a video to disk, initialize
 if time.time() - start_time >= minite_to_save_video or video_file_name == 0 :
 ## where H = heigth, W = width, C = channel 
 H, W, C = frame.shape
 
 print('time.time()-->',time.time(),'video_file_name-->', video_file_name, ' #####')
 start_time = time.time()

 video_file_name = str(time.mktime(datetime.datetime.now().timetuple())).replace('.0', '')
 output_save_directory = output_stream+str(int(video_file_name))+'.mp4'


 fourcc = cv2.VideoWriter_fourcc(*'avc1')
 
 writer = cv2.VideoWriter(output_save_directory, fourcc,20.0,(W, H), True)

 # check to see if we should write the frame to disk
 if writer is not None:
 
 try:
 writer.write(frame)

 except Exception as e:
 print('Error in writing video output---> ', e)



-
doc: misc improvements for the Windows section
10 May 2012, by Diego Biurrundoc: misc improvements for the Windows section
-
Imagick and Gmagick builds available for Windows
The new Windows build page http://valokuva.org/magick/ contains builds for both Imagick and Gmagick. All builds are done using VC9 and PHP 5.3.
ImageMagick builds are QuantumDepth 16 (default).
GraphicsMagick builds are QuantumDepth 8 (default).Please note that these builds won’t work with the official PHP.net binaries which are compiled using VC6.
Edit: Pierre corrected me that there are official VC9 builds of PHP available at http://windows.php.net/download/