> I'm wanting to grab the pixels from the screen, and encode that into a video. > The screenshot will save fine to a bmp file, but when I try and cast it to > work with encoding into a video, I get a swscale() src image error in my > output and the video file is just a blank white/gray screen. I made a topic > on stackoverflow > <http://stackoverflow.com/questions/15914012/encoding-a-screenshot-into-a-video-using-ffmpeg> > > where you can see the source I'm using. >
I mad this for a longer time and now it works. I will look at my code later. But for the moment i think these two lines are wrong: |avpicture_fill((AVPicture*)inpic, (uint8_t*)pPixels, PIX_FMT_BGR32, c->width, c->height); av_image_alloc(inpic->data, inpic->linesize, c->width, c->height, c->pix_fmt, 1);| you first copy the screenshot from pPixels to the AVpicture inpic, but then allocat the AVpicture, so a empty frame gots to the encoder.
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
