
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (32)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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 (4293)
-
Revision 6ce718eb18 : Merge "End of orientation zero group experiment" into experimental
22 avril 2013, par Deb MukherjeeChanged Paths : Modify /vp9/decoder/vp9_decodframe.c Modify /vp9/encoder/vp9_encodemb.c Modify /vp9/encoder/vp9_rdopt.c Merge "End of orientation zero group experiment" into experimental
-
Live stream is gets delayed while processing frame in opencv + python
18 mars 2021, par 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)



-
How to solve error : "cvCreateFileCaptureWithPreference : backend FFMPEG doesn't support legacy API anymore"
24 octobre 2018, par SarvinI am trying to build and run an OpenCV project from Github using OpenCV 3.4.2, Cmake 3.13.0-rc1 and VS 2017. The project builds successfully as I understand from the build output but it throws the above warning after I run the program. The video I want to load is in a .AVI format and uses cvCaptureFromAVI function. Just trying to learn OpenCV, your help and kindness is appreciated.
Source :
#include <iostream>
#include <opencv2></opencv2>opencv.hpp>
#include "package_bgs/PBAS/PixelBasedAdaptiveSegmenter.h"
#include "package_tracking/BlobTracking.h"
#include "package_analysis/VehicleCouting.h"
using namespace cv;
int main(int argc, char **argv)
{
std::cout << "Using OpenCV " << CV_MAJOR_VERSION << "." <<
CV_MINOR_VERSION << "." << CV_SUBMINOR_VERSION << std::endl;
/* Open video file */
CvCapture *capture = 0;
capture = cvCaptureFromAVI("video.avi");
if(!capture){
std::cerr << "Cannot open video ting tong!" << std::endl;
return 1;
}
/* Background Subtraction Algorithm */
IBGS *bgs;
bgs = new PixelBasedAdaptiveSegmenter;
/* Blob Tracking Algorithm */
cv::Mat img_blob;
BlobTracking* blobTracking;
blobTracking = new BlobTracking;
/* Vehicle Counting Algorithm */
VehicleCouting* vehicleCouting;
vehicleCouting = new VehicleCouting;
std::cout << "Press 'q' to quit..." << std::endl;
int key = 0;
IplImage *frame;
while(key != 'q')
{
frame = cvQueryFrame(capture);
if(!frame) break;
cv::Mat img_input = cv::cvarrToMat(frame);
cv::imshow("Input", img_input);
// bgs->process(...) internally process and show the foreground mask image
cv::Mat img_mask;
bgs->process(img_input, img_mask);
if(!img_mask.empty())
{
// Perform blob tracking
blobTracking->process(img_input, img_mask, img_blob);
// Perform vehicle counting
vehicleCouting->setInput(img_blob);
vehicleCouting->setTracks(blobTracking->getTracks());
vehicleCouting->process();
}
key = cvWaitKey(1);
}
delete vehicleCouting;
delete blobTracking;
delete bgs;
cvDestroyAllWindows();
cvReleaseCapture(&capture);
return 0;
}
</iostream>Error :