original from https://github.com/Ansersion/myRtspClient for self testing and develop use. I add cmakelist and add a source code to decode the h264 with ffmpeg. more info please see the original page. Thx for opensource and the kind author Ansersion.
1.cd myRtspClient 2.cmake . && make 3.cd .. && cmake . make 4.in src there are two way to get data one is ffmpeg another is jrtplib. 5.h264 decode then encode to mjpeg.