Posted: October 8, 2016 By: Comments: 7

How to transcode HLS/MP4 to Facebook live stream via FFmpeg


At this time is it not possible to create Facebook Live stream targets using the REST API or with a Client-Side Application … read more

There a solution to transcode live/video (HLS/MP4) stream to RTMP (Facebook) using ffmpeg .

Transcode HLS To RTMP (Facebook live)

Transcode MP4 To RTMP (Facebook live)

Facebook video format Video Format:

  • We accept video in maximum 720p (720 x 1280) resolution, at 30 frames per second. (or 1 key frame every 2 seconds)
  • You must send an I-frame (keyframe) at least once every two seconds throughout the stream.
  • Recommended max bit rate is 4 mbps.
  • The Live API accepts H264 encoded video and AAC encoded audio only

Audio Format:

  • Pixel Aspect Ratio: Square
  • Frame Types: Progressive Scan
  • Audio Sample Rate: 44.1 KHz
  • Audio Bitrate: 128 Kbps stereo
  • Bitrate Encoding: CBR

Create Facebook live “Go Live Dialog”

call the following code to initialize a pop-up window with control that determine where to direct your POST request.

9507 Total Views 11 Views Today

Post Categories

Website Development

  • Vinay Chowdary Sarupuru

    Can i do the same with streaming any of my old youtube channel video to my new youtube channel

  • Thanx! Could you explain why you’re using “-s 426×240” ?

  • Enrique Arturo Soto Mendoza

    Hi, is there a way to stream using a m3u file ? I’ve got one and I cant use it with the command you gave above. Thanks

    • m3u8 file? show me an example so i can help you faster.

  • Nimbu

    Sorry i’m using google translator you can use rtmp instead of hls