Reference

Video Specifications

Live videos must have both an audio and a video track.

Format

  • Video with a maximum 720p (1280x720) resolution at 30 frames per second, with 1 key frame every 2 seconds.
  • An I-frame (keyframe) sent at least once every two seconds throughout the stream.
  • A max bit rate of 4 Mbps is recommended. Going above this maximum is possible but will make live streams highly unstable.
  • A single resolution throughout the video. Changing resolution midstream has a negative impact on broadcasts.
  • Titles must be 254 characters or less.
  • The Live API accepts H264 encoded video and AAC encoded audio only.

Length

  • 8 hour maximum length for live stream.
  • 8 hour maximum length for preview streams (either through Live dialog or publisher tools). After 240 minutes, a new stream key must be generated.
  • RTMP stream URLs will expire 24 hours after they are created.

Advanced Audio Settings

  • Audio Bitrate: 128 Kbps mono
  • Audio Codec: AAC
  • Audio Sample Rate: 48 KHz

Advanced Video Settings

  • Bitrate Encoding: CBR
  • Frame Types: Progressive Scan
  • Pixel Aspect Ratio: Square
  • Video Codec: H264

Nodes

NodeDescription

/{live-encoder-id}

Associates a LiveEncoder with a video broadcast.

/{live-video-id}

Returns information about LiveVideos.

Root Edges

Root EdgeDescription

/broadcaster_encoding_settings

Returns supported input formats and encoder settings.

Edges

EdgeDescription

/{group-id}/live_encoders

Registers a LiveEncoder to stream a LiveVideo to a Group.

/{group-id}/live_videos

Creates a LiveVideo in a Group.

/{live-encoder-id}

Associates a LiveEncoder with a video broadcast.

/{live-video-id}

Returns information about LiveVideos.

/{live-video-id}/input_streams

Configures multiple stream URLs.

/{live-video-id}/comments

Returns comments of a live stream. To get comments in real-time visit the Server-sent Events reference.

/{live-video-id}/reactions

Returns reactions of a LiveVideo. To get reactions in real-time visit the Server-sent Events reference.

/{live-video-id}/master_ingest_stream_id

Switches between a primary and a secondary stream url.

/{live-video-id}/targeting

Targets a LiveVideo to a specific audience.

/{page-id}/live_encoders

Registers a LiveEncoder to stream a LiveVideo to a Page.

/{page-id}/live_videos

Creates a Live Video on a Page.

/{user-id}/live_encoders

Registers a LiveEncoder to stream a LiveVideo to a User's Timeline.

/{user-id}/live_videos

Creates and retrieves information of a LiveVideo on a User's Timeline.

Error Codes

Error messages will be sent via RTMP then will persist through to the Graph API. You can use the broadcast/video ID and query for the errors in the Graph Explorer tool via a GET request. Errors returned will contain the error code, description, and a timestamp.

error_subcodeError SummaryDescription
COPYRIGHT__LIVE_COPYRIGHT_VIOLATION

Live Copyright Violation

Your live video has been stopped because it may contain audio or visual content that belongs to a different Page.

VIDEO__CREATE_FAILED

Upload Problem

There was a problem and your video was not uploaded. Please try again.

LIVE_VIDEO__DELETE_FAILED

Live Video Not Deleted

There was a problem and we were not able to delete your live video. Please try again.

LIVE_VIDEO__EDIT_API_NOT_ALLOWED

Editing Via Video API Is Not Allowed While Live

Editing a live video using the Video Edit API is not allowed. Use the live video ID.

LIVE_VIDEO__LIVE_STREAM_ERROR

Generic Stream

There was an error during the stream

LIVE_VIDEO__NOT_EXIST

Live Video Does Not Exist

The live video you are trying to access does not exist in the system any more.

LIVE_VIDEO__PRIVACY_REQUIRED

Privacy Setting Required

You need to set a privacy before going live.