ffmpeg take screenshot

C++
ffmpeg -i inputvideo.mp4 -ss 00:00:03 -frames:v 1 outputimage.jpeg
Source

Also in C++: