ptr727 / PlexCleaner

Utility to optimize media files for Direct Play in Plex, Emby, Jellyfin
MIT License
264 stars 13 forks source link

unable get ffmpeg #163

Closed Septan closed 1 year ago

Septan commented 1 year ago

Is this a new issue that can be reproduced?

Which operating systems reproduce the issue?

Version information.

OS Version: E.g. Windows 10 Pro 22H2.

Steps to reproduce?

I just ran the command line

Commandline.

PlexCleaner checkfornewtools --settingsfile PlexCleaner.json

Relevant log output.

PlexCleaner checkfornewtools --settingsfile PlexCleaner.json
14:10:05 [INF] <1> Loading settings from : "PlexCleaner.json"
14:10:05 [INF] <1> Application Version : "3.1.24+d77820f206.d77820f2063b22373fb736670320c391a4488e7d", Runtime Version : "7.0.5", Debug Build: False
14:10:05 [INF] <1> Parallel Processing: False : Thread Count: 1, Processor Count: 16
14:10:05 [INF] <1> Checking for new tools ...
14:10:05 [INF] <1> Getting latest version of FfMpeg ...
14:10:36 [ERR] <1> "GetContentInfo"
System.AggregateException: One or more errors occurred. (A task was canceled.)
 ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at InsaneGenius.Utilities.Download.GetContentInfo(Uri uri, Int64& size, DateTime& modifiedTime)
   at PlexCleaner.Tools.GetUrlDetails(MediaToolInfo mediaToolInfo) in /home/runner/work/PlexCleaner/PlexCleaner/PlexCleaner/Tools.cs:line 339
   at PlexCleaner.Tools.CheckForNewTools() in /home/runner/work/PlexCleaner/PlexCleaner/PlexCleaner/Tools.cs:line 265
   at PlexCleaner.Program.CheckForNewToolsCommand(CommandLineOptions options) in /home/runner/work/PlexCleaner/PlexCleaner/PlexCleaner/Program.cs:line 160
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.CommandLine.NamingConventionBinder.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.NamingConventionBinder.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.NamingConventionBinder.ModelBindingCommandHandler.Invoke(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<BuildInvocationChain>b__0(InvocationContext invocationContext, Func`2 _)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<UseParseErrorReporting>b__0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<UseHelp>b__0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<UseVersionOption>b__0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<UseTypoCorrections>b__0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<UseSuggestDirective>b__18_0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<UseParseDirective>b__0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<RegisterWithDotnetSuggest>b__5_0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<UseEnvironmentVariableDirective>b__6_0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<UseExceptionHandler>b__0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_2.<BuildInvocationChain>b__3(InvocationContext c)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<CancelOnProcessTermination>b__1_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<CancelOnProcessTermination>b__1_0(InvocationContext context, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_1.<BuildInvocationChain>b__2(InvocationContext ctx, Func`2 next)
   at System.CommandLine.Invocation.InvocationPipeline.<Invoke>g__FullInvocationChain|3_0(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.Invoke(IConsole console)
   at System.CommandLine.CommandExtensions.Invoke(Command command, String[] args, IConsole console)
   at PlexCleaner.CommandLineOptions.Invoke() in /home/runner/work/PlexCleaner/PlexCleaner/PlexCleaner/CommandLineOptions.cs:line 30
   at PlexCleaner.Program.Main() in /home/runner/work/PlexCleaner/PlexCleaner/PlexCleaner/Program.cs:line 44
--- End of stack trace from previous location ---

   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at InsaneGenius.Utilities.Download.GetContentInfo(Uri uri, Int64& size, DateTime& modifiedTime)
14:10:36 [ERR] <1> FfMpeg : Failed to get latest version
14:10:36 [INF] <1> Exit Code : 1

Settings file.

{ "$schema": "https://raw.githubusercontent.com/ptr727/PlexCleaner/main/PlexCleaner.schema.json", "SchemaVersion": 3, "ToolsOptions": { "UseSystem": false, "RootPath": ".\Tools\", "RootRelative": true, "AutoUpdate": true }, "ProcessOptions": { "KeepOriginalLanguage": true, "RemoveClosedCaptions": true, "SetIetfLanguageTags": true, "SetTrackFlags": true, "KeepExtensions": [ ".partial~", ".nfo", ".jpg", ".srt", ".smi", ".ssa", ".ass", ".vtt" ], "ReMuxExtensions": [ ".avi", ".m2ts", ".ts", ".vob", ".mp4", ".m4v", ".asf", ".wmv" ], "ReEncodeVideo": [ { "Format": "mpeg2video" }, { "Format": "vc1" }, { "Format": "wmv3" }, { "Format": "msrle" }, { "Format": "rawvideo" }, { "Format": "indeo5" }, { "Format": "h264", "Profile": "Constrained Baseline@30" }, { "Format": "mpeg4", "Codec": "dx50" }, { "Format": "msmpeg4v2", "Codec": "mp42" }, { "Format": "msmpeg4v3", "Codec": "div3" } ], "ReEncodeAudioFormats": [ "flac", "mp2", "vorbis", "wmapro", "opus", "wmav2", "adpcm_ms", "pcm_u8", "pcm_s16le" ], "KeepLanguages": [ "en", "af", "zh", "in" ], "PreferredAudioFormats": [ "truehd atmos", "truehd", "dts-hd master audio", "dts-hd high resolution audio", "dts", "e-ac-3", "ac-3" ], "DeleteEmptyFolders": true, "DeleteUnwantedExtensions": true, "ReMux": true, "DeInterlace": true, "ReEncode": true, "SetUnknownLanguage": true, "DefaultLanguage": "en", "RemoveUnwantedLanguageTracks": false, "RemoveDuplicateTracks": false, "RemoveTags": true, "UseSidecarFiles": true, "SidecarUpdateOnToolChange": false, "Verify": true, "RestoreFileTimestamp": false, "FileIgnoreList": [] }, "ConvertOptions": { "FfMpegOptions": { "Video": "libx264 -crf 22 -preset medium", "Audio": "ac3", "Global": "-analyzeduration 2147483647 -probesize 2147483647", "Output": "-max_muxing_queue_size 1024 -abort_on empty_output" }, "HandBrakeOptions": { "Video": "x264 --quality 22 --encoder-preset medium", "Audio": "copy --audio-fallback ac3" } }, "VerifyOptions": { "AutoRepair": true, "DeleteInvalidFiles": false, "RegisterInvalidFiles": false, "MaximumBitrate": 100000000 }, "MonitorOptions": { "MonitorWaitTime": 60, "FileRetryWaitTime": 5, "FileRetryCount": 2 } }

Log file.

No response

Media file information.

No response

ptr727 commented 1 year ago

Log file output says that it is unable to get latest ffmpeg download details.
Maybe the site was down?

Try to load:

ptr727 commented 1 year ago

You can try the latest build, I added some additional logging, and upped the web request timeout to 30s.
Note this is only to help troubleshoot, if the update sites are down there is nothing to be done on this side.