我正在尝试通过 Powershell 在远程转码服务器上调用 ffmpeg:
$session = new-pssession -computername transcodingserver
Invoke-Command -session $session -scriptblock { powershell ffmpeg }
ffmpeg正确安装在远程服务器上,可以在那里运行,但是远程调用会报错:
ffmpeg : The term 'ffmpeg' is not recognized as the name of a cmdlet, function, script file, or operable program.
+ CategoryInfo : NotSpecified: (ffmpeg : The te...rable program. :String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
+ PSComputerName : transcodingserver
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ ffmpeg
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (ffmpeg:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
NotSpecified: (:) [], RemoteException
在我看来,如果我运行的机器Invoke-Command
试图运行 ffmpeg,它没有安装在那里。您需要做什么才能在远程服务器上运行 ffmpeg?