Unable to Stream to the browser using the below pipeline:

585 views
Skip to first unread message

Who AmI

unread,
Apr 27, 2015, 8:19:56 AM4/27/15
to meetech...@googlegroups.com
Dear Engineers,
I have installed janus-gateway locally in my  machine, and been trying in the following way:

I am streaming from my ubuntu machine :

gst-launch-1.0 v4l2src device=/dev/video0  ! "video/x-raw, format=I420, width=640, height=480" !  x264enc ! rtph264pay ! udpsink host=<ip>  port=5004 sync=false


and i launch a web page:  http://<ip>:8000/streamingtest.html

I have choosen -> Demos -> Streaming -> Opus/Vp8 live streaming,  and started.

QUESTION:

Nothing comes as an output.  My understanding is even if you stream h264 formated data to the gateway, which gets converted to Vp8?.

Kindly let me know what do i have to do to stream h264 data.


Mikael Boman

unread,
Apr 27, 2015, 12:26:00 PM4/27/15
to meetech...@googlegroups.com
And who shall convert it?

Also take a look on your gstreamer pipe - not sure it is complete.
Anyhow, it gets processed as h.264 which only Mozilla Firefox support (to my understanding).
Also make sure you have set the streaming cfg for handling h.264.

Who AmI

unread,
Apr 27, 2015, 12:32:28 PM4/27/15
to Mikael Boman, meetech...@googlegroups.com
Thanks for the reply.

I have enabled the configuration like this in janus.plugins.streaming.cfg

[h264-sample]
type = rtp
id = 10
description = H.264 live stream coming from gstreamer
audio = no
video = yes
videoport = 8020
videopt = 126
videortpmap = H264/90000
videofmtp = profile-level-id=42e01f\;packetization-mode=1


And my  Gstreamer pipeline is:


gst-launch-1.0 v4l2src device=/dev/video0  ! "video/x-raw, format=I420, width=640, height=480" !  x264enc ! rtph264pay ! udpsink host=<ip>  port=8020 sync=false

I am testing in firefox Version: 35.0.1

Thanks.




--
You received this message because you are subscribed to a topic in the Google Groups "meetecho-janus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/meetecho-janus/Rgby2S_abzY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to meetecho-janu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mikael Boman

unread,
Apr 27, 2015, 12:39:21 PM4/27/15
to meetech...@googlegroups.com, miken...@googlemail.com
gst-launch-1.0 v4l2src device=/dev/video0  ! "video/x-raw, format=I420, width=640, height=480" !  x264enc ! rtph264pay pt=126 ! udpsink host=<ip>  port=5004

as proposal (added pt).

However, I used 96 instead of 126 in plugin cfg and gstreamer pipe.

Who AmI

unread,
Apr 28, 2015, 5:14:53 AM4/28/15
to meetech...@googlegroups.com, miken...@googlemail.com
Thanks for the reply.

I tried changing pt=96, in the plugin cfg and gstreamer pipe also. But still unable to view the video.  Have checked that the machine is pumping udp packets.

Receiver machine received udp packet too.

I ran the below command

sudo ./janus -d 10 2>&1 > janus.log

Have attached the log file for your reference.  Also, in the console i received the below error:


sudo ./janus -d 10 2>&1 > janus.log
STUN demux: OK!
Comparing username '0x31616f6b3a3161336238646639' (13) with '0x31616f6b' (4) : 0
Found valid username, returning password: 'PlPugikegOgnt804gaovUI'
 Message HMAC-SHA1 fingerprint:
key     : 0x506c507567696b65674f676e7438303467616f765549
  expected: 0x4c5f8c3e73ae34d63f7f2a3de6332756b96a2bff
  received: 0x4c5f8c3e73ae34d63f7f2a3de6332756b96a2bff
STUN auth: OK!
STUN unknown: 0 mandatory attribute(s)!
STUN Reply (buffer size = 1300)...
STUN Role not specified by peer!
 Message HMAC-SHA1 message integrity:
  key     : 0x506c507567696b65674f676e7438303467616f765549
  sent    : 0xf8967b861fc59e9a09bdeb8ce753c4b5e53f300e
 Message HMAC-SHA1 fingerprint: 0x3922b48c
 All done (response size: 84)
 Message HMAC-SHA1 message integrity:
  key     : 0x3432383139643331636665663565353438336665396637616231353336656432
  sent    : 0x9ef198fcc7e33d2a2ee0c605c4bb0e7d1b2ed3d1
 Message HMAC-SHA1 fingerprint: 0xc2a59add
STUN error: Incomplete message: 121 of 65300 bytes!
STUN demux: OK!
 Message HMAC-SHA1 fingerprint:
key     : 0x3432383139643331636665663565353438336665396637616231353336656432
  expected: 0x1466c6586e887dda3af5902540b1830d6df38354
  received: 0x1466c6586e887dda3af5902540b1830d6df38354
STUN auth: OK!
STUN unknown: 0 mandatory attribute(s)!
Received 64-bytes STUN message
Mapped address found!
 Message HMAC-SHA1 fingerprint: 0xe49abe1b
STUN error: Incomplete message: 121 of 65300 bytes!
STUN error: Incomplete message: 834 of 65300 bytes!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
STUN error: RTP or other non-protocol packet!
^CSTUN error: RTP or other non-protocol packet!



Thanks.
janus.log

Lorenzo Miniero

unread,
Apr 28, 2015, 5:19:47 AM4/28/15
to meetech...@googlegroups.com, miken...@googlemail.com
Please don't paste huge amounts of text, use services like pastebin for the purpose.

The pt is not needed on the feeding side, it's what is sent on the WebRTC side: pt=96 means that 96 is negotiated in the SDP with the client, not that gstreamer must send a pt=96 payload, the plugin really doesn't care about that.

Your problem was already described in older posts, so I encourage you to go through them to check what others tried before you. In your case, I assume you're missing a profile=1 or something like that in the H264 encoder. AFAIK Firefox currently expects a specific profile and will ignore it. I think the same can be said about packetization type as well, but I may be wrong.

L.

Who AmI

unread,
Apr 28, 2015, 6:54:37 AM4/28/15
to meetech...@googlegroups.com, miken...@googlemail.com
Sure. Next time i will  use pastbin for large post.

I am very new to this domain, and hence unable to attack exact location of the problem. 

Searching older post did not provide me the solution. Rather, i would say, i am unable to find  the solution in the internet.

Kindly share if you have any URL related to this problem.

,

Lorenzo Miniero

unread,
Apr 28, 2015, 6:57:56 AM4/28/15
to meetech...@googlegroups.com, miken...@googlemail.com
Just look for x264enc or rtph264pay in this group and you'll find a couple of related posts with examples.

L.

Who AmI

unread,
Apr 28, 2015, 12:35:51 PM4/28/15
to meetech...@googlegroups.com, miken...@googlemail.com
Hi Lorenzo,

Thanks, and Managed to stream h264 video into the browser.  Just want to check the feasibility. Is it possible to stream multiple cameras into the same browser ?

Lorenzo Miniero

unread,
Apr 28, 2015, 3:00:51 PM4/28/15
to meetech...@googlegroups.com, miken...@googlemail.com
Yes, just add other mountpoints.

L.
Reply all
Reply to author
Forward
0 new messages