Commit graph

1035 commits

Author SHA1 Message Date
gnattu
bf285a572d
fix: make sure the dimension is divisible by two for zscale (#11185) 2024-03-19 15:42:45 -06:00
Cody Robibero
833bc06eb4
Merge pull request #11161 from nyanmisaka/fix-segment-deletion
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2024-03-18 08:37:02 -06:00
Bond-009
8070aabe1b
Merge pull request #11165 from vessd/transcoding-exception
Catch delete encoded media file exceptions
2024-03-17 17:38:42 +01:00
nyanmisaka
ae7c0c83e9 Bump the required minimum ffmpeg version to 4.4
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-17 21:30:42 +08:00
nyanmisaka
557b8f0c78 Apply suggestions from code review
Drop the unnecessary initial capacity from the list.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-17 20:45:00 +08:00
Sergey Veselkov
78643b4b2a Catch delete file exceptions 2024-03-16 09:56:06 +03:00
nyanmisaka
eca9bf41bc Add TranscodingSegmentCleaner to replace ffmpeg's hlsenc deletion
FFmpeg deletes segments based on its own transcoding progress,
but we need to delete segments based on client download progress.
Since disk and GPU speeds vary, using hlsenc's built-in deletion
will result in premature deletion of some segments. As a consequence,
the server has to constantly respin new ffmpeg instances, resulting
in choppy video playback.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-03-16 07:35:05 +08:00
Joe Rogers
4f7a341c14
Add LSR/CITY to artist whitelist 2024-03-15 14:05:38 -04:00
Bond-009
9dbef98a15
Merge pull request #11129 from crobibero/extract-concat
Specify file as concat when extracting attachments
2024-03-09 21:18:06 +01:00
Cody Robibero
a92de9b2e3
Merge pull request #11014 from gnattu/vf-videotoolbox 2024-03-09 09:19:36 -07:00
Cody Robibero
814fc6864d Specify file as concat when extracting attachments 2024-03-08 18:10:31 -07:00
Attila Szakacs
8d40d431e8
Extract and cache all media attachments in bulk (#11029)
Similar to https://github.com/jellyfin/jellyfin/pull/10884

---

Jellyfin clients need fonts for subtitles, and each font is a separate
attachment, which causes a lot of re-reads of the file. Certain contents,
like anime in a lot of cases, contain 50-80 different attachments.

Spawning 80 ffmpeg processes at the same time on the same file might
cause swapping on slower HDDs and can bring disk subsystem to a crawl.

(For more info, see https://github.com/jellyfin/jellyfin/3215)

This change helps a lot in this scenario.

Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
2024-03-03 13:33:54 -07:00
gnattu
1cb7264f0d feat: fully support videotoolbox hardware filters
Signed-off-by: gnattu <gnattuoc@me.com>
2024-02-28 17:56:59 +08:00
Shadowghost
36f298e417 Do not dispose the ffmpeg process 2024-02-25 17:24:54 +01:00
gnattu
44cb9f5fdd feat: add hw scale filter for videotoolbox
Signed-off-by: gnattu <gnattuoc@me.com>
2024-02-15 21:52:41 +08:00
Bond-009
0bf1c10c44
Merge pull request #10990 from Shadowghost/bdmv-fixes
BDMV fixes
2024-02-14 11:24:35 +01:00
felix920506
3cf0070287
Escape subtitle extraction input path (#10992) 2024-02-10 22:51:09 -07:00
Bond-009
f888ee3dfc
Merge pull request #10772 from dmitrylyzo/normalize-mkv-webm
Discard WebM if there is an unsupported codec
2024-02-11 00:26:19 +01:00
Shadowghost
52c79c050b Order files before creating concat config 2024-02-10 16:53:38 +01:00
Shadowghost
f34c56282d Use concat config for BDMV/DVD folder attachment extraction 2024-02-10 16:52:21 +01:00
Mark Cilia Vincenti
f26fc7dfb2 Merge changes 2024-02-03 08:45:14 +01:00
Cody Robibero
81cf4b6c50
Merge pull request #10884 from alltilla/extract-all-subtitles
Extract all subtitle streams simultaneously
2024-02-02 17:00:01 -07:00
nyanmisaka
52da00c3c7 Register RKMPP HW codecs and filters
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-02-01 18:59:27 +08: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
nyanmisaka
9323390add Fix the display aspect ratio of PGSSUB subtitle burn-in
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2024-01-28 20:06:42 +08: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
Dmitry Lyzo
ba877283a1
fix: add av1 to webm
At least AV1 in WebM is supported by Chrome and Firefox.
2024-01-18 08:01:06 +03:00
Cody Robibero
e7b8d45bbb
Use helper function to compare guid (#10825) 2024-01-17 08:51:39 -07:00
Mark Cilia Vincenti
e47144e7c7 Updated contributors, upgraded to AsyncKeyedLocker 6.3.0 which now supports non-keyed locking using a similar interface and changed SemaphoreSlim-based locks to using AsyncNonKeyedLocker. 2024-01-14 12:11:16 +01:00
Dmitry Lyzo
39088b5ad2 fix: discard webm if there is an unsupported codec 2024-01-09 10:39:31 +03:00
Mark Cilia Vincenti
d1677dc680 AsyncKeyedLock migration 2024-01-03 16:47:25 +01:00
Patrick Barron
9215a4d40a Add ITranscodeManager service 2023-12-21 12:53:50 -05:00
Bond_009
635d67d458 Revert "Use System.Net.IPNetwork"
This reverts commit 117d05d288da1d412159a29c0cb8d5c8259e48ae.
2023-11-14 21:16:33 +01:00
Bond_009
b62b0ec2b5 Fix warnings 2023-11-14 21:14:21 +01:00
Bond_009
eb022c49cc Update to .NET 8 2023-11-14 21:12:16 +01:00
Bond_009
a9ef103c95 Add IDisposableAnalyzers to more projects 2023-11-05 02:01:14 +01:00
Vincent Lark
123c6e7d1b Extract the MediaEncoder probing command arguments builder 2023-10-26 20:06:45 +02:00
Vincent Lark
8ee9a0adf9 Forward user_agent config to ffprobe 2023-10-21 23:57:05 +02:00
Nick
6b94d55e1e Fix for new WaitForExitAsync method 2023-10-18 20:01:40 -07:00
Nick
cd662506a1 Merge branch 'master' into trickplay 2023-10-18 19:27:05 -07:00
Stepan Goremykin
8d7e4229ca Merge branch 'master' into fix-resharper-warnings
# Conflicts:
#	Emby.Server.Implementations/Net/SocketFactory.cs
#	RSSDP/SsdpCommunicationsServer.cs
#	RSSDP/SsdpDeviceLocator.cs
#	RSSDP/SsdpDevicePublisher.cs
2023-10-12 20:11:16 +02:00
Claus Vium
733ee12ee4
Merge pull request #10378 from Bond-009/waitforexitasync
Use Process.WaitForExitAsync added in .NET 5
2023-10-10 20:12:07 +02:00
Bond_009
4757ce105b Use Process.WaitForExitAsync added in .NET 5 2023-10-10 00:18:50 +02:00
Bond_009
c707baed83 Jellyfin.Drawing minor improvements
Reduce duplicate/dead code
2023-10-08 17:10:04 +02:00
Bond-009
0b31997b2f
Merge pull request #10348 from Bond-009/strings 2023-10-08 14:07:30 +02:00
Stepan Goremykin
212976277d Remove redundant ToString call for value types 2023-10-08 01:17:32 +02:00
Stepan Goremykin
2d7835c848 Join declaration and assignment 2023-10-08 01:16:43 +02:00
Stepan Goremykin
3259d484ff Use generated regex 2023-10-08 01:16:00 +02:00
Stepan Goremykin
526f9a825c Make files readonly 2023-10-08 00:40:58 +02:00
Stepan Goremykin
8ea812b65d Reduce string literal length by using verbatim string 2023-10-08 00:26:12 +02:00