Commit graph

299 commits

Author SHA1 Message Date
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
Erwin de Haan f2e50f50bd Visual Studio Reformat: MediaBrowser.MediaEncoding 2019-01-13 20:26:04 +01:00
Erwin de Haan ec1f5dc317 Mayor code cleanup
Add Argument*Exceptions now use proper nameof operators.

Added exception messages to quite a few Argument*Exceptions.

Fixed rethorwing to be proper syntax.

Added a ton of null checkes. (This is only a start, there are about 500 places that need proper null handling)

Added some TODOs to log certain exceptions.

Fix sln again.

Fixed all AssemblyInfo's and added proper copyright (where I could find them)

We live in *current year*.

Fixed the use of braces.

Fixed a ton of properties, and made a fair amount of functions static that should be and can be static.

Made more Methods that should be static static.

You can now use static to find bad functions!

Removed unused variable. And added one more proper XML comment.
2019-01-10 20:38:53 +01:00
Bond_009 f520ddc966 Remove useless properties from IEnvironmentInfo 2019-01-08 17:35:56 +01:00
Bond_009 ec47c5b0f7 Remove unused FontConfigLoader 2019-01-02 15:12:52 +01:00
Bond_009 0042b96c80 Use ValueTuple and Linq 2019-01-02 16:21:24 +03:00
Bond_009 c99b45dbe0 Remove some warnings 2019-01-02 02:35:40 +03:00
Bond_009 ea4c914123 Fix exception logging 2018-12-30 22:44:39 +01:00
Bond_009 0c1b9d3bff Rebase 2018-12-30 22:44:38 +01:00
Andrew Rabert a86b71899e Add GPL modules 2018-12-27 18:27:57 -05:00
Mathieu Velten 1d7d52ff9e Port MediaEncoding and Api.Playback from 10e57ce8d21b4516733894075001819f3cd6db6b 2018-12-14 17:32:54 +01:00
Luke Pulverenti 40442f887b consolidate emby.server.core into emby.server.implementations 2017-08-09 15:56:38 -04:00
Luke Pulverenti b89af7af43 fixes #2121 - background roku thumbnail generation (or maybe... any scheduled task?) should be "niced" 2017-08-01 15:43:39 -04:00
Luke Pulverenti d270b10db6 move auto-organize to plugin 2017-07-27 01:18:39 -04:00
Luke Pulverenti bd32c8ba49 update lg dlna profile 2017-07-13 15:04:59 -04:00
Luke Pulverenti 820b4873fb move methods to base class 2017-06-04 16:28:27 -04:00
Luke Pulverenti 33014f77aa update GetItems method 2017-05-26 02:48:54 -04:00
Luke Pulverenti 696a6b34ea improve smb support 2017-05-04 14:14:45 -04:00
Luke Pulverenti 53024bd149 removed dead code 2017-05-04 03:01:35 -04:00
Luke Pulverenti 8755886761 switch to hwaccel auto 2017-04-21 16:03:07 -04:00
Luke Pulverenti 8eb4c034b4 update audio sync params 2017-04-15 15:45:33 -04:00
Luke Pulverenti 4154fdf9c6 update omdb info parsing 2017-04-12 13:09:12 -04:00
Luke Pulverenti abc54d1ea3 determine interlaced from ffprobe data 2017-03-26 00:20:00 -04:00
Luke Pulverenti ce3f2bdd20 reduce AnalyzeDurationMs for live tv 2017-03-05 10:38:36 -05:00
Luke Pulverenti 8deb423883 restore config settings for now 2017-02-08 13:50:33 -05:00
Luke Pulverenti 45398959d7 update media probe 2017-01-31 16:25:29 -05:00
Luke Pulverenti ab026ab2de restore localized guids switch 2017-01-29 15:00:29 -05:00
Luke Pulverenti 8d668095bb add IsRemote property 2017-01-20 12:53:48 -05:00
Luke Pulverenti 9da48106c8 update logging 2016-12-29 16:50:53 -05:00
Luke Pulverenti 5833aedb15 update bitrate filter 2016-12-23 03:50:32 -05:00
Luke Pulverenti f8c88aa632 add null checks 2016-12-22 10:58:31 -05:00
Luke Pulverenti e936f49518 update use of shellexecute 2016-12-09 20:58:52 -05:00
Luke Pulverenti c30b82ab44 update recording encoder 2016-11-29 14:13:20 -05:00
Luke Pulverenti ffb1ec76a7 update components 2016-11-19 02:51:07 -05:00
Luke Pulverenti 9b5a4c22e3 update image & subtitle extraction 2016-11-14 01:44:21 -05:00
Luke Pulverenti 635c8d50a3 update character escaping 2016-11-13 22:44:54 -05:00
Luke Pulverenti 227dd0a42d rework result factory 2016-11-10 09:41:24 -05:00
Luke Pulverenti a8b340cbb2 update portable projects 2016-11-08 13:44:23 -05:00
Luke Pulverenti 7cf0f79f85 update thumbnail sampling 2016-11-02 13:08:34 -04:00
Luke Pulverenti 8ab5e5aca9 update ffmpeg override behavior 2016-11-01 14:29:29 -04:00
Luke Pulverenti b1276dc208 make media encoding project portable 2016-11-01 00:07:12 -04:00
Luke Pulverenti 3094cd7ff3 update project targets 2016-10-30 03:11:37 -04:00
Luke Pulverenti 89ff1f2af6 update components 2016-10-28 14:35:17 -04:00
Luke Pulverenti ef6b90b8e6 make controller project portable 2016-10-25 15:02:04 -04:00
Luke Pulverenti 55f47d2120 update recording defaults 2016-10-16 13:11:32 -04:00
Luke Pulverenti d5b5c8e1a5 update display of active recordings 2016-10-11 02:46:59 -04:00
Luke Pulverenti 50e6686987 update live stream management 2016-10-07 11:08:13 -04:00
Luke Pulverenti a69ca6c55b avoid buffering http responses 2016-10-06 14:55:01 -04:00
Luke Pulverenti 229172da50 update series recording editor 2016-09-30 14:43:59 -04:00
Luke Pulverenti 6a7fabc3bd add new guide settings 2016-09-30 02:50:06 -04:00
Luke Pulverenti eee9c0e048 update recording dialogs 2016-09-22 02:57:31 -04:00
Luke Pulverenti d94598a75e update recording screens 2016-09-21 13:07:18 -04:00
Luke Pulverenti 064ea27994 update default image extraction timeouts 2016-09-09 14:26:05 -04:00
Luke Pulverenti 9c7eef891b add configurable encoding params 2016-09-04 11:01:31 -04:00
Luke Pulverenti e4851e1b25 reduce rescanning due to IsOffline 2016-08-24 02:13:15 -04:00
Luke Pulverenti eb36b009ca update stream start events 2016-08-18 20:10:10 -04:00
Luke Pulverenti cc62faa1c2 update season queries 2016-08-18 01:56:10 -04:00
Luke Pulverenti 9349cc5beb update thread count on image extraction 2016-08-10 15:15:41 -04:00
Luke Pulverenti 79887b2c34 validate encoder presence 2016-08-05 01:12:25 -04:00
Luke Pulverenti a363beb23c update probing 2016-08-03 02:38:27 -04:00
Luke Pulverenti 7e1a0baf9b update media probe 2016-08-03 00:33:34 -04:00
Luke Pulverenti a23144726e add startup null check 2016-07-08 00:00:37 -04:00
Luke Pulverenti 08e58886f7 update metadata editor 2016-07-02 22:47:39 -04:00
Luke Pulverenti dc49059f1b fix interlace detection stderr 2016-07-02 17:45:20 -04:00
Luke Pulverenti 1295d1e694 fix probe stdout 2016-07-02 00:25:34 -04:00
Luke Pulverenti 22601f0a2e reduce stdout redirection 2016-07-01 22:16:05 -04:00
Luke Pulverenti 00634b62c5 remove standard output redirect on image extractions 2016-06-30 22:35:18 -04:00
Luke Pulverenti 525f780453 add startup error handling 2016-06-30 00:23:52 -04:00
Luke Pulverenti 3ebfb59456 add error handling 2016-06-29 23:11:25 -04:00
Luke Pulverenti 775fc94020 update path configs 2016-06-29 01:49:31 -04:00
Luke Pulverenti 02b0734029 update startup wizard 2016-06-28 22:45:37 -04:00
Luke Pulverenti cffc9417c7 update startup wizard 2016-06-23 13:04:18 -04:00
Luke Pulverenti 39ed3696ad update ffmpeg path config 2016-06-20 02:47:12 -04:00
Luke Pulverenti fb07b4640c update ffmpeg path customization 2016-06-20 02:45:35 -04:00
Luke Pulverenti 6cb5b2cd72 update ffmpeg path customization 2016-06-20 02:30:20 -04:00
Luke Pulverenti 6e9f8fb2d1 allow customization of ffmpeg path 2016-06-20 02:19:28 -04:00
Luke Pulverenti a15a762ba1 fixes #1484 - (Feature request) Make emby choose output stream based on ffmpeg config 2016-04-30 15:16:43 -04:00
Luke Pulverenti b0379ec7f8 improve embedded image extraction 2016-04-13 16:49:16 -04:00
Sven Van den brande 168587b2a0 Remove unused code... 2016-03-27 23:11:27 +02:00
Luke Pulverenti 487e6f52a9 update components 2016-03-18 13:28:45 -04:00
Luke Pulverenti 119c4f1435 fix official rating description 2016-02-21 12:22:31 -05:00
Luke Pulverenti 76eb1c46e3 support more embedded video metadata 2016-02-17 21:55:15 -05:00
Luke Pulverenti 1a2867ea55 support tagging 3d as mvc 2016-02-11 14:11:28 -05:00
Luke Pulverenti 51df0b79f2 update interlaced detection 2016-02-01 12:02:58 -05:00
Luke Pulverenti 9b527dcd4f fix interlaced detection 2016-01-13 15:59:17 -05:00
Luke Pulverenti 81fb823c02 record mediastream comment 2016-01-11 11:52:22 -05:00
Luke Pulverenti 59277211c7 update interlaced detection 2015-12-19 13:33:40 -05:00
Luke Pulverenti 3c433e95b9 update interlaced detection 2015-12-19 13:29:53 -05:00
Luke Pulverenti 255747337a fix merge conflict 2015-12-19 13:23:13 -05:00
Luke Pulverenti 4595c3854c update interlaced detection formats 2015-12-19 13:02:32 -05:00
Luke Pulverenti 8d6acbbc68 adjust logging 2015-12-19 12:50:44 -05:00
Luke Pulverenti 6ea8ef9107 restore changes 2015-12-19 12:48:42 -05:00
Luke Pulverenti 949d23f06a fix merge conflict 2015-12-19 12:45:50 -05:00
Luke Pulverenti 02938e7bcb update keyframe setting 2015-12-12 01:49:03 -05:00
Luke Pulverenti a8e5aba643 update library setup 2015-10-16 00:46:41 -04:00
Luke Pulverenti 078277ebc2 continue file system rework 2015-10-04 00:23:11 -04:00
Luke Pulverenti 9f1a8d1dc3 add ffprobe error handling 2015-09-30 01:24:23 -04:00
Luke Pulverenti 2e0076e03f update nfo writer 2015-09-25 08:53:38 -04:00
Luke Pulverenti f3e9bbed23 update file system methods 2015-09-24 13:50:49 -04:00
Luke Pulverenti 959ac9d727 restore changes 2015-09-20 13:56:26 -04:00
Luke Pulverenti 4492dcc592 update merge 2015-09-20 13:34:05 -04:00
Luke Pulverenti 7c7f05e6e2 fix merge conflict 2015-09-20 13:23:37 -04:00
Luke c3d6c19cc3 Merge pull request #1182 from hmflash/fix-ffprobe-argumentexception
Fix ffprobe keyframe detection on linux
2015-09-18 17:15:57 -04:00
Luke Pulverenti 5340bfe8da added setting for intel qsv hardware decoding 2015-09-17 23:08:45 -04:00
Luke Pulverenti a2c371ec60 rework collection editor 2015-09-15 23:55:26 -04:00
Seth Hinze 4dc5d901b6 Split ffprobe output on CRLF or LF. 2015-09-14 19:28:29 -07:00