安卓版本機軟體開發套件的 HEVC 選擇

在本主題中,您將了解 Android 版的布萊特灣原生 SDK 如何選擇 HEVC 來源和轉譯。

概覽

高效視頻編碼(HEVC),也稱為H.265,是一種視頻壓縮標準,可以減小視頻文件的大小,從而實現更高質量的播放。

適用於Android的Brightcove本機SDK使用以下HEVC選擇過程:

  1. HEVC來源選擇
  2. HEVC移交選擇

HEVC來源選擇

使用Brightcove提出視頻請求後,HEVC信號源選擇過程開始Catalog

根據您的帳戶配置,Catalog響應可能包含多個來源,帶有或不帶有HEVC格式。這是一個例子:

 "sources": [
  {
    "type": "application/dash+xml",
    "src": "http://manifest.prod.boltdns.net/manifest/v1/dash/live-baseurl/clear/4800266849001/11023209-08e4-40d4-9a8b-25aa659421e2/2s/manifest.mpd?fastly_token=ZYZ",
    "profiles": "urn:mpeg:dash:profile:isoff-live:2011"
  },
  {
    "type": "application/dash+xml",
    "src": "https://manifest.prod.boltdns.net/manifest/v1/dash/live-baseurl/clear/4800266849001/11023209-08e4-40d4-9a8b-25aa659421e2/2s/manifest.mpd?fastly_token=XYZ",
    "profiles": "urn:mpeg:dash:profile:isoff-live:2011"
  },
  {
    "type": "application/dash+xml",
    "src": "http://manifest.prod.boltdns.net/manifest/v2/dash/live-baseurl/clear/avc1_hvc1_mp4a/4800266849001/11023209-08e4-40d4-9a8b-25aa659421e2/2s/manifest.mpd?fastly_token=XYZ",
    "profiles": "urn:mpeg:dash:profile:isoff-live:2011"
  },
  {
    "type": "application/dash+xml",
    "src": "https://manifest.prod.boltdns.net/manifest/v2/dash/live-baseurl/clear/avc1_hvc1_mp4a/4800266849001/11023209-08e4-40d4-9a8b-25aa659421e2/2s/manifest.mpd?fastly_token=XYZ",
    "profiles": "urn:mpeg:dash:profile:isoff-live:2011"
  }
]

在此示例中,有四個DASH源:

  • 一個非HEVC HTTP源
  • 一種非HEVC HTTPS源
  • 一個HEVC HTTP源
  • 一個HEVC HTTPS來源

請注意,HEVC源包含字符串hvc在網址中。

適用於Android的Native SDK源選擇器更喜歡HEVC源。在上面的示例中,它將選擇HEVC HTTPS源。

本機SDK繼續執行默認選擇過程,如Android:來源選擇文件:

  1. 在HTTP上優先使用HTTPS
  2. 首選DASH而非HLS
  3. 如果選擇HLS進行播放,請選擇可用的最高版本的HLS

HEVC移交選擇

根據您的攝取配置,HEVC源可能包含在不同的格式中。您可能具有以下條件:

僅HEVC格式

當視頻源的格式轉換只有HEVC編解碼器時,不涉及格式轉換選擇。給定設備功能和可用帶寬,ExoPlayer會選擇適當的格式。

HEVC和其他編解碼器的混合

如果視頻源具有混合了HEVC和其他編解碼器(如AVC)的格式,則將調用格式選擇過程。當本機SDK將源加載到ExoPlayer時,它將執行SelectionOverride視頻呈現方式更喜歡HEVC而不是其他編解碼器。

給定設備支持其再現格式的視頻,以下是再現過程:

  1. 本機SDK選擇所有HEVC格式。
  2. 它會忽略以相同分辨率複製現有HEVC的非HEVC再現。

在大多數情況下,這迫使ExoPlayer偏愛HEVC。這是兩種可能的情況:

編解碼器混合複製

在這種情況下,大多數HEVC和AVC編解碼器的分辨率都是重複的。例如:

AVC <Representation bandwidth="453000" height="270" width="480">
AVC <Representation bandwidth="704000" height="360" width="640">
AVC <Representation bandwidth="903000" height="360" width="640">
AVC <Representation bandwidth="1202000" height="540" width="960">
AVC <Representation bandwidth="1989000" height="720" width="1280">
AVC <Representation bandwidth="2478000" height="720" width="1280">
AVC <Representation bandwidth="3458000" height="720" width="1280">
AVC <Representation bandwidth="3761000" height="720" width="1280">
HVC <Representation bandwidth="304000" height="270" width="480">
HVC <Representation bandwidth="548000" height="360" width="640">
HVC <Representation bandwidth="993000" height="432" width="768">
HVC <Representation bandwidth="1301000" height="576" width="1024">
HVC <Representation bandwidth="1605000" height="720" width="1280">
HVC <Representation bandwidth="2809000" height="720" width="1280">

根據上述視頻格式,Brightcove Natvie SDK將選擇以下格式:

AVC <Representation bandwidth="1202000" height="540" width="960">
HVC <Representation bandwidth="304000" height="270" width="480">
HVC <Representation bandwidth="548000" height="360" width="640">
HVC <Representation bandwidth="993000" height="432" width="768">
HVC <Representation bandwidth="1301000" height="576" width="1024">
HVC <Representation bandwidth="1605000" height="720" width="1280">
HVC <Representation bandwidth="2809000" height="720" width="1280">

請注意,僅選擇了一個AVC格式,因為它的分辨率不會復制現有的HEVC格式。

一半一半

在這種情況下,使用AVC編解碼器的分辨率較低,而使用HVC編解碼器的分辨率較高。例如:

AVC <Representation bandwidth="453000" height="270" width="480">
AVC <Representation bandwidth="704000" height="360" width="640">
AVC <Representation bandwidth="903000" height="360" width="640">
AVC <Representation bandwidth="1202000" height="540" width="960">
AVC <Representation bandwidth="3761000" height="720" width="1280">
HVC <Representation bandwidth="1301000" height="576" width="1024">
HVC <Representation bandwidth="1605000" height="720" width="1280">
HVC <Representation bandwidth="2809000" height="720" width="1280">

在這種情況下,由於不存在分辨率與HEVC格式重複的AVC編解碼器,因此Native SDK會選擇所有格式,從而使ExoPlayer可以根據可用帶寬來選擇格式。

在這種情況下,Native SDK不會在所有情況下都強制選擇HEVC,以免將最低版本限制為高比特率HEVC版本。這可能會導致不良的用戶體驗以及較差的網絡連接。