| Age | Commit message (Collapse) | Author |
|
Truncate ISO-639-2 language display names at first delimiter
|
|
* Fix subtitle encoding
* Add short-circuit
* Use IsTextFormat
* Update MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs
Co-authored-by: Bond-009 <bond.009@outlook.com>
---------
Co-authored-by: Bond-009 <bond.009@outlook.com>
|
|
|
|
security-path-traversal-fixes
# Conflicts:
# Jellyfin.Api/Controllers/HlsSegmentController.cs
# Jellyfin.Api/Controllers/PluginsController.cs
|
|
Fix race condition in concurrent subtitle conversion
|
|
|
|
Remove libpostproc check for ffmpeg version validation
|
|
Normalize invalid PTS from containers for Trickplay generation
|
|
This change does not affect the keyframe only mode.
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
|
|
* 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.
|
|
Fix potential garbled text in FFmpeg logs on Windows
|
|
|
|
SubtitleEncoder.ConvertSubtitles parsed subtitles with libse's static
Subtitle.Parse, which iterates a statically cached list of shared
SubtitleFormat instances. Format parsers keep mutable per-parse state on
the instance, so concurrent subtitle requests corrupted each other's
output (cues mixed across streams and languages, truncated files) or
failed with NullReferenceException when format detection broke down and
Subtitle.Parse returned null.
Parse through the injected ISubtitleParser instead. SubtitleEditParser
instantiates a fresh format parser per call, so requests no longer share
state. Its Parse method now returns the libse Subtitle directly (the
SubtitleTrackInfo flattening was unused since the SubtitleEdit writer
rework) so the writers keep full fidelity such as ASS styling.
|
|
|
|
Explicitly set StandardErrorEncoding and StandardOutputEncoding to
Encoding.UTF8 when invoking the FFmpeg subprocess.
This prevents log encoding issues and character corruption on Windows
environments that default to non-UTF8 ANSI code pages.
This fixes garbled metadata and font names in the FFmpeg logs.
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
|
|
DateTime.TryParse without an IFormatProvider falls back to the current
thread culture, so the same string can parse differently (or fail)
depending on the server's locale. None of these call sites deal with
user-entered text - they parse dates that come from filenames, an
HTTP header, ffprobe metadata and values the app itself wrote to the
auth database - so InvariantCulture is the correct provider everywhere
here.
Fixes the S6580 / CA1305 warnings on these call sites.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
|
|
|
|
Prevents raw ISO-639-2 values (e.g. "Greek, Modern (1453-)" from cluttering the audio and subtitle display names by truncating them at the first comma or semicolon ("Greek"). Applies to MediaStreamRepository and ProbeResultNormalizer.
|
|
|
|
|
|
|
|
https://learn.microsoft.com/en-us/dotnet/standard/native-interop/best-practices
|
|
|
|
fix-external-sub-invalidation
|
|
Prefer subtitle extension over codec
|
|
|
|
Extract attachments in one ffmpeg command when dumping
|
|
|
|
* Write subtitles using SubtitleEdit
We've been using SubtitleEdit to parse since 2021
https://github.com/jellyfin/jellyfin/pull/4984
I think it's time we start using it to write too
* Clean up ConvertSubtitles
* Add JsonWriter back
|
|
* Add support for VobSub subtitle streams
* update logic to determine separate extraction for VobSub subtitles
* simplify VobSub extraction logic and fix ffmpeg command
* Match `ExtractAllExtractableSubtitlesMKS` with `ExtractAllExtractableSubtitlesInternal` Matroska's VobSub option
* Add a comments clarify why MKS was used, and remove the redundant VobSub extension branch
* remove redundant VobSub format check
* fix type errors
|
|
|
|
|
|
We've been using SubtitleEdit to parse since 2021
https://github.com/jellyfin/jellyfin/pull/4984
I think it's time we start using it to write too
|
|
|
|
fix: suppress repeated PriorityClass warning in MediaEncoder
|
|
|
|
When Jellyfin runs without permission to set process priority (e.g.
Docker), StartProcess() logged a warning for every file probed during
a library scan. Add a _canSetProcessPriority flag: warn once on first
failure, skip all subsequent attempts.
Fixes #15287
|
|
Safeguard against invalid GUIDs
|
|
IOException with STRM HTTP URLs
|
|
* Add OriginalLanguage as option to PreferredAudioLanguage
* Support for multiple original languages
* Add original audio stream indicator
* Fetch OriginalLanguage from TMDB
* Adapt to EFCore refactor
* Fix PlayDefaultAudioTrack OriginalLanguage behavior
* Fix better PlayDefaultAudioTrack OriginalLanguage behavior
* Add comment to ItemFields
* Improved PlayDefaultAudioTrack behavior
* Add migration for original language
* Use sting.Equals for string comparisons
* Always set dto OriginalLanguage
* Remove OriginalLanguage from ItemFields
---------
Co-authored-by: Lampan-git <lampan-git@users.noreply.github.com>
|
|
feat/audiobook_chapters
|
|
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
|
|
fix: retain subtitles spanning HLS segment boundaries
|
|
Respect EnableSubtitleExtraction setting in subtitle delivery
|
|
Co-authored-by: Bond-009 <bond.009@outlook.com>
|
|
LoadCultures() in LocalizationManager skipped all iso6392.txt entries
without a two-letter ISO 639-1 code, dropping 302 of 496 languages
including mul (Multiple languages), und (Undetermined), mis (Uncoded
languages), zxx, and many real languages like Achinese, Akkadian, etc.
This caused FindLanguageInfo() to return null for these codes, which
meant:
- ExternalPathParser could not recognize them as valid language codes
in subtitle filenames, so the Language field was never set
- DisplayTitle fell back to the raw code string (e.g. "Mul")
Fix by allowing entries without two-letter codes to be loaded with an
empty TwoLetterISOLanguageName. Also set LocalizedLanguage in
ProbeResultNormalizer for ffprobe-detected streams (the DB repository
path was already handled on master).
|
|
Remove -copyts and add -flush_packets 1 to subtitle extraction
Original-merge: ec33c74ec44693a9ddb1e2f13bea90ef3c22267e
Merged-by: Bond-009 <bond.009@outlook.com>
Backported-by: Bond_009 <bond.009@outlook.com>
|
|
Also enables nullable for MediaStreamInfo
Makes more properties nullable that aren't always present
|
|
* Fix attachment extraction of files without video or audio stream
* Apply review suggestions
|