
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (43)
-
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 (10158)
-
LGPD : Demystifying Brazil’s New Data Protection Law
31 août 2023, par Erin — Privacy -
starting and stopping the ffmpeg video capture within a C ++
29 août 2015, par yure albuquerqueIt is possible to start FFmpeg from inside a C ++ program and it sending a character ’q’ automatically according to the local time by exemple ?A command line would be to capture the desktop video.
ffmpeg -f dshow -i video=UScreenCapture output.mp4
(’q’ to quit)
I am trying the following code does not work more :
#include <iostream>
#define WINDOWS_LEAN_AND_MEAN
#include
#include
#include <iostream>
#include <thread>
#include <cassert>
#include
using namespace std;
enum { ParentRead, ParentWrite, ChildWrite, ChildRead, NumPipeTypes };
int main()
{
SECURITY_ATTRIBUTES sa;
sa.nLength = sizeof(sa);
sa.bInheritHandle = TRUE;
sa.lpSecurityDescriptor = NULL;
HANDLE pipes[NumPipeTypes];
if (!CreatePipe(&pipes[ParentWrite], &pipes[ChildRead], &sa, 0))
return 0;
if (!CreatePipe(&pipes[ParentRead], &pipes[ChildWrite], &sa, 0))
return 0;
// make sure the handles the parent will use aren't inherited.
SetHandleInformation(pipes[ParentRead], HANDLE_FLAG_INHERIT, 0);
SetHandleInformation(pipes[ParentWrite], HANDLE_FLAG_INHERIT, 0);
STARTUPINFO si;
ZeroMemory(&si, sizeof(STARTUPINFO));
si.cb = sizeof(STARTUPINFO);
//si.wShowWindow = SW_SHOW;
si.dwFlags = STARTF_USESHOWWINDOW;
si.dwFlags |= STARTF_USESTDHANDLES;
// si.dwFlags = STARTF_USEHOTKEY;
si.hStdOutput = pipes[ChildWrite];
si.hStdError = pipes[ChildWrite];
si.hStdInput = pipes[ChildRead];
//si.hStdInput = stdout;
PROCESS_INFORMATION pi;
ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
TCHAR cmd[] = "ffmpeg -f dshow -i video=UScreenCapture output.mp4";
if (!CreateProcess(NULL, cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi))
return 0;
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
Sleep(20000);
cout<<"End"</stop process(failure)
CloseHandle(pipes[ChildRead]);
CloseHandle(pipes[ChildWrite]);
CloseHandle(pipes[ParentWrite]);
CloseHandle(pipes[ParentRead]);
return 0;
}
</cassert></thread></iostream></iostream> -
Qt 5.2 / OpenCV 2.4.8 - Can’t open video files via VideoCapture
4 août 2015, par ZamahraI have a big problem that i can’t solve by myself. OpenCV itself works fine, but i’m not able to load videos. Here’s my code :
PRO- File
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = videoredux
TEMPLATE = app
INCLUDEPATH += C:/OpenCV/opencv_bin/install/include
LIBS += -LC:\\OpenCV\\opencv_bin\\bin \
libopencv_core248d \
libopencv_highgui248d \
libopencv_imgproc248d \
libopencv_features2d248d \
libopencv_calib3d248d \
libopencv_video248d \
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.uiand the MainWindow Class :
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <qfiledialog>
#include <iostream>
#include
#include <opencv2></opencv2>core/core.hpp>
#include <opencv2></opencv2>highgui/highgui.hpp>
#include <opencv2></opencv2>imgproc/imgproc.hpp>
#include <opencv></opencv>cv.h>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->videoStatusLabel->setText("Kein Video geladen.");
// SIGNALS & SLOTS
QObject::connect(ui->chooseVideoButton,SIGNAL(clicked()),
this,SLOT(chooseVideo()));
QObject::connect(ui->startButton,SIGNAL(clicked()),
this,SLOT(startProcess()));
}
void MainWindow::chooseVideo(){
QString fileName = QFileDialog::getOpenFileName(this,
tr("Open Video"), "/home", tr("Video Files (*.avi *.mp4 *.mpeg *.mpg)"));
qDebug() << "Path:" << fileName;
ui->videoStatusLabel->setText(fileName);
}
void MainWindow::startProcess(){
QString videoPath = ui->videoStatusLabel->text();
QFileInfo video(videoPath);
if(video.exists()){
const std::string path = videoPath.toUtf8().constData();
cv::VideoCapture capture(path);
cv::Mat frame;
if(!capture.isOpened()){
qDebug() << "Error, video not loaded";
}
cv::namedWindow("window",1);
while(true)
{
bool success = capture.read(frame);
if(success == false){
break;
}
cv::imshow("window",frame);
cv::waitKey(20);
}
cv::waitKey(0);
}
else{
qDebug() << "Error, File doesn't exist";
}
}
</iostream></qfiledialog>The paths are correct, I tried many different video formats but he never loads the videos. I’m running Qt on a Windows 8 machine and i have “K-Lite Codec Pack 10.2.0 Basic” and ffmpeg installed. The videos are playing properly with my video players. I also tried to copy the .dll to the working directory, searched for opencv dll’s in the system32 directory and rebuild OpenCV with mingw on this computer. I know that many people have the same problems, but none of their suggestions solved it. Does anyone know how to solve this problem ?
Thank you very much !
Nadine
----UPDATE---- I still can’t open video files, so I programmed the application on a Windows7 64-Bit system. It worked fine, but when I try to open the application on a Windows8 computer it still can’t open the file. It doesn’t matter which codecs are installed, because it generally runs on every Windows7 computer and fails on every Windows8 computer.. The same for older OpenCV-Versions. Is there a general problem with OpenCV and Windows8 ?