Skip to content

feat: Render live encoder output stats on Stream Monitor#1095

Merged
sparkison merged 7 commits into
m3ue:devfrom
Warbs816:feat/stream-monitor-output-media-info
May 11, 2026
Merged

feat: Render live encoder output stats on Stream Monitor#1095
sparkison merged 7 commits into
m3ue:devfrom
Warbs816:feat/stream-monitor-output-media-info

Conversation

@Warbs816
Copy link
Copy Markdown
Contributor

@Warbs816 Warbs816 commented May 4, 2026

Summary

Pairs with the proxy-side change that exposes output_media_infom3ue/m3u-proxy#56. The existing Stream Info row reflects the source ffmpeg is reading; this PR adds an Output row beneath it showing what ffmpeg is producing (encoder codec, target resolution, muxer container, fps, bitrate, audio).

Closes the question raised on #1089 about layering output-side stats too.

What changed

Model mapping (app/Filament/Pages/M3uProxyStreamMonitor.php)

After the existing live media_info merge, we read $stream['output_media_info'] from the proxy payload and attach a filtered copy as $model['output_media_info'] when non-empty. Mirrors the existing media_info mapping shape — no probe-data fallback because output stats only exist when ffmpeg is actively transcoding (no encoder = no row).

Blade row (resources/views/filament/pages/m3u-proxy-stream-monitor.blade.php)

Adds a new Output Info row directly below the Stream Info row, gated on $stream['model']['output_media_info']. Container palette is violet (bg-violet-50 / dark:bg-violet-950/30) to make it visually distinct from the failover orange used elsewhere on the card. Per-field badge colours match the Stream Info row (info for resolution, primary for codec, success for audio, gray for fps/bitrate/container) so input ↔ output is comparable field-by-field. Includes the same green pulse dot used on the input row to indicate live data.

Behaviour

  • Transcoded stream: Stream Info shows source description; Output shows what ffmpeg is encoding to right now (e.g. source 1920×1080 hevc → output 1280×720 h264)
  • Plain HTTP-proxy stream: no Output row (proxy reports no output_media_info)
  • Resolver stream (yt-dlp / streamlink): no Output row

Test plan

  • Transcoded stream — Stream Info row still populated from probe + live data; Output row appears with encoder fields
  • Plain HTTP-proxy stream — Stream Info still works (probe data only); Output row absent
  • Resolver stream — Both rows absent
  • Choose a better colour?

Warbs816 added 3 commits May 3, 2026 17:21
Pairs with the proxy-side change that exposes output_media_info — the codec,
resolution, container, fps and bitrate that ffmpeg is actually producing on
the outbound side of a transcoded stream.

The existing Stream Info row continues to describe the source ffmpeg is
reading. A new Output row sits below it, gated on the proxy publishing the
new field, with a distinct amber palette + arrow-up-tray icon so the input
vs output distinction is immediately visible. Plain HTTP-proxy streams have
no encoder, so the row stays hidden for them.
…range clash

The amber/orange palette on the Output Info row was visually too close to
the existing failover indicators (Failover Active badge + Primary → Failover
title text), making it ambiguous whether the row signified a failover state
or just encoder output. Switch the row container to a violet palette and
align the per-field badges (resolution → info, codec → primary, audio →
success) with the input "Stream Info" row so input vs output is comparable
field-by-field while the surrounding violet block still marks it as the
encoder side.
@Warbs816
Copy link
Copy Markdown
Contributor Author

Warbs816 commented May 4, 2026

Can't decide on the colour for the output data bg... I'll let you decide 😊

@Warbs816 Warbs816 marked this pull request as ready for review May 5, 2026 20:07
@sparkison
Copy link
Copy Markdown
Member

Reviewing and merging shortly!

@sparkison sparkison merged commit 21af791 into m3ue:dev May 11, 2026
4 checks passed
@Warbs816 Warbs816 deleted the feat/stream-monitor-output-media-info branch May 11, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants