显示YouTube视频的分辨率(4K/8K)在非搜索页面中。

huangapple go评论58阅读模式
英文:

How to show youtube video's resolution(4k/8k) in non-search pages

问题

我想要

我们只能在YouTube的搜索页面上通过视频下方的“4K”/“8K”标签来看到视频是否为“4K”或“8K”,我希望在其他页面(例如播放列表页面、视频播放页面)中也能看到“4K”/“8K”标签。

你可能会说

“只需点击视频播放页面的'配置图标',以获取此视频的最大分辨率”。

但这不太好,因为“配置图标”的结果是不正确的(请看下面的解释)!

解释

  • 在PC的浏览器中访问此网址 youtube-search-URL
  • 然后您将看到搜索结果中的第一项是“Ultra Europe 8K 180 VR”,带有2个标签“8K”/“VR180”
  • 点击该项,您将进入视频播放页面
  • 您在视频播放页面找不到“8K”标签,而且您只能通过“配置图标”找到最大分辨率是“2160s60 4K”,没有“8K”可用。
  • 这是因为这个8K视频是3D SBS(并排)视频,这意味着左侧部分是4K,右侧部分也是4K。但由于您处于PC监视器模式(单声道模式),所以只有一侧(“4K”)可用。

所以有没有办法实现这一点?比如一个扩展程序或tamperMoney脚本?谢谢你们。

英文:

What I want

We can see if a video is 4K or 8K ONLY in the search page of youtube via the 4K/8K tag under the video, and I want to see the 4K/8K tag in other pages(e.g. playlist page, video-play-page).

显示YouTube视频的分辨率(4K/8K)在非搜索页面中。

显示YouTube视频的分辨率(4K/8K)在非搜索页面中。

What you may say

"Just click the config icon of video-play-page to get the maximum resolution of this video"

But this is not good, since the result of the config icon is incorrect(see blew explanation)!

Explanation

  • Visit this in PC's browser youtube-search-URL
  • Then you'll see the first item in the search result is Ultra Europe 8K 180 VR with 2 tags 8K/VR180
  • Click that item, and you'll enter the video-play-page
  • You will NOT find the 8k tag in the video-play-page, and the maximum resolution u can find via the config-icon is only 2160s60 4K, NO 8K available.
  • This is because this 8k video is a 3d SBS(side by side) video, which means the left part is 4k and the right part is 4k too. But since you are in PC monitor mode(mono mode), so only one side(4K) is available.

So is there any way to achieve that? Like an extension, or tamperMoney script? Thanks you guys.

答案1

得分: 1

以下是您要翻译的内容:

在YouTube上,这些标签的渲染是由YouTube制作的,我不知道他们如何设置这些标签 - 如果您检查页面的代码 - 这些标签被渲染为“badges”。

从搜索结果中提取:

{
  “videoRenderer”:{
    “videoId”:“Sv3yoyUOENU”,
    [...]
    “title”:{
      “runs”:[
        {
          “text”:“Ultra Europe 8K 180 VR”
        }
      ],
      [...]
    },
    [...]
    “badges”:[
      {
        “metadataBadgeRenderer”:{
          “style”:“BADGE_STYLE_TYPE_SIMPLE”,
          “label”:“8K”,
          “trackingParams”:“CPIBENwwGAEiEwjYhsfMibH-AhXVw3IJHe4TBfw=”
        }
      },
      {
        “metadataBadgeRenderer”:{
          “style”:“BADGE_STYLE_TYPE_SIMPLE”,
          “label”:“VR180”,
          “trackingParams”:“CPIBENwwGAEiEwjYhsfMibH-AhXVw3IJHe4TBfw=”
        }
      }
    ],
    [...]
  }
}

请查看此播放列表示例 - 其中包含您在截图中显示的视频。

将前面的提取与所述播放列表的响应进行比较:

从播放列表中提取:

{
  “playlistVideoRenderer”:{
    “videoId”:“cmULDIVQLNk”,
    [...]
    “title”:{
      “runs”:[
        {
          “text”:“The Swing Beans Live at The BuG in Virtual Reality”
        }
      ],
    },
    “index”:{
      “simpleText”:“1”
    },
    “shortBylineText”:{
      “runs”:[
        {
          “text”:“Cynthia Cabello 360 VR Life”,
        }
      ]
    },
    “badges”:[
      {
        “metadataBadgeRenderer”:{
          “style”:“BADGE_STYLE_TYPE_SIMPLE”,
          “label”:“VR180”,
          “trackingParams”:“CNICEMY0GAAiEwjguM7OjbH-AhV5w3IJHcSHDz4=”
        }
      }
    ],
    [...]
  }
}

您可以看到两个项目分别渲染为videoRendererplaylistVideoRenderer - 具有不同的结构。

我认为每个对象都有自己的限制/不同的结构,因此,在播放列表中显示的标签/徽章的方式与每个对象不同。

我怀疑很难以一种简单的方式在播放列表中获取相同的标签/徽章的“视图” - 无论是使用自定义脚本还是扩展。

英文:

The render of such tags are made by YouTube and I have no idea how they set those tags - which, if you inspect the code of the page - those are rendered as "badges".

Extract from the search result:

{
  "videoRenderer": {
    "videoId": "Sv3yoyUOENU",
    [...]
    "title": {
      "runs": [
        {
          "text": "Ultra Europe 8K 180 VR"
        }
      ],
      [...]
    },
	[...]
    "badges": [
      {
        "metadataBadgeRenderer": {
          "style": "BADGE_STYLE_TYPE_SIMPLE",
          "label": "8K",
          "trackingParams": "CPIBENwwGAEiEwjYhsfMibH-AhXVw3IJHe4TBfw="
        }
      },
      {
        "metadataBadgeRenderer": {
          "style": "BADGE_STYLE_TYPE_SIMPLE",
          "label": "VR180",
          "trackingParams": "CPIBENwwGAEiEwjYhsfMibH-AhXVw3IJHe4TBfw="
        }
      }
    ],
    [...]
  }
}

See this playlist sample - which contains the video you show in your screenshot.

Compare the previous extraction with the response on said playlist:

Extract from the playlist:

{
  "playlistVideoRenderer": {
    "videoId": "cmULDIVQLNk",
    [...]
    "title": {
      "runs": [
        {
          "text": "The Swing Beans Live at The BuG in Virtual Reality"
        }
      ],
    },
    "index": {
      "simpleText": "1"
    },
    "shortBylineText": {
      "runs": [
        {
          "text": "Cynthia Cabello 360 VR Life ",
        }
      ]
    },
    "badges": [
      {
        "metadataBadgeRenderer": {
          "style": "BADGE_STYLE_TYPE_SIMPLE",
          "label": "VR180",
          "trackingParams": "CNICEMY0GAAiEwjguM7OjbH-AhV5w3IJHcSHDz4="
        }
      }
    ],
    [...]
  }
}

You can see that both items are rendered as videoRenderer and playlistVideoRenderer respectively - having different structures.

I believe that each object have their own restrictions/different structure and then, making the tags/badges shown differs between each object.

I doubt there is a easy way to get the same "view" of tags/badges in playlists - either with custom scripts or extensions.

huangapple
  • 本文由 发表于 2023年4月17日 01:37:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76029355.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定