Page 1 of 1

VLC stream a file in C#: works in a command line not when starting a process

Posted: 15 Apr 2019 18:45
by devilbissj
This is the setup in my C# code:

ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.FileName = "\"" + "C:\\Program Files (x86)\\VideoLan\\VLC\\vlc.exe" + "\"";
startInfo.CreateNoWindow = true;
startInfo.UseShellExecute = false;
startInfo.ErrorDialog = false;
startInfo.RedirectStandardError = true;
startInfo.RedirectStandardOutput = true;
Process test = new Process();
test.StartInfo = startInfo;
test.Exited += new EventHandler(restream_Exited);
test.OutputDataReceived += OutputHandler;
test.ErrorDataReceived += ErrorHandler;
startInfo.Arguments = " --intf dummy --dummy-quiet -vvv " + files[0] + " --sout " + "\"" + "udp:" + destIP + ":" + destPort + "\"" + " --ttl 3";
test.Start()


VLC starts up but no video is streaming.

this works from the dos command line...

"C:\Program Files (x86)\VideoLan\VLC\vlc.exe" --intf dummy --dummy-quiet -vvv \\192.18.20.111\Videos\Raw\test.mpg --sout "udp:192.18.20.30:9001" --ttl 3

Any ideas as to why i can not get the video playing from within my C# code?

Re: VLC stream a file in C#: works in a command line not when starting a process

Posted: 16 Apr 2019 08:32
by Jean-Baptiste Kempf
Look in the logs :)