我已经在VB中启动了ffmpeg作为进程但是单独捕获的ffmpeg命令不起作用。我的代码是,我不知道如何解决问题,如果有任何帮助非常感谢
proc.StartInfo.FileName = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "\converter\bin\ffmpeg.exe"
proc.StartInfo.Arguments = "-f dshow -i video=screen-capture-recorder screen.mp4"
proc.StartInfo.UseShellExecute = False
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
proc.StartInfo.RedirectStandardInput = True
proc.StartInfo.RedirectStandardOutput = True
proc.StartInfo.CreateNoWindow = True
proc.Start()
答案 0 :(得分:0)
This is my code
Dim sAppPath As String
Dim sCommand As String
Dim sFilePath As String
sCommand = AppSettings.Get("command")
sFilePath = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
'Full HD
sAppPath = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "\converter\bin\ffmpeg.exe " & sCommand & " " & sFilePath & "\RENDER\" & m_sFileName & ".mp4"
WriteLog("Testing " & sCommand & " " & sFilePath & " " & sAppPath)
'sAppPath = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "\converter\bin\ffmpeg.exe -f dshow -vcodec rawvideo -s 1920x1080 -r 24 -pix_fmt yuv420p -i video=screen-capture-recorder -c:v libx264 -pix_fmt yuv420p -preset ultrafast -qp 0 -tune zerolatency -vf fps=24 -framerate 24 -y" & " C:\Users\Bode20\Documents\RENDER\" & m_sFileName & ".mp4"
ProcID = Shell(sAppPath, AppWinStyle.MinimizedFocus)