
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (47)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (8856)
-
Muting ffmpeg warnings when loading video with OpenCV
26 mai 2017, par cbuchartI’m using OpenCV to process a set of MPEG videos. For some of them following warning is displayed when reading a frame or seeking (it is printed by the ffmpeg library).
[mpeg2video @ 026b0d20] warning : first frame is no keyframe
The thing is that such messages are printed together other valid output of my application and they are bothering final users. Is there any way to suppress such warning messages programmatically, other than re-coding the videos with an external tool ?
I’m already muting the standard output and error, as well as using a custom (dummy) OpenCV error handler. Below a MCVE for testing.
PS : I understand the warning and actually the full project handles those scenarios so videos are correctly read.
Example code to reproduce the problem
#include <iostream>
#include <opencv2></opencv2>core/core.hpp>
#include <opencv2></opencv2>highgui/highgui.hpp>
int handleError(int status, const char* func_name,
const char* err_msg, const char* file_name,
int line, void* userdata)
{
return 0;
}
int main()
{
std::cout << "Start!" << std::endl;
cv::VideoCapture reader;
if (!reader.open("Sample.mpg")) {
std::cout << "Failed opening video" << std::endl;
return 0;
}
cv::redirectError(handleError);
std::cout.setstate(std::ios_base::failbit);
std::cout << "std::cout mute test..." << std::endl; // OK, muted
std::cerr.setstate(std::ios_base::failbit);
std::cerr << "std::cerr mute test..." << std::endl; // OK, muted
cv::Mat tmpImage;
try {
tmpImage = tmpImage * tmpImage; // OK, OpenCV error muted
} catch (...) {}
// Here the warning is printed
reader.read(tmpImage);
std::cout.clear();
std::cerr.clear();
std::cout << "Finished!" << std::endl;
return 0;
}
</iostream>The
Sample.mpg
video can be downloaded from the Internet Archive : https://archive.org/download/ligouHDR-HC1_sample1/Sample.mpgThis is the current output of the program :
I’m using VS 2010 and OpenCV 2.4.10. Following DLLs are the only ones with the executable (no other OpenCV-related DLL is reachable in the PATH).
- opencv_core2410.dll
- opencv_ffmpeg2410.dll
- opencv_highgui2410.dll
-
Muting ffmpeg warnings when loading video
25 mai 2017, par cbuchartI’m using OpenCV to process a set of MPEG videos. For some of them following warning is displayed when reading a frame or seeking (it is printed by the ffmpeg library).
[mpeg2video @ 026b0d20] warning : first frame is no keyframe
The thing is that such messages are printed together other valid output of my application and they are bothering final users. Is there any way to suppress such warning messages programmatically, other than re-coding the videos with an external tool ?
I’m already muting the standard output and error, as well as using a custom (dummy) OpenCV error handler. Below a MCVE for testing.
PS : I understand the warning and actually the full project handles those scenarios so videos are correctly read.
Example code to reproduce the problem
#include <iostream>
#include <opencv2></opencv2>core/core.hpp>
#include <opencv2></opencv2>highgui/highgui.hpp>
int handleError(int status, const char* func_name,
const char* err_msg, const char* file_name,
int line, void* userdata)
{
return 0;
}
int main()
{
std::cout << "Start!" << std::endl;
cv::VideoCapture reader;
if (!reader.open("Sample.mpg")) {
std::cout << "Failed opening video" << std::endl;
return 0;
}
cv::redirectError(handleError);
std::cout.setstate(std::ios_base::failbit);
std::cout << "std::cout mute test..." << std::endl; // OK, muted
std::cerr.setstate(std::ios_base::failbit);
std::cerr << "std::cerr mute test..." << std::endl; // OK, muted
cv::Mat tmpImage;
try {
tmpImage = tmpImage * tmpImage; // OK, OpenCV error muted
} catch (...) {}
// Here the warning is printed
reader.read(tmpImage);
std::cout.clear();
std::cerr.clear();
std::cout << "Finished!" << std::endl;
return 0;
}
</iostream>The
Sample.mpg
video can be downloaded from the Internet Archive : https://archive.org/download/ligouHDR-HC1_sample1/Sample.mpgThis is the current output of the program :
I’m using VS 2010 and OpenCV 2.4.10. Following DLLs are the only ones with the executable (no other OpenCV-related DLL is reachable in the PATH).
- opencv_core2410.dll
- opencv_ffmpeg2410.dll
- opencv_highgui2410.dll
-
Use FFMPEG process to get all frame from rtsp
10 octobre 2015, par LEONARDO VERNAZAprocess to run a command that reads a RTSP stream with FFMPEG, and I need to catch each frame to display it in a picturebox ; I’m receiving the data in void OnOutputDataReceived(object sender, DataReceivedEventArgs e), but once I transform e.data to byte[] and I generate the bitmap the app crashes.
my code :
private void Form1_Load_1(object sender, EventArgs e)
{
Process proc = new Process();
proc.StartInfo.FileName = "ffmpeg";
proc.StartInfo.Arguments = "-i rtsp://user:foscam@50.197.211.181:9826/videoMain -an -vcodec mjpeg -s 640x480 -threads 1 -aspect 16:9 -q:v 2 -updatefirst 1 -b:v 64k -f -";
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.OutputDataReceived += OnOutputDataReceived;
if (!proc.Start())
{
Console.WriteLine("Error starting");
return;
}
proc.BeginOutputReadLine();
StreamReader reader = proc.StandardError;
string line;
while ((line = reader.ReadLine()) != null)
{
Console.WriteLine(line);
}
proc.Close();
}
void OnOutputDataReceived(object sender, DataReceivedEventArgs e)
{
byte[] bytes = new byte[e.Data.Length * sizeof(char)];
System.Buffer.BlockCopy(e.Data.ToCharArray(), 0, bytes, 0, bytes.Length);
Bitmap bmp;
using (var ms = new MemoryStream(bytes))
{
// CRASH SITE
bmp = new Bitmap(ms);
}
pictureBox1.Image = bmp;
}