gpt4 book ai didi

c# - VLC 命令行 - 转码

转载 作者:太空宇宙 更新时间:2023-11-03 15:14:46 26 4
gpt4 key购买 nike

我想使用简单的 Windows 窗体程序对视频进行转码。

我正在创建带参数的流程。

我的代码:

        string vlc = @"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe";
string dest=@"C:\Users\pc\Desktop\test.mp4";

ProcessStartInfo p = new ProcessStartInfo
{
FileName = vlc,
Arguments = @"% vlc C:/video.mpg :sout=#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:std{access=file{no-overwrite},mux=mp4,dst="+dest+"}"
};
Process x = Process.Start(p);
x.WaitForExit();

问题是它不工作。该程序启动 VLC,但没有发生任何事情,也没有从 VLC 收到任何错误

最佳答案

我最近问了一个Similar Question ,

如果您想查看生成的流输出字符串,使用“打开网络流”并将您的选项卡更改为"file"。

不要单击“播放”,而是展开下拉列表以选择“流”。

按照向导说明设置目标文件和转码选项。

在流式传输之前,您将获得可以使用的字符串....

例如:

:sout=#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:file{dst=C:\\Users\\Public\\Videos\\Sample Videos\\test.mp4,no-overwrite} :sout-keep

关于c# - VLC 命令行 - 转码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39454105/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com