Skip to content

IM Player (f8.implayer)

C++ MPV-based player service with shared-memory video output.

  • Service class: f8.implayer
  • Version: 0.0.1
  • Source directory: f8/implayer
  • Tags: none

When to Use

  • Use f8.implayer as the main video playback entry point for local files, stream URLs, and supported online sources.
  • It is ideal for demos, replayable test passes, and scenarios where several graph branches should share one video source.
  • Choose it when you need explicit playback control such as play, pause, seek, loop, and volume.

Common Wiring Patterns

  • The standard pattern is f8.implayer -> CV / DL / Viz.
  • When several branches consume the same footage, keep implayer as the single canonical producer.
  • If playback needs to be controlled from graph logic, send commands from f8.pyengine or a script service.

Pitfalls / Gotchas

  • If the image is empty, check service logs and verify that downstream consumers are using the correct videoShmName.
  • Stream-based sources are more sensitive to network and codec environment issues than local files.
  • If the graph will be shared, remember that URL and cookie-related state may be sensitive.

Service Reference

How to Run

win/f8implayer_service.exe
  • Workdir: ./
  • Environment overrides: none

Typical Inputs / Outputs

  • Data inputs: none
  • Data outputs: playback, monitor
  • Commands: open, play, pause, stop, next, previous, seek, setVolume

Service State Fields

Name Access Required On Node Schema Description
loop rw true false boolean Repeat playlist when reaching EOF.
mediaUrl rw true true string URI or local file path to open. Cleared when exporting publish JSON.
openxrMode rw true true string / enum[off, on, auto] PCVR output: off|on|auto (auto retries when headset/runtime becomes available).
openxrMirrorWindow rw true true boolean When OpenXR is active, also present to the SDL mirror window.
volume rw true true number / default=1.0 Volume
playing ro true false boolean Playback state.
duration ro true true number Duration (seconds).
lastError ro true false string Last error message.
videoShmName ro true true string Shared memory region name.
videoShmEvent ro true false string Optional named event to signal new frames.
videoShmMaxWidth rw true false integer Downsample limit (0 = auto).
videoShmMaxHeight rw true false integer Downsample limit (0 = auto).
videoShmMaxFps rw true false number Copy rate limit (0 = unlimited).
authMode rw true false string / enum[none, browser, cookiesFile] Cookie auth mode: none|browser|cookiesFile (default: none).
authBrowser rw true false string / enum[chrome, chromium, edge, firefox, safari] Browser name for authMode=browser: chrome|chromium|edge|firefox|safari.
authBrowserProfile rw true false string Optional browser profile for authMode=browser. Local-only path-like metadata; cleared when exporting publish JSON.
authCookiesFile rw true false string cookies.txt path for authMode=cookiesFile. Local-only file path; cleared when exporting publish JSON.
decodedWidth ro true false integer Decoded/source video width (on-screen uses this).
decodedHeight ro true false integer Decoded/source video height (on-screen uses this).
videoWidth ro true false integer Width of the video frame.
videoHeight ro true false integer Height of the video frame.
videoPitch ro true false integer Pitch of the video frame.
active rw true false boolean / default=True Service lifecycle state (activate/deactivate).
svcId ro true false string Readonly: current service instance id (svcId).

Key Fields That Matter

  • loop (Loop, rw): Repeat playlist when reaching EOF. Schema: boolean.
  • mediaUrl (Media URL, rw): URI or local file path to open. Cleared when exporting publish JSON. Schema: string.
  • openxrMode (OpenXR Mode, rw): PCVR output: off|on|auto (auto retries when headset/runtime becomes available). Schema: string / enum[off, on, auto].
  • openxrMirrorWindow (OpenXR Mirror, rw): When OpenXR is active, also present to the SDL mirror window. Schema: boolean.
  • volume (Volume, rw): Volume Schema: number / default=1.0.
  • playing (Playing, ro): Playback state. Schema: boolean.
  • duration (Duration, ro): Duration (seconds). Schema: number.
  • lastError (Last Error, ro): Last error message. Schema: string.

Service Commands

open

Open a media URL

  • Show on node: true
Param Required Schema Description
url true string

play

Start playback

  • Show on node: true
  • Params: none

pause

Pause playback

  • Show on node: true
  • Params: none

stop

Stop playback

  • Show on node: true
  • Params: none

next

Advance to the next playlist item

  • Show on node: true
  • Params: none

previous

Return to the previous playlist item

  • Show on node: true
  • Params: none

seek

Seek

  • Show on node: false
Param Required Schema Description
position true number

setVolume

Set volume

  • Show on node: false
Param Required Schema Description
volume true number

Service Data Input Ports

None

Service Data Output Ports

Name Required On Node Schema Description
playback true false object{duration, playing, position, videoId} Playback state stream (position/duration/playing).
monitor true false object{active, alive, cpu, error, ...} Unified runtime monitor snapshots (health/resource/perf/error).

Operators

None