vb.net - PowerShell 无法正确识别字符串

标签 vb.net powershell ffmpeg

我正在向 powershell 传递命令

Dim command As String
command = "ffmpeg -vsync 0 –hwaccel cuvid -c:v h264_cuvid –resize 1280x720 -i D:\Imagens\nova\bol.mkv -c:a copy -c:v h264_nvenc -b:v 5M D:\Imagens\nova\bol_encod.mkv"


Dim powerShell As String = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
    Process.Start("powershell", "-noexit " + command)

但powershell返回

Unable to find a suitable output format for 'ÔÇôhwaccel' ÔÇôhwaccel: Invalid argument



我相信“ÔÇôhwaccel”是–hwaccel;这很奇怪,一旦我直接在 PowerShell 上传递代码,它就可以正常工作。

那是我的字符串有问题吗?

谢谢你!

最佳答案

a copy paste of the source command into powershell 5

我假设powershell 5而不是核心,我复制了测试并将其粘贴到终端中,发现这个u而不是'-'。我将首先重新输入并避免看起来可能是长连字符或其他破坏终端的东西。

关于vb.net - PowerShell 无法正确识别字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59816291/

相关文章:

powershell - Get-ChildItemWhere-Object -notlike $array - 有办法做到这一点吗?

android - fatal error 问题 - jhotovy 的 android-ffmpeg-x264 版本 - github.com/jhotovy/android-ffmpeg.git

android - Android 上使用 FFMPEG 的 HLS 播放问题

vb.net - .exe 不是 Windows XP 上有效的 Win32 应用程序

c# - vb.Net c# 运行批处理文件并流式传输其输出

c# - 从 C# 转换为 VB.NET 的代码中出现奇怪错误

windows - 将可能包含非 ASCII Unicode 字符的 PowerShell 输出解码为 Python 字符串

powershell - PowerShell:使用单词列表检查文件是否为英语

vb.net - 在 VB.Net 中使用空值

python - ffmpeg 不会停止编码,即使使用 -shortest 命令