Skip to content

Share an ffmpeg channel between inputs with the same key - #568

Open
RaHehl wants to merge 2 commits into
ikalchev:devfrom
RaHehl:ffmpeg-channel-key
Open

RaHehl wants to merge 2 commits into
ikalchev:devfrom
RaHehl:ffmpeg-channel-key

Conversation

@RaHehl

@RaHehl RaHehl commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Builds on #567.

A URL that changes with every resolve gave every session its own ffmpeg. FFmpegInput.key lets such inputs share one channel.

AI use: written with the help of an AI coding assistant (Fable 5.2). I reviewed and tested the changes myself.

A restart of ffmpeg reused the first command line, so a camera URL with
an expiring token never recovered. Restarts now resolve the input again.
A failing or hanging resolver counts as a failed start, and stop()
cancels it.
A URL that changes with every resolve gave every session its own ffmpeg.
FFmpegInput.key lets such inputs share one channel.
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.07%. Comparing base (412b899) to head (99786ce).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #568      +/-   ##
==========================================
+ Coverage   92.00%   92.07%   +0.07%     
==========================================
  Files          50       50              
  Lines       10839    10866      +27     
  Branches     1404     1410       +6     
==========================================
+ Hits         9972    10005      +33     
+ Misses        579      575       -4     
+ Partials      288      286       -2     
Files with missing lines Coverage Δ
pyhap/media/ffmpeg.py 94.57% <100.00%> (+2.03%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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