[英]Get actual playtime of webrtc stream
I am streaming video from gstreamer to the rtsp, convert it to the webrtc and show the video in the website.我正在将视频从 gstreamer 流式传输到 rtsp,将其转换为 webrtc 并在网站上显示视频。 I need to know what is the time from the beginning of the stream to synchronize with some additional metadata.我需要知道从 stream 开始与一些额外的元数据同步的时间是多少。
When I connect to the stream 10 seconds after the streaming started for example, I need to know that the delay between start and my delay is exactly 10 seconds.例如,当我在流媒体开始 10 秒后连接到 stream 时,我需要知道开始和我的延迟之间的延迟正好是 10 秒。
How can I get such information?我怎样才能得到这样的信息?
You have two choices.你有两个选择。
Insertable Streams and insert metadata with each frame.可插入流并在每个帧中插入元数据。 I would use a identity
element and modify in the handoff
.我会使用一个identity
元素并在handoff
中进行修改。
requestVideoFrameCallback this allows you to get exact timing information. requestVideoFrameCallback这使您可以获取准确的时间信息。 presentationTime
is probably what you want, but other values might be useful. presentationTime
可能是您想要的,但其他值可能有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.