
Recherche avancée
Autres articles (22)
-
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 (...)
-
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 (...) -
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 (...)
Sur d’autres sites (3443)
-
why is streaming to an flv server with ffmpeg only showing black/blank video for clients ?
6 septembre 2012, par rogerdpackWhen I stream to an flv server, like flash media server, using ffmpeg, like
ffmpeg -i input -vcodec libx264 rtmp://hostname/streamname
it turns out black. Why is that ?
-
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
-
JavaCV - strange black screen when playing a file with FFmpegFrameGrabber
17 mai 2012, par noncomI am using JavaCV and it's FFmpegFrameGrabber in my project. It loads and player files OK, when I launch the project from Eclipse, but shows either a black screen or a still 1st frame when I run a compiled project. Sometimes comming with this error :
Input #0, avi, from 'C:/path/Start_Cut.avi':
Duration: 00:00:20.03, start: 0.000000, bitrate: 26002 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 1920x1080, 30 tbr, 30 tbn, 30 tbc
Cannot allocate memory. com.googlecode.javacv.FrameGrabber$Exception: Cannot initialize the conversion c ontext.
at com.googlecode.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.jav a:280)and sometimes with
[mpeg4 @ 6A95DF20] Invalid and inefficient vfw-avi packed B frames detected
Input #0, avi, from 'C:/path/Start_Cut.avi':
Duration: 00:00:20.03, start: 0.000000, bitrate: 26002 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25 tbr, 30
tbn, 25 tbcdoes anyone has a clue on this ?
UPDATE :
I have been able to narrow down the problem. For some reason, FFmpegFrameGrabber returns
null
upn calling thegrab()
method. Why does it work in Eclipse and does not work in standalone build ? All libraries are included and I suppose, it would come up with an error if they did not.