You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write timestamps to the video stream using the method described below.
Open the player to play streams from different links and compare the latency.
Note: Latency is a difficult issue. Don't start with random attempts and follow the documentation step by step to create a low-latency environment. For WebRTC, refer to #307. For live streaming, refer to v4_CN_SampleRealtime or v4_EN_SampleRealtime.
Note: If you can't achieve low latency following the documentation, it's because each link can cause latency. You need to be able to analyze the problem yourself. This article provides a method to troubleshoot latency using timestamps.
You can use FFmpeg to capture local time and write it to the video stream. This way, you can compare the images from different links to determine where the latency is.
You can use FFmpeg filters to achieve this. For specific filter parameters, please refer to FFmpeg.org:
Open a stopwatch webpage in your browser, capture the browser window with OBS, and observe the difference between the stopwatch numbers in the streaming video and the stopwatch browser.
For example, a stopwatch page, timeanddate, there are two ways to capture:
Use Window Capture to directly capture the browser window.
Use OBS's Browser to open the page in OBS's browser, and click Interact to start the stopwatch.
After capturing in OBS, you can crop the window by holding down ALT or Option and dragging the window for quick cropping.
You need to add a timer or time to the OBS source. There are many ways to do this, such as using a Lua script or a browser implementation, etc. For example, a web page clock implementation, add a new browser in OBS source, and enter the URL (web page parameter description):
Don't worry about custom CSS, the web page style in this example is passed through the get parameter style.
Note: Test the URL in Chrome or another browser first to debug the style, then copy it to the OBS browser source URL input box, otherwise, it may cause problems.
This discussion was converted from issue #2742 on July 18, 2023 08:12.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This article describes how to troubleshoot high latency, with the main steps as follows:
FFmpeg
You can use FFmpeg to capture local time and write it to the video stream. This way, you can compare the images from different links to determine where the latency is.
You can use FFmpeg filters to achieve this. For specific filter parameters, please refer to FFmpeg.org:
-vf drawtext="fontfile=arial.ttf:text='%{localtime\:%X}':x=10:y=10:fontsize=40:fontcolor=white"
For example, a specific example:
Open the player: http://localhost:8080/players/srs_player.html?autostart=true
OBS Stopwatch
Open a stopwatch webpage in your browser, capture the browser window with OBS, and observe the difference between the stopwatch numbers in the streaming video and the stopwatch browser.
For example, a stopwatch page, timeanddate, there are two ways to capture:
After capturing in OBS, you can crop the window by holding down ALT or Option and dragging the window for quick cropping.
OBS Device
Capture video with OBS video capture device
You need to add a timer or time to the OBS source. There are many ways to do this, such as using a Lua script or a browser implementation, etc. For example, a web page clock implementation, add a new browser in OBS source, and enter the URL (web page parameter description):
Don't worry about custom CSS, the web page style in this example is passed through the get parameter style.
Beta Was this translation helpful? Give feedback.
All reactions