
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (50)
-
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (6206)
-
h264_metadata : Fix double-free
20 août 2017, par Mark Thompson -
Free extradata before reallocating.
22 novembre 2017, par Dale CurtisFree extradata before reallocating.
Otherwise ff_alloc_extradata() just leaks any existing allocated
memory.Signed-off-by : Dale Curtis <dalecurtis@chromium.org>
Reviewed-by : Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc> -
converting images to mp4 using ffmpeg on iphone
29 novembre 2011, par user633901Up till now, i can create mpeg1 but with no luck for mp4.Maybe we can talk and share information.Someone told me that i have to set some flags for using mp4.But i am stuck at using it...
following is the working code :
av_register_all();
printf("Video encoding\n");
/// find the mpeg video encoder
//codec=avcodec_find_encoder(CODEC_ID_MPEG1VIDEO);
codec = avcodec_find_encoder(CODEC_ID_MPEG4);
if (!codec) {
fprintf(stderr, "codec not found\n");
exit(1);
}
c = avcodec_alloc_context();
picture = avcodec_alloc_frame();
// put sample parameters
c->bit_rate = 400000;
/// resolution must be a multiple of two
c->width = 240;
c->height = 320;
//c->codec_id = fmt->video_codec;
//frames per second
c->time_base= (AVRational){1,25};
c->gop_size = 10; /// emit one intra frame every ten frames
c->max_b_frames=1;
c->pix_fmt =PIX_FMT_YUV420P; // PIX_FMT_YUV420P
if (avcodec_open(c, codec) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
f = fopen([[NSHomeDirectory() stringByAppendingPathComponent:@"test.mp4"] UTF8String], "wb");
if (!f) {
fprintf(stderr, "could not open %s\n",[@"test.mp4" UTF8String]);
exit(1);
}
// alloc image and output buffer
outbuf_size = 100000;
outbuf = malloc(outbuf_size);
size = c->width * c->height;
#pragma mark -
AVFrame* outpic = avcodec_alloc_frame();
int nbytes = avpicture_get_size(PIX_FMT_YUV420P, c->width, c->height); //this is half size of numbytes.
//create buffer for the output image
uint8_t* outbuffer = (uint8_t*)av_malloc(nbytes);
#pragma mark -
for(k=0;k<1;k++) {
for(i=0;i<25;i++) {
fflush(stdout);
int numBytes = avpicture_get_size(PIX_FMT_RGBA, c->width, c->height);
uint8_t *buffer = (uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"%d.png", i+1]];
CGImageRef newCgImage = [image CGImage];
CGDataProviderRef dataProvider = CGImageGetDataProvider(newCgImage);
CFDataRef bitmapData = CGDataProviderCopyData(dataProvider);
buffer = (uint8_t *)CFDataGetBytePtr(bitmapData);
///////////////////////////
//outbuffer=(uint8_t *)CFDataGetBytePtr(bitmapData);
//////////////////////////
avpicture_fill((AVPicture*)picture, buffer, PIX_FMT_RGBA, c->width, c->height);
avpicture_fill((AVPicture*)outpic, outbuffer, PIX_FMT_YUV420P, c->width, c->height);//does not have image data.
struct SwsContext* fooContext = sws_getContext(c->width, c->height,
PIX_FMT_RGBA,
c->width, c->height,
PIX_FMT_YUV420P,
SWS_FAST_BILINEAR, NULL, NULL, NULL);
//perform the conversion
sws_scale(fooContext, picture->data, picture->linesize, 0, c->height, outpic->data, outpic->linesize);
// Here is where I try to convert to YUV
// encode the image
out_size = avcodec_encode_video(c, outbuf, outbuf_size, outpic);
printf("encoding frame %3d (size=%5d)\n", i, out_size);
fwrite(outbuf, 1, out_size, f);
free(buffer);
buffer = NULL;
}
// get the delayed frames
for(; out_size; i++) {
fflush(stdout);
out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL);
printf("write frame %3d (size=%5d)\n", i, out_size);
fwrite(outbuf, 1, outbuf_size, f);
}
}
// add sequence end code to have a real mpeg file
outbuf[0] = 0x00;
outbuf[1] = 0x00;
outbuf[2] = 0x01;
outbuf[3] = 0xb7;
fwrite(outbuf, 1, 4, f);
fclose(f);
free(picture_buf);
free(outbuf);
avcodec_close(c);
av_free(c);
av_free(picture);
//av_free(outpic);
printf("\n");my msn:hieeli@hotmail.com