obs-websocket icon indicating copy to clipboard operation
obs-websocket copied to clipboard

Feature Request: Seek or Scrub Media Source

Open respectTheCode opened this issue 1 year ago • 1 comments

Feature Request Type

RPC Request

Feature Request Type (Other)

No response

Requested Feature

It would be great to have away to move the playhead of a media source to an absolute or relative time

Requested Feature Usage Scenario

While a video is playing jump back 15 seconds to repeat a section.

Jumping to the last 30 seconds of a video to see how it ends.

respectTheCode avatar May 05 '24 01:05 respectTheCode

You can use GetMediaInputStatus to get the current playback time in milliseconds along with the playback status and the total length of the video.

Using this info just do a calculation on that data and then use SetMediaInputCursor to set the media source to that time. (Be aware of the keyframe interval of your video. As you'd ideally want to seek to a keyframe for eg 2 sec you'd want to seek to 2000,4000,6000....)

TriggerMediaInputAction can also be used to Play/Pause/Restart/Stop the media source. (If you plan on seeking frequently it's best to pause the source before doing so.)

Joefis-x20s avatar May 22 '24 11:05 Joefis-x20s

This worked

respectTheCode avatar Mar 02 '25 21:03 respectTheCode