Does YouTube live streaming support HLS (HTTP Live Streaming)?

15,459

Solution 1

Short answer: Yes

Long answer:

The official page says:

Mobile streaming: Live events will be automatically available on iPhone, iPad, iPod Touch & Android 4.0+ mobile devices via m.youtube.com.

This sounds a lot like a HLS fallback.

Using an iPad user-agent and sniffing network traffic I found the following request to a Google server:

HTTP GET

/api/manifest/hls_variant/sparams/gcr,id,ip,ipbits,itag,playlist_type,pmbypass,source,expire/source/yt_live_broadcast/[redacted]/index.m3u8?[redacted]

and response:

HTTP/1.1 200 OK Content-Type: application/vnd.apple.mpegurl

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=380059,CODECS="avc1.4d0015,mp4a.40.5",RESOLUTION=426x240,CLOSED-CAPTIONS=NONE
http://manifest.googlevideo.com/api/manifest/hls_playlist/id/ANM-dq5USTc.1/itag/92/source/yt_live_broadcast/ratebypass/yes/live/1/cmbypass/yes/gir/yes/dg_shard[..]

So yeah, I guess YouTube live supports HLS.

Solution 2

A liveStream object contains a cdn object with the ingestionType property. This String property is used to declare the method or protocol used to transmit the video stream.

The only supported transmission format at this time is rtmp. HLS is not supported at this time but is on YouTube's roadmap for supported upstream formats.

As of April 2016, YouTube has added DASH as a supported ingestion video format.

Share:
15,459
Hisen
Author by

Hisen

Updated on June 28, 2022

Comments

  • Hisen
    Hisen almost 2 years

    I'm a newcomer. I know YouTube live streaming supports RTMP, but I cannot find HLS encoder settings. Does it support HLS? I want to broadcast an HLS streaming via YouTube.

  • Hisen
    Hisen about 9 years
    Thanks for your answer. However, I guess you misunderstood my question. I mean I want to create a live broadcast streaming, but my stream is HLS. I know Youtube live events can be played in iOS. However, does it support HLS encoding when we create a live streaming?
  • aergistal
    aergistal about 9 years
    For input there's only RTMP so far.
  • chen
    chen almost 8 years
    There are two protocols as far as broadcast a live stream: 1) the protocol to upload/publish to Youtube; 2) and the protocol Youtube broadcast to the end user. Is ingestionType the protocol to upload to Youtube system or the Youtube users to watch (download) the video?
  • JAL
    JAL almost 8 years
    @chen The upstream, at least as far as I know. Considering you can play back live events in any webpage/web view, YouTube must support a multitude of downstream formats.
  • chen
    chen almost 8 years
    I was reading a blog about Facebook Live, and Facebook Live team seemed to use RTMP as the downstream protocol to bring down the latency, any thoughts?
  • Marc Chambers
    Marc Chambers over 7 years
    Since April we now offer DASH ingestion, which is similar to HLS. developers.google.com/youtube/v3/live/guides/encoding-with-d‌​ash
  • JAL
    JAL over 7 years
    @MarcChambers Hey, thanks! Glad YouTube hired another dev relations engineer!
  • tamak
    tamak over 6 years
    @MarcChambers just discovering this 2016 thread, any chance HLS ingestion is supported now?
  • JAL
    JAL over 6 years
    @tamak rtmp and dash are still the only two ingestion types. Review the API docs.