
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (65)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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 (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (6285)
-
getting black and white image after encoding
16 mai 2012, par user1310596I am trying to encode image using ffmpeg library and objective c. I am using following code but I am getting black and white image as the result. Is there something to do with pixel format(PIX_FMT) ? Please help me so that I can get colored image.
av_register_all();
avcodec_init();
avcodec_register_all();
avformat_alloc_context();
AVCodec *codec;
AVCodecContext *ctx= NULL;
int out_size, size, outbuf_size;
AVFrame *picture;
uint8_t *outbuf;
unsigned char *flvdata = malloc(sizeof(unsigned char) * 30);
outbuf_size = 200000;
outbuf = malloc(outbuf_size);
printf("Video encoding\n");
codec = avcodec_find_encoder(CODEC_ID_FLV1);
if (!codec) {
fprintf(stderr, "codec not found\n");
exit(1);
}
ctx= avcodec_alloc_context();
picture= avcodec_alloc_frame();
ctx->width = 320;
ctx->height = 240;
ctx -> sample_rate = 11025;
ctx -> time_base.den = 1000;
ctx -> time_base.num = 23976;
ctx -> codec_id = CODEC_ID_FLV1;
ctx -> codec_type = CODEC_TYPE_VIDEO;
ctx->pix_fmt = PIX_FMT_YUV420P;
if (avcodec_open(ctx, codec) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
outbuf_size = 100000;
outbuf = malloc(outbuf_size);
size = ctx->width * ctx->height;
AVFrame* outpic = avcodec_alloc_frame();
int nbytes = avpicture_get_size(PIX_FMT_YUV420P, ctx->width, ctx->height);
uint8_t* outbuffer = (uint8_t*)av_malloc(nbytes);
fflush(stdout);
int numBytes = avpicture_get_size(PIX_FMT_YUV420P, ctx->width, ctx->height);
UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"0.jpg"]];
CGImageRef newCgImage = [image CGImage];
CGDataProviderRef dataProvider = CGImageGetDataProvider(newCgImage);
CFDataRef bitmapData = CGDataProviderCopyData(dataProvider);
long dataLength = CFDataGetLength(bitmapData);
uint8_t *buffer = (uint8_t *)av_malloc(dataLength);
buffer = (uint8_t *)CFDataGetBytePtr(bitmapData);
for(int i = 0; i < dataLength; i++)
{
if((i + 1) % 16 == 1 && i != 1)
printf("\n");
printf("%X\t",buffer[i]); // getting something different than the actual hex value of the image
}
outpic -> pts = 0;
avpicture_fill((AVPicture*)picture, buffer, PIX_FMT_RGB8, ctx->width, ctx->height);
avpicture_fill((AVPicture*)outpic, outbuffer, PIX_FMT_YUV420P, ctx->width, ctx->height);
struct SwsContext* fooContext = sws_getContext(ctx->width, ctx->height,
PIX_FMT_RGB8,
ctx->width, ctx->height,
PIX_FMT_YUV420P,
SWS_FAST_BILINEAR, NULL, NULL, NULL);
sws_scale(fooContext, picture->data, picture->linesize, 0, ctx->height, outpic->data, outpic->linesize);
printf("abcdefghijklmnop");
out_size = avcodec_encode_video(ctx, outbuf, outbuf_size, outpic);
printf("\n\n out_size %d outbuf_size %d",out_size,outbuf_size);Thanks in advance
-
Remove white-xifish.png from makefile dependencies for spec ; it doesn’t appear to
3 février 2012, par MontyRemove white-xifish.png from makefile dependencies for spec ; it doesn’t appear to reference it, and trying to install it twice is breaking make install.
git-svn-id : http://svn.xiph.org/trunk/vorbis@18185 0101bb08-14d6-0310-b084-bc0e0c8e3800
-
vp7 : fix checking vp7_feature_value_size()
11 novembre 2014, par Michael Niedermayer