Commit Graph

304 Commits

Author SHA1 Message Date
Bond_009
6f8ccab788 Move non-jellyfin extensions to separate project 2021-06-19 18:04:46 +02:00
Stan
adf406b182
Fix playback of complex BluRay ISOs (#6166) 2021-06-10 20:07:28 +02:00
Bond_009
26d7fc8280 Enable nullable reference types for MediaBrowser.MediaEncoding.Subtitles 2021-05-20 22:10:19 +02:00
Bond_009
499bac5185 EncodingHelper: Fix circular dependency 2021-04-20 23:03:36 +02:00
BaronGreenback
bc1cc2d04a Remove unused using directives 2021-04-17 11:37:55 +01:00
MrTimscampi
ef9eba8bc9 Ignore format for ISO files 2021-03-25 12:23:29 +01:00
Bond_009
a8ed753f6c FxCop -> Net Analyzers (part 2) 2021-03-13 22:33:28 +01:00
Bond_009
9ed7f429c0 FxCop -> Net Analyzers (part 1) 2021-03-09 03:04:47 +01:00
Claus Vium
e5f99762e2
Merge pull request #5073 from BaronGreenback/ffmpeg
Fix for 4933: Alternative ffmpeg fix
2021-02-27 19:55:52 +01:00
Bond_009
b1fe28d0a6 Use GetEncodingOptions where possible 2021-02-21 02:58:30 +01:00
nyanmisaka
b0e0e19468 add cuda format converter 2021-02-06 13:21:40 +08:00
BaronGreenback
df402df908 fix return 2021-01-21 12:48:43 +00:00
Nyanmisaka
060f6c194f
Apply suggestions from code review
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2020-12-09 16:37:15 +08:00
nyanmisaka
ebd9ab3ccc use larger batch size on mpegts to avoid corrupted thumbnails 2020-12-09 14:39:41 +08:00
crobibero
ca5c20c988 Remove IIsoMounter and IsoMounter 2020-12-03 07:34:15 -07:00
Claus Vium
3b4f86579b
Merge pull request #4610 from nyanmisaka/hdr-extract
Extract tone mapped thumbnails for HDR videos
2020-12-02 09:50:54 +01:00
Joshua M. Boniface
a6199f821b
Merge pull request #4169 from stanionascu/bdiso-playback
Playback (direct-stream/transcode) of BDISO/BDAV containers
2020-12-01 22:36:04 -05:00
Nyanmisaka
7b5285feac
Apply suggestions from code review
Co-authored-by: BaronGreenback <jimcartlidge@yahoo.co.uk>
2020-12-02 08:22:07 +08:00
nyanmisaka
3e9cf98c30 add hdr tone mapping to image extraction 2020-11-29 13:22:42 +08:00
nyanmisaka
c2c06ae15b fix image extraction 2020-11-29 13:20:55 +08:00
nyanmisaka
bb16174936 increase the default image extraction timeout 2020-11-29 13:12:41 +08:00
Nyanmisaka
0c6efe6317
Apply suggestions from code review
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
2020-11-28 22:32:54 +08:00
Nyanmisaka
d72f3498bf
fix ci 2020-11-28 21:27:55 +08:00
Nyanmisaka
53c91c2c14
Apply suggestions from code review
Co-authored-by: BaronGreenback <jimcartlidge@yahoo.co.uk>
2020-11-28 21:14:55 +08:00
nyanmisaka
d19edefbcd fix image extraction 2020-11-28 20:55:56 +08:00
Fernando Fernández
38c3b6fcd3 Fix build and thread detection logic 2020-11-18 10:20:59 +01:00
Fernando Fernández
94cae4f145 Specify threads to ffmpeg properly 2020-11-17 16:44:04 +01:00
Fernando Fernández
a6ad36b57a Don't scale images extracted by ffmpeg 2020-11-17 14:20:18 +01:00
Stanislav Ionascu
cd4641dca0 Remove PlayableStreamFileNames as unused
Since ffmpeg can play and transcode ISO files and BDMV folders directly,
there's no use of that property.
2020-10-01 22:20:34 +02:00
Stanislav Ionascu
3ad6232973 Add probe / direct-stream / transcoding support for BluRays
This commit (and ffmpeg built with libbluray support), adds support
for playback of bluray images (bd-iso) and bluray folders.
2020-10-01 21:59:57 +02:00
crobibero
8b96881aa1 Clean up json Converters 2020-08-26 08:22:48 -06:00
Bond-009
6292a9e4e9
Merge branch 'master' into warn24 2020-08-20 18:50:15 +02:00
Bond-009
5160e627f1
Merge branch 'master' into feature/ffmpeg-version-check 2020-08-20 16:40:03 +02:00
Bond_009
ab2147751f Make MediaBrowser.MediaEncoding warnings free 2020-08-20 12:16:24 +02:00
Bond_009
2b400c99ef Fix warnings 2020-08-19 17:50:50 +02:00
Bond-009
d9f6953416 Minor fixes 2020-08-04 17:14:07 +02:00
Bond-009
53f99d5d4b Add some analyzers to MediaBrowser.MediaEncoding 2020-08-04 17:08:09 +02:00
Bond-009
18efa25a6f Enable TreatWarningsAsErrors for MediaBrowser.MediaEncoding 2020-08-04 16:20:52 +02:00
Max Git
3588ee5229 Merge branch 'master' into feature/ffmpeg-version-check 2020-07-02 23:50:13 +02:00
Neil Burrows
6b532b3da5
User string.Empty instead of ""
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
2020-06-29 20:52:20 +01:00
Neil Burrows
4389773508 Respect FFMpeg path passed via Environment Variable 2020-06-29 17:17:28 +01:00
Max Git
c35c401d65 Merge branch 'master' into feature/ffmpeg-version-check 2020-06-23 09:20:50 +02:00
telans
8de6452967
fix some documentation periods 2020-06-20 18:13:11 +12:00
Max Git
33f78df051 Merge branch 'master' into feature/ffmpeg-version-check 2020-06-17 02:52:38 +02:00
Bond-009
9af6eda0b4
Merge pull request #3343 from telans/comment-stops
Add full stop at end of comments (SA1629)
2020-06-16 11:54:58 +02:00
telans
247f9c61e6
fix SA1513/SA1516 2020-06-16 16:11:30 +12:00
telans
9018f8d8be
Add full stop at end of comments (SA1629) 2020-06-16 10:37:52 +12:00
dkanada
dabb869a6b
Merge branch 'master' into hwaccel 2020-06-15 20:21:25 +09:00
Max Git
37e737e012 Merge from master & fix conflict 2020-06-15 12:12:03 +02:00
telans
3d9049ef08
fix SA1508 2020-06-15 10:45:55 +12:00
telans
acd4389653
fix SA1005 2020-06-15 10:41:00 +12:00
crobibero
44957c5a9a Use typed logger where possible 2020-06-05 18:15:56 -06:00
Max Git
e103d087d3 Try harder at detecting FFmpeg version and enable the validation 2020-06-01 07:10:15 +02:00
Vasily
628734931c Fix missing commas and merge defects 2020-05-26 18:49:15 +03:00
artiume
407de0209e Update MediaEncoder.cs 2020-05-26 18:29:58 +03:00
nyanmisaka
b4b93995f7 add more separate hw decoding toggles 2020-05-26 18:06:49 +03:00
Max Git
cee587d6e3 Try harder to find ffmpeg in app directory. While here do some cleanup 2020-04-27 03:25:57 +02:00
Mark Monteiro
8f02fb9a4f Remove unused usings
This addresses the new issues identified in SonarCloud analysis
2020-04-22 13:09:59 -04:00
Mark Monteiro
f815059698 Merge remote-tracking branch 'upstream/master' into register-services-correctly 2020-04-20 20:11:33 -04:00
Bond_009
a73e1f18b6 Minor improvements 2020-04-19 11:16:09 +02:00
Mark Monteiro
9728aa8b0a Merge branch 'master' into register-services-correctly 2020-04-13 17:06:24 -04:00
Mark Monteiro
7152b55747 Use a separate line for each property initializer 2020-04-11 13:28:21 -04:00
Mark Monteiro
17e8813378 Use ActivatorUtilities to construct MediaEncoder and update constructor to inject EncodingHelper correctly 2020-04-11 10:53:13 -04:00
Mark Monteiro
e0f40f57d8 Merge remote-tracking branch 'upstream/master' into remove-common-process 2020-04-03 20:22:03 -04:00
Bond-009
f31efce52d
Merge branch 'master' into usings 2020-04-01 22:42:43 +02:00
Mark Monteiro
1f5caa46c5 Fix some more issues with disposing Process instances 2020-03-27 01:53:08 +01:00
Mark Monteiro
97c36d11d4 Use a TimeSpan instead of ms and support providing a custom CancellationToken 2020-03-27 01:09:09 +01:00
Mark Monteiro
b947d98266 Delete unnecessary ProcessFactory abstraction 2020-03-27 00:45:48 +01:00
Mark Monteiro
ee2f911a2b Remove unnecessary CommonProcess abstraction 2020-03-27 00:10:16 +01:00
Bond_009
e9d1eabd53 Remove unused usings 2020-03-24 16:12:06 +01:00
Bond_009
a07ee65365 Minor improvements 2020-02-23 10:53:51 +01:00
Bond-009
f3a1729964 Address comments 2020-01-16 15:02:50 +01:00
Bond-009
e882b03e81 Add back support for DVDs copied as folders 2020-01-16 13:30:38 +01:00
Bond_009
cf2e2a3f30 Fix exceptions while scanning
Fixes these exceptions:
```
[2019-12-22 20:48:14.779 +01:00] [ERR] Error in WaitForExit
System.InvalidOperationException: No process is associated with this object.
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.GetWaitState()
   at System.Diagnostics.Process.WaitForExitCore(Int32 milliseconds)
   at System.Diagnostics.Process.WaitForExit(Int32 milliseconds)
   at Emby.Server.Implementations.Diagnostics.CommonProcess.WaitForExit(Int32 timeMs) in /home/pi/dev/jellyfin/Emby.Server.Implementations/Diagnostics/CommonProcess.cs:line 100
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.StopProcess(ProcessWrapper process, Int32 waitTimeMs) in /home/pi/dev/jellyfin/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs:line 785
[2019-12-22 20:48:14.790 +01:00] [INF] Killing ffmpeg process
[2019-12-22 20:48:14.795 +01:00] [ERR] Error killing process
System.InvalidOperationException: No process is associated with this object.
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.Kill()
   at Emby.Server.Implementations.Diagnostics.CommonProcess.Kill() in /home/pi/dev/jellyfin/Emby.Server.Implementations/Diagnostics/CommonProcess.cs:line 95
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.StopProcess(ProcessWrapper process, Int32 waitTimeMs) in /home/pi/dev/jellyfin/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs:line 799
[2019-12-22 20:48:14.808 +01:00] [ERR] Error in "ffprobe"
System.Text.Json.JsonException: The JSON value could not be converted to System.String. Path: $.streams[0].start_pts | LineNumber: 32 | BytePositionInLine: 26.
 ---> System.InvalidOperationException: Cannot get the value of a token type 'Number' as a string.
   at System.Text.Json.Utf8JsonReader.GetString()
   at System.Text.Json.Serialization.Converters.JsonConverterString.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.JsonPropertyInfoNotNullable`4.OnRead(JsonTokenType tokenType, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonPropertyInfo.Read(JsonTokenType tokenType, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.JsonSerializer.HandleValue(JsonTokenType tokenType, JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
   --- End of inner exception stack trace ---
   at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& readStack, Utf8JsonReader& reader, Exception ex)
   at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
   at System.Text.Json.JsonSerializer.ReadCore(JsonReaderState& readerState, Boolean isFinalBlock, ReadOnlySpan`1 buffer, JsonSerializerOptions options, ReadStack& readStack)
   at System.Text.Json.JsonSerializer.ReadAsync[TValue](Stream utf8Json, Type returnType, JsonSerializerOptions options, CancellationToken cancellationToken)
   at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Nullable`1 videoType, Boolean forceEnableLogging, CancellationToken cancellationToken) in /home/pi/dev/jellyfin/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs:line 399
   at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](T item, MetadataRefreshOptions options, CancellationToken cancellationToken) in /home/pi/dev/jellyfin/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs:line 122
   at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, TItemType item, String logName, MetadataRefreshOptions options, RefreshResult refreshResult, CancellationToken cancellationToken) in /home/pi/dev/jellyfin/MediaBrowser.Providers/Manager/MetadataService.cs:line 815
```
2019-12-22 22:09:09 +01:00
Bond_009
cc5acf37f7 Make probesize and analyzeduration configurable and simplify circular
dependencies

Makes the probesize and analyzeduration configurable with env args.
(`JELLYFIN_FFmpeg_probesize` and `FFmpeg_analyzeduration`)
2019-11-25 12:07:59 +01:00
Bond_009
1b01a6ece1 Add tests for EncoderValidator
* Add support for ffmpeg 4.2
* Parse the complete ffmpeg version instead of only the first 2 digits
* Make max and min version optional
* Remove max limitation (for now)
* Style improvements
2019-09-28 19:41:34 +02:00
Bond_009
1616f24cee Fix more warnings 2019-09-01 18:39:23 +02:00
Bond-009
91cd7d2f6b Limit amount of ffmpeg processes extracting images at once 2019-04-30 23:35:39 +02:00
Phallacy
a7e31ef31f applied changes to just also search jellyfin base dir 2019-04-09 00:27:41 -07:00
redSpoutnik
480a6607e2
Merge branch 'master' into subtitle-display-title 2019-03-16 17:54:57 +01:00
redSpoutnik
427688a0a0 Change subtitles DisplayTitle behavior 2019-03-14 22:31:51 +01:00
PloughPuff
b864e9da2a Finalise removal of --ffprobe switch
Removed --ffprobe from src files and server/docker scripts.
2019-03-12 22:09:18 +00:00
Bond-009
ab9859ecef Address comment 2019-03-07 21:42:56 +01:00
Bond_009
37ea50a572 Reduce the amount of exceptions thrown 2019-03-07 21:42:56 +01:00
PloughPuff
2617a49b78 Renamed Init() to SetFFmpegPath() 2019-03-05 21:29:15 +00:00
PloughPuff
656bffbbb2 Remove --ffprobe logic 2019-03-05 21:29:15 +00:00
PloughPuff
8104e739d5 Address review comments from Bond 2019-03-05 21:29:15 +00:00
PloughPuff
ed69e690b8 Review comments
Address review comments from JustAMan, Bond-009 and cvium.
2019-03-05 21:29:15 +00:00
PloughPuff
20775116f7 Reworked FFmpeg path discovery and always display to user
1) Reworked FFmpeg and FFprobe path discovery (CLI switch, Custom xml, system $PATH, UI update trigger).  Removed FFMpeg folder from Emby.Server.Implementations.  All path discovery now in MediaEncoder.

2) Always display FFmpeg path to user in Transcode page.

3) Allow user to remove a Custome FFmpeg path and return to using system $PATH (or --ffmpeg if available).

4) Remove unused code associated with 'prebuilt' FFmpeg.

5) Much improved logging during path discovery.
2019-03-05 21:24:54 +00:00
Claus Vium
aafed63c3f Set EnableRaisingEvents to true for processes that require it 2019-02-24 16:33:05 +01:00
Bond_009
1cdcace061 Remove dead code 2019-02-02 15:58:39 +01:00
Vasily
91e99effc9
Apply suggestions from code review for flipped conditions.
Co-Authored-By: EraYaN <EraYaN@users.noreply.github.com>
2019-01-29 14:45:07 +01:00
Erwin de Haan
581a7fe078 Unwrapped MoveDirectory, DirectoryExists, FileExists & removed MoveFile 2019-01-28 22:10:00 +01:00
Erwin de Haan
d7c6d16250 Unwrapped CreateDirectory and DeleteDirectory 2019-01-28 22:09:56 +01:00
Erwin de Haan
3a831994f6 Unwrapped GetDirectoryName and DirectorySeperatorChar 2019-01-28 22:06:34 +01:00
Andrew Rabert
d16f38dbe1 Merge pull request #623 from wtayl0r/inject-logger-factories
Replaced injections of ILogger with ILoggerFactory
2019-01-20 18:12:50 -05:00
William Taylor
65cd3ed597 Replaced injections of ILogger with ILoggerFactory
This makes resolving dependencies from the container much easier as
you cannot resolve with primitives parameters in a way that is any
more readable.

The aim of this commit is to change as little as possible with the end
result, loggers that were newed up for the parent object were given the same
name. Objects that used the base or app loggers, were given a new logger with
an appropriate name.

Also removed some unused dependencies.
2019-01-20 21:05:12 +00:00
Claus Vium
e8cf72e925 Change CanExtractSubtitles to true to allow conversion during direct streaming 2019-01-20 21:03:18 +01:00
Erwin de Haan
65bd052f3e ReSharper conform to 'var' settings 2019-01-13 21:37:13 +01:00
Erwin de Haan
a36658f6f0 ReSharper Reformat: Properties to expression bodied form. 2019-01-13 21:31:14 +01:00