I am trying to use FFMPEG to capture a raspberry pi's screen/display and stream it to an RGB led matrix but cannot figure out how to capture the screen/display properly.
I am working with an example program (provided by Adafruit) that takes a video file as a parameter and streams it to the matrix and I'm trying to effectively swap out any mention of the video file with the screen/display. Here's the code
I tried to change line 141 as follows.
// Before
if(avformat_open_input(&pFormatCtx, movie_file, NULL, NULL)!=0)
return -1; // Couldn't open file
// After
AVInputFormat *pAVInputFormat = NULL;
pAVInputFormat = av_find_input_format("x11grab");
if(avformat_open_input(&pFormatCtx,, ":0.0+10,250", pAVInputFormat, NULL))
return -1; // Couldn't open file
But that didn't really seem to work.
Is there an easy way to make the program capture from the screen/display instead of a video file?