rtsp-client

Record RTSP stream with FFmpeg libavformat

安稳与你 提交于 2019-11-27 09:53:30
问题 I'm trying to record RTSP stream from Axis camera with FFmpeg libavformat. I can grab video from files and then save it to another file, this is OK. But camera sends strange data, FPS is 100 and camera sends every 4th frame so result FPS is about 25. But libavformat set packets dts/pts for 90000 fps (default?) and new file stream has 100fps. Result is one hour video with only 100 frames. Here is my code #include <stdio.h> #include <stdlib.h> #include <libavcodec/avcodec.h> #include