Closed mightZhong closed 4 years ago
did not see the gstreamer log
Yes, there is no gstreamer log, I add some debug log and find:
It works fine here.
here is the rtmp push command
ffmpeg -f lavfi -re -i color=black:s=640x480:r=15 -filter:v "drawtext=text='%{localtime\:%T}':fontcolor=white:fontsize=80:x=20:y=20" \
-vcodec libx264 -tune zerolatency -preset ultrafast \
-g 15 -keyint_min 15 -profile:v baseline -level 3.0 -pix_fmt yuv420p -r 15 -f flv "rtmp://localhost/live/live"
It works fine here.
here is the rtmp push command
ffmpeg -f lavfi -re -i color=black:s=640x480:r=15 -filter:v "drawtext=text='%{localtime\:%T}':fontcolor=white:fontsize=80:x=20:y=20" \ -vcodec libx264 -tune zerolatency -preset ultrafast \ -g 15 -keyint_min 15 -profile:v baseline -level 3.0 -pix_fmt yuv420p -r 15 -f flv "rtmp://localhost/live/live"
gst-launch-1.0 videotestsrc is-live=true pattern=black ! video/x-raw, width=640, height=480, framerate=15/1, format=I420 ! clockoverlay time-format="%T" ! x264enc tune=zerolatency speed-preset=ultrafast option-string="keyint=15:min-keyint=15:level=3.0" ! video/x-h264, profile=baseline ! flvmux streamable=true ! rtmpsink location="rtmp://localhost/live/live live=1"
hi @notedit, I test on my Mac and Linux
on Mac, demo can run and I push rtmp stream with OBS tool, but the video received on web is not fluent
on Live, it raise error panic: create pipeline error
when I push stream
you should check your gstreamer elements if you have that error.
It is just a demo, you should polish it if you want to use it in production.
ok, thanks for your response
Hi, I try to run rtmp-to-webrtc demo, but there is no video show on my web. The modification I make as follow:
My test steps as follow:
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!