One of my favorite things about Mpv is that it's basically a clear cut example on how to use the FFmpeg api. It's written in a way that's fairly straightforward to follow, and was rather instrumental in me understanding the hardware acceleration API of FFmpeg.