[discussion] retrieve rtsp ntp time#672
Conversation
|
Run failed because of I tested the code myself with this snippet and it worked: import av
input_ = av.open('RTSP_URL')
for (ntp, packet) in input_.demux(video=0):
print('ntp', ntp)
print('packet', packet) |
|
I used your branch to download the video stream with RTSP. The returned ntp value is as follows, how should I interpret it? |
|
@Hobeom It's time in seconds since epoch. You can use this converter: https://www.epochconverter.com/. |
|
A very useful commit, unfortunately it fails completing the checking part :/ |
|
I'm sorry but I don't see this PR going anywhere, it completely changes the API. |
Great !! Jim |
Hi!
I have a use case where I would benefit from retrieving the camera's NTP time from a RTSP container. FFMPEG contains structures capable of parsing this information, but unfortunately they are internal and are not available in the public API.
I made this small patch to solve my problem. It is not generic enough, as it hardcodes ntp time into demux return. I also had to include
vendor/ffmpeg-4.2in include_dirs on setup.py.My intention with this PR is to share the solution with you and hopely find out a way to change the code so that it can be incorporated into the project.