[Libav-user] get RGB values from ffmpeg frame

Navin nkipe at tatapowersed.com
Tue Nov 20 12:38:41 CET 2012


Actually, Malik; the idea was not to use the ffmpeg.exe. I wanted the 
bitmap/RGB values to be stored in memory (a datastructure) in my program 
and then I'd pass the pointer of the datastructure to a client program 
which is running at the same time. The client program would then take 
the info from the datastructure and use it to display the video frame.
Thanks for the code you posted. Macros and datatypes like LT_SUCCESS, 
MAX_FR_SZ, metaD_t, LtHandle, ASF_IDX_SZ etc. seem new. Am a bit puzzled.

Navin

On 11/20/2012 5:00 PM, Malik Cissé wrote:
> Hi Navin,
>
> Also YUV4:2:0 in BMP does not seem feasible (sorry for my previous statement).
> One think you can do too is use ffmpeg in a system call in your code.
> This is very versatile (you need to replace 422 by 420 though)
> char ffmpegString[256];//should be plenty
> 	char fmt[] = "bmp"; //bmp, jpg, png, pgm etc...
> 	sprintf(ffmpegString, "ffmpeg.exe -s %dx%d -vcodec rawvideo -f rawvideo -pix_fmt uyvy422 -i raw_uyvy422.yuv -f image2 raw_uyvy422.%s",RawWidth, RawHeight, fmt);
> 	system(ffmpegString);
>
> Malik Cisse
>


More information about the Libav-user mailing list