skip to Main Content

I would like create a server to create subtitles for live videos on Facebook. I use Google Speech to convert sound to text. However, in order to do that, I need to read the facebook live streams.

Using Facebook Live API, with me/live_videos, I get the following response:

{
      "status": "LIVE",
      "stream_url": "rtmp://rtmp-api.facebook.com:80/rtmp/{id}",
      "secure_stream_url": "rtmps://rtmp-api.facebook.com:443/rtmp/{id},
      "embed_html": "<iframe src="https://www.facebook.com/video/embed?video_id={video_id}" width="400" height="400" frameborder="0"></iframe>",
      "id": "{id}"
    },

How can I read the streams from the above links?

2

Answers


  1. Chosen as BEST ANSWER

    I figure out that there is no way to get the current stream from Facebook now. Maybe they should add this feature to their API.


  2. You can get the stream of ongoing live which you can play using any Dash Player.
    To get the stream URL of Live Video, follow these steps:

    1. Use the LIVE_ID of video (not Video_ID) to make the request.
    2. Send a get request at this end point /LIVE_ID with fields as ‘access_token’ and ‘dash_preview_url’.
    3. This will return the URL of the ongoing live stream which can be played using any DASH Player.

    You can refer to official documentation for more information.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search