This repository has been archived on 2026-07-09. You can view files and clone it, but cannot push or open issues or pull requests.
agent-knowledge-base-archived/projects/translation/notes.md

19 KiB

Translation Notes

Initial User Description

The project will likely use an Android phone as a live camera source. The phone sends its camera video stream over SRT. Unreal Engine receives that stream, and a Motion Design scene adds polished overlay graphics such as cycling race statistics and title cards.

The phone or an existing app will also provide sensor data, including pedal rotation speed/cadence, wheel speed, and heart rate. The user will provide the existing app later for inspection.

The immediate goal is not the final graphics package. The immediate goal is to write or configure an Unreal Engine plugin/workflow that can show the SRT stream inside Unreal Engine.

2026-06-03 ActionStreamer Android Sender Repository

The Android sender repository is now identified as krustophski/ActionStreamer, local path /Users/post/Documents/GitHub/ActionStreamer.

It is a private independent fork of ThibaultBee/StreamPack. Branch policy in that repository:

  • main mirrors upstream StreamPack;
  • custom/actionstreamer is the private working branch;
  • root AGENTS.md documents the upstream/rebase workflow.

Relevant existing pieces:

  • demos/camera is an Android camera streaming sample;
  • extensions/srt provides SRT output;
  • SrtMediaDescriptor supports host, port, stream id, passphrase, latency, and timeout;
  • the camera demo settings already include endpoint type SRT, SRT server IP, port, stream id, passphrase, and bitrate regulation;
  • default SRT port is already 9998, matching the current Unreal plugin listener test.

First Android direction: do not rewrite SRT transport. Reuse StreamPack's camera streamer and SRT endpoint, then brand/simplify the camera demo into ActionStreamer with defaults and UX aimed at sending the phone camera to the Unreal listener.

2026-06-03 ActionStreamer Native Sender Handoff

The Android work has moved beyond the original StreamPack demo adaptation. Current sender is a native app module in krustophski/ActionStreamer:

/Users/post/Documents/GitHub/ActionStreamer
branch: custom/actionstreamer
module: :actionstreamer-native
APK: apps/actionstreamer-native/build/outputs/apk/debug/ActionStreamer.apk
package: com.krustophski.actionstreamer

Current working profile:

SRT: caller -> 192.168.170.115:9998
SRT flags: latency=300&transtype=live&tlpktdrop=1
Video: H.264/AVC, 1280x720, 30 fps, 3500 kbps
Audio: disabled
OIS: disabled
Video stabilization: disabled

Important testing notes:

  • HEVC on vivo X80/V2183A caused pixel breakup or unstable output in the observed tests.
  • H.264 is currently preferred for stable Unreal ingest.
  • Optical stabilization and Camera2 video stabilization were implemented as API/settings fields and confirmed to be supported by camera 0 on tested phones, but enabling them caused stream failure/instability. Keep them disabled unless doing a dedicated test.
  • Pixel 9 Pro was installed successfully on 2026-06-03. It streamed with hardware encoder c2.exynos.h264.encoder.
  • vivo X80/V2183A hardware encoder previously reported MediaTek hardware H.264/HEVC encoders; H.264 is the current safe choice.

Phone API endpoints for the Unreal/SRT plugin agent:

GET  /api/status
GET  /api/settings
POST /api/settings
POST /api/control/start
POST /api/control/stop
POST /api/control/restart
GET  /api/log
GET  /api/telemetry
GET  /api/capabilities

When the phone is connected over ADB from the Mac:

adb forward tcp:18080 tcp:8080
http://127.0.0.1:18080/api/status

For another agent on the same network or cellular-accessible route, use:

http://<phone-ip>:8080

The phone dashboard/API is a device endpoint for diagnostics and emergency control. Unreal Remote Control Web API remains the master operator control layer for broadcast events, Motion Design presets, stream plate layout, replay/live mode, and final output selection.

2026-06-03 StreamPack Main4 Branch Notes

The user has a local working folder:

/Users/post/VScode/StreamPack-main 4

This folder should be treated as read-only input. Its streaming behavior is currently preferred because the image is acceptable. Agents should not modify it directly.

The ActionStreamer repository now has a separate branch based on that folder:

/Users/post/Documents/GitHub/ActionStreamer
branch: custom/streampack-main4-unreal
commit: c94780da0
APK: demos/camera/build/outputs/apk/debug/ActionStreamer.apk

Implementation note: this branch removes the earlier :actionstreamer-native experiment from the active tree and returns to the StreamPack demo-camera based app. The added work is a thin Unreal-friendly API layer on top of the existing SettingsWebServer; it does not intentionally change codec, bitrate, resolution, FPS, or camera quality defaults from StreamPack-main 4.

Current Unreal-facing additions in that branch:

  • dashboard/API port is 8080;
  • APK output filename is ActionStreamer.apk;
  • aliases exist for /api/control/start, /api/control/stop, /api/control/restart;
  • /api/status includes both old StreamPack fields and native-style fields such as streamState, settings, telemetry, session, and sensors;
  • /api/log, /api/telemetry, /api/capabilities, /api/sensors, and /api/session/* exist for Unreal connector integration;
  • sensor endpoints are scaffolded only and should be connected to real BLE later.

2026-06-02 SRT Stream Plugin Discussion

The first module should be SRT Stream Unreal Engine Plugin.

The plugin should be fast and native to a C++ Unreal project. Remote Control Web API is not the transport for video. It is the operator control layer for buttons and fields:

  • add stream;
  • delete stream;
  • start/stop listener;
  • port;
  • passphrase;
  • latency;
  • stream name/id;
  • status.

The video path should remain native:

Android camera app
  -> SRT stream
  -> Unreal C++ SRT receiver plugin
  -> decoded frame texture/render target/material
  -> Unreal scene / Motion Design

The best MVP direction is likely FFmpeg with SRT support, or libsrt plus FFmpeg/libavcodec. CPU decode is acceptable for the first proof. GPU decode can be investigated later if latency or CPU load requires it.

For Motion Design compatibility, avoid a closed custom-only system. The plugin should expose SRT streams as normal Unreal scene/media resources as much as practical: stream actor/component, output texture/render target, material instance, and possibly later Media Framework source/player support.

2026-06-02 Resilient Stream Requirement

The user clarified that the plugin must be very resilient. A phone stream can disappear and later return with different parameters. This must not break the Unreal scene or Motion Design page.

Expected behavior:

  • phone stops streaming -> stream actor switches to technical fallback slate;
  • phone reconnects -> stream actor switches back to live video automatically;
  • phone restarts sender with different bitrate/resolution/frame rate/codec profile -> plugin attempts to renegotiate/reinitialize decoding and continue;
  • Motion Design overlays and telemetry remain active while video is missing;
  • stream identity persists across reconnects.

The technical slate should be automatic. It can be generated in Unreal from a PNG/background plus text, material, UMG/widget render target, TextRender overlay, or a future Motion Design template.

The slate should show useful operator information:

  • stream id/name;
  • phone/device name;
  • rider/athlete name;
  • team/number when available;
  • listener port;
  • current state such as WAITING FOR SRT, NO SIGNAL, or RECONNECTING;
  • last seen time;
  • last known codec/resolution/frame rate/bitrate if available.

The core idea is that the stream plate always renders something usable: either live video or a technical picture explaining what source is missing.

2026-06-03 Unified Telemetry And Replay Notes

ActionStreamer should become one phone app for both SRT streaming and telemetry. Do not split BLE/sensor capture into a separate Android app unless a later blocker forces it.

Standard BLE sports services to support first:

  • Bluetooth Heart Rate Service for chest straps and HR sensors;
  • Bluetooth Cycling Speed and Cadence Service for wheel and crank sensors;
  • Bluetooth Cycling Power Service for power meters and smart cranks;
  • Bluetooth Running Speed and Cadence Service for non-cycling sport extensions when useful.

The phone should be remotely controlled after launch. Unreal/operator UI is the master controller; the phone REST API and HTML dashboard are local device endpoints for commands, settings, diagnostics, logs, and sensor pairing.

Live telemetry path:

ActionStreamer phone
  -> WebSocket telemetry
  -> Unreal PC service
  -> Postgres + TimescaleDB / raw JSONL
  -> Unreal Motion Design live values and replay queries

Recording stack:

  • TimescaleDB for queryable live/archive time-series;
  • raw JSONL for full-fidelity phone/server verification and recovery;
  • FIT activity export for sports ecosystem compatibility.

Do not make old Google Fit API the primary export path. Prefer FIT/Strava-compatible files first and keep Android Health Connect in mind for later Android ecosystem integration.

Replay must be a queryable timeline, not simple log playback. The same recorded Unreal-side video should be replayable with different Motion Design data layer presets:

  • Live Broadcast;
  • Climb Analysis;
  • Power Analysis;
  • Heart Rate;
  • Map Replay;
  • Diagnostics.

Synchronization fields to preserve on every sample/event where possible:

  • session_id;
  • sample_id;
  • phone_monotonic_ns;
  • phone_wall_time;
  • server_received_at;
  • session_time_ms.

The server timeline is the master clock for replay. Phone-local raw logs and server records should be periodically verifiable through checkpoints or hash blocks so dropped/buffered samples can be detected and recovered.

2026-06-03 Synchronized Recording Notes For Unreal Service Agents

The conversation intent was not just "show telemetry live". The system must record a ride/broadcast session synchronously so Unreal can later replay the video with different data layers.

Minimum recording model:

ActionStreamer phone local JSONL
  + ActionStreamer WebSocket telemetry
  -> Unreal PC service
  -> TimescaleDB normalized samples
  -> server raw JSONL archive
  -> FIT export on session stop
  -> Unreal/Motion Design live and replay APIs

Server-side session timeline is canonical. The phone keeps its own local backup, but replay queries should use server session_time_ms.

Each sample/event should preserve:

  • session_id;
  • phone_session_id if the phone generated its own id;
  • sample_id;
  • device_id;
  • sensor_id;
  • sensor_role;
  • phone_monotonic_ns;
  • phone_wall_time;
  • server_received_at;
  • session_time_ms;
  • raw payload or raw payload reference.

Data categories to store:

  • phone metrics: battery, charging, thermal zones, CPU/app CPU/per-core CPU, memory, network, stream stats;
  • phone sensors: GPS, speed, altitude, IMU, magnetometer/compass;
  • BLE sports sensors: heart rate, cycling speed/cadence, cycling power, running speed/cadence;
  • stream events: start/stop/reconnect, SRT settings, codec/resolution/fps/bitrate changes;
  • production events: operator actions, Motion Design scene changes, overlay triggers, replay markers, values shown on air;
  • Unreal video metadata: file/id, stream id, recording start/end in session time, codec/resolution/fps.

Replay is not simple log playback. Unreal should ask the service for values by session_time_ms, allowing one recorded video to be shown with different layer presets such as Live Broadcast, Climb Analysis, Power Analysis, Heart Rate, Map Replay, and Diagnostics.

Verification is part of the design: compare phone local JSONL sample counts/checkpoints/hash blocks with server records, report missing ranges, and recover buffered samples when possible.

2026-06-03 Replay And Motion Design Sequencing Notes

Replay should be designed as a queryable timeline plus cue/state reconstruction system.

Working Unreal-side objects/classes for agents to implement or approximate:

  • UActionStreamerSessionSubsystem: session and registered phone state.
  • UActionStreamerTelemetryClient: live/replay API client to the Unreal PC service.
  • UActionStreamerReplayClock: current session_time_ms, playback rate, pause/run/seek/scrub.
  • UActionStreamerTimelineSource: named channel query API for Motion Design/Blueprints.
  • UActionStreamerMotionCueRouter: converts timeline events into Motion Design/Blueprint/Sequencer actions.
  • AActionStreamerReplayDirector: coordinates recorded video playback, layer preset, replay clock, and Motion Design scene state.
  • UActionStreamerLayerPreset: data asset/config for Live Broadcast, Climb Analysis, Power Analysis, Heart Rate, Map Replay, Diagnostics.

Event/cue types to store in production_events:

  • scene_change;
  • overlay_show;
  • overlay_hide;
  • overlay_update;
  • marker;
  • camera_cut;
  • stream_state;
  • data_threshold.

Replay rules:

  • Live mode records events and renders current graphics.
  • Replay mode reconstructs state at the requested session_time_ms.
  • Seeking must rebuild visible Motion Design state from checkpoints/keyframes plus events, not merely fire events between old and new time.
  • Cue processing must be idempotent: repeated seeks should not duplicate one-shot actions.
  • Long-lived overlays need explicit show/hide or duration/state snapshots so replay can reconstruct them.
  • Sequencer can drive playback time for cinematic review, but telemetry values are still queried by server session_time_ms.
  • Motion Design pages should bind to named timeline channels, not phone dashboard HTML.

Stable channel examples:

  • rider.speed_kph;
  • rider.cadence_rpm;
  • rider.heart_rate_bpm;
  • rider.power_w;
  • route.grade_percent;
  • route.altitude_m;
  • route.distance_m;
  • phone.temperature_c;
  • phone.battery_percent;
  • stream.reconnect_count;
  • stream.receiver_state.

2026-06-03 Packaged Unreal Broadcast Runtime Notes

The Unreal side should become a packaged broadcast application. When the operator starts the .exe, it should not require opening the Unreal Editor or running manual helper commands.

Launch behavior:

  • open fullscreen or configured output resolution;
  • start the SRT listener/server automatically, initially on port 9998;
  • load the default Motion Design program scene;
  • show live phone video with telemetry overlays when the ActionStreamer stream is connected;
  • show the technical fallback slate when the stream is missing;
  • expose Remote Control Web API/operator controls immediately.

Runtime presets to implement first:

  • Program Fullscreen;
  • Program With Lower Third;
  • Diagnostics;
  • Replay Timeline;
  • Analysis Split;
  • Technical Fallback.

The important TV behavior is that the program feed can animate/scale/crop to the side or corner while replay, map, graph, or sensor analysis panels open. These changes should be controlled by Motion Design/Sequencer-friendly cues and recorded as production events.

Remote controls should cover:

  • listener start/stop/restart;
  • phone IP/settings/stream restart;
  • session start/stop;
  • preset switching;
  • replay play/pause/seek/scrub;
  • layer preset selection;
  • overlay show/hide/update;
  • output mode selection.

Output planning:

  • MVP: local Unreal fullscreen/window program output;
  • planned: final composited SRT output, NDI output, WebRTC output/preview;
  • later: SDI/DeckLink, RTMP, local recording/program file.

Dependencies should be bundled where practical. The packaged runtime should include the selected FFmpeg/SRT/native binaries and default Motion Design/runtime assets so another machine can run the broadcast app without separate command-line tool installs.

Build for one ActionStreamer stream first, but keep stream ids/layouts so the same runtime can later support multiple phone streams, multi-view mosaics, picture-in-picture, and live-plus-replay layouts.

2026-06-03 ActionStreamer Phone Connector Notes For Unreal Agents

The current native phone module already exposes a REST connector that the Unreal SRT plugin/operator agent should consume.

Base URL:

http://<phone-ip>:8080

Current routes:

  • GET /api/status;
  • GET /api/settings;
  • POST /api/settings;
  • POST /api/control/start;
  • POST /api/control/stop;
  • POST /api/control/restart;
  • GET /api/sensors;
  • POST /api/sensors/scan;
  • POST /api/sensors/connect;
  • POST /api/sensors/disconnect;
  • POST /api/session/start;
  • POST /api/session/stop;
  • GET /api/log;
  • GET /api/telemetry.

Unreal plugin/operator work should add a phone connector object or subsystem and expose it through Remote Control. The same operator page should control both the SRT receiver and the ActionStreamer phone:

  • configure Unreal listener port;
  • push phone srtHost/srtPort/srtFlags;
  • start/restart/stop phone stream;
  • start/restart/stop listener;
  • show receiver status and phone status side by side;
  • start/stop synchronized recording session;
  • scan/connect/disconnect BLE sports sensors;
  • show phone battery/thermal/CPU/logs for diagnostics.

Do not scrape the HTML dashboard for production values. Use JSON routes or the future Unreal PC telemetry service.

The Unreal-side connector should be resilient:

  • missing/no phone API response should not stop the SRT listener;
  • SRT no-signal should not stop phone status polling;
  • Motion Design should continue to render fallback slate and telemetry layers where data is still available.

2026-06-03 Clean StreamPack Bridge Notes

Current clean-baseline phone build:

repo: /Users/post/Documents/GitHub/ActionStreamer
branch: custom/clean-unreal-bridge
commit: d63292b1c
APK: demos/camera/build/outputs/apk/debug/ActionStreamer.apk
package: io.github.thibaultbee.streampack.sample

This build is intentionally close to pure StreamPack. It should be used when testing whether previous pixel breakup was caused by ActionStreamer/native modifications.

Do not change in this branch without explicit user instruction:

  • codec;
  • bitrate;
  • resolution;
  • FPS;
  • SRT latency/buffer flags;
  • MediaFormat encoder options;
  • camera profile;
  • stabilization;
  • rotation;
  • automatic reconnect/start behavior.

Current API shape:

  • GET /api/status returns stream state, battery, charging, temperature, and sensor placeholder list;
  • GET /api/capabilities returns camera ids/facing/orientation/fps ranges and hardware/software encoders;
  • GET /api/log returns in-memory bridge log;
  • POST /api/control/start delegates to the original StreamPack startStream();
  • POST /api/control/stop delegates to the original StreamPack stopStream();
  • POST /api/control/restart does stop then start;
  • session and sensor endpoints are scaffolding for the Unreal/telemetry plan.

Current Pixel setup from the Mac:

serial: 48231FDAP000XR
model: Pixel_9_Pro
LAN API: http://192.168.170.123:8080
Wi-Fi ADB: 192.168.170.123:5555

The Wi-Fi endpoint was enabled with:

adb -s 48231FDAP000XR tcpip 5555
adb connect 192.168.170.123:5555
adb -s 192.168.170.123:5555 install --no-streaming -r -g demos/camera/build/outputs/apk/debug/ActionStreamer.apk

Unreal handoff:

  • configure the SRT listener first;
  • once the listener is bound, call POST http://<phone-ip>:8080/api/control/start;
  • poll GET /api/status and GET /api/log;
  • do not depend on the phone API for receiving SRT frames once the stream is already running;
  • if the LAN IP changes, ask the Android agent or operator for the current /api/status address.