diff options
| author | Marc Brooks <IDisposable@gmail.com> | 2026-07-17 16:23:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-17 23:23:57 +0200 |
| commit | cab108a8395bca7afbc0f0b587b55c13d4bc0d2a (patch) | |
| tree | c506a55e0dd0806cd3e67b365c42c03091636280 /src/Jellyfin.Networking/Manager | |
| parent | 3d83e67a52a8aca41ec416f8d31bfce685d0754d (diff) | |
Prevent ffmpeg from hanging extracting subtitles (#17297)
* Prevent ffmpeg from hanging extracting subtitles
Add `RunSubtitleExtractionProcess` to unify the external
_ffmpeg_ process handling and error management.
Add a `-nostdin` flag that prevents _ffmpeg_ from reading from
_stdin_ and blocking on an inherited stdin handle (e.g. when
Jellyfin runs as a service under NSSM), which otherwise hangs
subtitle extraction forever when _ffmpeg_ blocks on any
keyboard-interaction read until the timeout (30 minutes).
Close the redirected _stdin_ to ensure immediage EOF.
Drain the _stderr_ to a string and log it, to ensure we don't block
the _ffmpeg_ process on errors that exceed the pipe length.
Pass `-y` to _ffmpeg_ to ensure it overwrites any existing output file
without prompting for confirmation.
* Address review comments
Make sure we always drain stderr.
Make sure the timeout also honors the cancellationToken.
Make sure when we get cancelled we don't log it as a ffmpeg error.
Diffstat (limited to 'src/Jellyfin.Networking/Manager')
0 files changed, 0 insertions, 0 deletions
