Modern video codecs are already very good at dealing with temporal redundancy. You probably don't need to do anything extra unless you're targetting an extremely low bitrate. You could probably go down to 10fps without having things look bad, and that should help.
I guess you want to leave the resolution fairly high, so it's easy to read the chalk board. Downscale to maybe 720p or even 480p. Unless you have a really fancy camera, there will probably be noise in the images, and the noise is input data that a video codec will try to faithfully reproduce, costing more bitrate. So downscale as much as you can without starting to lose useful detail, to minimize the non-useful detail in the input. e.g. -vf scale=-1:480
to scale to 480 pixels high, with width to keep aspect ratio the same.
Capture something high bitrate / high quality, then take it home and
ffmpeg -i input.mp4 -c:a opus -b:a 40k -pix_fmt yuv420p -c:v libx264 -preset slower -x264-params keyint=1000:nr=200 -crf 25 output.mkv
(links to docs in Professor Sparkles' answer.)
Use a higher crf for less quality / smaller files. Using a denoise filter on the input before feeding it to x264 could help, too, or just use x264's builtin noise reduction. (which is done in a way that will help compression the most).
Adjust the target bitrate for opus if you want more audio quality. 40kib/s should be ok for speech. If your video player will only seek to keyframes (instead of decoding to the seek target from the previous keyframe), you might find keyint=1000
is a bit too high.
You could play around with -vf mpdecimate
to make VFR video and not even send similar frames to the encoder, that doesn't save much unless you turn up the similarity threshold to the point where the video would look like it got stuck for a sec. Or if motion smoothness isn't important, you could use -vf framestep=2
to drop every other frame. And then I think you need to use -r 15 if your input was 30fps, or ffmpeg will be confused.
x265 takes way more CPU to encode and play back, but looks even better than x264.
VP9 is also an option. I was just looking at it, and there's a --enable-vp9-temporal-denoising
build option. That might help vp9 decide that the differences between frames in much of the picture are just noise, and not encode them at all.