Git Product home page Git Product logo

gstreamer-webrtc's Introduction

rtc-streamer

webrtc streamer based on gstreamer

to use gstreamer webrtc plugin, you need install gstreamer>=1.14.2

gstreamer webrtc plugin does not support audio/video bundle yet.

features

  • support mediafile to webrtc
  • support rtmp stream to webrtc
  • support rtsp stream to webrtc
  • support webrtc to mediafile(mkv for now)
  • support webrtc to rtmp stream
  • support webrtc to rtsp stream

gstreamer-webrtc's People

Contributors

notedit 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

Watchers

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

gstreamer-webrtc's Issues

fingerprint is null

I installed gstreamer 1.14.4.when open test.html, I received the error.
this is received remote sdp:
v=0
o=- 5964978430099094417 0 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-options:trickle
a=msid-semantic:WMS webrtcbin1
m=audio 9 UDP/TLS/RTP/SAVPF 100
c=IN IP4 0.0.0.0
a=setup:actpass
a=ice-ufrag:+KgsA73MAsZ47AuOSNyvBTnXHmtjzN2z
a=ice-pwd:Erz7UeJqKkr0ZWqPxnS0DVAOe4Ni6ls8
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:100 OPUS/48000/2
a=rtcp-fb:100 nack pli
a=fmtp:100 sprop-maxcapturerate=48000;sprop-stereo=0
a=ssrc:188064153 msid:user4228366586@host-63a3f01 webrtctransceiver2
a=ssrc:188064153 cname:user4228366586@host-63a3f01
a=mid:audio0
a=fingerprint:sha-256 (null)
m=video 9 UDP/TLS/RTP/SAVPF 97
c=IN IP4 0.0.0.0
a=setup:actpass
a=ice-ufrag:m4ToU3UfP1FpRJYSlus8CF7taHDgvsMW
a=ice-pwd:DYPaB8tEZN6kt2wtCq7QaxoNY3ph4sno
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:97 VP8/90000
a=rtcp-fb:97 nack pli
a=framerate:30
a=ssrc:3231859295 msid:user4228366586@host-63a3f01 webrtctransceiver3
a=ssrc:3231859295 cname:user4228366586@host-63a3f01
a=mid:video1
a=fingerprint:sha-256 (null)

server.py log:
** (:91129): WARNING **: 23:02:57.182: tried to set connection-id after disabling DTLS

** (:91129): WARNING **: 23:02:57.182: tried to set connection-id after disabling DTLS

** (:91129): WARNING **: 23:02:57.182: tried to set connection-id after disabling DTLS

** (:91129): WARNING **: 23:02:57.182: tried to set connection-id after disabling DTLS

** (:91129): WARNING **: 23:02:57.183: (transportsendbin.c:387):tsb_setup_ctx: code should not be reached

** (:91129): CRITICAL **: 23:02:57.183: gst_dtls_srtp_enc_request_new_pad: assertion 'self->srtp_enc' failed

** (:91129): CRITICAL **: 23:02:57.183: gst_dtls_srtp_enc_request_new_pad: assertion 'self->srtp_enc' failed

** (:91129): WARNING **: 23:02:57.183: (transportsendbin.c:419):transport_send_bin_constructed: code should not be reached

(:91129): GStreamer-CRITICAL **: 23:02:57.183: gst_ghost_pad_new: assertion 'GST_IS_PAD (target)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.183: gst_element_add_pad: assertion 'GST_IS_PAD (pad)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.183: gst_object_unref: assertion 'object != NULL' failed

** (:91129): WARNING **: 23:02:57.183: (transportsendbin.c:387):tsb_setup_ctx: code should not be reached

** (:91129): CRITICAL **: 23:02:57.184: gst_dtls_srtp_enc_request_new_pad: assertion 'self->srtp_enc' failed

** (:91129): WARNING **: 23:02:57.184: (transportsendbin.c:434):transport_send_bin_constructed: code should not be reached

** (:91129): WARNING **: 23:02:57.184: (transportreceivebin.c:271):transport_receive_bin_constructed: code should not be reached

** (:91129): WARNING **: 23:02:57.184: (transportreceivebin.c:291):transport_receive_bin_constructed: code should not be reached

** (:91129): WARNING **: 23:02:57.184: (transportreceivebin.c:304):transport_receive_bin_constructed: code should not be reached

** (:91129): WARNING **: 23:02:57.184: (transportreceivebin.c:307):transport_receive_bin_constructed: code should not be reached

** (:91129): WARNING **: 23:02:57.184: (transportreceivebin.c:329):transport_receive_bin_constructed: code should not be reached

** (:91129): WARNING **: 23:02:57.184: (transportreceivebin.c:332):transport_receive_bin_constructed: code should not be reached

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_pad_get_peer: assertion 'GST_IS_PAD (pad)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_object_ref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_pad_add_probe: assertion 'GST_IS_PAD (pad)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_object_unref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_object_unref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_pad_get_peer: assertion 'GST_IS_PAD (pad)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_object_ref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_pad_add_probe: assertion 'GST_IS_PAD (pad)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_object_unref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_object_unref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_object_ref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_pad_add_probe: assertion 'GST_IS_PAD (pad)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_object_unref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_pad_get_peer: assertion 'GST_IS_PAD (pad)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_object_ref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.185: gst_pad_add_probe: assertion 'GST_IS_PAD (pad)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.186: gst_object_unref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.186: gst_object_unref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.186: gst_object_ref: assertion 'object != NULL' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.186: gst_pad_add_probe: assertion 'GST_IS_PAD (pad)' failed

(:91129): GStreamer-CRITICAL **: 23:02:57.186: gst_object_unref: assertion 'object != NULL' failed

** (:91129): CRITICAL **: 23:02:57.186: _generate_fingerprint_from_certificate: assertion 'certificate != NULL' failed

Can you help me solve it?
Thank you!

Example for send only

Hi

Could you be so nice and create a send only example from Test source,
Server > Browser without incoming streams from browser side?

I have tried but video is not playing on browser so a short example would be great.

Thanks

No video_pad and audio_pad on rtsp source

Hi @notedit , thank for your work, your code helps people who are new to streaming like me a big step forward.
With source as TestSource, FileSource; your code works perfectly, however with the source being rtsp, the code has a bug as below:

Code:

url = "rtsp://admin:[email protected]/cam/realmonitor?channel=1&subtype=0"
source  = RTSPSource(url)

# url = "9-7-2023-23-06_1.mp4"
# source = FileSource(url)

pc.add_stream(source)

Bug:

<GstWebRTC.WebRTCSessionDescription object at 0x7f1bb7445b88 (GstWebRTCSessionDescription at 0x7f1ba80076f0)>
v=0
o=- 185096500726403420 0 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-options:trickle
a=msid-semantic:WMS webrtcbin0

<GstWebRTC.WebRTCSessionDescription object at 0x7f1bb7445ca8 (GstWebRTCSessionDescription at 0x7f1ba800beb0)>
v=0
o=- 200726801577984056 0 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-options:trickle
a=msid-semantic:WMS webrtcbin0

Error: gst-stream-error-quark: Internal data stream error. (1): gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:webrtc/webrtc+source+RTSPSource:webrtc+source+rtspsource0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0:
streaming stopped, reason not-linked (-1)

I see you already have parsebin.connect('pad-added', self._new_parsed_pad) but it doesn't seem to work. Please help me check this issue

Running gstreamer-webrtc between two machines?

This is not necessarily an issue, but a request/question. I'm very interested in learning how to expand this example code to work across two machines. I apologize for my ignorance since I'm new to websockets and webrtc, but what do I need to do to have the video captured on one machine (say from v4l2src) and displayed on another starting from your code?

Thanks for any help and thanks for making your well written code available for others.

Question about the project

Hi @notedit,

My understanding is that you are the author of this project. Thanks for helping me to get the GStreamer WebRTC demo running using Python.

Looking at your repos I find that you have essentially have WebRTC work that is of interest to me. Some of it is actually what I am interested to do - a python based WebRC gateway etc.

So I am now keen to get a bit of understanding of what you are doing with WebRTC and if we have alignment in our project objective.

Regards,

Mohammad

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.