Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var process = Process.Start(new ProcessStartInfo
- {
- FileName = "ffmpeg",
- Arguments = $"-i {pathOrUrl} -f s16le -ar 48000 -ac 2 pipe:1",
- UseShellExecute = false,
- RedirectStandardOutput = true
- });
- Thread.Sleep(2000);
- int blockSize = 3840;
- byte[] buffer = new byte[blockSize];
- int byteCount;
- while (true)
- {
- Console.WriteLine("Byte: " + (i += 1).ToString());
- byteCount = process.StandardOutput.BaseStream
- .Read(buffer, 0, blockSize);
- if (byteCount == 0)
- break;
- _vClient.Send(buffer, 0, byteCount);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement