push to facebook not working anymore

Gabriel T

Member
Hello
looks like push to facebook is not wortking anymore...i noticed that fb changed publish token and url so i updated my scripts, but its not working anymore...
logs:

12:42:22,587 INFO ransponderController - http-nio-8888-exec-8 handleRequest /rest-api/push/startup params:{streamName=1426-Gb^5b375d803ff70^ok^fr-5872, rtmpUrl=rtmps://live-api-s.facebook.com:443/rtmp/xxx}
12:42:22,621 INFO agerRemoteRmiService - RMI TCP Connection(585)-xxx SEND REST OBJECT ==>
URL:http://localhost:9091/RoomApp/StreamStatusEvent
OBJECT:
{
"nodeId" : "OuGGlbBea8u8AP0ZIgnCCfTGsoCqwT9C@xxx",
"appKey" : "roomApp",
"sessionId" : "/xxx:49810/xxx:8443",
"mediaSessionId" : "v797aua30h0bovvukgd3ne3dkd",
"name" : "1426-Gb^5b375d803ff70^ok^fr-5872",
"published" : false,
"hasVideo" : true,
"hasAudio" : true,
"status" : "PLAYING",
"audioCodec" : "mpeg4-generic",
"videoCodec" : "H264",
"record" : false,
"width" : 320,
"height" : 240,
"bitrate" : 0,
"minBitrate" : 0,
"maxBitrate" : 0,
"quality" : 0,
"rtmpUrl" : "rtmps://live-api-s.facebook.com:443/rtmp/xxx",
"createDate" : 1530355342590,
"mediaProvider" : "WebRTC",
"history" : false
}
12:42:22,624 INFO agerRemoteRmiService - RMI TCP Connection(585)-xxx RECEIVED REST OBJECT <==
URL:http://localhost:9091/RoomApp/StreamStatusEvent
OBJECT:
{
"nodeId" : "OuGGlbBea8u8AP0ZIgnCCfTGsoCqwT9C@xxx",
"appKey" : "roomApp",
"sessionId" : "/xxx:49810/xxx:8443",
"mediaSessionId" : "v797aua30h0bovvukgd3ne3dkd",
"name" : "1426-Gb^5b375d803ff70^ok^fr-5872",
"published" : false,
"hasVideo" : true,
"hasAudio" : true,
"status" : "PLAYING",
"audioCodec" : "mpeg4-generic",
"videoCodec" : "H264",
"record" : false,
"width" : 320,
"height" : 240,
"bitrate" : 0,
"minBitrate" : 0,
"maxBitrate" : 0,
"quality" : 0,
"rtmpUrl" : "rtmps://live-api-s.facebook.com:443/rtmp/xxx",
"createDate" : 1530355342590,
"mediaProvider" : "WebRTC",
"history" : false
}
12:42:22,859 INFO agerRemoteRmiService - RMI TCP Connection(585)-xxx SEND REST OBJECT ==>
URL:http://localhost:9091/RoomApp/playStream
OBJECT:
{
"nodeId" : "OuGGlbBea8u8AP0ZIgnCCfTGsoCqwT9C@xxx",
"appKey" : "roomApp",
"sessionId" : "/xxx:49810/xxx:8443",
"mediaSessionId" : "v797aua30h0bovvukgd3ne3dkd",
"name" : "1426-Gb^5b375d803ff70^ok^fr-5872",
"published" : false,
"hasVideo" : true,
"hasAudio" : true,
"status" : "PLAYING",
"audioCodec" : "mpeg4-generic",
"videoCodec" : "H264",
"record" : false,
"width" : 320,
"height" : 240,
"bitrate" : 0,
"minBitrate" : 0,
"maxBitrate" : 0,
"quality" : 0,
"rtmpUrl" : "rtmps://live-api-s.facebook.com:443/rtmp/xxx",
"parentMediaSessionId" : "5872a891-7c4f-11e8-a0ae-6b604d55c6c5",
"createDate" : 1530355342590,
"mediaProvider" : "WebRTC",
"history" : false
}
12:42:22,862 INFO agerRemoteRmiService - RMI TCP Connection(585)-xxx RECEIVED REST OBJECT <==
URL:http://localhost:9091/RoomApp/playStream
OBJECT:
{
"nodeId" : "OuGGlbBea8u8AP0ZIgnCCfTGsoCqwT9C@xxx",
"appKey" : "roomApp",
"sessionId" : "/xxx:49810/xxx:8443",
"mediaSessionId" : "v797aua30h0bovvukgd3ne3dkd",
"name" : "1426-Gb^5b375d803ff70^ok^fr-5872",
"published" : false,
"hasVideo" : true,
"hasAudio" : true,
"status" : "PLAYING",
"audioCodec" : "mpeg4-generic",
"videoCodec" : "H264",
"record" : false,
"width" : 320,
"height" : 240,
"bitrate" : 0,
"minBitrate" : 0,
"maxBitrate" : 0,
"quality" : 0,
"rtmpUrl" : "rtmps://live-api-s.facebook.com:443/rtmp/xxx",
"parentMediaSessionId" : "5872a891-7c4f-11e8-a0ae-6b604d55c6c5",
"createDate" : 1530355342590,
"mediaProvider" : "WebRTC",
"history" : false
}
12:42:22,866 INFO agerRemoteRmiService - RMI TCP Connection(584)-xxx SEND REST OBJECT ==>
URL:http://localhost:9091/RoomApp/StreamStatusEvent
OBJECT:
{
"nodeId" : "OuGGlbBea8u8AP0ZIgnCCfTGsoCqwT9C@xxx",
"appKey" : "roomApp",
"sessionId" : "/xxx:49810/xxx:8443",
"mediaSessionId" : "v797aua30h0bovvukgd3ne3dkd",
"name" : "1426-Gb^5b375d803ff70^ok^fr-5872",
"published" : false,
"hasVideo" : true,
"hasAudio" : true,
"status" : "STOPPED",
"audioCodec" : "mpeg4-generic",
"videoCodec" : "H264",
"record" : false,
"width" : 320,
"height" : 240,
"bitrate" : 0,
"minBitrate" : 0,
"maxBitrate" : 0,
"quality" : 0,
"rtmpUrl" : "rtmps://live-api-s.facebook.com:443/rtmp/xxx",
"createDate" : 1530355342590,
"mediaProvider" : "WebRTC",
"history" : false
}
12:42:22,869 INFO agerRemoteRmiService - RMI TCP Connection(584)-xxx RECEIVED REST OBJECT <==
URL:http://localhost:9091/RoomApp/StreamStatusEvent
OBJECT:
{
"nodeId" : "OuGGlbBea8u8AP0ZIgnCCfTGsoCqwT9C@xxx",
"appKey" : "roomApp",
"sessionId" : "/xxx:49810/xxx:8443",
"mediaSessionId" : "v797aua30h0bovvukgd3ne3dkd",
"name" : "1426-Gb^5b375d803ff70^ok^fr-5872",
"published" : false,
"hasVideo" : true,
"hasAudio" : true,
"status" : "STOPPED",
"audioCodec" : "mpeg4-generic",
"videoCodec" : "H264",
"record" : false,
"width" : 320,
"height" : 240,
"bitrate" : 0,
"minBitrate" : 0,
"maxBitrate" : 0,
"quality" : 0,
"rtmpUrl" : "rtmps://live-api-s.facebook.com:443/rtmp/xxx",
"createDate" : 1530355342590,
"mediaProvider" : "WebRTC",
"history" : false
}
 

Max

Administrator
Staff member
Hello

It works with our demo server
1. Open page
https://demo.flashphoner.com/client...republishing/webrtc-as-rtmp-republishing.html
2. Enter full Facebook RTMP URL
rtmp://live-api-s.facebook.com:80/rtmp/1970023859715658?ds=1&s_vt=api-s&a=ATiM238yTx2EO3nS
3. Press Start.
Server version 3392
Server WCS_HOME/conf/flashphoner.properties
Code:
rtmp_transponder_full_url=true
Please note that stream name 64c5 is ignored during RTMP relay because of this setting.

upload_2018-7-2_23-15-14.png
 

Nilay Anand

New Member
I did above step with my Facebook rtmp url "rtmps://live-api-s.facebook.com:443/rtmp/103444210629962?ds=1&s_sw=0&s_vt=api-s&a=ATiB7vaLPTQSJFq9" and status came as "FAILED". Am I missing anything here?
 
Last edited:

Max

Administrator
Staff member
Please provide more information, screenshots and logs, server version.
Note, our default example uses embedded Flash Player to demonstrate that result stream can be played as RTMP.
This player requires Adobe Flash Player.
Make sure you have installed Adobe Flash Player for this example because if it is not installed, script on the page may be broken.

This is how working page looks.
You can see black RTMP Player container on the page if Flash Player is installed.

upload_2018-9-27_0-37-30.png
 

Nilay Anand

New Member
Please note, I had to make streamed video further re-broadcasted to Facebook live video using their RTMP url. After changing config params in flashphone.properties file, it works correctly. I had to change following params:
rtmp_transponder_stream_name_prefix =
rtmp_transponder_full_url=true

Now I'm trying to rebroadcast the video to Facebook live by making REST API call to `[POST] /rest-api/push/startup` and that currently not working for me.
Code:
curl -X POST \
  https://34.199.108.19:8888/rest-api/push/startup \
  -H 'Content-Type: application/json' \
   -d '{
        "streamName": "71cf",
        "rtmpUrl": "rtmp://live-api-s.facebook.com:80/rtmp/104730387168011?ds=1&s_sw=0&s_vt=api-s&a=ATjGd7oFM4AXS82W"
    }'
The above API call receive following response

Code:
{"mediaSessionId":"l483mclh78gh78cbmbleke8c8f","streamName":"104730387168011?ds=1&s_sw=0&s_vt=api-s&a=ATjGd7oFM4AXS82W","rtmpUrl":"rtmp://live-api-s.facebook.com:80/rtmp","width":720,"height":480,"muted":false,"soundEnabled":false,"options":{}}
But video do not get republish to Facebook live
 

Max

Administrator
Staff member
There are two ways to re-publish stream:

1. When you set rtmpUrl directly in JavaScript - WebRTC as RTMP example.
https://demo.flashphoner.com/client...republishing/webrtc-as-rtmp-republishing.html
or
2. When you do not set rtmpUrl in JavaScript - Two Way Streaming Example.
https://demo.flashphoner.com/client...ming/two_way_streaming/two_way_streaming.html

If you work with option (2), /push/startup should work properly.

Here you can find full re-publishing docs:
https://docs.flashphoner.com/display/WCS5EN/To+another+RTMP+server#ToanotherRTMPserver-JavaScriptAPI

JavaScript API (option 1)
https://docs.flashphoner.com/display/WCS5EN/To+another+RTMP+server#ToanotherRTMPserver-JavaScriptAPI

REST API (option 2)
https://docs.flashphoner.com/display/WCS5EN/To+another+RTMP+server#ToanotherRTMPserver-RESTqueries
 
Top