I am trying to record the rtsp stream using openRTSP and ffmpeg using below command, and which works fine. But there are some issue in the duration of the video. I am always getting output video file with duration less than the actual record period.
For example, if I record the live for 10 minutes, I am getting video file with only 6-7 minutes of duration. I have checked the fps of both input and output and it is same(fps=10). What could be the issue?
openRTSP -D 10 -v -t -c -B 10000000 -b 10000000 rtsp://192.168.1.5:554/media/live/1/1 | ffmpeg -i - -codec copy out.mp4
The problem was with ffmpeg version,the HLS segment duration in m3u8 file was integer value with old ffmpeg. But When I use latest ffmpeg it's changed to float and I am getting full duration video.