BrianDMG / conv2mp4

This Powershell script will recursively search through a user-defined file path and convert all videos of user-specified file types to MP4 with H264 video and AAC audio using ffmpeg. The purpose of this script is to reduce transcoding CPU load on a media server like Plex or Emby and increase video compatibility across platforms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConvertFrom-Yaml

Septan opened this issue · comments

ConvertFrom-Yaml : The term 'ConvertFrom-Yaml' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:14 char:35
+ $prop = Get-Content "$propFile" | ConvertFrom-Yaml
+                                   ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (ConvertFrom-Yaml:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Convert-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:18 char:25
+ $cfgFile = Convert-Path "$($prop.paths.files.cfg)"
+                         ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Convert-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Conv
   ertPathCommand

ConvertFrom-Yaml : The term 'ConvertFrom-Yaml' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:19 char:33
+ $cfg = Get-Content "$cfgFile" | ConvertFrom-Yaml
+                                 ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (ConvertFrom-Yaml:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Remove-Variable : Cannot find a variable with the name 'cfgFile'.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:20 char:1
+ Remove-Variable -Name cfgFile
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (cfgFile:String) [Remove-Variable], ItemNotFoundException
    + FullyQualifiedErrorId : VariableNotFound,Microsoft.PowerShell.Commands.RemoveVariableCommand

Convert-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:32 char:31
+ $preflightPath = Convert-Path "$($prop.paths.init.preflight)"
+                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Convert-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Conv
   ertPathCommand

The expression after '.' in a pipeline element produced an object that was not valid. It must result in a command
name, a script block, or a CommandInfo object.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:33 char:3
+ . $preflightPath
+   ~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression

Convert-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:36 char:32
+ $buildQueuePath = Convert-Path "$($prop.paths.init.buildqueue)"
+                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Convert-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Conv
   ertPathCommand

The expression after '.' in a pipeline element produced an object that was not valid. It must result in a command
name, a script block, or a CommandInfo object.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:37 char:3
+ . $buildQueuePath
+   ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression

Write-Statistics : The term 'Write-Statistics' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:224 char:1
+ Write-Statistics
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Write-Statistics:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Write-Failures : The term 'Write-Failures' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:225 char:1
+ Write-Failures
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Write-Failures:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Finished
Remove-LockFile : The term 'Remove-LockFile' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At E:\Temp\conv2mp4-5.1.0\conv2mp4-5.1.0\conv2mp4.ps1:232 char:1
+ Remove-LockFile
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Remove-LockFile:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
commented

Hey @Septan, thanks for opening an issue. From the output you've pasted here, it looks like you might be running the script outside of a docker container. As of v5.0.0, the script is meant to be executed with a Docker container (which you can find here. If you don't want to use Docker, the most recent v4.x.x version still works as a standalone script.