xbox-smartglass-csharp icon indicating copy to clipboard operation
xbox-smartglass-csharp copied to clipboard

Other Video Formats

Open BobbyShoe opened this issue 5 years ago • 2 comments

Have you ever tried to use the other Video Formats for lower resolution? I see four different video options available in the array on this line of code:

VideoFormat videoFormat = nano.VideoFormats[0];

1280 X 720 960 X 540 640 X 360 320 X 180

are available. However only 1280 X 720 (at index 0) appears to start streaming.

Thanks.

BobbyShoe avatar Jan 15 '20 13:01 BobbyShoe

Also the formats all indicate they are 30 FPS, but the streams appear to be 60 FPS from what I can tell.

BobbyShoe avatar Jan 15 '20 13:01 BobbyShoe

change VideoFormat videoFormat = nano.VideoFormats [0]; does not give changes.

usage nano.Control.ChangeVideoQualityAsync

   public enum StreamResolution
   {
       VR_360p, // 640x360
       VR_480p, // 848x480
       VR_720p, // 1280x720
       VR_1080, // 1920x1080

       VR_540p //not support
   }

....

public async Task InitializeStreamAsync(/*StreamResolution _resolution = StreamResolution.VR_720p*/)
       {
           //resolution = _resolution;

           AudioFormat audioFormat = nano.AudioFormats[0];
           VideoFormat videoFormat = nano.VideoFormats[0];

           await nano.Control.ChangeVideoQualityAsync(8000000, (uint)resolution, 30000, 1001, 59, 0);
           await nano.InitializeStreamAsync(audioFormat, videoFormat);

       }

ISergey256 avatar Mar 26 '20 19:03 ISergey256