
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (112)
-
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (11450)
-
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 :
-
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)



-
FFPROBE get start-time of audio only
13 février 2023, par MarcusI am using this to get the start time of the video and audio :


ffprobe -show_entries stream=start_time -i https://www.website.com/video.mp4



And the response I get is :


ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
 built with Apple clang version 12.0.0 (clang-1200.0.32.28)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_9 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://www.website.com/video.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
 Duration: 00:03:14.85, start: 0.000000, bitrate: 4488 kb/s
 Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 4418 kb/s, 24 fps, 24 tbr, 90k tbn, 48 tbc (default)
 Metadata:
 handler_name : VideoHandler
 Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)
 Metadata:
 handler_name : SoundHandler
[STREAM]
start_time=0.000000
[/STREAM]
[STREAM]
start_time=9.892993
[/STREAM]



How can I get only the second stream, which is the audio, and without all the extra info ?


So the response would just be :




start_time=9.892993