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
Scripts may want to trigger an action at a precise playback time in the future. When using mp.observe_property on audio-pts, the resolution is only ~50ms realtime. Also, since the stream-time interval is ~50ms multiplied by playback speed, this problem is exacerbated, for example, when speed = 2 and the minimum interval becomes ~100ms in the audio stream.
I'm going to tentatively throw out an arbitrary goal of <1ms precision in stream-time (not in playback time), but this is negotiable so let me know if this is unrealistic for whatever reason.
Ideally, this method would be able to hook video frames as well.
Potential solution 1
If there was a way to pick an arbitrary resolution to observe audio-pts and make it not depend on playback speed that could help.
Potential solution 2
A way to add a high precision timer that executes a script function when audio-pts is greater/less than a user defined value. A corresponding property to fire for video times/frames might also be useful for similar applications.
The text was updated successfully, but these errors were encountered:
Pulled out from #13614 (comment)
Problem
Scripts may want to trigger an action at a precise playback time in the future. When using
mp.observe_property
onaudio-pts
, the resolution is only ~50ms realtime. Also, since the stream-time interval is ~50ms multiplied by playback speed, this problem is exacerbated, for example, when speed = 2 and the minimum interval becomes ~100ms in the audio stream.I'm going to tentatively throw out an arbitrary goal of <1ms precision in stream-time (not in playback time), but this is negotiable so let me know if this is unrealistic for whatever reason.
Ideally, this method would be able to hook video frames as well.
Potential solution 1
If there was a way to pick an arbitrary resolution to observe audio-pts and make it not depend on playback speed that could help.
Potential solution 2
A way to add a high precision timer that executes a script function when
audio-pts
is greater/less than a user defined value. A corresponding property to fire for video times/frames might also be useful for similar applications.The text was updated successfully, but these errors were encountered: