Skip to main content
shopping_basket Basket 0
Login

Building a Raspberry Pi 2 WebRTC camera

stuartChilds
30
maker, hacker, doer

Comments

August 8, 2019 07:04

Hi, Newbie here but wanting to learn/understand. Can the the Web RTC be streamed outside it own network if i connected using GPRS/SMS or will ports/permissions get in the way? Thanks!

0 Votes

May 7, 2019 07:18

Hi,
I could solve nginx server issue of the config file.
But now I'm unable to view the stream in the browser, I have captured the logs from the console of the browser as follows:

Initializing library janus.js:254:3
Empty string passed to getElementById(). jquery.min.js:2:7499
Library initialized: true janus.js:411:2
Using REST API to contact Janus: http://localhost:8088/janus janus.js:438:4
Empty string passed to getElementById(). jquery.min.js:2:7499
Object { janus: "success", transaction: "nS3qNln8eFKM", data: {…} }
janus.js:874:5
Created session: 4714203190200909 janus.js:885:6
Long poll... janus.js:509:3
Object { janus: "success", session_id: 4714203190200909, transaction: "wnsoaThyH9VN", data: {…} }
janus.js:1133:5
Created handle: 6936532392121983 janus.js:1140:5
Plugin attached! (janus.plugin.streaming, id=6936532392121983) streamingtest.js:87:10
Sending message ({"request":"list"}) streamingtest.js:286:2
Sending message to plugin (handle=6936532392121983): janus.js:1242:3
Object { janus: "message", body: {…}, transaction: "5DU9VlFiXBLD" }
janus.js:1243:3
Message sent! janus.js:1285:5
Object { janus: "success", session_id: 4714203190200909, transaction: "5DU9VlFiXBLD", sender: 6936532392121983, plugindata: {…} }
janus.js:1286:5
Synchronous transaction successful (janus.plugin.streaming) janus.js:1295:6
Object { streaming: "list", list: (1) […] }
janus.js:1297:6
Got a list of available streams streamingtest.js:300:4
Array [ {…} ]
streamingtest.js:301:4
>> [1] RPWC H264 test streaming (live) streamingtest.js:303:5
Empty string passed to getElementById(). jquery.min.js:2:7499
Selected video id #1 streamingtest.js:318:2
Sending message to plugin (handle=6936532392121983): janus.js:1242:3
Object { janus: "message", body: {…}, transaction: "ZU5AY1YR3m1g" }
janus.js:1243:3
Empty string passed to getElementById(). jquery.min.js:2:7499
Message sent! janus.js:1285:5
Object { janus: "ack", session_id: 4714203190200909, transaction: "ZU5AY1YR3m1g" }
janus.js:1286:5
Long poll... janus.js:509:3
Got a plugin event on session 4714203190200909 janus.js:709:4
Object { janus: "event", session_id: 4714203190200909, transaction: "ZU5AY1YR3m1g", sender: 6936532392121983, plugindata: {…}, jsep: {…} }
janus.js:710:4
-- Event is coming from 6936532392121983 (janus.plugin.streaming) janus.js:721:4
Object { streaming: "event", result: {…} }
janus.js:723:4
Handling SDP as well... janus.js:731:5
Object { type: "offer", sdp: "v=0\r\no=- 1556868060803474 1 IN IP4 192.168.1.54\r\ns=Mountpoint 1\r\nt=0 0\r\na=group:BUNDLE video\r\na=msid-semantic: WMS janus\r\nm=video 9 UDP/TLS/RTP/SAVPF 96\r\nc=IN IP4 192.168.1.54\r\na=sendonly\r\na=mid:video\r\na=rtcp-mux\r\na=ice-ufrag:gnq4\r\na=ice-pwd:DsXzrMf1COvlLrMQZyPR69\r\na=ice-options:trickle\r\na=fingerprint:sha-256 65:E7:28:7A:C5:89:BD:9C:4A:5B:63:BA:7D:60:C1:2F:94:8D:82:E5:53:8F:DA:E2:32:8C:1C:D8:02:EB:B7:F1\r\na=setup:actpass\r\na=rtpmap:96 H264/90000\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 goog-remb\r\na=ssrc:177848451 cname:janus\r\na=ssrc:177848451 msid:janus janusv0\r\na=ssrc:177848451 mslabel:janus\r\na=ssrc:177848451 label:janusv0\r\na=candidate:1 1 udp 2013266431 192.168.1.54 57488 typ host\r\na=end-of-candidates\r\n" }
janus.js:732:5
Notifying application... janus.js:736:5
::: Got a message ::: streamingtest.js:106:10
Object { streaming: "event", result: {…} }
streamingtest.js:107:10
Handling SDP as well... streamingtest.js:148:11
Object { type: "offer", sdp: "v=0\r\no=- 1556868060803474 1 IN IP4 192.168.1.54\r\ns=Mountpoint 1\r\nt=0 0\r\na=group:BUNDLE video\r\na=msid-semantic: WMS janus\r\nm=video 9 UDP/TLS/RTP/SAVPF 96\r\nc=IN IP4 192.168.1.54\r\na=sendonly\r\na=mid:video\r\na=rtcp-mux\r\na=ice-ufrag:gnq4\r\na=ice-pwd:DsXzrMf1COvlLrMQZyPR69\r\na=ice-options:trickle\r\na=fingerprint:sha-256 65:E7:28:7A:C5:89:BD:9C:4A:5B:63:BA:7D:60:C1:2F:94:8D:82:E5:53:8F:DA:E2:32:8C:1C:D8:02:EB:B7:F1\r\na=setup:actpass\r\na=rtpmap:96 H264/90000\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 goog-remb\r\na=ssrc:177848451 cname:janus\r\na=ssrc:177848451 msid:janus janusv0\r\na=ssrc:177848451 mslabel:janus\r\na=ssrc:177848451 label:janusv0\r\na=candidate:1 1 udp 2013266431 192.168.1.54 57488 typ host\r\na=end-of-candidates\r\n" }
streamingtest.js:149:11
isTrickleEnabled: undefined janus.js:3378:3
isAudioSendEnabled:
Object { audioSend: false, videoSend: false, data: true, update: false, keepAudio: false, keepVideo: false }
janus.js:3285:3
isVideoSendEnabled:
Object { audioSend: false, videoSend: false, data: true, update: false, keepAudio: false, keepVideo: false }
janus.js:3318:3
streamsDone: undefined janus.js:1582:3
Creating PeerConnection janus.js:1679:4
Object { optional: (1) […] }
janus.js:1680:4
RTCPeerConnection { localDescription: null, currentLocalDescription: null, pendingLocalDescription: null, remoteDescription: null, currentRemoteDescription: null, pendingRemoteDescription: null, signalingState: "stable", canTrickleIceCandidates: null, iceGatheringState: "new", iceConnectionState: "new" }
janus.js:1682:4
Preparing local SDP and gathering candidates (trickle=true) janus.js:1687:4
isDataEnabled:
Object { audioSend: false, videoSend: false, data: true, update: false, keepAudio: false, keepVideo: false }
janus.js:3367:3
Creating data channel janus.js:1764:4
Handling Remote Track janus.js:1719:5
track { target: RTCPeerConnection, isTrusted: true, receiver: RTCRtpReceiver, track: MediaStreamTrack, streams: Restricted, transceiver: RTCRtpTransceiver, srcElement: RTCPeerConnection, currentTarget: RTCPeerConnection, eventPhase: 2, bubbles: false, … }
janus.js:1720:5
::: Got a remote stream ::: streamingtest.js:171:10
MediaStream { id: "janus", active: true, onaddtrack: null, onremovetrack: null }
streamingtest.js:172:10
Adding onended callback to track:
MediaStreamTrack { kind: "video", id: "{d6f820a1-75f3-4750-999a-e041fb100451}", label: "remote video", enabled: true, muted: true, onmute: null, onunmute: null, readyState: "live", onended: null }
janus.js:1726:6
Remote description accepted! janus.js:1780:6
Creating answer (iceDone=false) janus.js:2590:4
isAudioSendEnabled:
Object { audioSend: false, videoSend: false, data: true, update: false, keepAudio: false, keepVideo: false }
janus.js:3285:3
isAudioRecvEnabled:
Object { audioSend: false, videoSend: false, data: true, update: false, keepAudio: false, keepVideo: false }
janus.js:3307:3
Adding recvonly audio transceiver:
RTCRtpTransceiver { mid: null, sender: RTCRtpSender, receiver: RTCRtpReceiver, stopped: false, direction: "recvonly", currentDirection: null }
janus.js:2663:7
isVideoSendEnabled:
Object { audioSend: false, videoSend: false, data: true, update: false, keepAudio: false, keepVideo: false }
janus.js:3318:3
isVideoRecvEnabled:
Object { audioSend: false, videoSend: false, data: true, update: false, keepAudio: false, keepVideo: false }
janus.js:3340:3
Setting video transceiver to recvonly:
RTCRtpTransceiver { mid: "video", sender: RTCRtpSender, receiver: RTCRtpReceiver, stopped: false, direction: "recvonly", currentDirection: null }
janus.js:2707:7
Object { }
janus.js:2730:3
isVideoSendEnabled:
Object { audioSend: false, videoSend: false, data: true, update: false, keepAudio: false, keepVideo: false }
janus.js:3318:3
Object { type: "answer", sdp: "v=0\r\no=mozilla...THIS_IS_SDPARTA-66.0.3 4580137805604457060 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 FC:D1:18:C5:74:FA:2D:25:FD:4F:42:7F:24:9C:63:72:D8:65:36:E2:6A:F8:9F:A8:75:2A:86:35:6B:DC:38:A6\r\na=ice-options:trickle\r\na=msid-semantic:WMS *\r\nm=video 0 UDP/TLS/RTP/SAVPF 120\r\nc=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:video\r\na=rtpmap:120 VP8/90000\r\n" }
janus.js:2748:5
ReferenceError: offer is not defined[Learn More] janus.js:2756:5
Starting bitrate timer (via getStats) janus.js:2945:5
Long poll... janus.js:509:3
Got a keepalive on session 4714203190200909 janus.js:554:4


Please help me out what could be done.

0 Votes

May 2, 2019 12:55

Hello,
I'm facing an issue with the opening of http:///streamingtest.html page. I doubt my configuration file "/etc/nginx/sites-enabled/default" of nginx isn't correct.
Could anyone please who, has successfully implemented this blog, post their "/etc/nginx/sites-enabled/default" file so that I can cross it?

0 Votes

[Comment was deleted]

January 19, 2018 12:15

The next error is aptitude did not find gstreamer1.0 which is resolved by using
sudo apt-get gstreamer1.0

0 Votes

January 19, 2018 12:15

Nice. Thanks.
./configure gives the error
"package requirements (libsrtp >= 1,5) were not met.
No package 'libsrtp' found.'
In the README file in the source it states that this package has to be manually built but the readme gives detailed instructions. You may want to update this article with those instructions.

0 Votes

[Comment was deleted]

[Comment was deleted]

February 20, 2017 10:45

When I call 'make' - then receive an error:

CC plugins/plugins_libjanus_streaming_la-janus_streaming.lo
plugins/janus_streaming.c: In function 'janus_streaming_create_fd':
plugins/janus_streaming.c:2414:33: error: 'SO_REUSEPORT' undeclared (first use in this function)

Do you have any ideas how to fix it?

I have Raspbian GNU/Linux installed

0 Votes

November 23, 2016 07:46

@vandan1 or anyone else with the same issue:

I found that I had to go edit /etc/nginx/sites-available/default
make sure the root is specified correctly
for this tutorial, "root /usr/share/nginx/www/;"

July 14, 2016 06:33

Can u Plz tell me if this works with a usb camera....it is compatible though cuz i can take images
if yes then how different would the commands be

0 Votes

July 7, 2016 10:49

Here is a complete ready-to-use image for RaspberryPi which allows to entirely host Janus VideoRooms on the Rpi itself and allows many Rpi's, PC, Smartphones to interconnect in two-way audio/video conferences: http://www.linux-projects.org/rpi-video ... e-demo-os/

0 Votes

March 17, 2016 10:37

Thanks for the great work.
May i know can if audio can be implemented both ways for Video Chat?

Please advise. Thanks

0 Votes

March 16, 2016 21:00

Good tutorial. Big respect for doing such freat things.
Unfortunately I finished all of the steps browser (firefox) shows only error code 404 and nginx/1.6.2 name.
Any idea to display webpage correcrly?
Thanks in advance.

0 Votes

March 5, 2016 00:51

For those who are interested, according to this tutorial UV4L now supports the Janus Video Room plugin:

http://www.linux-projects.org/modules/s ... #example17

I tried it. It was as easy as typing the room and username and clicking on the start button on the web interface. Perfect realtime audio & video.

0 Votes

January 28, 2016 20:36

Dear stuartChilds,

Thank you for the great blog. I carefully followed your instructions on how to get Janus working; however I am getting the following:

Starting Meetecho Janus (WebRTC Gateway) v0.1.0
---------------------------------------------------

Checking command line arguments...
Debug/log level is 4
Debug/log timestamps are disabled
Debug/log colors are enabled
Adding 'vmnet' to the ICE ignore list...
Using 10.10.1.145 as local IP...
[WARN] Token based authentication disabled
Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, IPv6 support disabled)
[WARN] Janus is deployed on a private address (10.10.1.145) but you didn't specify any STUN server! Expect trouble if this is supposed to work over the internet and not just in a LAN...
BUNDLE is NOT going to be forced
rtcp-mux is NOT going to be forced
ICE handles watchdog started
Fingerprint of our certificate: D2:B9:31:8F:DF:24:D8:0E:ED:D2:EF:25:9E:AF:6F:B8:34:AE:53:9C:E6:F3:8F:F2:64:15:FA:E8:7F:53:2D:38
Plugins folder: /opt/janus/lib/janus/plugins
Loading plugin 'libjanus_videocall.so'...
JANUS VideoCall plugin initialized!
VideoCall watchdog started
Loading plugin 'libjanus_echotest.so'...
JANUS EchoTest plugin initialized!
Loading plugin 'libjanus_recordplay.so'...
EchoTest watchdog started
JANUS Record&Play plugin initialized!
Loading plugin 'libjanus_voicemail.so'...
JANUS VoiceMail plugin initialized!
Loading plugin 'libjanus_sip.so'...
JANUS SIP plugin initialized!
Loading plugin 'libjanus_videoroom.so'...
JANUS VideoRoom plugin initialized!
Loading plugin 'libjanus_audiobridge.so'...
JANUS AudioBridge plugin initialized!
VideoRoom watchdog started
SIP watchdog started
Loading plugin 'libjanus_streaming.so'...
Record&Play watchdog started
VoiceMail watchdog started
AudioBridge watchdog started
JANUS Streaming plugin initialized!
Transport plugins folder: /opt/janus/lib/janus/transports
Loading transport plugin 'libjanus_rabbitmq.so'...
[WARN] RabbitMQ support disabled (Janus API)
[WARN] RabbitMQ support disabled (Admin API)
[WARN] RabbitMQ support disabled for both Janus and Admin API, giving up
Loading transport plugin 'libjanus_websockets.so'...
[ERR] [plugins/janus_streaming.c:janus_streaming_relay_thread:3415] [gst-rpwc] Error polling... 4 (Interrupted system call)
Streaming watchdog started
WebSockets server started (port 8188)...
[WARN] Secure WebSockets server disabled
[WARN] Admin WebSockets server disabled
[WARN] Secure Admin WebSockets server disabled
JANUS WebSockets transport plugin initialized!
Loading transport plugin 'libjanus_http.so'...
WebSocket (Janus API) thread started
HTTP webserver started (port 8088, /janus path listener)...
[WARN] HTTPS webserver disabled
[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!
HTTP/Janus sessions watchdog started

As you can see I am getting an error at [plugins/janus_streaming.c:janus_streaming_relay_thread:3415] . Can you please help me figure out what can be possibly wrong? Any help would be greatly appreciate it.

Thanks a lot.

0 Votes

January 15, 2016 08:46

Hi,

I tried UV4L at http://linux-projects.org. It can now also stream H264 720p video (together with audio optionally) at full speed, *NO LATENCY* and minimal CPU consumption. It does that with WebRTC in Firefox and no gstreamer sauce is needed. Would it be possible to integrate it with Janus?

0 Votes

January 7, 2016 03:11

Could you test the video latency in microseconds?
Test method reference:
https://www.raspberrypi.org/forums/view ... 3&start=26
Thanks.

0 Votes

December 3, 2015 23:49

Just had a go at this.

gstreamer1.0 isn't found any more, apparently it's part of epiphany now?

I did need to get the gstreamer-tools though.

I also found that the streamer demo is actually in a demos subfolder: http://192.168.1.69/demos/streamingtest.html

So after that I now jet the Janus page up, but still no sign of the video stream. Any clues as to what to check next?

0 Votes

December 2, 2015 11:20

Hi stuartChilds,

Thanks a lot for your reply.

I have managed to solve the "freeze" issue, quite simply really: I just added a keyframe refresh rate in the command line, such as -g 4, which is pretty frequent but it does the job. I believe the default is 30 (1 per second at 30 fps) but this is way too slow when the subject or the camera moves a lot.

As for using Chrome with H264, I am still stuck, Chrome is now supposed to support H264. I have found where, in janus.js, it fails, but it does not help. I'll try re-encoding the stream to VP8 before feeding it to the server, and see if it's encoding related or browser related.

0 Votes

November 30, 2015 11:17

Thanks all for the comments.
@ gilles13 We had problems with Chrome, too - it seems Firefox is simply better at supporting some things than Chrome!

Regarding the video freezing, it's not something I have seen but sounds like an issue that could affect plenty of people. It may be some something to do with the video subsystem on the Pi or an issue with Janus, so it would be worth contacting either/both of these communities with suitable amounts of debug information to see if they can help. It would be interesting to see/hear if this has been replicated by other people, or if the same thing happens with a different LAN host / setup.

0 Votes

November 28, 2015 11:16

I followed your instructions.

I had to install GStreamer from this link http://www.onepitwopi.com/raspberry-pi/ ... pberry-pi/ though.

I ran your gstreamer command line by cutting and pasting it.

I then ran the Janus command line. The output looked exactly like yours apart from the last line "[gst-rpwc] New video stream..." (which was missing):

JANUS EchoTest plugin initialized!
Loading plugin 'libjanus_streaming.so'...
EchoTest watchdog started
JANUS Streaming plugin initialized!
Streaming watchdog started
Transpor plugins folder: /opt/janus/lib/janus/transports
Loading transport plugin 'libjanus_http.so'...
HTTP webserver started (port 8088, /janus path listener)...
[WARN] HTTPS webserver disabled
[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!
HTTP/Janus sessions watchdog started
Sessions watchdog started


I think that I started gstreamer correctly. The output was:

raspivid --verbose --nopreview -hf -vf --width 640 --height 480 --framerate 15 --bitrate 1000000 --profile baseline --timeout 0 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=8004
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)4\,\ profile\=\(string\)baseline\,\ codec_data\=\(buffer\)01428028ffe1000d2742802895a0280f680789135001000528ce025c80"
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = "application/x-rtp\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H264\,\ sprop-parameter-sets\=\(string\)\"J0KAKJWgKA9oB4kTUA\\\=\\\=\\\,KM4CXIA\\\=\"\,\ payload\=\(int\)96\,\ ssrc\=\(uint\)4183066236\,\ timestamp-offset\=\(uint\)1221893287\,\ seqnum-offset\=\(uint\)18618"
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = "application/x-rtp\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H264\,\ sprop-parameter-sets\=\(string\)\"J0KAKJWgKA9oB4kTUA\\\=\\\=\\\,KM4CXIA\\\=\"\,\ payload\=\(int\)96\,\ ssrc\=\(uint\)4183066236\,\ timestamp-offset\=\(uint\)1221893287\,\ seqnum-offset\=\(uint\)18618"
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)0/1\,\ parsed\=\(boolean\)true\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)4\,\ profile\=\(string\)baseline\,\ codec_data\=\(buffer\)01428028ffe1000d2742802895a0280f680789135001000528ce025c80"
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 1221893287
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 18618
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

0 Votes

November 20, 2015 18:06

Hello,

I have just installed janus and nginx on my raspberry pi 2 as per you instructions and got it working without problem on my LAN, which by the way is hosted on the Pi.
I am now able to broadcast whatever my raspicam is capturing to several opened browser windows, with minimal lag. These are the good news !!!
I am experiencing 2 issues:

1- I cannot get it to work on Chrome, just on Firefox. I have installed the nanoStream Live Encoder to play H264 video on chrome and this allows me to stream video from the raspicam to chrome using UV4Lwebrtc. I wonder why the stream from janus is not recognized.

2- The video stream tends to freeze, whenever the raspicam moves too much (or the subject it's filming). This happens at any window size (on both sender and receiver sides), at any bitrate (I tried 1000000 to 5000000), the number of clients does not change things either. The LAN is wifi but the bandwidth is very large. I know it should not freeze, because the same stream with UV4Lwebrtc on the same LAN does not freeze at all.

I am just hoping you would have an idea as to how the latter issue can be addressed.
Thanks for the great work anyway.

0 Votes

November 12, 2015 18:17

@vandan1,
If you can't load the streamingtest.html page but get the nignx welcome page instead, then do the folliwing to change the nignx default public folder -

sudo nano /etc/nginx/sites-enabled/default

then change the root folder from -

location / {
root /var/www/nginx-default;

to the following folder -

location / {
root /usr/share/nginx/www/;

0 Votes

October 7, 2015 09:20

vandan1 wrote:
> I have followed all the steps, there is no error at any step. After i type my ip
> address in the web browser , it simply says "welcome to nginx". Please help me out..
>
> Im using a raspberry pi 2.

Sounds like you missed the step out:

"Now copy the Janus HTML content to the Nginx server root:

$ sudo cp -r /opt/janus/share/janus/demos/ /usr/share/nginx/www/"

If the Janus content is in place it should get served up. Or else perhaps you're not using the full URL:

http:///streamingtest.html

0 Votes

October 7, 2015 06:37

I have followed all the steps, there is no error at any step. After i type my ip address in the web browser , it simply says "welcome to nginx". Please help me out..

Im using a raspberry pi 2.

0 Votes

April 6, 2015 15:05

I just got WebRTC working on my Pi 2 and dishing video up to Chrome using the link below. I could not get Chrome to work using Janus and Gstreamer. Apparently uv4l just added this capability on March 22nd, 2015 so about 14 days ago which means it's an alternate to Gstreamer and Janus now.

http://www.linux-projects.org/modules/s ... e&artid=14

0 Votes

April 2, 2015 08:05

Is possible to have an image of your sd card for test it ?
What revision of OS are you using ?
best
Roberto

0 Votes

April 2, 2015 07:28

I follow the tutorial but streaming don't work .
WebRTC error... "Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set video send codecs.."

All work on raspberry camera and streaming infact if i use gstreamer client udp on an other pc i recive the video on the screen ...
I'm using Googe Chrome as web browser on my pc.
best
Roberto

0 Votes

March 27, 2015 06:05

I get hung up at the GStreamer1.0 install. Says no such file exists. Gives me many other files that contain GStreamer. I tried to find another build that included the needed file but no luck.

0 Votes

March 17, 2015 01:25

Is the extra horsepower of the Pi2 needed for the video transcoding, or will this work with a PiB?

0 Votes

March 16, 2015 15:24

I got this to work, so thank you. I've been looking for a Raspberry Pi WebRTC solution for about 6 months and this is the first time I've ever seen it work for the RaspiCam and from the command line. It does work from Ice Weasel, but you have to be in X windows.

The problem with this solution is its streaming H264 which Chrome does not support in WebRTC yet. Having this only work in Firefox isn't that useful as most of the web is using Chrome. So, how do you convert the stream using Gstreamer to VP8 so that Chrome browsers can also view this live video feed?

Here's an alternate Gstreamer command I modified from a stack overflow at http://stackoverflow.com/questions/2730 ... 264-to-vp8, but I couldn't get it to work either:

raspivid --verbose --nopreview -hf -vf --width 640 --height 480 --framerate 15 --bitrate 1000000 --profile baseline --timeout 0 -o - | gst-launch-1.0 -v fdsrc ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, sprop-parameter-sets=(string)\"Z2QAKK2EBUViuKxUdCAqKxXFYqOhAVFYrisVHQgKisVxWKjoQFRWK4rFR0ICorFcVio6ECSFITk8nyfk/k/J8nm5s00IEkKQnJ5Pk/J/J+T5PNzZprQFAeyA\,aO48sA\=\=\", payload=(int)96, ssrc=(guint)2498431066, clock-base=(guint)297251943, seqnum-base=(guint)34949" \
! rtph264depay ! queue ! ffdec_h264 ! ffmpegcolorspace ! videoscale ! queue \
! vp8enc bitrate=256000 speed=2 max-latency=1 error-resilient=true \
! rtpvp8pay ! udpsink host=127.0.0.1 port=8005

Here's the version of Gstreamer I'm using from compiling it myself:
gst-launch-1.0 version 1.4.5
GStreamer 1.4.5
http://www.linuxfromscratch.org/blfs/view/svn/

0 Votes

March 16, 2015 12:51

Sir please can you let me know how can i change this code in order to make it work with a stun server? I dont have a public ip so i want to find a getaround way to stream trhough my raspberry.
I need native code streaming from raspberry via a stun server in order to be accessed from webbrowsers.
Thank you very much in advance

0 Votes

Related Content

DesignSpark Electrical Logolinkedin