Commit graph

354 commits

Author SHA1 Message Date
artiume 407de0209e Update MediaEncoder.cs 2020-05-26 18:29:58 +03:00
artiume 1ff95289ef Update EncoderValidator.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
Joshua M. Boniface bf92694f8b
Merge pull request #2715 from nyanmisaka/libfdk-aac
Prefer to use libfdk_aac encoder for better audio quality when it is available
2020-04-12 19:17:11 -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
nyanmisaka db23660660 prefer to use libfdk_aac for better audio quality 2020-03-30 15:53:49 +08: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
Nyanmisaka 2c10891b66
turn on indentation. 2020-01-15 18:45:28 +08:00
Nyanmisaka e95239e281
add support for AMD h264_amf & hevc_amf 2020-01-11 01:36:25 +08: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 0bf8bfbb0c Merge branch 'master' into mediaencoding 2019-12-10 23:00:59 +01:00
ferferga 94ef239de0 Add full Raspberry Pi hardware decoding support 2019-11-25 23:09:23 +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 3e1aab6b29 Fix ffmpeg version check for unknown versions 2019-09-29 13:43:47 +02: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
JMCC 5d85076ad5 Enable Exynos V4L2-m2m HW encoder 2019-05-11 17:17:32 +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
Joshua M. Boniface 5587dd8bfb
Merge pull request #900 from ploughpuff/validator
Implement proper FFmpeg version checking
2019-03-05 11:07:49 -05:00
Vasily f1086a72bf
Improve logic when determining return value
Co-Authored-By: ploughpuff <33969763+ploughpuff@users.noreply.github.com>
2019-02-28 15:58:41 +00:00
PloughPuff 7668ecf9c9 Use Version Class to ease comparisons 2019-02-27 18:20:48 +00:00
Claus Vium aafed63c3f Set EnableRaisingEvents to true for processes that require it 2019-02-24 16:33:05 +01:00
PloughPuff 69ea15f73a Use string interpolation
Two further review comments from JustAMan.
2019-02-16 00:47:38 +00:00
PloughPuff d8d237f6f2 Review comments
Addressed review comments from JustAMan.  Removed code to determine experimental version.  Store major and minor as two ints.  Allow control of a min and max recommended version.
2019-02-15 23:51:22 +00:00