Giter Club home page Giter Club logo

media-server-go-demo's Introduction

media-server-go-demo

media server go demo for https://github.com/notedit/media-server-go

Build

Ubuntu 18.04.2 LTS

mkdir wk_webrtc && cd wk_webrtc
git clone --recurse-submodules https://github.com/notedit/media-server-go.git
git clone https://github.com/notedit/media-server-go-demo.git


# build media-server-go
cd ../media-server-go && make && go build 

# build media-server-go-demo
cd ../media-server-go-demo

# broadcast 
go build 

# recording
go build 

# rtmp-to-webrtc 
sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-libav gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-dev 

go build

# rtp-streamer
the same with rtmp-to-webrtc 

# server-to-server 
go build 

# sfu
go build 

# video-mixer
go build 

# webrtc-to-hls
go build

# webrtc-to-rtmp
go build 

Examples

media-server-go-demo's People

Contributors

feixiao avatar 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  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

media-server-go-demo's Issues

RTMPS support ?

Hello,
Thanks for your work!
Is it planned to support RTMPS protocol ?
We would like to stream from WebRTC to a RTMPS URL.
Regards,

Install media-server-go

Ubuntu 16.04
After a successful install of media-server-go-native:
root@rtc:~/wk_webrtc/media-server-go# go build

github.com/notedit/media-server-go/wrapper

In file included from ../include/media-server/include/rtp.h:17:0,
from mediaserver_wrap.cxx:356:
../include/media-server/include/rtp/RTPPacket.h:24:20: fatal error: optional: No such file or directory
#include
^
compilation terminated.

panic: create pipeline error

0x7f261884b740][1587970433.143][LOG]>RTPTransport::Init()
[0x7f261884b740][1587970433.143][LOG]-RTPTransport::Init() | Got ports [46922,46923]
[0x7f261884b740][1587970433.143][LOG]<RTPTransport::Init()
panic: create pipeline error

goroutine 34 [running]:
github.com/notedit/media-server-go-demo/rtmp-to-webrtc/rtmpstreamer.(*RtmpStreamer).WriteHeader(0xc0001a2d80, 0xc00027ccb0, 0x1, 0x1, 0x0, 0x0)

编译media-server-go 报错

taodf@techdev ~/go/src/wk_webrtc/media-server-go $ go build

github.com/notedit/media-server-go/wrapper

/usr/bin/ld: cannot find -lmediaserver
collect2: error: ld returned 1 exit status

Can not play the stream on the web page

I setup the sample to the Google Cloud VPS running CentOS. I changed a bit in your code to enable the https using autotls with Let's Encrypt and a free subdomain. Then I added the ICE servers to the page

iceServers: [
    {urls: "stun:stun.1.google.com:19302"},
    {urls: "turn:numb.viagenie.ca", credential: "muazkh", username: "[email protected]"}
]

Then I use another server to push the rtmp stream using ffmpeg

ffmpeg -i bbb_sunflower_1080p_30fps_normal.mp4 -vcodec libx264 -preset ultrafast -acodec libfdk_aac -ar 44100 -b:a 128k -b:v 512k -s 640x480 -profile:v baseline -level 3.0 -maxrate 1000k -bufsize 64k -f flv rtmp://<myhost>:1935/live/test

I get his warning with rtmp stream

(rtmp-to-webrtc:7717): GStreamer-WARNING **: 08:27:04.697: gstpad.c:5079:store_sticky_event:<avdec_aac0:src> Sticky event misordering, got 'segment' before 'caps'

I open the web page and nothing is displayed
Here is the full log

[0x7fb4f07f7880][1562056148.054][LOG]>DTLSConnection::Initialize()
[0x7fb4f07f7880][1562056148.055][LOG]>DTLSConnection::GenerateCertificate()
[0x7fb4f07f7880][1562056148.064][LOG]<DTLSConnection::GenerateCertificate()
[0x7fb4f07f7880][1562056148.064][LOG]<DTLSConnection::Initialize(5)
[0x7fb4f07f7880][1562056148.077][LOG]>RTPBundleTransport::Init()
[0x7fb4f07f7880][1562056148.077][LOG]-RTPBundleTransport::Init() | Got port [39834]
[0x7fb4f07f7880][1562056148.077][LOG]<RTPBundleTransport::Init()
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /channel                  --> main.channel (3 handlers)
[GIN-debug] GET    /                         --> main.index (3 handlers)
[0x7fb4e1ffb700][1562056154.989][LOG]>RTPTransport::Init()
[0x7fb4e1ffb700][1562056154.989][LOG]-RTPTransport::Init() | Got ports [48124,48125]
[0x7fb4e1ffb700][1562056154.989][LOG]<RTPTransport::Init()
[0x7fb4e1ffb700][1562056154.999][LOG]>RTPTransport::Init()
[0x7fb4e1ffb700][1562056154.999][LOG]-RTPTransport::Init() | Got ports [56935,56936]
[0x7fb4e1ffb700][1562056154.999][LOG]<RTPTransport::Init()
[0x7fb4db7fe700][1562056155.005][LOG]-RTPTransport::ReadRTP() | NAT: received packet from new source [127.0.0.1:40736]
[0x7fb4db7fe700][1562056155.005][LOG]-RTPSession::onRemotePeer(Video) [127.0.0.1:40736]
[0x7fb4db7fe700][1562056155.006][LOG]-RTPSession::onRTPPacket(Video) | New SSRC [new:2682374516,old:0]
[0x7fb4db7fe700][1562056155.006][LOG]-RemoteRateEstimator adding stream [ssrc:2682374516]

(rtmp-to-webrtc:7775): GStreamer-WARNING **: 08:29:15.018: gstpad.c:5079:store_sticky_event:<avdec_aac0:src> Sticky event misordering, got 'segment' before 'caps'

(rtmp-to-webrtc:7775): GStreamer-WARNING **: 08:29:15.018: gstpad.c:5079:store_sticky_event:<'':decodepad0> Sticky event misordering, got 'segment' before 'caps'

(rtmp-to-webrtc:7775): GStreamer-WARNING **: 08:29:15.020: gstpad.c:5079:store_sticky_event:<src_0:proxypad1> Sticky event misordering, got 'segment' before 'caps'
[0x7fb4cb7fe700][1562056155.025][LOG]-RTPTransport::ReadRTP() | NAT: received packet from new source [127.0.0.1:47664]
[0x7fb4cb7fe700][1562056155.025][LOG]-RTPSession::onRemotePeer(Audio) [127.0.0.1:47664]
[0x7fb4cb7fe700][1562056155.025][LOG]-RTPSession::onRTPPacket(Audio) | New SSRC [new:24309093,old:0]
[0x7fb4cb7fe700][1562056155.025][LOG]-RemoteRateEstimator adding stream [ssrc:24309093]
helloworld
[GIN] 2019/07/02 - 08:29:31 | 200 |     561.978µs |    101.99.40.46 | GET      /
[0x7fb4e0ff9700][1562056171.333][LOG]-RTPBundleTransport::AddICETransport [52fdfc072182654f:3Ku3]
[0x7fb4e0ff9700][1562056171.333][LOG]-RemoteRateEstimator adding stream [ssrc:0]
[0x7fb4e0ff9700][1562056171.333][LOG]-DTLSConnection::SetSRTPProtectionProfiles() [profiles:'']
[0x7fb4e0ff9700][1562056171.333][LOG]-DTLSICETransport::SetLocalSTUNCredentials() | [frag:52fdfc072182654f,pwd:163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649]
[0x7fb4e0ff9700][1562056171.333][LOG]-DTLSICETransport::SetRemoteSTUNCredentials() |  [frag:3Ku3,pwd:ZIWiDuPA022uEiIgXX/r9b76]
[0x7fb4e0ff9700][1562056171.333][LOG]-DTLSICETransport::SetRemoteCryptoDTLS | [setup:actpass,hash:sha-256,fingerprint:D8:7B:10:BF:9F:99:2D:9D:23:22:A8:70:73:B9:4E:D7:E8:AB:66:C1:2E:86:6B:E1:BE:D2:8F:E9:00:DD:0A:8A]
[0x7fb4e0ff9700][1562056171.333][LOG]-DTLSConnection::SetRemoteSetup() | [remote:2]
[0x7fb4e0ff9700][1562056171.333][LOG]>DTLSConnection::Init()
[0x7fb4e0ff9700][1562056171.333][LOG]<DTLSConnection::Init()
[0x7fb4e0ff9700][1562056171.334][LOG]-DTLSICETransport::AddOutgoingSourceGroup() [group:0x7fb4a0017ba0,ssrc:1000000001,fec:0,rtx:0]
[0x7fb4e0ff9700][1562056171.334][LOG]-DTLSICETransport::AddOutgoingSourceGroup() [group:0x7fb4a0018af0,ssrc:1000000002,fec:0,rtx:0]
[0x7fb4e2ffd700][1562056173.559][LOG]-DTLSConnection::onSSLInfo() | DTLS handshake done
[0x7fb4e2ffd700][1562056173.559][LOG]-DTLSICETransport::onDTLSSetup() [suite:1]
[0x7fb4e2ffd700][1562056173.559][LOG]-DTLSICETransport::SetLocalCryptoSDES() | [suite:AES_CM_128_HMAC_SHA1_80]
[0x7fb4e2ffd700][1562056173.559][LOG]-SRTPSession::AddStream() | [ssrc:1000000001,OK]
[0x7fb4e2ffd700][1562056173.559][LOG]-SRTPSession::AddStream() | [ssrc:1000000002,OK]
[0x7fb4e2ffd700][1562056173.559][LOG]-DTLSICETransport::SetRemoteCryptoSDES() | [suite:AES_CM_128_HMAC_SHA1_80]
OnDTLSStateChange 2

No video

No video on rtmp webrtc. I dont know what im doing wrong.

Bitrate Change

Can we change the bitrate and resolution so it can be a basis for adaptive bitrate streaming at the expense of latency

broadcast `go build` fails

hello there,

I am trying to reproduce the steps from the demo but when I run go build from broadcast I get this error

root@media-server-go:~/wk_webrtc/media-server-go-demo/broadcast# go build
go: downloading github.com/sanity-io/litter v1.1.0
go: downloading github.com/joho/godotenv v1.3.0
go: downloading github.com/gin-gonic/gin v1.3.0
go: downloading github.com/gorilla/websocket v1.4.0
go: extracting github.com/sanity-io/litter v1.1.0
go: extracting github.com/joho/godotenv v1.3.0
go: extracting github.com/gorilla/websocket v1.4.0
go: extracting github.com/gin-gonic/gin v1.3.0
go: downloading github.com/mattn/go-isatty v0.0.4
go: downloading github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading gopkg.in/go-playground/validator.v8 v8.18.2
go: downloading github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2
go: downloading github.com/golang/protobuf v1.2.0
go: extracting github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7
go: extracting github.com/mattn/go-isatty v0.0.4
go: extracting github.com/golang/protobuf v1.2.0
go: extracting github.com/ugorji/go/codec v0.0.0-20181209151446-772ced7fd4c2
go: extracting gopkg.in/yaml.v2 v2.2.2
go: extracting gopkg.in/go-playground/validator.v8 v8.18.2
# github.com/notedit/media-server-go/wrapper
In file included from mediaserver_wrap.cxx:358:0:
../include/media-server/include/rtpsession.h:10:10: fatal error: srtp2/srtp.h: No such file or directory
 #include <srtp2/srtp.h>
          ^~~~~~~~~~~~~~
compilation terminated.

Also I can not build the rest of the packages. (I am getting various errors) is this behaviour expected? should I open a ticket for every error?

Not display stream

I was try demo"broadcast" , "webrtc-to-rtmp" , "rtmp-to-webrtc" everything build+start ok, but not working

  • broadcast: watch/{streamid}
  • rtmp-to-webrtc: Push stream to rtmp working (video/audio) but not display in html
  • webrtc-to-rtmp: [0x7f0626ffd700][1561505849.605][DBG]-DTLSICETransport::Send() | We don't have an DTLS setup yet

Demo Mac OS install gstreamer

https://github.com/notedit/media-server-go-demo
只有 Linux 的。 Mac 上需要加上
brew install gstreamer
brew search gst
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-ffmpeg
刚学习,自己装了这些后 demo 跑起来了,不知道后期还需要什么,暂时先提一个 issues ,省的后面同学用 Mac 学习再去查资料

send raw-rtp-input use rtp

Is it possible to send rtp to sample raw-rtp-input using ffmpeg

ffmpeg -f lavfi -i testsrc=size=640x480:rate=30 -vcodec libx264 -f rtp rtp://127.0.0.1:5004

I think can change this

pipelineStr := "videotestsrc is-live=true ! video/x-raw,format=I420,framerate=15/1 ! x264enc aud=false bframes=0 speed-preset=veryfast key-int-max=15 ! video/x-h264,stream-format=byte-stream,profile=baseline ! h264parse ! rtph264pay config-interval=-1 pt=%d ! appsink name=appsink"

pipelineStr := "udpsrc port=5004 ! application/x-rtp, payload=96, encoding-name=H264"

but it can't be use.

BEWARE OF MISSING PLUGINS! webrtc-to-hls files not being created.

I followed the readme files line for line and found that it worked perfectly when running locally, but when running on server the hls files were not being created. If you have a similar issue, check your gstreamer plugins list using this command: gst-inspect-1.0 . If you do not see this plugin 'multifile: multifilesink: Multi-File Sink' then that is your problem. Install gstreamer using the official docs https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c

rtmp-to-webrtc demo run fail

Hi, I try to run rtmp-to-webrtc demo, but there is no video show on my web.
The modification I make as follow:

  1. index.html => socket = new WebSocket('ws://x.x.x.x:8000/channel');
  2. rtmp-to-webrtc/server.go => var endpoint = mediaserver.NewEndpoint("x.x.x.x")
    note: x.x.x.x is my server public IP
    Then I build rtmp-to-webrtc and deploy it to the server above mentioned, of course, I copy index.html to server too.

My test steps as follow:

  1. push stream to rtmp://x.x.x.x:1935 with OBS tool
  2. Input http://x.x.x.x:8000 in my chrome, it just show "MediaServer Demo", but no video

These are logs output by rtmp-to-webrtc:
[0x7fa8203dc740][1578484123.799][LOG]>RTPTransport::Init() [0x7fa8203dc740][1578484123.799][LOG]-RTPTransport::Init() | Got ports [55746,55747] [0x7fa8203dc740][1578484123.799][LOG]<RTPTransport::Init() [0x7fa8203dc740][1578484123.801][LOG]>RTPTransport::Init() [0x7fa8203dc740][1578484123.801][LOG]-RTPTransport::Init() | Got ports [47867,47868] [0x7fa8203dc740][1578484123.801][LOG]<RTPTransport::Init() helloworld [GIN] 2020/01/08 - 19:48:51 | 200 | 192.581µs | 42.120.72.102 | GET / OnDTLSStateChange 3 error: websocket: close 1001 (going away) [GIN] 2020/01/08 - 19:48:52 | 200 | 4m40.874353921s | 42.120.72.102 | GET /channel [GIN] 2020/01/08 - 19:48:55 | 404 | 559ns | 42.120.72.102 | GET /favicon.ico [0x7fa81b0c8700][1578484135.210][LOG]-RTPBundleTransport::AddICETransport [5fb90badb37c5821:9nnL] [0x7fa81b0c8700][1578484135.210][LOG]-RemoteRateEstimator adding stream [ssrc:0] [0x7fa81b0c8700][1578484135.211][LOG]-DTLSConnection::SetSRTPProtectionProfiles() [profiles:''] [0x7fa81b0c8700][1578484135.211][LOG]-DTLSICETransport::SetLocalSTUNCredentials() | [frag:5fb90badb37c5821,pwd:b6d95526a41a9504680b4e7c8b763a1b1d49d4955c848621] [0x7fa81b0c8700][1578484135.211][LOG]-DTLSICETransport::SetRemoteSTUNCredentials() | [frag:9nnL,pwd:wHfc1eTFD9IGjJrC2L0cIuwF] [0x7fa81b0c8700][1578484135.211][LOG]-DTLSICETransport::SetRemoteCryptoDTLS | [setup:actpass,hash:sha-256,fingerprint:5E:D3:A3:2A:DC:06:49:E8:DE:F2:2C:C9:B8:18:72:14:3C:D0:E1:F1:05:3B:E5:CC:C8:07:AD:80:50:82:13:7D] [0x7fa81b0c8700][1578484135.211][LOG]-DTLSConnection::SetRemoteSetup() | [remote:2] [0x7fa81b0c8700][1578484135.211][LOG]>DTLSConnection::Init() [0x7fa81b0c8700][1578484135.211][LOG]<DTLSConnection::Init() [0x7fa81b0c8700][1578484135.211][LOG]-DTLSICETransport::AddOutgoingSourceGroup() [group:0x7fa8044ab4c0,ssrc:1000000007,fec:0,rtx:0] [0x7fa81b0c8700][1578484135.211][LOG]-DTLSICETransport::AddOutgoingSourceGroup() [group:0x7fa8043e7cc0,ssrc:1000000008,fec:0,rtx:0] [0x7fa8198c5700][1578484135.325][LOG]-DTLSConnection::onSSLInfo() | DTLS handshake done [0x7fa8198c5700][1578484135.325][LOG]-DTLSICETransport::onDTLSSetup() [suite:1] [0x7fa8198c5700][1578484135.325][LOG]-DTLSICETransport::SetLocalCryptoSDES() | [suite:AES_CM_128_HMAC_SHA1_80] [0x7fa8198c5700][1578484135.325][LOG]-SRTPSession::AddStream() | [ssrc:1000000007,OK] [0x7fa8198c5700][1578484135.325][LOG]-SRTPSession::AddStream() | [ssrc:1000000008,OK] [0x7fa8198c5700][1578484135.325][LOG]-DTLSICETransport::SetRemoteCryptoSDES() | [suite:AES_CM_128_HMAC_SHA1_80] OnDTLSStateChange 2

I have no idea what is wrong , any suggestions would be greatly appreciated!

../include/media-server/include/rtpsession.h:10:10: fatal error: srtp2/srtp.h: No such file or directory #include <srtp2/srtp.h>

I followed the instructions but got an error
during **cd ../media-server-go && go build **

root@serverthing:~/wk_webrtc/media-server-go# go build
go: downloading github.com/gofrs/uuid v3.1.0+incompatible
go: downloading github.com/notedit/sdp v0.0.0-20190418080450-702b42591eb2
go: extracting github.com/gofrs/uuid v3.1.0+incompatible
go: extracting github.com/notedit/sdp v0.0.0-20190418080450-702b42591eb2
go: downloading github.com/Jeffail/gabs v1.1.1
go: extracting github.com/Jeffail/gabs v1.1.1
go: finding github.com/gofrs/uuid v3.1.0+incompatible
go: finding github.com/notedit/sdp v0.0.0-20190418080450-702b42591eb2
go: finding github.com/Jeffail/gabs v1.1.1
# github.com/notedit/media-server-go/wrapper
In file included from mediaserver_wrap.cxx:358:0:
../include/media-server/include/rtpsession.h:10:10: fatal error: srtp2/srtp.h: No such file or directory
 #include <srtp2/srtp.h>
          ^~~~~~~~~~~~~~
compilation terminated.

webrtc-to-rtmp Error: Internal data stream error.

[GIN] 2019/11/07 - 11:33:25 | 200 |     286.392µs |   220.163.72.24 | GET      /
[0x7f28e49e5740][1573097613.890][LOG]>RTPBundleTransport::Init()
[0x7f28e49e5740][1573097613.890][LOG]-RTPBundleTransport::Init() | Got port [50790]
[0x7f28e49e5740][1573097613.890][LOG]<RTPBundleTransport::Init()
[0x7f28e49e5740][1573097615.166][LOG]-RTPBundleTransport::AddICETransport [52fdfc072182654f:3ccw]
[0x7f28e49e5740][1573097615.166][LOG]-RemoteRateEstimator adding stream [ssrc:0]
[0x7f28e49e5740][1573097615.166][LOG]-DTLSConnection::SetSRTPProtectionProfiles() [profiles:'']
[0x7f28e49e5740][1573097615.166][LOG]-DTLSICETransport::SetLocalSTUNCredentials() | [frag:52fdfc072182654f,pwd:163f5f0f9a621d729566c74d10037c4d7bbb0407d1e2c649]
[0x7f28e49e5740][1573097615.166][LOG]-DTLSICETransport::SetRemoteSTUNCredentials() |  [frag:3ccw,pwd:rNawbTDidWVb0MspTCFV4FkR]
[0x7f28e49e5740][1573097615.166][LOG]-DTLSICETransport::SetRemoteCryptoDTLS | [setup:actpass,hash:sha-256,fingerprint:74:ED:10:85:63:70:D6:1E:8A:EE:A0:A4:01:23:2E:0A:8D:4E:AA:BF:6E:89:3C:91:95:77:20:DE:97:6C:90:4E]
[0x7f28e49e5740][1573097615.166][LOG]-DTLSConnection::SetRemoteSetup() | [remote:2]
[0x7f28e49e5740][1573097615.166][LOG]>DTLSConnection::Init()
[0x7f28e49e5740][1573097615.166][DBG]-DTLSConnection::Init() | we are SETUP_PASSIVE
[0x7f28e49e5740][1573097615.166][DBG]-DTLSConnection::onSSLInfo() | DTLS handshake starts
[0x7f28e49e5740][1573097615.166][LOG]<DTLSConnection::Init()
[0x7f28dd56d700][1573097615.167][DBG]-DTLSICETransport::Start()
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.0.codec:ISAC]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.0.pt:104]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.1.codec:G722]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.1.pt:9]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.10.codec:telephone-event]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.10.pt:112]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.11.codec:telephone-event]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.11.pt:126]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.12.codec:opus]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.12.pt:111]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.2.codec:PCMU]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.2.pt:0]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.3.codec:PCMA]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.3.pt:8]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.4.codec:CN]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.4.pt:106]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.5.codec:telephone-event]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.5.pt:110]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.6.codec:telephone-event]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.6.pt:113]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.7.codec:ISAC]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.7.pt:103]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.8.codec:CN]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.8.pt:105]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.9.codec:CN]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.9.pt:13]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.codecs.length:13]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.ext.0.id:1]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.ext.0.uri:urn:ietf:params:rtp-hdrext:ssrc-audio-level]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.ext.1.id:2]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.ext.1.uri:http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.ext.2.id:3]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.ext.2.uri:http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [audio.ext.length:3]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.0.codec:VP9]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.0.pt:100]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.0.rtx:101]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.1.codec:H264]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.1.pt:125]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.1.rtx:107]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.2.codec:H264]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.2.pt:124]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.2.rtx:120]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.3.codec:H264]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.3.pt:108]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.3.rtx:109]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.4.codec:H264]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.4.pt:123]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.4.rtx:119]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.5.codec:VP8]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.5.pt:96]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.5.rtx:97]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.6.codec:VP9]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.6.pt:98]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.6.rtx:99]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.7.codec:H264]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.7.pt:102]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.7.rtx:122]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.8.codec:H264]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.8.pt:127]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.8.rtx:121]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.codecs.length:9]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.0.id:9]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.0.uri:http://www.webrtc.org/experiments/rtp-hdrext/color-space]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.1.id:13]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.1.uri:urn:3gpp:video-orientation]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.2.id:3]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.2.uri:http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.3.id:5]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.3.uri:http://www.webrtc.org/experiments/rtp-hdrext/playout-delay]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.4.id:6]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.4.uri:http://www.webrtc.org/experiments/rtp-hdrext/video-content-type]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.5.id:7]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.5.uri:http://www.webrtc.org/experiments/rtp-hdrext/video-timing]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.6.id:8]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.6.uri:http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.7.id:14]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.7.uri:urn:ietf:params:rtp-hdrext:toffset]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.8.id:2]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.8.uri:http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time]
[0x7f28e49e5740][1573097615.167][DBG]-DTLSICETransport::SetRemoteProperties | Setting property [video.ext.length:9]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [audio.codecs.0.codec:opus]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [audio.codecs.0.pt:111]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [audio.codecs.length:1]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [audio.ext.length:0]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.0.codec:h264]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.0.pt:102]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.0.rtx:122]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.1.codec:h264]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.1.pt:127]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.1.rtx:121]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.2.codec:h264]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.2.pt:108]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.2.rtx:109]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.3.codec:h264]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.3.pt:123]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.3.rtx:119]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.4.codec:h264]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.4.pt:125]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.4.rtx:107]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.5.codec:h264]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.5.pt:124]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.5.rtx:120]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.codecs.length:6]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.ext.0.id:2]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.ext.0.uri:http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.ext.1.id:13]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.ext.1.uri:urn:3gpp:video-orientation]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.ext.2.id:3]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.ext.2.uri:http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SetLocalProperties | Setting property [video.ext.length:3]
[0x7f28e49e5740][1573097615.168][LOG]-DTLSICETransport::AddIncomingSourceGroup() [mid:'',rid:'',ssrc:629802969,fec:0,rtx:0]
[0x7f28e49e5740][1573097615.168][DBG]-RTPIncomingSourceGroup::Start() | [remb:0]
[0x7f28e49e5740][1573097615.168][LOG]-RemoteRateEstimator adding stream [ssrc:629802969]
[0x7f28e49e5740][1573097615.168][DBG]-RTPIncomingSourceGroup::AddListener() [listener:0x1ae8220]
[0x7f28e49e5740][1573097615.168][LOG]-DTLSICETransport::AddIncomingSourceGroup() [mid:'',rid:'',ssrc:4179991248,fec:0,rtx:3829420196]
[0x7f28e49e5740][1573097615.168][DBG]-RTPIncomingSourceGroup::Start() | [remb:0]
[0x7f28e49e5740][1573097615.168][LOG]-RemoteRateEstimator adding stream [ssrc:4179991248]
[0x7f28e49e5740][1573097615.168][DBG]-RTPIncomingSourceGroup::AddListener() [listener:0x1ae6710]
[0x7f28e49e5740][1573097615.168][LOG]-DTLSICETransport::AddOutgoingSourceGroup() [group:0x1ae4cf0,ssrc:629802969,fec:0,rtx:0]
[0x7f28dd56d700][1573097615.168][DBG]-DTLSICETransport::Send() | We don't have an DTLS setup yet
[0x7f28e49e5740][1573097615.168][LOG]-DTLSICETransport::AddOutgoingSourceGroup() [group:0x1ae6760,ssrc:4179991248,fec:0,rtx:3829420196]
[0x7f28dd56d700][1573097615.168][DBG]-DTLSICETransport::Send() | We don't have an DTLS setup yet
[0x7f28e49e5740][1573097615.168][DBG]-RTPOutgoingSourceGroup::AddListener() [listener:0x1a7f908]
[0x7f28e49e5740][1573097615.168][DBG]-RTPStreamTransponder() | [outgoing:0x1ae4cf0,sender:0x1ad1df0,ssrc:629802969]
[0x7f28e49e5740][1573097615.168][DBG]>RTPStreamTransponder::SetIncoming() | [incoming:0x1ae53b0,receiver:0x1ad1df8,ssrc:629802969]
[0x7f28e49e5740][1573097615.168][DBG]-RTPIncomingSourceGroup::AddListener() [listener:0x1a7f900]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SendPLI() | [ssrc:629802969]
[0x7f28e49e5740][1573097615.168][DBG]<RTPStreamTransponder::SetIncoming() | [incoming:0x1ae53b0,receiver:0x1ad1df8]
[0x7f28e49e5740][1573097615.168][DBG]-RTPOutgoingSourceGroup::AddListener() [listener:0x1ae4168]
[0x7f28e49e5740][1573097615.168][DBG]-RTPStreamTransponder() | [outgoing:0x1ae6760,sender:0x1ad1df0,ssrc:4179991248]
[0x7f28e49e5740][1573097615.168][DBG]>RTPStreamTransponder::SetIncoming() | [incoming:0x1ae9320,receiver:0x1ad1df8,ssrc:4179991248]
[0x7f28e49e5740][1573097615.168][DBG]-RTPIncomingSourceGroup::AddListener() [listener:0x1ae4160]
[0x7f28e49e5740][1573097615.168][DBG]-DTLSICETransport::SendPLI() | [ssrc:4179991248]
[0x7f28dd56d700][1573097615.168][DBG][0x7f28e49e5740][1573097615.168][DBG]<RTPStreamTransponder::SetIncoming() | [incoming:0x1ae9320,receiver:0x1ad1df8]
-DTLSICETransport::Send() | We don't have an DTLS setup yet
[0x7f28dd56d700][1573097615.168][DBG]-DTLSICETransport::Send() | We don't have an DTLS setup yet
[0x7f28e49e5740][1573097615.184][DBG]-RTPIncomingSourceGroup::AddListener() [listener:0x1b78d80]
[0x7f28dd56d700][1573097615.405][DBG]-DTLSICETransport::ActivateRemoteCandidate() | Activating candidate [220.163.72.24:50755,use:0,prio:1853693695,dtls:1]
[0x7f28dd56d700][1573097615.491][LOG]-DTLSConnection::onSSLInfo() | DTLS handshake done
[0x7f28dd56d700][1573097615.491][DBG]-DTLSConnection::SetupSRTP() | fingerprint in remote SDP matches that of peer certificate (hash SHA-256)
[0x7f28dd56d700][1573097615.491][LOG]-DTLSICETransport::onDTLSSetup() [suite:1]
[0x7f28dd56d700][1573097615.491][LOG]-DTLSICETransport::SetLocalCryptoSDES() | [suite:AES_CM_128_HMAC_SHA1_80]
[0x7f28dd56d700][1573097615.491][LOG]-SRTPSession::AddStream() | [ssrc:629802969,OK]
[0x7f28dd56d700][1573097615.491][LOG]-SRTPSession::AddStream() | [ssrc:4179991248,OK]
[0x7f28dd56d700][1573097615.491][LOG]-SRTPSession::AddStream() | [ssrc:3829420196,OK]
[0x7f28dd56d700][1573097615.491][LOG]-DTLSICETransport::SetRemoteCryptoSDES() | [suite:AES_CM_128_HMAC_SHA1_80]
[0x7f28dd56d700][1573097615.491][LOG]-SRTPSession::AddStream() | [ssrc:629802969,OK]
[0x7f28dd56d700][1573097615.491][LOG]-SRTPSession::AddStream() | [ssrc:4179991248,OK]
[0x7f28dd56d700][1573097615.491][LOG]-SRTPSession::AddStream() | [ssrc:3829420196,OK]
OnDTLSStateChange 2
[0x7f28dd56d700][1573097615.556][DBG]-StreamTransponder::onRTP() | Reset stream
[0x7f28dd56d700][1573097615.556][DBG]-RTPDepacketizer::Create() | Creating depacketizer for [media:Audio,codec:OPUS]
[0x7f28dd56d700][1573097615.573][DBG]-StreamTransponder::onRTP() | Reset stream
[0x7f28dd56d700][1573097615.573][DBG]-RTPDepacketizer::Create() | Creating depacketizer for [media:Video,codec:H264]
[0x7f28dd56d700][1573097615.573][DBG]-RTPDepacketizer::Create() | Creating depacketizer for [media:Video,codec:H264]
media frame ===========
media frame ===========
Error: Internal data stream error.

Gst back Error: Internal data stream error.

problem with NAT

I can not get examples working across multiple networks (behind NAT on both ends)

编译错误

media-server-go-native 已经编译过了,再build media-server-go报错
image

Panic runtime error with VP8

Starting to explore the media-server-go examples and got it working nicely with H264. Then I tried to adapt it to use VP8, (perhaps eventually to support both several incoming offered formats) and came across this panic during a buffer conversion.

Code below, note the "continue" on line 151 that skips the OnMediaFrame callback registration. It seems that this code allows one to loopback VP8, but as soon as you may want to register something on frames, likely to feed it to a modified gstreamer pipeline, the OnMediaFrame call fails. The gstreamer/HLS portions of the gist can be removed with the same result.

[0x7f7dacff9700][1585316205.235][LOG]-SRTPSession::AddStream() | [ssrc:91865768,OK]
[0x7f7dacff9700][1585316205.235][LOG]-DTLSICETransport::SetRemoteCryptoSDES() | [suite:AES_CM_128_HMAC_SHA1_80]
[0x7f7dacff9700][1585316205.235][LOG]-SRTPSession::AddStream() | [ssrc:1521937445,OK]
[0x7f7dacff9700][1585316205.235][LOG]-SRTPSession::AddStream() | [ssrc:1450984025,OK]
[0x7f7dacff9700][1585316205.235][LOG]-SRTPSession::AddStream() | [ssrc:91865768,OK]
OnDTLSStateChange 2
panic: runtime error: slice bounds out of range [:1354170525] with capacity 2862

goroutine 17 [running, locked to thread]:
github.com/notedit/media-server-go.annexbConvert(0xc000055800, 0xb32, 0xb32, 0xb32, 0xb32, 0x7f7dc4e5a428, 0x0, 0x8)
        /home/tom/go/src/github.com/notedit/media-server-go/util.go:59 +0x30b
github.com/notedit/media-server-go.(*overwrittenMediaFrameListener).OnMediaFrame(0xc000453280, 0xe11cc0, 0xc0002d0f10)
        /home/tom/go/src/github.com/notedit/media-server-go/mediaframemultiplexer.go:44 +0xe1
github.com/notedit/media-server-go/wrapper.(*_swig_DirectorMediaFrameListener).OnMediaFrame(0xc0004532c0, 0xe11cc0, 0xc0002d0f10)
        /home/tom/go/src/github.com/notedit/media-server-go/wrapper/native.go:5095 +0x77
github.com/notedit/media-server-go/wrapper.Swig_DirectorMediaFrameListener_callback_onMediaFrame_native_4b7afac4175a7297(0x5, 0x7f7d9000fe10)
        /home/tom/go/src/github.com/notedit/media-server-go/wrapper/native.go:5110 +0x7c
github.com/notedit/media-server-go/wrapper._cgoexpwrap_6c6c43463922_Swig_DirectorMediaFrameListener_callback_onMediaFrame_native_4b7afac4175a7297(0x5, 0x7f7d9000fe10)
        _cgo_gotypes.go:6875 +0x35
exit status 2

https://gist.github.com/tomberek/c5dcdb1199e08c33ca2be46d5da08a3f

The OnMediaFrame call seems to work without any problems when using H264.

Sidenote: I've created a Nix expression that handles creating and installing media-server-go-native. With some cleanup and making it more idiomatic, this may be useful for any Nix users.
https://gist.github.com/tomberek/f0b56c0754b55b20e7c881f98ab872b7

webrtc-to-rtmp demo can't work

Hi , I tested the webrtc-to-rtmp demo, but it can't work. Following is my test steps

  1. change the IP set in NewRtmpPusher to my nginx-rtmp server, then go build
  2. run the executable file webrtc-to-rtmp and open the webrtc test web in chrome, I can see myself in local and remote stream.
  3. there is no log of "video frame ==========" or "audio frame ===== " print, and no rtmp stream send to my nginx-rtmp server

I wondering if there is something wrong in my steps, any suggestion is appreciated~

webrtc to rtmp demo error: Required gstreamer plugin faac not found

2021/10/13 13:02:44 [Recovery] 2021/10/13 - 13:02:44 panic recovered:
GET /channel HTTP/1.1
Host: 172.18.108.210:8000
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7
Cache-Control: no-cache
Connection: Upgrade
Origin: null
Pragma: no-cache
Sec-Websocket-Extensions: permessage-deflate; client_max_window_bits
Sec-Websocket-Key: nS06LY5eaASX0YjVfnwbYg==
Sec-Websocket-Version: 13
Upgrade: websocket
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36


Required gstreamer plugin faac not found
/home/Project/test/media-server-go-demo/webrtc-to-rtmp/server.go:115 (0x90df10)
        channel: panic(err)
/home/mfweb/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0x89e8ba)
        (*Context).Next: c.handlers[c.index](c)
/home/mfweb/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:83 (0x89e8a6)
        RecoveryWithWriter.func1: c.Next()
/home/mfweb/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0x89dbc6)
        (*Context).Next: c.handlers[c.index](c)
/home/mfweb/go/pkg/mod/github.com/gin-gonic/[email protected]/logger.go:241 (0x89dba9)
        LoggerWithConfig.func1: c.Next()
/home/mfweb/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 (0x89d104)
        (*Context).Next: c.handlers[c.index](c)
/home/mfweb/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:409 (0x89cd39)
        (*Engine).handleHTTPRequest: c.Next()
/home/mfweb/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:367 (0x89c873)
        (*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/usr/local/go/src/net/http/server.go:2878 (0x6fd5ba)
        serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1929 (0x6f8c67)
        (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_amd64.s:1581 (0x4f8c80)
        goexit: BYTE    $0x90   // NOP

[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 200 with 500
[GIN] 2021/10/13 - 13:02:44 | 500 |  1.156828956s |     172.18.96.1 | GET      "/channel"
[0x7f795c87d700][1634101369.384][DBG]-DTLSICETransport::SendPLI() | [ssrc:4062584100]
[0x7f795d8ff700][1634101369.385][DBG]-DTLSICETransport::Send() | We don't have an DTLS setup yet

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.