Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

RTMP support

Mid_J_
Beginner
249 Views

Hello Team,

1. Is there a way to Output RTMP or HLS stream from the Mixed Video MCU conference mode?

2. Or is any there way to ingest the raw mixed stream to FFMPEG

Thanks,

MJ

0 Kudos
4 Replies
Qiujiao_W_Intel
Employee
249 Views

Hi, Mid,

For question 1: 

Yes, we support to output MCU mixed video stream to both rtmp server and HLS server. The recommendation is to output MCU mixed video stream to rtmp server, and do hls streaming on rtmp server side.

For question 2:

Yes, once output MCU mixed video stream to rtmp server, you can use ffmpeg to access it through rtmp server

Mid_J_
Beginner
249 Views

Thanks

I tried using

 conference.addExternalOutput('rtmp://MYRTMPSEVER:1935/mystream', {streamId:"live3"
  }, function () {
    L.Logger.info('Start external streaming success.');
  }, function (err) {
    L.Logger.error('Start external streaming failed:', err);
  });

 

But i get err err = "Timeout to make rpc to avstream.cfac4dd7-7584-ac22-62f0-527b2e12ce6d.0.subscribe

on client side and get the attached error on server side

2017-10-12 12:48:24.412  - WARN: AmqpClient - Late rpc reply: { data:
   { type: 'failed',
     reason: 'avstream_out fatal error: No a/v options specified' },
  corrID: 72250,
  type: 'onStatus' }

Full log during the connection is attached

Please check

 

 

Qiujiao_W_Intel
Employee
249 Views

Hi, Mid, please double check your code, for addExternalOutput API, 

conference.addExternalOutput('rtmp://MYRTMPSEVER:1935/mystream', {streamId:"live3"
  }, function () {
    L.Logger.info('Start external streaming success.');
  }, function (err) {
    L.Logger.error('Start external streaming failed:', err);
  });

url should be: rtmp://MYRTMPSEVER:1935/applicationname/streamname, and streamId should be stream id you want to push (MCU mix stream id or forward stream id), one of our sample:

conference.addExternalOutput('rtmp://MYRTMPSEVER:1935/liveshow/rtmptest', {streamId:"59c9ad8bfb585823cd28a230-common"
  }, function () {
    L.Logger.info('Start external streaming success.');
  }, function (err) {
    L.Logger.error('Start external streaming failed:', err);
  });

Another notice is that currently we don't support adding external output for audio only or video only stream, please double check your code and stream

 

 

Mid_J_
Beginner
249 Views

Hello,

Thanks a lot for your reply. 

I tried with Multiple RTMP servers with correct application name and stream name.

But I am still getting below results - Better results now for RTSP than RTMP but still not able to get it working.

I am using version Release version 3.3.1

ffmpeg -v
ffmpeg version 3.1.2 

I only initiate this call after trySubscribeStream and only after I am able to view the mix stream properly.

I am using default Both audio video with default camera and not trying to use only audio or video

I have again attached the error log from server side

===== RTMP ==================

streamvar = {
streamId: stream.id(),
resolution: {width: 640, height: 480}
};
conference.addExternalOutput("rtmp://MYRTMPSERVER:1935/applicationame/livestream", streamvar , function () {
console.log('Start external streaming success.');
  }, function (err) {
console.log('Start external streaming failed:', err);
  });
 

Client side "Start external streaming failed: Timeout to make rpc to avstream.89b1d28e-72e5-3653-2946-ef0663ee4606.0.subscribe"

Server Side "2017-10-27 15:02:47,651  - ERROR: woogeen.RtspOut - No a/v options specified
2017-10-27 15:02:47.651  - ERROR: AccessNode - avstream-out fatal error: No a/v options specified"

Am I using it wrong for this version?

=====RTSP ===================
When I try using RTSP "rtsp://MYRTMPSERVER:1935/applicationame/livestream" I get below results
I even get stream in my RTMP/RTSP server for few seconds but after few seconds it disappears.
 
On Client Side: "Start external streaming success."
On Server Side:
2017-10-27 15:31:24.181  - INFO: Portal - Fault detected on node: { agent: 'avstream.89b1d28e-72e5-3653-2946-ef0663ee4606',
  node: 'avstream.89b1d28e-72e5-3653-2946-ef0663ee4606.2' }
2017-10-27 15:31:24.183  - INFO: SocketIOServer - addExternalOutput onConnection error: access node exited unexpectedly
 
 
====================
I have attached logs of both RTMP and RTSP. 
Please let me know what could be the issue?
 
====================
For Remove Output when using below call
 
conference.removeExternalOutput( "rtsp://MYRTMPSERVER:1935/applicationame/livestream", function () {
console.log('Stop external streaming success.');
  }, function (err) {
console.log('Stop external streaming failed:', err);
  });
 
If I use direct string as param conference.removeExternalOutput( "rtsp://MYRTMPSERVER:1935/applicationame/livestream"
    I get error msg "Stop external streaming failed: Invalid RTSP/RTMP server url"
If I use Json object conference.removeExternalOutput( {id:"rtsp://MYRTMPSERVER:1935/applicationame/livestream"}
    I get "Stop external streaming failed: URL should be string."
 
Kindly have a look. Please let me know if I am using it wrong.
 
Note from the documentation it says to use below 
<script type="text/JavaScript">
var conference = Woogeen.ConferenceClient.create();
// ……
conference.addExternalOutput(url: 'rtsp://localhost:1935/live', {streamId: xxx
}, function () {
    L.Logger.info('Start external streaming success.');
  }, function (err) {
    L.Logger.error('Start external streaming failed:', err);
  });
</script>
 
"conference.addExternalOutput(url: " this gives JS error
 
 
<script type="text/JavaScript">
var conference = Woogeen.ConferenceClient.create();
// ……
conference.removeExternalOutput({id: rtspIdToStop}, function () {
    L.Logger.info('Stop external streaming success.');
  }, function (err) {
    L.Logger.error('Stop external streaming failed:', err);
  });
</script>
 
What is rtspIdToStop
 
Appreciate your help.
Thanks
 
Reply