Selección HEVC con el SDK nativo para Android

En este tema, aprenderá cómo Brightcove Native SDK para Android selecciona fuentes y representaciones HEVC.

Resumen

La codificación de video de alta eficiencia (HEVC), también conocida como H.265, es un estándar de compresión de video que reduce el tamaño de los archivos de video, lo que permite una reproducción de mayor calidad.

Brightcove Native SDK para Android utiliza el siguiente proceso de selección HEVC:

  1. Selección de fuente HEVC
  2. Selección de reproducción HEVC

Selección de fuente HEVC

El proceso de selección de fuente HEVC comienza después de realizar una solicitud para un video usando Brightcove Catalog.

Dependiendo de la configuración de su cuenta, el Catalog La respuesta puede contener varias fuentes, con o sin versiones HEVC. He aquí un ejemplo:

 "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"
  }
]

En este ejemplo, hay cuatro fuentes DASH:

  • Una fuente HTTP que no es HEVC
  • Una fuente HTTPS que no es HEVC
  • Una fuente HTTP HEVC
  • Una fuente HEVC HTTPS

Tenga en cuenta que las fuentes HEVC contienen la cadena hvc en la URL.

El selector de fuente Native SDK para Android prefiere fuentes HEVC. En el ejemplo anterior, seleccionará la fuente HEVC HTTPS.

El SDK nativo continúa con el proceso de selección predeterminado como se define en la Androide: Selección de fuente documento:

  1. Prefiere HTTPS sobre HTTP
  2. Prefiere DASH sobre HLS
  3. Si selecciona HLS para la reproducción, prefiera la versión más alta de HLS disponible

Selección de reproducción HEVC

Dependiendo de sus configuraciones de ingestión, la fuente HEVC puede estar contenida en diferentes representaciones. Puede tener lo siguiente:

Solo interpretaciones HEVC

Cuando las representaciones de la fuente de video solo tienen códecs HEVC, no hay ninguna selección de reproducción involucrada. ExoPlayer selecciona la interpretación adecuada dadas las capacidades del dispositivo y el ancho de banda disponible.

Una mezcla de HEVC y otros códecs

Si la fuente de video tiene representaciones con una mezcla de HEVC y otros códecs (como AVC), se invoca un proceso de selección de representación. Cuando el SDK nativo carga la fuente en ExoPlayer, realiza una SelectionOverride para que la reproducción de video prefiera HEVC sobre otros códecs.

Dado un video cuyos formatos de reproducción son compatibles con el dispositivo, este es el proceso de reproducción:

  1. El SDK nativo selecciona todas las representaciones HEVC.
  2. Ignora las representaciones que no son HEVC que duplican un HEVC existente con la misma resolución.

Esto obliga a ExoPlayer a preferir HEVC en la mayoría de los casos. Aquí hay dos escenarios posibles:

Duplicación de mezcla de códecs

En este escenario, la mayoría de las resoluciones de los códecs HEVC y AVC están duplicadas. Por ejemplo:

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">

Dadas las representaciones de video anteriores, Brightcove Natvie SDK seleccionará las siguientes representaciones:

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">

Tenga en cuenta que solo se seleccionó una reproducción AVC, porque su resolución no duplica una reproducción HEVC existente.

Mitad y mitad

En este escenario, hay representaciones de menor resolución con el códec AVC y representaciones de mayor resolución con el códec HVC. Por ejemplo:

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">

En este caso, debido a que no hay códecs AVC con resoluciones que dupliquen las representaciones HEVC, el SDK nativo selecciona todas las representaciones, lo que permite a ExoPlayer seleccionar las representaciones según el ancho de banda disponible.

El SDK nativo no fuerza la selección HEVC en todos los casos en este escenario, para evitar limitar la reproducción más baja a una reproducción HEVC de alta tasa de bits. Esto podría causar una mala experiencia de usuario con una mala conexión de red.