How to get video start time with libvlc

546 views Asked by At

I'm trying to sync multiple videos based on the real time they were saved at.

For playing the video, I ended up with libvlc, but now i'm unable to read the metadata that contains the time at which the video starts.

I would use the start time to calculate offsets for videos, so that i can sync them with each other.

I created the video from an rtsp stream with the ffmpeg command

ffmpeg -i <stream path> -timestamp now output.mp4

looking at the file with ffprobe, I can see that it contains the correct timestamp in creation_time.

But this I am unable to read with libvlc.

Is there a way to save the real wallclock start time on the video in such a way that i can read it from libvlc?

Other suggestions that tell me how to sync two videos are welcome as well.

1

There are 1 answers

1
bossbarber On BEST ANSWER

I don't believe this is possible to do. On another project we were trying to get the real-time clock data from an RTSP feed, but only relative clock data can be retrieved, nothing that it includes a system time. You may want to check the libvlc forums. I couldn't find an answer there, but they are pretty good at responding to questions within a week.