Code Monkey home page Code Monkey logo

centricular / gstwebrtc-demos Goto Github PK

View Code? Open in Web Editor NEW
486.0 486.0 197.0 491 KB

Superseded by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-examples/webrtc - Demo apps for using gstreamer's webrtc implementation

Home Page: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-examples/webrtc

License: BSD 2-Clause "Simplified" License

C 33.19% HTML 0.52% JavaScript 6.33% Python 32.04% Shell 0.06% Makefile 0.78% Rust 16.39% C# 2.97% Meson 1.00% Dockerfile 0.62% Java 6.08% C++ 0.02%

gstwebrtc-demos's People

Contributors

coreycole avatar ebail avatar heftig avatar jungbernhard avatar linkmauve avatar mathieuduponchelle avatar matthew1000 avatar maxmcd avatar meldron avatar nirbheek avatar philn avatar sawchord avatar sdroege avatar seungha-yang avatar skilb avatar sunapi386 avatar svangasse avatar thaytan avatar thiblahute avatar tp-m avatar ykazakov avatar ystreet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gstwebrtc-demos's Issues

gst-rust container currently does not build

calling docker-compose build returns a

Building sendrecv-gst-rust
Step 1/8 : FROM maxmcd/gstreamer:1.14-buster
 ---> 39727879bc2f
Step 2/8 : RUN apt-get install -y curl
 ---> Running in b2e70e67f7ca
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libcurl4
The following NEW packages will be installed:
  curl libcurl4
0 upgraded, 2 newly installed, 0 to remove and 33 not upgraded.
Need to get 570 kB of archives.
After this operation, 1074 kB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libcurl4 amd64 7.60.0-2 [316 kB]
Err:2 http://cdn-fastly.deb.debian.org/debian buster/main amd64 curl amd64 7.60.0-2
  404  Not Found [IP: 151.101.52.204 80]
Fetched 316 kB in 1s (326 kB/s)
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/pool/main/c/curl/curl_7.60.0-2_amd64.deb  404  Not Found [IP: 151.101.52.204 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

GstWebRTC does not work with MacOS 10.12.6

Hello, thank you for making this material available.

I have tried compiling the example webrtc-sendrecv.py but I did not succeed.

I Tried:

import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst
gi.require_version('GstSdp', '1.0')
from gi.repository import GstSdp
gi.require_version('GstWebRTC', '1.0')
from gi.repository import GstWebRTC

I get:
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace GstWebRTC not available

I installed gst-python with "brew install gst-python"

brew info gst-python
gst-python: stable 1.14.1 (bottled)
Python overrides for gobject-introspection-based pygst bindings
https://gstreamer.freedesktop.org/modules/gst-python.html
/usr/local/Cellar/gst-python/1.14.1 (12 files, 395KB) *
Poured from bottle on 2018-06-23 at 03:19:10
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/gst-python.rb
==> Dependencies
Required: gst-plugins-base ✔, pygobject3 ✔
Recommended: python ✔
Optional: python@2 ✔

What could be wrong?
It's strange that Gst and Gst Sdp work while Gst WebRtc does not

Getting "_get_final_direction: code should not be reached " error in versions >1.14.1

I am using the below pipeline to stream the video to a web chrome browser.

  • gst_parse_launch ("webrtcbin bundle-policy=max-bundle name=sendrecv " STUN_SERVER
    " rtspsrc location=rtsp://<ipcamera_url_info_here> ! queue ! application/x-rtp, media=video, encoding-name=H264, payload=96 ! sendrecv. ",
    &error);

The video used to stream with 1.14.1 version. But in version 1.14.2 and 1.15.0 I am getting the below errors:

  • 0:00:15.475758027 32474 0x7f087c073590 ERROR dtlsconnection gstdtlsconnection.c:727:ssl_err_cb:GstDtlsConnection@0x7f087c005590 ssl error: 139674417313168:error:140B4090:SSL routines:SSL_do_handshake:connection type not set:ssl_lib.c:2779:

  • 0:00:15.476559073 32474 0x1863400 ERROR default webrtcsdp.c:380:_get_direction_from_media: Multiple direction attributes
    _ERROR:webrtcsdp.c:493:get_final_direction: code should not be reached
    Aborted (core dumped)

I am adding the Offer and answer below for reference. Anyone have idea about what has been changed in the later versions due to which the sig_abort is happening?

Sending offer:
v=0
o=- 7690451568308751661 0 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-options:trickle
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=setup:actpass
a=ice-ufrag:vbCMdyTJVZSepXT6mqDUL3NcG9gRGM2e
a=ice-pwd:hNt5nrHBIM5k64hk0I+8auyt2CqwSCqi
a=rtcp-mux
a=rtcp-rsize
a=sendrecv
a=rtpmap:96 H264/90000
a=rtcp-fb:96 nack pli
a=packetization-supported:DH
a=rtppayload-supported:DH
a=framerate:10.000000
a=recvonly
a=fmtp:96 packetization-mode=1;profile-level-id=428029;sprop-parameter-sets=Z0KAKZpkA8ARPy4C3AQEBQAAAwPoAABOIOhgDQwANDC7y40MAaGABoYXeXCg,aM48gA==
a=ssrc:588744535 msid:user784747222@host-3812aea4 webrtctransceiver0
a=ssrc:588744535 cname:user784747222@host-3812aea4
a=mid:video0
a=fingerprint:sha-256 19:37:42:9E:0E:36:84:79:6C:A2:50:63:29:25:2E:8E:32:9D:68:23:60:9F:B5:3A:3E:43:B2:AF:9B:56:DC:1E
Received answer:
v=0
o=- 4087386550310822300 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS
m=video 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:MKIk
a=ice-pwd:AEhz5dDhQL2GeY9lyVrIj2O9
a=ice-options:trickle
a=fingerprint:sha-256 DE:3A:B5:09:C2:AE:0F:20:E9:16:25:3D:34:E6:64:79:3A:8C:8E:50:1F:2A:72:0B:1A:CB:55:B7:53:FE:54:A2
a=setup:active
a=mid:video0
a=inactive
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 H264/90000
a=rtcp-fb:96 nack pli
a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f

MacOS + webrtc-sendrecv.py = Illegal instruction: 4

I have some problems running the Python example on macOS: the connection starts, in the browser window (chrome and firefox) I see in the flying ball and hear noise, but after a few seconds the program crashes with "Illegal instruction: 4". A window with the video stream coming from the browser does not open. In contrast, if I run the compiled C example, I see the video from the browser. If I set in the browser {"video":false,"audio":true}, the Python program works fine, but the video is not transmitted.

I did some investigation, and I think that the crash is caused by the threading issues because on MacOS the UI operations should be called from the main thread. But in the Python program the pipeline is created on the asyncio event loop. Unfortunately I am completely newbie in Python so I do not see any easy fix here.

gsteamer 1.14.2 installed on MacOS 10.13.6 by homebrew with the following options:

brew install gstreamer
brew install gst-plugins-base --with-opus
brew install gst-plugins-good --with-speex --with-libvpx --with-jack
brew install gst-plugins-bad --with-libnice --with-opus --with-srtp
brew install gst-python
$ python3 --version
Python 3.7.0

The test pipeline works fine:

gst-launch-1.0 videotestsrc pattern=ball ! videoconvert ! autovideosink

Here is a sample run:

$ python3 webrtc-sendrecv.py 1721
Sending offer:
v=0
o=- 3303706454607302771 0 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-options:trickle
a=msid-semantic:WMS sendrecv
m=video 9 UDP/TLS/RTP/SAVPF 97
c=IN IP4 0.0.0.0
a=setup:actpass
a=ice-ufrag:XBq4jDVORdgcPIcLgro04jxbO0Y5xi1c
a=ice-pwd:yjpMNpC9jlhlnvLo+4IPlMdRLUGuRDzH
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:97 VP8/90000
a=rtcp-fb:97 nack pli
a=framerate:30
a=ssrc:1949809321 msid:user2948245404@host-9bf5ae61 webrtctransceiver0
a=ssrc:1949809321 cname:user2948245404@host-9bf5ae61
a=mid:video0
a=fingerprint:sha-256 BB:CF:2D:0F:56:B6:EB:52:74:B9:13:E6:35:49:75:4D:13:C4:4A:F4:9C:07:82:02:F3:0A:DF:1D:D9:6A:F3:EA
m=audio 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=setup:actpass
a=ice-ufrag:VMg4ywOfav8gWkIMwaNBgVUJgUjoUeAl
a=ice-pwd:PxkPCSMFlgIKu856GIbqiMHnElhTHAJf
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 OPUS/48000/2
a=rtcp-fb:96 nack pli
a=fmtp:96 sprop-maxcapturerate=48000;sprop-stereo=0
a=ssrc:2488823075 msid:user2948245404@host-9bf5ae61 webrtctransceiver1
a=ssrc:2488823075 cname:user2948245404@host-9bf5ae61
a=mid:audio1
a=fingerprint:sha-256 BB:CF:2D:0F:56:B6:EB:52:74:B9:13:E6:35:49:75:4D:13:C4:4A:F4:9C:07:82:02:F3:0A:DF:1D:D9:6A:F3:EA

Received answer:
v=0
o=- 5883944315674643207 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS y8E09mXfXUFm2m2rgN7NgBE2D28tgJEM6TA3
m=video 9 UDP/TLS/RTP/SAVPF 97
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:TuJQ
a=ice-pwd:jvwwL3myUqdhCz8e7ifGdJfY
a=ice-options:trickle
a=fingerprint:sha-256 14:98:38:33:92:92:82:1E:69:C8:93:D9:B1:4D:60:B1:09:7C:60:C5:F4:44:58:61:09:44:90:3B:6F:B7:BA:3D
a=setup:active
a=mid:video0
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:97 VP8/90000
a=rtcp-fb:97 nack pli
a=ssrc:714727404 cname:qZWzu+tTH9Ykc9TN
a=ssrc:714727404 msid:y8E09mXfXUFm2m2rgN7NgBE2D28tgJEM6TA3 32c1ea82-212e-4214-9a01-823dd6c02e0d
a=ssrc:714727404 mslabel:y8E09mXfXUFm2m2rgN7NgBE2D28tgJEM6TA3
a=ssrc:714727404 label:32c1ea82-212e-4214-9a01-823dd6c02e0d
m=audio 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:YKTI
a=ice-pwd:oHJ1ptMvPMigaRwZjxMHMkD/
a=ice-options:trickle
a=fingerprint:sha-256 14:98:38:33:92:92:82:1E:69:C8:93:D9:B1:4D:60:B1:09:7C:60:C5:F4:44:58:61:09:44:90:3B:6F:B7:BA:3D
a=setup:active
a=mid:audio1
a=sendrecv
a=rtcp-mux
a=rtpmap:96 OPUS/48000/2
a=fmtp:96 minptime=10;useinbandfec=1
a=ssrc:2681704157 cname:qZWzu+tTH9Ykc9TN
a=ssrc:2681704157 msid:y8E09mXfXUFm2m2rgN7NgBE2D28tgJEM6TA3 6c009868-51be-4c79-b76b-3ed1bfb9eb68
a=ssrc:2681704157 mslabel:y8E09mXfXUFm2m2rgN7NgBE2D28tgJEM6TA3
a=ssrc:2681704157 label:6c009868-51be-4c79-b76b-3ed1bfb9eb68

Illegal instruction: 4

Key Frames requests from peer via a webrtcbin signal ?

I don't know if this the right channel to ask. I am playing with Gstreamer, and learning webrtc.
I have checked this example, and it works nearly ok, for what I could see.

The streams DEMO --> BROWSER works great.

The streams BROWSER ---> DEMO, works by takes like a minute to start flowing video.

It seems Chrome sends a VP8 key frame at rate each 3000 frames. I am sending the RTP VP8/OPUS streams to some UDPSINK elements. It takes between 1 minute and 3 minutes to an application to sink correctly the streams.

If I transcode the video, it gets better, but I really don't what to. I just want to have the incoming stream to a matroska container.

I am thinking it could be nice, if there were some "signal" that an APP could hook it up, and request Key Frames from the peer, via the RTP session. A "FIR" request ?

Thanks.

Detect Peer Connection Loss

Hey guys,

what is the best way to detect if the peer connection has been lost?

Currently I am thinking about polling the webrtcbin property conection-state. Anybody with a better idea?

Thanks!

Localhost : webrtc-sendrecv.c configuration.

Hi, i'm also trying this demo on localhost.

I have a node server serving JS+HTML file and a signalling server "simple-server.py"

My signalling server is on port : 8443
My node.js server is on port : 8000

I want to use the webrtc-sendrecv.c to send a gstreamer stream.

I have changed the :

static const gchar *server_url = "wss://webrtc.nirbheek.in:8443";

into

static const gchar *server_url = "wss://localhost:8443";

But when i run in a shell : ./webrtc-sendrecv --peer-id=3937

I get an error :

Connecting to server...
< HTTP/1.1 6 Unacceptable TLS certificate
< Soup-Debug-Timestamp: 1522404866
< Soup-Debug: SoupMessage 0 (0x25bc0b0)

The server did not accept the WebSocket handshake.

Can't figure out what's my mistake !

Sorry for my "bad english"

Thank a lot for reading this thread

Trying to replace the "simple-server" with a nodeJS signaling server with websocket

If you have any advice, or hint to do this it would be awesome.

I have a read that the signalling server could be replace by another signalling server. But i have no idea of how i can achieve this, and if the python server is handling some logic !

Actually i'm trying to replace the python server with a server from "https://www.webrtc-experiment.com/
" websocket-over-nodejs " ssl.js file.

I'm really struggling to adapt the python code in javascript code.

For example : How can i get raddr = ws.remote_address (python) in javascript ?

I'm looking for good documentation and hints i don't ask you do my job. I know it will be hard for me to achive this. But i have plenty of time =)

So if you can help me by giving good documentation on websocket for nodejs / python, or giving steps / hints. It would be very kind

Sypsô

Not working in Android Mobile google-chrome browser

Can u please tell me whether webrtc.nirbheek.in is tested in Android mobile chrome browser ?
I tried with Android mobile chrome browser .
PROBLEMS :- Able to send streaming to other device but not able to receive from other device to the mobile.
Please suggest any ways to solve this .

Strange problem after replace videotestsrc to v4l2src (white screen at second time)

I have modified the demo to one-way video streaming, so, one camera is enough for test when web browser and webrtc-sendrecv.py run on same computer.
I also test without change the demo, attach one more camera to the computer, and use "v4l2src device=/dev/video1" instead, and got the same problem.

After use "v4l2src" instead, I can watch camera video in the browser only at first one or two times, after that, everything is fine except the video become while screen. (use videotestsrc is always fine)

This problem only exist for Chrome (Firefox is fine), after I upgrade my Chrome to "Version 69.0.3497.92 (Official Build) (64-bit)", I can watch my camera video again, but only at first time. I try to test it in an incognito page, only got successed at first time. Reopen incognito page or reopen the Chrome or reboot my computer doesn't help.

In Chrome WebRTC debug page, I found that, when the video is while screen, there are two ssrc_xxxxxx_recv, the framesDecoded of one ssrc is always zero, another one is normal. Why this happen?

screenshot_2018-09-17_18-34-21

can't view rtsp source without decode

In the example sendrecv, the pipeline use videotestsrc as the source, as below:
videotestsrc pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay !

But I want to view an rtsp source from a rtspserver with decode h264, I change the code to:
rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! avdec_h264 ! queue ! x264enc ! rtph264pay !

And the cap define is "application/x-rtp,media=video,encoding-name=H264,payload="
it works fine.

As the source stream is already coded with h264, so I remove the decode and codec process in the pipeline. But then I can't see the stream on the web.
rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! queue ! rtph264pay !

How to view the stream without decodec and codec in the webrtc pipeline?

Not really an issue : Little hint to handle multiple stream from gstreamer on a single webpage

Hi again,

I have been able to use your demo with my webcam on a localnetwork everything is working fine, thank to you.

I'm now looking to enhance your demo.

My goal is to handle multiple gstreamer "stream" in a single webpage. But i'm not sure this is actually "possible".

I have though that i can handle multiple gstream "stream" if i can make a list of them. Each entry of my list could have a "video element" linked to the stream.

Let's say i have 3 stream

Each one would have a video element that "read" the stream.

I'm don't know if this could be achived by webRTC and your demo.

At least thank you guys your work is awesome

Sypsô

Looking for Help : Trying to use v4l2src instead of videotestsrc

Hi, i'm a student on an internship, trying to implement a live stream with webRTC. The recent update of Gstreamer head me to this API and Demo.

I'm a new be on WebRTC and this Gstreamer API for WebRTC.

So here is my problem. When i use the "https://webrtc.nirbheek.in/" + the demo everything work fine i'm able to watch the ball moving. I was also able to hear the sound ! But i have disable it :)

My problem is "switching from videotestsrc pattern = ball. to v4l2src isn't working" [The video stream doesn't show in the

And it's a bit weird because JUST changing videotestsrc to v4l2src doesn't show any error :/

I supposed it's a SDP problem. But i have any clue ! And i also supposed that you have already tryied to replace this by a webcam =)

Thank you for reading my post ! I hope you can help me =)

P.S I have read : http://blog.nirbheek.in/2018/02/gstreamer-webrtc.html and the link it shares

Safari?

This seems hardcoded to use VP8. Shouldn't the negotiation phase pick the right video codec based on what the browser wants? I mean, isn't this the whole purpose of webrtc?

Python demo stops working after few seconds

What I have:

I have Ubuntu 18.04 on VirtualBox (Mac)

NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"

I have built GStreamer 1.1.4.2 using the sources obtained from:
https://gstreamer.freedesktop.org/news/

$ gst-inspect-1.0 --version
gst-inspect-1.0 version 1.14.2
GStreamer 1.14.2
Unknown package origin

More details of my setup can be found in #42

I am using https://webrtc.nirbheek.in/ for signalling.

Once I start the python demo, I see the bouncing ball video appear in my browser but then it freezes after a few seconds. By that time the python end has an assertion error in console:

Traceback (most recent call last):
  File "webrtc-sendrecv.py", line 75, in on_incoming_decodebin_stream
    assert (len(caps))
TypeError: object of type 'Caps' has no len()
Traceback (most recent call last):
  File "webrtc-sendrecv.py", line 75, in on_incoming_decodebin_stream
    assert (len(caps))
TypeError: object of type 'Caps' has no len()

Screenshot attached.

webrtcprogress

Any suggestion regarding what to investigate?

webrtcbin0 can't handle caps application/x-rtp...

I am trying to build my own python app based on the demo example. After facing an exception in application code, I ended up creating a command line version of the pipeline to reproduce the error.

Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic
>gst-launch-1.0 --version
gst-launch-1.0 version 1.14.1
GStreamer 1.14.1
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0
>gst-inspect-1.0 webrtcbin
Factory Details:
  Rank                     primary (256)
  Long-name                WebRTC Bin
  Klass                    Filter/Network/WebRTC
  Description              A bin for webrtc connections
  Author                   Matthew Waters <[email protected]>

Plugin Details:
  Name                     webrtc
  Description              WebRTC plugins
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstwebrtc.so
  Version                  1.14.1
  License                  LGPL
  Source module            gst-plugins-bad
  Source release date      2018-05-17
  Binary package           GStreamer Bad Plugins (Ubuntu)
  Origin URL               https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1.0

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBin
                         +----GstWebRTCBin

Implemented Interfaces:
  GstChildProxy

Pad Templates:
  SRC template: 'src_%u'
    Availability: Sometimes
    Capabilities:
      application/x-rtp
  
  SINK template: 'sink_%u'
    Availability: On request
    Capabilities:
      application/x-rtp

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
  none

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "webrtcbin0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  async-handling      : The bin will handle Asynchronous state changes
                        flags: readable, writable
                        Boolean. Default: false
  message-forward     : Forwards all children messages
                        flags: readable, writable
                        Boolean. Default: false
  connection-state    : The overall connection state of this element
                        flags: readable
                        Enum "GstWebRTCPeerConnectionState" Default: 0, "new"
                           (0): new              - GST_WEBRTC_PEER_CONNECTION_STATE_NEW
                           (1): connecting       - GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING
                           (2): connected        - GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED
                           (3): disconnected     - GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED
                           (4): failed           - GST_WEBRTC_PEER_CONNECTION_STATE_FAILED
                           (5): closed           - GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED
  signaling-state     : The signaling state of this element
                        flags: readable
                        Enum "GstWebRTCSignalingState" Default: 0, "stable"
                           (0): stable           - GST_WEBRTC_SIGNALING_STATE_STABLE
                           (1): closed           - GST_WEBRTC_SIGNALING_STATE_CLOSED
                           (2): have-local-offer - GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER
                           (3): have-remote-offer - GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER
                           (4): have-local-pranswer - GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER
                           (5): have-remote-pranswer - GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER
  ice-gathering-state : The collective gathering state of all ICETransport's
                        flags: readable
                        Enum "GstWebRTCICEGatheringState" Default: 0, "new"
                           (0): new              - GST_WEBRTC_ICE_GATHERING_STATE_NEW
                           (1): gathering        - GST_WEBRTC_ICE_GATHERING_STATE_GATHERING
                           (2): complete         - GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE
  ice-connection-state: The collective connection state of all ICETransport's
                        flags: readable
                        Enum "GstWebRTCICEConnectionState" Default: 0, "new"
                           (0): new              - GST_WEBRTC_ICE_CONNECTION_STATE_NEW
                           (1): checking         - GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING
                           (2): connected        - GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED
                           (3): completed        - GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED
                           (4): failed           - GST_WEBRTC_ICE_CONNECTION_STATE_FAILED
                           (5): disconnected     - GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED
                           (6): closed           - GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED
  local-description   : The local SDP description to use for this connection
                        flags: readable, writable
                        Boxed pointer of type "GstWebRTCSessionDescription"
  remote-description  : The remote SDP description to use for this connection
                        flags: readable, writable
                        Boxed pointer of type "GstWebRTCSessionDescription"
  stun-server         : The STUN server of the form stun://hostname:port
                        flags: readable, writable
                        String. Default: null
  turn-server         : The TURN server of the form turn(s)://username:password@host:port
                        flags: readable, writable
                        String. Default: null

Element Signals:
  "pad-added" :  void user_function (GstElement* object,
                                     GstPad* arg0,
                                     gpointer user_data);
  "pad-removed" :  void user_function (GstElement* object,
                                       GstPad* arg0,
                                       gpointer user_data);
  "no-more-pads" :  void user_function (GstElement* object,
                                        gpointer user_data);
  "on-negotiation-needed" :  void user_function (GstElement* object,
                                                 gpointer user_data);
  "on-ice-candidate" :  void user_function (GstElement* object,
                                            guint arg0,
                                            gchararray arg1,
                                            gpointer user_data);

Element Actions:
  "create-offer" :  void user_function (GstElement* object,
                                        GstStructure* arg0,
                                        GstPromise* arg1);
  "create-answer" :  void user_function (GstElement* object,
                                         GstStructure* arg0,
                                         GstPromise* arg1);
  "set-local-description" :  void user_function (GstElement* object,
                                                 GstWebRTCSessionDescription* arg0,
                                                 GstPromise* arg1);
  "set-remote-description" :  void user_function (GstElement* object,
                                                  GstWebRTCSessionDescription* arg0,
                                                  GstPromise* arg1);
  "add-ice-candidate" :  void user_function (GstElement* object,
                                             guint arg0,
                                             gchararray arg1);
  "get-stats" :  void user_function (GstElement* object,
                                     GstPad* arg0,
                                     GstPromise* arg1);
  "add-transceiver" :  GstWebRTCRTPTransceiver * user_function (GstElement* object,
                                                                GstWebRTCRTPTransceiverDirection arg0,
                                                                GstCaps* arg1);
  "get-transceivers" :  GArray * user_function (GstElement* object);

Children:
  rtpbin

When I run the following pipeline it fails with error that I get from my python app.

gst-launch-1.0 videotestsrc pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay ! application/x-rtp, media=video, encoding-name=VP8, payload=97 ! webrtcbin

WARNING: erroneous pipeline: could not link rtpvp8pay0 to webrtcbin0, webrtcbin0 can't handle caps application/x-rtp, media=(string)video, encoding-name=(string)VP8, payload=(int)97

The following works without any problem.

gst-launch-1.0 videotestsrc pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay ! application/x-rtp, media=video, encoding-name=VP8, payload=97 ! queue ! rtpvp8depay ! vp8dec ! autovideosink

Unable to stream camera in 720p resolution and above .

I connected USB camera in PC browser side and opening https://webrtc.nirbheek.in .
Using peer-id in other system trying sendrecv demo app and able to stream . but the streaming received from browser side is always VGA (640x480).
How I can send 720p (1280x720) from https://webrtc.nirbheek.in browser based app ?
I also check in webrtc.js file where constraints = {video: true, audio: true}; there is no any width height settings .
Please try to help how to solve this issue .

srtp/gnutls aren't included in gst-build, which makes it hard to build the demos with meson

Hey, thanks for your work on this.

Could you make the running instructions a bit more concrete? E.g. how to precisely continue after having built gstreamer with gst-build.

I've built all gstreamer libraries with gst-build, and then this project with the following script:

% cat build.sh
#!/usr/bin/env bash

set -euo pipefail

# Needed deps on Ubuntu 16.04:
#
# libsoup2.4-dev
# libjson-glib-dev

set -x
gcc -O2 webrtc-sendrecv.c $(PKG_CONFIG_PATH=$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gstreamer/pkgconfig:$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gst-plugins-base/pkgconfig:$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gst-plugins-good/pkgconfig:$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gst-plugins-bad/pkgconfig:$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gst-plugins-ugly/pkgconfig pkg-config --cflags --libs gstreamer-webrtc-1.0 gstreamer-sdp-1.0 libsoup-2.4 json-glib-1.0) -o webrtc-sendrecv
set +x

And I'm running it via this script:

% cat run.sh
#!/usr/bin/env bash

LD_LIBRARY_PATH=$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gstreamer/lib:$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gst-plugins-base/lib:$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gst-plugins-good/lib:$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gst-plugins-bad/lib:$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gst-plugins-ugly/lib:$HOME/src/gstreamer-webrtc/gst-build/build/subprojects/gst-plugins-bad/gst-libs/gst/webrtc ./webrtc-sendrecv $@

E.g. ./run.sh --peer-id=1234.

In my case I get

Connecting to server...
> GET  HTTP/1.1
> Soup-Debug-Timestamp: 1517748888
> Soup-Debug: SoupSession 1 (0x107a130), SoupMessage 1 (0x185c8e0), SoupSocket 1 (0xec5360)
> Host: webrtc.nirbheek.in:8443
> Upgrade: websocket
> Connection: Upgrade
> Sec-WebSocket-Key: Oti+mMzdeB36pTwsz3jf7A==
> Sec-WebSocket-Version: 13
> Accept-Encoding: gzip, deflate
> Connection: Keep-Alive
  
< HTTP/1.1 101 Switching Protocols
< Soup-Debug-Timestamp: 1517748888
< Soup-Debug: SoupMessage 1 (0x185c8e0)
< Server: Python/3.5 websockets/3.3
< Upgrade: WebSocket
< Connection: Upgrade
< Sec-WebSocket-Accept: M0XbTOzizq93wC4ZweM1TyzRWhU=
  
Connected to signalling server
Registering id 5701 with server
Registered with server
Setting up signalling server call with 7883
Failed to parse launch: no element "webrtcbin"
ERROR: failed to start pipeline

(webrtc-sendrecv:10998): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed
Pipeline stopped

(webrtc-sendrecv:10998): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed

Is my way to build correct, could it be easier?

Given that I get no element "webrtcbin", assume something is not in a location it's looking for?

Thanks!

Cannot find NICE when configuring gst-plugins-bad

Hello,

I am trying to build gstreamer 1.14.4 in a raspbian-stretch based Docker container.

However, when I get to installing gst-plugins-bad the configuration script does not seem to find libnice. Running ./configure --prefix=/usr in the gst-plugins-bad-1.14.4 folder yields the following output:

configure: *** checking feature: WebRTC ***
configure: *** for plug-ins: webrtc ***
checking for NICE... no
configure: *** These plugins will not be built: webrtc

However I have installed libnice with apt-get install libnice-dev and also built the source from https://github.com/libnice/libnice.git. gst-inspect-1.0 nice yields:

Plugin Details:
  Name                     nice
  Description              Interactive UDP connectivity establishment
  Filename                 /usr/lib/gstreamer-1.0/libgstnice.so
  Version                  0.1.14.1
  License                  LGPL
  Source module            libnice
  Binary package           libnice
  Origin URL               http://telepathy.freedesktop.org/wiki/

My Dockerfile:

FROM raspbian/stretch

RUN apt-get update && apt-get install -y --no-install-recommends \
    autoconf `# libnice` \
    automake `# libnice` \
    bison \
    build-essential \
    ca-certificates \
    flex \
    gettext \
    git \
    gnutls-dev `# libnice` \
    gtk-doc-tools `# libnice` \
    libffi-dev \
    libglib2.0 \
    libnice-dev \
    libopus-dev \
    libpcre3-dev \
    libsrtp-dev \
    libssl-dev `# needed for DTLS requirement`\
    libtool `# libnice` \
    libvpx-dev \
    libx264-dev \
    mount \
    perl \
    python \
    wget \
    zlib1g 

# http://www.linuxfromscratch.org/blfs/view/svn/multimedia/gstreamer10.html
RUN wget https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.14.4.tar.xz \
    && tar xvfJ gstreamer-1.14.4.tar.xz > /dev/null \
    && cd gstreamer-1.14.4 \
    && ./configure --prefix=/usr \
    && make \
    && make install 

    # gst-plugins-base
RUN wget https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.14.4.tar.xz \
    && tar xvfJ gst-plugins-base-1.14.4.tar.xz > /dev/null \
    && cd gst-plugins-base-1.14.4 \
    && ./configure --prefix=/usr \
    && make \
    && make install 

RUN git clone https://github.com/libnice/libnice.git \
    && cd libnice \
    && ./autogen.sh --prefix=/usr --with-gstreamer --enable-static --enable-static-plugins --enable-shared --without-gstreamer-0.10 --disable-gtk-doc --enable-compile-warnings=no \
    && make install

# gst-plugins-good
RUN wget https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.14.4.tar.xz \
    && tar xvfJ gst-plugins-good-1.14.4.tar.xz > /dev/null \
    && cd gst-plugins-good-1.14.4 \
    && ./configure --prefix=/usr \
    && make \
    && make install 

# gst-plugins-bad
RUN wget https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.14.4.tar.xz \
    && tar xvfJ gst-plugins-bad-1.14.4.tar.xz > /dev/null \
    && cd gst-plugins-bad-1.14.4 \
    && ./configure --prefix=/usr \
    && make \
    && make install 

    # gst-plugins-ugly
 RUN wget https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.14.4.tar.xz \
    && tar xvfJ gst-plugins-ugly-1.14.4.tar.xz > /dev/null \
    && cd gst-plugins-ugly-1.14.4 \
    && ./configure --prefix=/usr \
    && make \
    && make install 

# gst-rtsp-server
 RUN wget https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-1.14.4.tar.xz \
    && tar xvfJ gst-rtsp-server-1.14.4.tar.xz > /dev/null \
    && cd gst-rtsp-server-1.14.4 \
    && ./configure --prefix=/usr \
    && make \
    && make install 

RUN rm -rf gst*

When built from the base image maxmcd/gstreamer:1.14-buster instead I can get it working, and the only difference I can find is that apt-cache policy libnice-dev shows version 0.1.14 in that case instead of 0.1.13. Is 0.1.14 required for the WebRTC plugin?

Any help greatly appreciated!

In which gstreamer version can I find the bundle-policy property of Webrtcbin?

In the latest webrtc-sendrecv.c, I see the bundle-policy being added to the pipeline. In which version of gstreamer I could get this support? I have tried till 1.14.4 but it doesn't look like it has been added. When I tried building from master branch I get errors in gst-uninstalled. Any suggestions to get the bundle policy patch applied?

plugin 'opus' not found

Hi

I build all plugins required to run webrtc-sendrec and although the opus in plugins-bad has been built and installed (to /usr/local/lib/gstreamer-1.0/libgstopusparse.so and libgstopusparse.la), I get the error message:

required gstreamer plugin 'opus' not found

What could be the problem?
Ubuntu 16.04, gstreamer (& plugins): 1.14.1

Best
Stefan

Can it do recording to a file?

I tried using ffmpeg (which had SDP file as an input) to record live webrtc stream and it worked OK. There were some problems though.

I got interested in gstwebrtc in hope it would be better but since there is no documentation, it's very hard to even try it out.

I wonder if recording be done by gstreamer CLI alone or I would have to write C code?

gstwebrtc with rtcp

Hi,

Firstly thanks for this nice demos. I find the video becomes pixelated when packet lost , and I glance over the source code of gstwebrtc, it seems not handle the rtcp packet , is there something I missed?

a

Cannot compile examples on Raspian

Hi
Thanks for this nice move towards WebRTC
I am trying to compile the examples, on PI3 Debian, following your instructions
I am hitting the following error

pi@raspberrypi:~/gstwebrtc-demos/sendrecv/gst $ gcc webrtc-sendrecv.c $(pkg-config --cflags --libs gstreamer-webrtc-1.0 gstreamer-sdp-1.0 libsoup-2.4 json-glib-1.0) -o webrtc-sendrecv
Package gstreamer-webrtc-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing gstreamer-webrtc-1.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gstreamer-webrtc-1.0' found Package json-glib-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing json-glib-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'json-glib-1.0' found
webrtc-sendrecv.c:9:21: fatal error: gst/gst.h: No such file or directory
#include <gst/gst.h>
^
compilation terminated.

Can't get around it, please help :)
Phil

Demo and Janus Gateway: DTLS BIO error

Amazing work guys, really. I'm super excited by this new webRTC integration! Anyways, I've deployed Gstreamer Master onto a Raspberry Pi and got the sendrecv Python demo to work with the provided website. Bouncing ball and noise.

I then modified the demo a small amount to interface with a working custom Janus WebRTC gateway server I have; the goal being to push the same bouncing ball stream to that.

The thing is, it isn't working. After the SDP answer is processed by Gstreamer and all ICE candidates are sent, instead of beginning the stream, I get a few DTLS errors, and then nothing. Janus just sits idle waiting for the stream to begin it looks like.

0:00:05.914482127 6232 0x9e2c30 WARN dtlsconnection gstdtlsconnection.c:737:openssl_poll:GstDtlsConnection@0x71f1a0a8 do_handshake encountered BIO error

A full output dump is here:
https://paste.ofcode.org/tCEyRq2jiAAfvtQEiWKUNY

I'll work on this endlessly until I get it working, but at this point I feel there is a good chance there is an incompatibility. I ran into a lot of DTLS errors in the past with Janus.

Error in sendrecv demo

I run the demo in windows with Gstreamer 1.14.0 release.

In the example sendrecv, when I open the index.html in chrome, it always shows
failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
and can't connect to the server.

But I try the session-client.py and they work well.

Any idea about the error?

Cannot parse SDP message in python demo

The function SDPMessage.new_from_text does not exist in my case?

res, sdpmsg = GstSdp.SDPMessage.new_from_text(sdp)

What python version is this using? On my system I have python3-gst-1.0 1.14.1-1 (from debian buster)

Is it possible for webrtc-sendrecv to "broadcast" video

Hello,

With a lot of work i have been able to write my own signaling server in Node.js.
I also have been able to write a multi peer (in a single webpage) demo.

But a question cross my mind. Is it possible to broadcast a single gstreamer pipeline to a a lot of peer browser ?

A use case would be to have pipeline that broadcast my webcam. And each peer that connect would see the live stream.

It would be the opposite of what i wrote. Actually i have done : multiple (source) webrtc-sendrecv to one (client) page (chrome browser).

And i want : one (source) werbrtc-sendrecv instance and multiple (client) browser page

I have already check the Mesh, MCU, SFU topology. And i know this isn't really an issue of this demo.

If someone could feed me with (demo, website, information) or redirect me it would be really nice.

Sypsô

sendrecv.py core dump

I am trying to build my own python app based on the demo example. After facing a core dump in application code, I ended up trying out the demo project and generated the crash.

  1. I have an Ubuntu VM in VirtualBox on Mac
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

>gst-launch-1.0 --version
gst-launch-1.0 version 1.14.1
GStreamer 1.14.1
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0
  1. In Chrome I go to https://webrtc.nirbheek.in/ and take note of the ID

  2. I run sendrecv and generate the following crash. When the app starts running I see the web app showing the connection attempt.

$ python webrtc-sendrecv.py 1128
Sending offer:
v=0
o=- 636836448770024085 0 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-options:trickle
m=video 9 UDP/TLS/RTP/SAVPF 97
c=IN IP4 0.0.0.0
a=setup:actpass
a=ice-ufrag:1iR+VFzOHqq+nocQ22Gd1xqdzUs0bSd6
a=ice-pwd:HE4bf35FGYjB3ED54jAK/kY4LCKe//pv
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:97 VP8/90000
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=mid:video0
a=fingerprint:sha-256 89:CB:65:3D:23:38:BF:23:F1:D7:58:FC:0C:3B:14:FF:8A:F5:08:C0:50:56:1C:53:2C:10:96:33:49:9C:76:76
m=audio 9 UDP/TLS/RTP/SAVPF 96
c=IN IP4 0.0.0.0
a=setup:actpass
a=ice-ufrag:CD40Yis0r6HFzinOAcsU6B4MVMj4tmGB
a=ice-pwd:Olvo42cRw21hoGxVfjxKA26JCn5MMQe8
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 OPUS/48000/2
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=mid:audio1
a=fingerprint:sha-256 89:CB:65:3D:23:38:BF:23:F1:D7:58:FC:0C:3B:14:FF:8A:F5:08:C0:50:56:1C:53:2C:10:96:33:49:9C:76:76


** (python:15882): WARNING **: 00:00:42.698: (gstdtlsconnection.c:526):gst_dtls_connection_process: runtime check failed: (!priv->bio_buffer)

** (python:15882): WARNING **: 00:00:42.796: (gstdtlsconnection.c:526):gst_dtls_connection_process: runtime check failed: (!priv->bio_buffer)
Received answer:
v=0
o=- 5083558707956874919 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS 7xGKkNmER2WbqKg7BXGu2QqgwsESyM1PTfNQ
m=video 45472 UDP/TLS/RTP/SAVPF 97
c=IN IP4 10.0.2.15
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:547260449 1 udp 2122260223 10.0.2.15 45472 typ host generation 0 network-id 1
a=ice-ufrag:UsdR
a=ice-pwd:9qFkfTaQRoK8neXw0ZmUeKvP
a=ice-options:trickle
a=fingerprint:sha-256 FD:6A:07:A1:4A:5C:F2:1B:D9:40:38:84:68:64:E6:A0:2E:FB:CF:5C:98:68:7A:3D:E0:A2:4C:F6:C6:0F:9C:00
a=setup:active
a=mid:video0
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:97 VP8/90000
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=ssrc:1152445112 cname:VL7j9bZj7Dl9YCIS
a=ssrc:1152445112 msid:7xGKkNmER2WbqKg7BXGu2QqgwsESyM1PTfNQ 6f4236c8-d498-4bbd-9631-49ce6b8a4826
a=ssrc:1152445112 mslabel:7xGKkNmER2WbqKg7BXGu2QqgwsESyM1PTfNQ
a=ssrc:1152445112 label:6f4236c8-d498-4bbd-9631-49ce6b8a4826
m=audio 56874 UDP/TLS/RTP/SAVPF 96
c=IN IP4 10.0.2.15
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:547260449 1 udp 2122260223 10.0.2.15 56874 typ host generation 0 network-id 1
a=ice-ufrag:PVkF
a=ice-pwd:cJ/QcFwq7cI2fNbQ7X34QOmH
a=ice-options:trickle
a=fingerprint:sha-256 FD:6A:07:A1:4A:5C:F2:1B:D9:40:38:84:68:64:E6:A0:2E:FB:CF:5C:98:68:7A:3D:E0:A2:4C:F6:C6:0F:9C:00
a=setup:active
a=mid:audio1
a=sendrecv
a=rtcp-mux
a=rtpmap:96 OPUS/48000/2
a=fmtp:96 minptime=10;useinbandfec=1
a=ssrc:2421484089 cname:VL7j9bZj7Dl9YCIS
a=ssrc:2421484089 msid:7xGKkNmER2WbqKg7BXGu2QqgwsESyM1PTfNQ c2fd5046-541b-47f1-9b5c-c98d59d56d58
a=ssrc:2421484089 mslabel:7xGKkNmER2WbqKg7BXGu2QqgwsESyM1PTfNQ
a=ssrc:2421484089 label:c2fd5046-541b-47f1-9b5c-c98d59d56d58

double free or corruption (out)
Aborted (core dumped)

I am looking for ways to genberate some debug info so that I have more clue.

data_channel seems closed

Trying the example for data channel I am getting this error:
** (webrtc-sendrecv:10908): CRITICAL **: gst_webrtc_bin_create_data_channel: assertion 'webrtc->priv->is_closed != TRUE' failed
Could not create data channel, is usrsctp available?

Configuring and making gst_plugins_bad can see usrsctp is present.
config.log

USRSCTP_LIBS='-lusrsctp'
ac_cv_header_usrsctp_h=yes
ac_cv_lib_usrsctp_usrsctp_init=yes

Get and build the gstreamer,gst-plugins-base and gsd-plugins-bad - v1.15.
Where could I have done wrong?

Thank you.

What is this supposed to demo?

  • I see the ball rolling around in the browser.
  • I see my own video feed when I run ./webrtc-sendrecv --peer-id <id given in https://webrtc.nirbheek.in/>.

What I expect to see is (1) a program to stream up your own video/audio device or a test source encoded in webRTC, telling where to stream-to (2) a program to pull down the video/audio webRTC source and render it. But seems like I get one tool, webrtc-sendrecv that does both?

Seems to me that webrtc-sendrecv.c implements the

  1. Handshake (proposed in signalling/Protocol.md)
  2. Starts the video capture from device.
  3. Streams it up to the server? Or maybe locally?
  4. Opens a GUI window and I can see my camera feed, with a bit of latency delay.

I am confused why this is one program, I expect two. Also unclear from reading the readme, so I read through the code. It seems like it implements steps 1-4 in one program.

Video pixelated

Hello.

Camera: A4 TECH USB2.0 PC Camera PK-130MJ

For MediaStreamConstraints:

{
  "video": true,
  "audio": true
}

No Problem

For MediaStreamConstraints:

{
  "video": {
    "width":      { "exact": 1280 },
    "height":     { "exact": 800 }
  },
  "audio": true
}

After 1 minute

image

webrtc-sendrecv.py TypeError : 'Structure' object is not subscriptable

I am able to successfully test out the stream from C version, but not the python version. I have modified this docker file to setup gstreamer 1.14.2.

root@bcc8369cc4db:/gstwebrtc-demos# python3 sendrecv/gst/webrtc-sendrecv.py 7729
Traceback (most recent call last):

File "sendrecv/gst/webrtc-sendrecv.py", line 53, in on_offer_created

offer = reply['offer']

TypeError: 'Structure' object is not subscriptable

Thanks.

Record gstreamwr

How can i Change the pipeline to Record the áudio? I'm trying without success

audio error in sendrecv example

** (webrtc-sendrecv:6515): CRITICAL **: file gstaudioringbuffer.c: line 2044 (gst_audio_ring_buffer_set_channel_positions): should not be reached

I got this error recently and received no audio from web, video is ok.

why does this happen?

Namespace GstWebRTC is not available

Hey! I've been trying to run your examples for a while and for some reason, regardless of what configuration I build Gstreamer in I keep getting the error:
ValueError: Namespace GstWebRTC not available
I'm on Ubuntu 18.04, and have tried installing with both the 1.14 branch of gst-build and the master branch, but neither seems to work in this regard. Should I be installing gst-python, or relying on the regular introspection? Does introspection have to be disabled while building?

Thanks!

changing video size?

when receiving a video the video goes from 800x600 to 640x480 to 320x240. ive only tried the demo, not sure what the problem is

Datachannels

Hi,

are there any plans for Datachannel support?

Peter

Streaming to rtmp

I'm not so experienced. how can i modify python example to stream webcam caprured from browser to RTMP?

Thanks
S

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.