I am trying to record an h264 RTSP stream and do timelapse. I would like to only record every 10th frame (my original stream is 30FPS) and drop the rest of the frames. I also tried to speed up the video because I do get frame pauses, that last the appropriate time, but the video doesn’t speed up, so I added ,setpts=PTS/3"
ffmpeg -i rtsp://your_rtsp_stream_url -vf "select='not(mod(n,10))',setpts=PTS/3" -fps_mode vfr -c:v libx264 output.mp4
What I get instead is a steadily increasing file while recording so it looks like it’s not dropping frames:
frame= 326 fps=1.7 q=24.0 size= 21504KiB time=00:00:54.80 bitrate=3214.3kbits/s speed=0.28x
How can I only record every 10th frame and then playback that video with a 3x speed and do timelapse?