RTP forward and streaming plugin

1,245 views
Skip to first unread message

Eric Wang

unread,
Jul 15, 2016, 2:48:30 AM7/15/16
to meetecho-janus
Hi, all :

I tried H.264 RTP forwarding by using janus_streaming plugin. It is working fine with RTP streams sent by both VLC and gstreamer.
However, it is not working with RTP streams sent JRTPLIB clients, though they are using exactly the same H.264 frames.

The Chrome/Firefox simply do not show the video frames sent by JRTPLIB clients and forwarded by Janus .
It is interesting to discover that this issue will NOT occur if VLC/gstream stream was ever started and forwarded before JRTPLIB streams.

I am sure that RTP packets are all received by Janus in (by add and show debug messages in janus_streaming_relay_rtp_packet(...)).
Is there any hints to fix this issue ? Thanks very much !

Best Regards,
Eric Wang


Lorenzo Miniero

unread,
Jul 15, 2016, 3:50:42 AM7/15/16
to meetecho-janus
Janus just forwards whatever you send it, so if something's not working, it's most likely a problem with the source. I'm not familiar with JRTPLIB so no idea what may be wrong. You may want to make a simpler test, with JRTPLIB sending plain RTP to a local tool (e.g., a gstreamer pipeline), and check if things work fine there, if not just to see if it's a problem with the stream itself.

L.

Eric Wang

unread,
Jul 18, 2016, 4:48:15 AM7/18/16
to meetecho-janus
Hi, Lorenzo :

You are right ! It is found that the RTP headers sent in my program are not completely right for H.264.
It is working fine after fix it. Thank you !


Titan Pan

unread,
Aug 16, 2016, 10:12:27 PM8/16/16
to meetecho-janus
Hi Lorenzo:
    I have the same issue. The streaming plugin works fine with streams send by gstreamer. But it doesn't work with the stream generated by ffmpeg libs, which is playable with vlc.

    My sdp file and streaming.cfg:
;streaming.cfg

[h264-sample]
type = rtp
id = 10
description = H.264 live stream coming from spice
audio = no
video = yes
videoport = 8004
videomcast = 225.225.225.225
videopt = 96
videortpmap = H264/90000
videofmtp = sprop-parameter-sets=Z0LAKNoB4AiflhAAAAMAEAAAAwMo8YMq,aM48gA==\; profile-level-id=42c028

h264.sdp

c=IN IP4 225.225.225.225
a=tool:libavformat 57.25.100
m=video 8004 RTP/AVP 96
b=AS:4000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAKNoB4AiflhAAAAMAEAAAAwMo8YMq,aM48gA==; profile-level-id=42C028

I have no idea whether it's the problem with the  stream itself or janus doesn't support the codec.

Thanks!

Pan

在 2016年7月15日星期五 UTC+8下午3:50:42,Lorenzo Miniero写道:

akinori nakajima

unread,
Aug 16, 2016, 11:37:34 PM8/16/16
to meetecho-janus
just the same issue with ffmpeg cli (ffmpeg -f avfoundation -i "0" -c:v libx264 -f rtp rtp://host:port)

Амнон Исраэли

unread,
Aug 17, 2016, 3:40:34 AM8/17/16
to meetecho-janus
try to add 
-profile:v baseline -tune zerolatency

akinori nakajima

unread,
Aug 17, 2016, 4:08:20 AM8/17/16
to meetecho-janus
Hi , Амнон Исраэли.  That works! Thanks!!

Titan Pan

unread,
Aug 19, 2016, 12:39:19 AM8/19/16
to meetecho-janus
SOLVED!

It seems like streaming plugin doesn't support sprop-parameter-sets. Disable the CODEC_FLAG_GLOBAL_HEADER flags, it will work.

在 2016年8月17日星期三 UTC+8上午10:12:27,Titan Pan写道:

nmd

unread,
Oct 7, 2016, 11:13:19 AM10/7/16
to meetecho-janus
Hi you. Its seems like you succeed to stream with RTP and VLC and I wanna know how. Thanks
Reply all
Reply to author
Forward
0 new messages