RTP-SDP: WebRTC -> RTP -> ffmpeg -> HLS

545 views
Skip to first unread message

Pony Hugger

unread,
Jun 20, 2018, 10:08:28 AM6/20/18
to kurento
Hi!

I'd like to publish a WebRTC-Stream via HLS. This is how the current "pipeline" looks like:
WebRTC -> RTP -> ffmpeg -> HLS

Unfortunately i am not able to receive the stream via ffmpeg or VLC.

I've already tried to generate an SDP file using rtpEndpoint.generateOffer() and rtpEndpoint.processOffer(viewerSDP), while "viewerSDP" was:

v=0
o=- 0 0 IN IP4 <<CLIENT-IP>>
s=
c=IN IP4 <<CLIENT-IP>>
t=0 0
m=video 26540 RTP/AVP 100
a=rtpmap:100 H264/90000
a=recvonly


or

v=0
c=IN IP4 <<CLIENT-IP>>
m=video 51000 RTP/AVP 96
a=rtpmap:96 H264/90000
m=audio 51002 RTP/AVP 97
a=rtpmap:97 mpeg4-generic/128
a=fmtp:97 streamType=5;profile-level-id=44;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3


Any ideas?

Thanks!

Paulo R. Lanzarin

unread,
Jun 20, 2018, 5:19:22 PM6/20/18
to kur...@googlegroups.com
You should use rtpEndpoint.processAnswer instead of processOffer if Kurento is the offeree in your case.
Otherwise it won't work at all.
If you've done that, please share both Kurento and ffmpeg (with -loglevel trace) so I can take a look at it.

s,

Paulo.

--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
To post to this group, send email to kur...@googlegroups.com.
Visit this group at https://groups.google.com/group/kurento.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/b4721918-3631-475d-bb1a-68659160d45f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pony Hugger

unread,
Jun 21, 2018, 3:33:41 AM6/21/18
to kurento
Hi Paulo,

thanks for your offer! Before hassling with RTP again, i'll try to make use of the GStreamerFilter, to generate all necessary HLS files.

Cheers!  

Pony Hugger

unread,
Jun 21, 2018, 6:30:18 AM6/21/18
to kurento
GStreamerFilter won't work, as the filter needs sink AND source...

... so i am working again on the RTP-Connection.
This is what is happening, when i try to connect via VLC:

OFFER:
v=0
o=BOB 0 0 IN IP4 <<CLIENT-IP>>
s=-
c=IN IP4 <<CLIENT-IP>>
t=0 0
m=audio 9000 RTP/AVPF 96 0 97
a=rtpmap:97 AMR/8000
a=recvonly
m=video 9010 RTP/AVP 100
a=rtpmap:100 H264/90000
a=recvonly

ANSWER:
v=0
o=- 3738565098 3738565098 IN IP4 << KURENTO-IP >>
s=Kurento Media Server
c=IN IP4 << KURENTO-IP >>
t=0 0
m=audio 48280 RTP/AVPF 0 97
a=rtpmap:97 AMR/8000
a=sendonly
a=ssrc:3160412076 cname:user1674515572@host-329b04f9
m=video 40412 RTP/AVP 100
a=rtpmap:100 H264/90000
a=sendonly
a=ssrc:2508676416 cname:user1674515572@host-329b04f9

Events fired by Kurento:

RtpEndpoint > IN AUDIO
RtpEndpoint > IN VIDEO

RtpEndpoint > MediaStateChanged:
{ newState: 'CONNECTED',
  oldState: 'DISCONNECTED',
  source: '8d0d74c0-321c-41d5-b568-813e1baed9bc_kurento.MediaPipeline/efaa75c8-0997-4c91-9d5a-3f7c46e21123_kurento.RtpEndpoint',
  tags: [],
  timestamp: '1529576323',
  type: 'MediaStateChanged' }

RtpEndpoint > MediaStateChanged:
{ newState: 'DISCONNECTED',
  oldState: 'CONNECTED',
  source: '8d0d74c0-321c-41d5-b568-813e1baed9bc_kurento.MediaPipeline/efaa75c8-0997-4c91-9d5a-3f7c46e21123_kurento.RtpEndpoint',
  tags: [],
  timestamp: '1529576331',
  type: 'MediaStateChanged' }

VLC-Log: 
live555 demux error: no data received in 10s, aborting

That's confusing, as Kurento is noticing the attempt to connect.

Pony Hugger

unread,
Jun 21, 2018, 11:02:57 AM6/21/18
to kurento
This is some additional information from the Kurento logs:

2018-06-21 14:57:35,174571 4091 [0x00007fdae09f3700]    info kmsrtpconnection          kmsrtpconnection.c:91 kms_rtp_connection_set_remote_info() <KmsRtpConnection@0x7fdad822d060>  Set remote host: << CLIENT-IP >>, RTP: 9010, RTCP: 9011
2018-06-21 14:57:35,689208 4091 [0x00007fdabf189700] warning dtlssrtpdemux             gstdtlssrtpdemux.c:137 sink_chain() <dtls-srtp-demux>  received invalid buffer: 1
2018-06-21 14:57:36,354189 4091 [0x00007fdab67fc700]    info kmsutils                  kmsutils.c:1440 kms_utils_depayloader_monitor_pts_out() <rtpopusdepay53>  Add probe: Adjust depayloader PTS out
2018-06-21 14:57:36,680400 4091 [0x00007fdabf189700] warning srtpdec                   gstsrtpdec.c:1149 gst_srtp_dec_decode_buffer() <srtp-decoder:rtp_sink>  Unable to unprotect buffer (unprotect failed code 9)
2018-06-21 14:57:36,680519 4091 [0x00007fdabf189700] warning srtpdec                   gstsrtpdec.c:1178 gst_srtp_dec_decode_buffer() <srtp-decoder>  Other error, dropping
2018-06-21 14:57:36,892705 4091 [0x00007fdab7fff700]    info kmsutils                  kmsutils.c:1440 kms_utils_depayloader_monitor_pts_out() <rtph264depay50>  Add probe: Adjust depayloader PTS out
2018-06-21 14:58:00,177743 4091 [0x00007fdabf189700] warning dtlssrtpdemux             gstdtlssrtpdemux.c:137 sink_chain() <dtls-srtp-demux>  received invalid buffer: 1
Reply all
Reply to author
Forward
0 new messages