简体   繁体   English

如何在roku / scenegraph中获得本机流视频分辨率?

[英]how to get native stream video resolution in roku/scenegraph?

Is it possible in screen graph to get native stream resolution? 屏幕图中是否有可能获得本机流分辨率? or at least its aspect ratio? 或至少是其长宽比? The Video node is performing automatic scaling padding it vertically or horizontally - I need to know the video size without padding. “视频”节点正在执行垂直或水平填充的自动缩放-我需要知道视频大小而无需填充。

Thank you in advance for your feedback. 预先感谢您的反馈。

The Roku Video Player Node does not have an interface that provides the native resolution of the video stream. Roku Video Player节点没有提供视频流原始分辨率的接口。

One way to solve this is to provide the video information to your application alongside the video. 解决此问题的一种方法是将视频信息与视频一起提供给您的应用程序。 So if you are hosting a list of video streams, also include the video resolution as part of the metadata. 因此,如果您托管视频流列表,则还应将视频分辨率作为元数据的一部分。

Example JSON: JSON示例:

{
  "videos": [
    {
      "title": "My Show",
      "url": "https://example.com/video.m3u8",
      "width": 1920,
      "height": 1080,
      "format": "hls"
    }
  ]
}

In general video resolution is not important for UI layout purposes. 通常,视频分辨率对于UI布局而言并不重要。 Most applications will play the video back full screen, or as part of a pre-defined rectangle in the UI. 大多数应用程序将全屏播放视频,或者将其作为用户界面中预定义矩形的一部分播放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM