aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
AgeCommit message (Collapse)Author
2020-06-05Use typed logger where possiblecrobibero
2020-04-27Try harder to find ffmpeg in app directory. While here do some cleanupMax Git
2020-04-22Remove unused usingsMark Monteiro
This addresses the new issues identified in SonarCloud analysis
2020-04-20Merge remote-tracking branch 'upstream/master' into register-services-correctlyMark Monteiro
2020-04-19Minor improvementsBond_009
2020-04-13Merge branch 'master' into register-services-correctlyMark Monteiro
2020-04-11Use a separate line for each property initializerMark Monteiro
2020-04-11Use ActivatorUtilities to construct MediaEncoder and update constructor to ↵Mark Monteiro
inject EncodingHelper correctly
2020-04-03Merge remote-tracking branch 'upstream/master' into remove-common-processMark Monteiro
2020-04-01Merge branch 'master' into usingsBond-009
2020-03-27Fix some more issues with disposing Process instancesMark Monteiro
2020-03-27Use a TimeSpan instead of ms and support providing a custom CancellationTokenMark Monteiro
2020-03-27Delete unnecessary ProcessFactory abstractionMark Monteiro
2020-03-27Remove unnecessary CommonProcess abstractionMark Monteiro
2020-03-24Remove unused usingsBond_009
2020-02-23Minor improvementsBond_009
2020-01-16Address commentsBond-009
2020-01-16Add back support for DVDs copied as foldersBond-009
2019-12-22Fix exceptions while scanningBond_009
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-11-25Make probesize and analyzeduration configurable and simplify circularBond_009
dependencies Makes the probesize and analyzeduration configurable with env args. (`JELLYFIN_FFmpeg_probesize` and `FFmpeg_analyzeduration`)
2019-09-28Add tests for EncoderValidatorBond_009
* 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-01Fix more warningsBond_009
2019-04-30Limit amount of ffmpeg processes extracting images at onceBond-009
2019-04-09applied changes to just also search jellyfin base dirPhallacy
2019-03-16Merge branch 'master' into subtitle-display-titleredSpoutnik
2019-03-14Change subtitles DisplayTitle behaviorredSpoutnik
2019-03-12Finalise removal of --ffprobe switchPloughPuff
Removed --ffprobe from src files and server/docker scripts.
2019-03-07Address commentBond-009
2019-03-07Reduce the amount of exceptions thrownBond_009
2019-03-05Renamed Init() to SetFFmpegPath()PloughPuff
2019-03-05Remove --ffprobe logicPloughPuff
2019-03-05Address review comments from BondPloughPuff
2019-03-05Review commentsPloughPuff
Address review comments from JustAMan, Bond-009 and cvium.
2019-03-05Reworked FFmpeg path discovery and always display to userPloughPuff
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-02-24Set EnableRaisingEvents to true for processes that require itClaus Vium
2019-02-02Remove dead codeBond_009
2019-01-29Apply suggestions from code review for flipped conditions.Vasily
Co-Authored-By: EraYaN <EraYaN@users.noreply.github.com>
2019-01-28Unwrapped `MoveDirectory`, `DirectoryExists`, `FileExists` & removed `MoveFile`Erwin de Haan
2019-01-28Unwrapped CreateDirectory and DeleteDirectoryErwin de Haan
2019-01-28Unwrapped GetDirectoryName and DirectorySeperatorCharErwin de Haan
2019-01-20Merge pull request #623 from wtayl0r/inject-logger-factoriesAndrew Rabert
Replaced injections of ILogger with ILoggerFactory
2019-01-20Replaced injections of ILogger with ILoggerFactoryWilliam Taylor
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-20Change CanExtractSubtitles to true to allow conversion during direct streamingClaus Vium
2019-01-13ReSharper conform to 'var' settingsErwin de Haan
2019-01-13ReSharper Reformat: Properties to expression bodied form.Erwin de Haan
2019-01-13Visual Studio Reformat: MediaBrowser.MediaEncodingErwin de Haan
2019-01-10Mayor code cleanupErwin de Haan
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-08Remove useless properties from IEnvironmentInfoBond_009
2019-01-02Remove unused FontConfigLoaderBond_009
2019-01-02Use ValueTuple and LinqBond_009