
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (72)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
L’espace de configuration de MediaSPIP
29 novembre 2010, parL’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
Il permet de configurer finement votre site.
La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...) -
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 ;
Sur d’autres sites (7192)
-
iOS FFMPEG encode images to video
10 avril 2013, par brad.roushI am trying to take a set of UIImages and create a video file out of them with FFMPEG. Seems there are lots of questions about this topic but non have been able to get this working correctly for me. This one was particularly helpful in giving me a starting point. This iFrameExtractor example was also very helpful but I want to do this in reverse, then add audio.
This is the closest I have gotten and it creates a short silent video with flashing colors and no images :
// Register all formats and codecs
av_register_all();
AVCodec *codec;
AVCodecContext *c= NULL;
int i, out_size, size, outbuf_size;
FILE *file;
AVFrame *picture;
uint8_t *outbuf;
NSLog(@"Video encoding");
/* find the mpeg video encoder */
codec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
if (!codec) {
fprintf(stderr, "codec not found\n");
exit(1);
}
c= avcodec_alloc_context3(codec);
picture= avcodec_alloc_frame();
/* put sample parameters */
c->bit_rate = 400000;
/* resolution must be a multiple of two */
c->width = 352;
c->height = 288;
/* 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;
/* open it */
if (avcodec_open2(c, codec, nil) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
// Put file in place
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docs_dir = [paths objectAtIndex:0];
NSString *filePath = [docs_dir stringByAppendingPathComponent:@"test.mpeg"];
// Seed file
NSString *sourcePath = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"mov"];
NSError* error = nil;
if (![[NSFileManager defaultManager] copyItemAtPath:sourcePath toPath:filePath error:&error]) {
NSLog(@"Test Video creation failed:%@",[error userInfo]);
} else NSLog(@"Test Video Created");
const char *filename = [filePath UTF8String];
file = fopen(filename, "wb");
if (!file) {
fprintf(stderr, "could not open %s\n", "filename");
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);
//create buffer for the output image
uint8_t* outbuffer = (uint8_t*)av_malloc(nbytes);
AVPacket packet;
av_init_packet(&packet);
//#pragma mark -
for(i=1;i<50;i++) {
fflush(stdout);
int numBytes = avpicture_get_size(PIX_FMT_YUV420P, c->width, c->height);
uint8_t *buffer = (uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
UIImage *image = [UIImage imageWithContentsOfFile:[docs_dir stringByAppendingPathComponent:[NSString stringWithFormat:@"%d.png",i]]];
CGImageRef newCgImage = [image CGImage];
CGDataProviderRef dataProvider = CGImageGetDataProvider(newCgImage);
CFDataRef bitmapData = CGDataProviderCopyData(dataProvider);
buffer = (uint8_t *)CFDataGetBytePtr(bitmapData);
avpicture_fill((AVPicture*)picture, buffer, PIX_FMT_RGB8, c->width, c->height);
avpicture_fill((AVPicture*)outpic, outbuffer, PIX_FMT_YUV420P, c->width, c->height);
struct SwsContext* fooContext = sws_getContext(c->width, c->height,
PIX_FMT_RGB8,
c->width, c->height,
PIX_FMT_YUV420P,
SWS_FAST_BILINEAR, NULL, NULL, NULL);
//perform the conversion
sws_scale(fooContext, outpic->data, outpic->linesize,
0, c->height, outpic->data, outpic->linesize);
// Tried This but it didn't work
//sws_scale(fooContext, picture->data, picture->linesize, 0, c->height, outpic->data, outpic->linesize);
out_size = avcodec_encode_video(c, outbuf, outbuf_size, outpic);
// Tried this but it didn't work
//int test = 0;
//out_size = avcodec_encode_video2(c, &packet, outpic, &test);
printf("encoding frame %3d (size=%5d)\n", i, out_size);
fwrite(outbuf, 1, out_size, file);
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, file);
}
*/
/* 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, file);
fclose(file);
free(outbuf);
avcodec_close(c);
av_free(c);
av_free(picture);
printf("\n");Any ideas will be helpful here. If anyone knows of any other good objective-c examples, this would also be great.
-
command line audio ducking
25 mai 2015, par DomsaNI got a music file and need to add a spoken quote to this file. THerefore the music volume should be lowered in order to hear the spoken quote. After the quote ends the music’s volume should be as it was before.
Problem : I need to do this with command line. Can I do this with FFmpeg ? If not any ideas ?
Greetings
-
Images and audio to slideshow movie
16 juin 2015, par Terji PetersenI’m trying to get FFmpeg to generate a slide show mp4 movie using an mp3 audio track and several jpg images. Having trouble getting the length of the movie to match the length of the mp3 file and the images evenly spaced.
Following is the closest I’ve gotten :ffmpeg -framerate 1/5 -i img%02d.jpg -i input.mp3 -c:v libx264 -r 30
-shortest -t 19 output.mp4The output here is a 15 second movie, 5 seconds per image but the mp3 file is 19 seconds long.
Any ideas ?