
Recherche avancée
Autres articles (45)
-
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 (...) -
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 -
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 (9411)
-
libav : How to clear real-time buffer ?
29 novembre 2018, par user67Here’s the c++ code that I’m using to access my webcam.
int Camera::Init(char* file_name,
char* device_name,
char* format,
char* resolution,
char* frame_rate,
char* pixel_format)
{
av_log(NULL, AV_LOG_INFO, "---INIT STARTED\n");
avdevice_register_all();
av_register_all();
AVDictionary* properties_collection = NULL;
av_dict_set(&properties_collection, "f", format, NULL);
av_dict_set(&properties_collection, "video_size", resolution, NULL);
av_dict_set(&properties_collection, "framerate", frame_rate, NULL);
av_dict_set(&properties_collection, "pix_fmt", pixel_format, NULL);
AVInputFormat *input_format = av_find_input_format("dshow");
char command_line[256];
sprintf(command_line, "video=%s", device_name);
AVFormatContext *input_context = avformat_alloc_context();
//input_context->flags |= AVFMT_FLAG_NOBUFFER; //DOESN'T HELP
//input_context->max_picture_buffer = 0; //ERR
int err_code = 0;
err_code = avformat_open_input(&input_context,
command_line,
input_format,
&properties_collection);
int i = 0;
while (i++ < 30)
{
Sleep(1000);
//avformat_flush(input_context); //DOESN'T HELP
//av_free(input_context); //ERR
}
system("pause");
return 0;
}Right after "avformat_open_input()" it starts reading frames to some internal buffer without me even calling "av_read_frame()".
After about 10 seconds it start’s giving me error messages :[dshow @ 0014ed40] real-time buffer [VirtualBox Webcam - FULL HD 1080P Webcam] [video input]
too full or near too full (62% of size: 3041280 [rtbufsize parameter])!
frame dropped!
...
...
...
[dshow @ 0014ed40] real-time buffer [VirtualBox Webcam - FULL HD 1080P Webcam] [video input]
too full or near too full (100% of size: 3041280 [rtbufsize parameter])!
frame dropped!How to clear this buffer or avoid using it ?
Thanks in advance.
P.S.Please pardon my english.
P.P.S.Have a good day.
-
FFMPEG API : How to clear real-time buffer ?
29 novembre 2018, par user67Here’s the c++ code that I’m using to access my webcam.
int Camera::Init(char* file_name,
char* device_name,
char* format,
char* resolution,
char* frame_rate,
char* pixel_format)
{
av_log(NULL, AV_LOG_INFO, "---INIT STARTED\n");
avdevice_register_all();
av_register_all();
AVDictionary* properties_collection = NULL;
av_dict_set(&properties_collection, "f", format, NULL);
av_dict_set(&properties_collection, "video_size", resolution, NULL);
av_dict_set(&properties_collection, "framerate", frame_rate, NULL);
av_dict_set(&properties_collection, "pix_fmt", pixel_format, NULL);
AVInputFormat *input_format = av_find_input_format("dshow");
char command_line[256];
sprintf(command_line, "video=%s", device_name);
AVFormatContext *input_context = avformat_alloc_context();
//input_context->flags |= AVFMT_FLAG_NOBUFFER; //DOESN'T HELP
//input_context->max_picture_buffer = 0; //ERR
int err_code = 0;
err_code = avformat_open_input(&input_context,
command_line,
input_format,
&properties_collection);
int i = 0;
while (i++ < 30)
{
Sleep(1000);
//avformat_flush(input_context); //DOESN'T HELP
//av_free(input_context); //ERR
}
system("pause");
return 0;
}Right after "avformat_open_input()" it starts reading frames to some internal buffer without me even calling "av_read_frame()".
After about 10 seconds it start’s giving me error messages :[dshow @ 0014ed40] real-time buffer [VirtualBox Webcam - FULL HD 1080P Webcam] [video input]
too full or near too full (62% of size: 3041280 [rtbufsize parameter])!
frame dropped!
...
...
...
[dshow @ 0014ed40] real-time buffer [VirtualBox Webcam - FULL HD 1080P Webcam] [video input]
too full or near too full (100% of size: 3041280 [rtbufsize parameter])!
frame dropped!How to clear this buffer or avoid using it ?
Thanks in advance.
P.S.Please pardon my english.
P.P.S.Have a good day.
-
Incorrect height for U and V channel when creating video from jpgs using ffmpeg
27 juillet 2022, par Chu BunI use the method in the ffmpeg source sample decode_video.c to decode a series of jpgs into AVFrames. Then use the method in the sample encode_video.c to combine the AVFrames into a video file.


AV_CODEC_ID_MJPEG is used to set up the decoder for the jpgs. The output frames have the format AV_PIX_FMT_YUVJ422P which has (full-width x full-height) Y-channel, and (half-width x full-height) U and V channels. The problem is when I try to encode the frames, ffmpeg seems to expect (half-width x half-height) U and V channels. As a result the colors are stretch in the vertical direction and do not match with the image in the Y-channel.


I could not figure out how to either decode the jpgs into YUV420 (half-width x half-height) frames, or encode frames in YUV422 format. Any pointers ?