
Recherche avancée
Autres articles (4)
-
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 -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...)
Sur d’autres sites (3683)
-
Trying to capture display output for real-time analysis with OpenCV ; I need help with interfacing with the OS for input
26 juillet 2024, par mirariI want to apply operations from the OpenCV computer vision library, in real time, to video captured from my computer display.
The idea in this particular case is to detect interesting features during gameplay in a popular game and provide the user with an enhanced experience ; but I could think of several other scenarios where one would want to have live access to this data as well. 
At any rate, for the development phase it might be acceptable using canned video, but for the final application performance and responsiveness are obviously critical.



I am trying to do this on Ubuntu 10.10 as of now, and would prefer to use a UNIX-like system, but any options are of interest.
My C skills are very limited, so whenever talking to OpenCV through Python is possible, I try to use that instead.
Please note that I am trying to capture NOT from a camera device, but from a live stream of display output ; and I'm at a loss as to how to take the input. As far as I can tell, CaptureFromCAM works only for camera devices, and it seems to me that the requirement for real-time performance in the end result makes storage in file and reading back through CaptureFromFile a bad option.



The most promising route I have found so far seems to be using ffmpeg with the x11grab option to capture from an X11 display ;
(e.g. the command
ffmpeg -f x11grab -sameq -r 25 -s wxga -i :0.0 out.mpg
captures 1366x768 of display 0 to 'out.mpg').
I imagine it should be possible to treat the output stream from ffmpeg as a file to be read by OpenCV (presumably by using the CaptureFromFile function) maybe by using pipes ; but this is all on a much higher level than I have ever dealt with before and I could really use some directions. 
Do you think this approach is feasible ? And more importantly can you think of a better one ? How would you do it ?


-
Muxing encoder output with custom io in ffmpeg
3 mai 2021, par MisterSincereI am having some basic issues on how to mux my encoder results into a mp4 file. My current approach is to create a custom
AVFormatContext
, where theDataProvider
is the encoder :

AVFormatContext *create_format_context(DataProvider *pDataProvider) {
 AVFormatContext *ctx{avformat_alloc_context()};

 size_t bufSize{8 * 1024 * 1024};
 uint8_t *avBuffer{(uint8_t*)av_malloc(bufSize)};

 ctx->pb = avio_alloc_context(avBuffer,
 bufSize,
 0,
 pDataProvider,
 DataProvider::read,
 nullptr,
 nullptr);

 ctx->flags |= AVFMT_FLAG_CUSTOM_IO;

 FFMPEG_CALL(avformat_open_input(&ctx, nullptr, nullptr, nullptr));
 return ctx;
}



But I crash on
avformat_open_input
with the following error message :



Invalid data found when processing input




It tries to read for the first time from the encoder, but since this is at init-time, the encoder doesn't have any results yet. I figured the problem is that ffmpeg tries to query for some header informations, since it would feel weird to ask for actual data when just opening.

How do I provide that header information / where can I learn something about how this header should look like and what else I need to provide for ffmpeg ?

Or is there even a completely different approach, because quite honestly I would be happy if I could feed the per frame encoded data directly to ffmpeg instead of through this whole context abstraction.

For context I pasted the muxer class, I guess the progress() function is the most interesting one, here header, source.


Also I call the kinda magic functions


av_register_all();
avcodec_register_all();
avformat_network_init();



before everything else concerning ffmpeg.


The encoder is not written with ffmpeg, but with cuda / the nvidia video sdk for hardware acceleration purposes.


-
avcodec/nv{enc,dec} : use sane version checking macro
13 avril 2018, par Timo Rothenpieler