Ant-Media-Server icon indicating copy to clipboard operation
Ant-Media-Server copied to clipboard

Timing is not correct in HLS recording of RTSP cameras

Open yashtandon113 opened this issue 10 months ago • 3 comments

Short description

Suppose there is a timer captured in a video frame via different IP cameras from same location and recording the HLS on the server side. Now, when the recording is finalized after 10 minutes, the timing is beyond or ahead of the actual time.

For example, the clock is at 12:00 in the start of the recording. Now, after 10 minutes, the timing in recording should be 12:10 but there are differences in timing in recording files.

Environment

  • Ant Media Server version: v2.7.0 and above

Steps to reproduce

  1. Change the HLS settings in application settings to store them
  2. Add IP camera streams to the server, capturing the timer
  3. Stop the stream after 10 minutes

Expected behavior

The timing should be correct in the recording after 10 minutes, as explained in the description above

Actual behavior

The timing is not correct in the recording.

yashtandon113 avatar Apr 17 '24 08:04 yashtandon113

After collaborating with Burak, we investigated this issue further. Interestingly, we found that the problem persists when recording RTSP streams with FFmpeg. It's surprising that no reports about this issue have surfaced online, considering its presence in FFmpeg as well. We've posted inquiries about this matter on various platforms, including Super User, Video Stack Exchange, and Reddit. With luck, we anticipate gathering more information soon.

lastpeony avatar May 03 '24 16:05 lastpeony

I have tested with my Axis Camera. This is the setup:

Image

I opened time.is web site in the tablet and added the RTSP URL to Ant Media Server as stream source. I recorded the stream for nearly one hour. When I play I didn't see any time drift.

You can ger the recording here: https://drive.google.com/file/d/13HXwVGztcDtu1e-YGau_Jy5TFWr2rleS/view?usp=sharing

burak-58 avatar Jun 10 '24 04:06 burak-58

Then I'll close the issue for the inactivity. Please feel free to re-open if you think there is still a problem

mekya avatar Jun 24 '24 10:06 mekya