Skip to content

fix(video): drop fflags nobuffer from RTSP opens (#94) - #97

Merged
keyldev merged 1 commit into
mainfrom
fix/issue-94-nobuffer
Oct 19, 2026
Merged

keyldev merged 1 commit into
mainfrom
fix/issue-94-nobuffer

Conversation

@keyldev

@keyldev keyldev commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator
  • nobuffer discards packets read during stream probing, including the keyframe some NVRs send at session start; later frames reference it, so nothing decoded (VideoToolbox errors, grey in software)
  • Applies to the live decoder on every platform and the web live remuxer

Summary

Related

Type

  • Bug fix
  • Feature
  • Refactor / cleanup
  • Docs / CI
  • Other:

Checklist

  • Builds with 0 warnings (TreatWarningsAsErrors=true).
  • Tests pass (dotnet test); new Core logic has unit tests.
  • No layering violation — App references Core only (Infrastructure / Video / Devices wired via DI in a head).
  • Scope stays within one phase (didn't pull work from a later phase's "Не входит").
  • README / docs updated if public commands, options, or setup changed.

Platforms tested

  • Windows
  • Linux
  • macOS
  • Android
  • iOS
  • CI build only

Screenshots / notes

- nobuffer discards packets read during stream probing, including the keyframe some NVRs send at session start; later frames reference it, so nothing decoded (VideoToolbox errors, grey in software)
- Applies to the live decoder on every platform and the web live remuxer
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can import rules and skills only from the repositories your team follows

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Preserve opening RTSP keyframes in live video

🐞 Bug fix 🕐 Less than 10 minutes

Grey Divider

AI Description

• Remove nobuffer from native and web RTSP opens so stream probing retains opening keyframes.
• Prevent dependent frames from failing to decode on affected NVR streams.
Diagram

graph TD
  Camera["RTSP camera"] --> Session["Native video session"] --> Decoder["Frame decoder"]
  Camera --> Ffmpeg["Web FFmpeg process"] --> Mp4["Fragmented MP4"] --> Hub["Live stream hub"]
Loading
High-Level Assessment

Removing nobuffer at both RTSP open points directly addresses the lost opening keyframe. The other latency and timeout settings remain in place; no broader pipeline change is warranted.

Files changed (2) +7 / -3

Bug fix (2) +7 / -3
FfmpegVideoSession.csRetain probe packets in the native RTSP session +4/-1

Retain probe packets in the native RTSP session

• Removes the 'fflags=nobuffer' input option so packets read during stream probing remain available to the decoder. Adds a comment explaining the opening-keyframe failure seen with some NVRs.

src/OpenIPC.Viewer.Video/Pipeline/FfmpegVideoSession.cs

LiveFfmpeg.csRetain opening keyframes in the web live stream +3/-2

Retain opening keyframes in the web live stream

• Removes '-fflags nobuffer' from the FFmpeg process arguments used for web RTSP streams. Keeps the transport and socket-timeout arguments unchanged.

src/OpenIPC.Viewer.Web/Api/LiveFfmpeg.cs

@keyldev
keyldev merged commit 3253466 into main Oct 19, 2026
5 checks passed
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.

1 participant