
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (40)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
Sur d’autres sites (7071)
-
FLV Streaming on iPhone with ffmpeg
11 février 2014, par SylterGood Morning,
I am an iOS/Mac Developer.I am developing an application that grab flv link from a website : now I want to play this flv file in streaming.
I find in AppStore BUZZPlayer, an application that can play flv video streaming : http://itunes.apple.com/it/app/buzz-player/id389744738?mt=8
Searching on Google I find out that exists ffmpeg for iPhone, so, my question is how can I stream a FLV Video with ffmpeg on iPhone ?
A sample code is very appreciated !
Thank You.
P.S. Sorry for my poor English...
-
ffmpeg +libx264 iPhone -> 'avcodec_encode_video' return always 0 . please advice
2 janvier 2014, par isaiahav_register_all();
AVCodec *codec ; AVCodecContext *c= NULL ; int out_size, size, outbuf_size ; //FILE *f ; uint8_t *outbuf ;
printf("Video encoding\n") ;
/* find the mpeg video encoder */
codec =avcodec_find_encoder(CODEC_ID_H264) ;//avcodec_find_encoder_by_name("libx264") ; //avcodec_find_encoder(CODEC_ID_H264) ;//CODEC_ID_H264) ;
NSLog(@"codec = %i",codec) ;
if (!codec)
fprintf(stderr, "codec not found\n") ;
exit(1) ;
c= avcodec_alloc_context() ;/* put sample parameters */
c->bit_rate = 400000 ;
c->bit_rate_tolerance = 10 ;
c->me_method = 2 ;
/* resolution must be a multiple of two */
c->width = 352 ;//width ;//352 ;
c->height = 288 ;//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 ;c ->me_range = 16 ;
c ->max_qdiff = 4 ;
c ->qmin = 10 ;
c ->qmax = 51 ;
c ->qcompress = 0.6f ;'avcodec_encode_video' is always 0 .
I guess that because 'non-strictly-monotonic PTS' warning, do you konw same situation ?
-
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