I have setup a RTSP monitor with a Raspberry Pi 3, using this tutorial:
TLDR: it uses the screen command together with omxplayer to overlay, on the console, the RTSP streams from multiple IP cameras, in different areas of the monitor, pretty much like a quad mixer does with analog cameras inputs.
Now, without having to access the RTSP streams twice each (one to display it realtime, another to record it), I want to also have a recording made on the 128GB SD I'm using, and with practicality in mind I'd like to just record whatever is displaying on screen and sent to the HDMI monitor connected to the Rasberry Pi 3 (which is, the combined grid-view of the multiple streams that I can see on screen).
Now, the environment is console only, and x11grab is not an appropriate source, so I went with the framebuffer input, fbdev, and specifically the /dev/fb0 device, which targets the "raw" video output. So, to test it, I ran:
sudo ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
in order to get a screenshot and check whether the overlayed streams were displayed... but naturally they weren't (I just see a shot of the text console screen that appears right after boot, and soon after gets covered by the RTSP streams), and not because I see any apparent reason why they shouldn't, but just because it would have been too easy otherwise.
Now, since I cannnot use the framebuffer itself to capture "whatever is being sent to video", what else is left?
It could be a viable alternative to have ffmpeg directly access the RTSP streams, and "duplicate" them, one to be used as source by omxplayer, and the other to be recorded on the SD... even if it is in my opinion needlessly complicated, and defeats the practical aim I have, which is recording all the streams together in a grid view just like they are shown on the monitor.