Commit Graph

257 Commits

Author SHA1 Message Date
lostb1t 7f1a0ff6fc wip 2025-12-21 14:34:27 +01:00
lostb1t 8d8d38600e wip 2025-12-21 14:34:27 +01:00
lostb1t e5a2acd6dd ise codec before path on format selection 2025-12-21 14:34:27 +01:00
lostb1t ddc613cd72 fix CA2007 2025-12-21 14:34:27 +01:00
lostb1t fa99b1d81c fix: remote subtitles 2025-12-21 14:34:27 +01:00
Karolis 5182aec13f Add subtitle extraction timeout configuration option 2025-11-17 15:18:29 +02:00
Tim Eisele 9c298c52f5 Expose ExtractAllExtractableSubtitles (#14876) 2025-09-26 13:45:01 -06:00
evan314159 2618a5fba2 Fix sync disposal of async-created IAsyncDisposable objects (#14755) 2025-09-16 11:14:52 +02:00
renovate[bot] dea500b26b Update dependency UTF.Unknown to 2.6.0 (#14599)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bond_009 <bond.009@outlook.com>
2025-08-11 13:06:24 -06:00
Carsten Braun 98daf4aedb Use string.IsNullOrEmpty instead of regular null check. 2025-06-07 21:51:08 +02:00
Carsten Braun fcf56b73cb When subtitle is embedded in the main video file, the path will be null. 2025-06-07 21:51:08 +02:00
Carsten Braun e8239a7ee2 Do not attempt to extract internal subtitles if there are only MKS subtitles. 2025-06-07 21:51:08 +02:00
Carsten Braun 84cebeae64 Skip early if subtitle is in MKS to avoid unnecessary function calls. 2025-06-07 21:51:08 +02:00
Carsten Braun c0e2875818 If subtitles are part of an MKS, it is not an error. Just log for debug purpose and continue. 2025-06-07 21:51:08 +02:00
Carsten Braun 411ba03bf0 Fixed formatting 2025-06-07 21:51:08 +02:00
Carsten Braun b2e19c0306 Also extract subtitles of MKS aux files if they're extractable. 2025-06-07 21:51:08 +02:00
Tim Eisele 596b635511 Cleanup extracted files (#13760)
* Cleanup extracted files

* Pagination and fixes

* Add migration for attachments to MigrateLibraryDb

* Unify attachment handling

* Don't extract again if files were already extracted

* Fix MKS attachment extraction

* Always run full extraction on mks

* Don't try to extract mjpeg streams as attachments

* Fallback to check if attachments were extracted to cache folder

* Fixup
2025-04-03 09:17:14 -06:00
alltilla eb4162f9ec Backport pull request #13384 from jellyfin/release-10.10.z
Fix parallel use of not thread-safe SubtitleFormat instance

Original-merge: 0b2a59e963

Merged-by: joshuaboniface <joshua@boniface.me>

Backported-by: Bond_009 <bond.009@outlook.com>
2025-02-03 16:59:08 -05:00
oxixes d2c2dcd53c Solve CodeQL issue 2024-09-11 11:43:02 +02:00
jaina heartles 7c3c0aa940 Use subtitle cache when burning-in subs 2024-09-11 10:03:08 +02:00
dmitrylyzo 84b20afe1f Backport pull request #12575 from jellyfin/release-10.9.z
Fix subtitle and attachment extraction when input path contains quotes

Original-merge: 3c3ebe8344

Merged-by: Bond-009 <bond.009@outlook.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
2024-09-07 18:09:54 -04:00
Łukasz 1451cbc39e Add subtitle parser errors to log if available (#12479) 2024-09-06 07:47:06 -06:00
David Schulte fc1bee30a6 Allow streaming of raw PGS subtitles without transcoding (#12056) 2024-07-15 08:48:09 -04:00
Mark Cilia Vincenti af74aa35d7 Clean up synchronization (#11458) 2024-05-05 19:21:54 -06:00
gnattu 658a454d81 fix: don't extract external sub (#11373) 2024-04-17 10:44:04 -06:00
felix920506 3cf0070287 Escape subtitle extraction input path (#10992) 2024-02-10 22:51:09 -07:00
Mark Cilia Vincenti f26fc7dfb2 Merge changes 2024-02-03 08:45:14 +01:00
Attila Szakacs ce81e2aeab Add alltilla to CONTRIBUTORS.md
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
2024-01-31 19:18:38 +01:00
Attila Szakacs 8fea819b51 Extract all subtitle streams simultaneously
Extracting a subtitle stream is a disk I/O bottlenecked operation as
ffmpeg has to read through the whole file, but usually there is nothing
CPU intensive to do.

If a file has multiple subtitle streams, and we want to extract more
of them, extracting them one-by-one results in reading the whole file
again and again.

However ffmpeg can extract multiple streams at once.

We can optimize this by extracting the subtitle streams all at once
when only one of them gets queried, then we will have all of them
cached for later use.

It is useful for people switching subtitles during playback.

It is even more useful for people who extract all the subtitle streams
in advance, for example with the "Subtitle Extract" plugin.
In this case we reduce the extraction time significantly based on the
number of subtitle streams in the files, which can be 5-10 in many
cases.

Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
2024-01-18 17:29:45 +01:00
Mark Cilia Vincenti d1677dc680 AsyncKeyedLock migration 2024-01-03 16:47:25 +01:00
Bond_009 635d67d458 Revert "Use System.Net.IPNetwork"
This reverts commit 117d05d288da1d412159a29c0cb8d5c8259e48ae.
2023-11-14 21:16:33 +01:00
Bond_009 a9ef103c95 Add IDisposableAnalyzers to more projects 2023-11-05 02:01:14 +01:00
Bond_009 4757ce105b Use Process.WaitForExitAsync added in .NET 5 2023-10-10 00:18:50 +02:00
sleepycatcoding 62be2a2ea9 Fix subtitle encoder if webvtt is requested 2023-08-02 15:15:41 +03:00
Bond_009 b5f0760db8 Use RegexGenerator where possible 2023-06-28 17:07:57 +02:00
Stepan Goremykin 910617bbc3 Remove redundant 'else' keywords 2023-04-06 19:38:34 +02:00
Stepan Goremykin 1c0bb828d2 Fix argument is not used in message template warning 2023-04-06 19:17:28 +02:00
Bond-009 81c8890b6d Fix all warnings in MediaBrowser.MediaEncoding (#9073) 2023-01-11 17:22:01 -07:00
Bond_009 b366dc2e6e Use ArgumentException.ThrowIfNullOrEmpty 2022-12-07 16:43:59 +01:00
Bond_009 71982c7297 Fix build errors 2022-12-07 16:42:28 +01:00
Bond_009 52194f56b5 Replace != null with is not null 2022-12-05 15:01:13 +01:00
Bond_009 a9a5fcde81 Use ArgumentNullException.ThrowIfNull helper method
Did a simple search/replace on the whole repo (except the RSSDP project)
This reduces LOC and should improve performance (methods containing a throw statement don't get inlined)

```
if \((\w+) == null\)
\s+\{
\s+throw new ArgumentNullException\((.*)\);
\s+\}
```

```
ArgumentNullException.ThrowIfNull($1);
```
2022-10-06 20:21:23 +02:00
Hannes Braun 4edeccc5e0 Remove redundant using directives 2022-09-28 16:26:03 +02:00
Cody Robibero 6004060b4e Fix build errors from new warnings 2022-09-09 07:44:14 -06:00
Cody Robibero fdd728e9f8 Merge pull request #8259 from RealGreenDragon/subtitle-extraction-timeout 2022-08-16 21:23:39 -06:00
MagicGreenDragon 7391b001ef increased subtitle extraction timeout to 30 min 2022-08-14 08:53:00 +02:00
Shadowghost 3e5cf9395f Backport pull request #8182 from jellyfin/release-10.8.z
Extract external subs from container before determining characterset

Original-merge: 1faee43b11

Merged-by: Bond-009 <bond.009@outlook.com>

Backported-by: Joshua Boniface <joshua@boniface.me>
2022-08-13 21:46:33 -04:00
Joshua Boniface 38eefbbafa Backport pull request #8087 from jellyfin/release-10.8.z
feat: make subtitleeditparser generic

Authored-by: Claus Vium <cvium@users.noreply.github.com>

Merged-by: Bond-009 <bond.009@outlook.com>

Original-merge: 7323ccfc23
2022-08-01 14:25:42 -04:00
Joshua M. Boniface 3061446c87 Merge pull request #7984 from crobibero/dotnet-6.0.6
Upgrade to dotnet 6.0.6, update remaining dependencies

(cherry picked from commit 56e7b323de)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2022-06-29 01:26:36 -04:00
Joshua M. Boniface e61c80fed7 Merge pull request #7960 from Shadowghost/subrip-encoder-fix
(cherry picked from commit ae79bbc34c)
Signed-off-by: Joshua Boniface <joshua@boniface.me>
2022-06-29 01:26:15 -04:00