I need to change the quality of a video that is being scanned by my Api, I'm already sending the file, now I need to change the quality of it at the time of transmission, follow my code below:
var buffer = new byte[65536];
using (var video = File.Open(_filename, FileMode.Open, FileAccess.Read))
{
var length = (int)video.Length;
var bytesRead = 1;
while (length > 0 && bytesRead > 0)
{
bytesRead = video.Read(buffer, 0, Math.Min(length, buffer.Length));
await outputStream.WriteAsync(buffer, 0, bytesRead);
length -= bytesRead;
}
}
Is there any way to change at the time of streaming or do I need to physically have it in other qualities?