5
I need to change the quality of a video that is being aired 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 I need to have it physically in the other qualities?
Normally, video quality is not defined by the way you feed the buffer, and yes by the sample rate of the video. It means that you have to work that buffer somehow before.
– Leonel Sanches da Silva
I got it, I’m gonna see a shape here and then I’m gonna shape it, see...
– thiago.adriano26