deepch / RTSPtoWebRTC

RTSP to WebRTC use Pion WebRTC
MIT License
1.55k stars 413 forks source link

No Video On Stream #142

Open Coimbra1984 opened 2 years ago

Coimbra1984 commented 2 years ago

Hi,

I try to convert a H264 stream to webRTC. I can view the rtsp stream on VLC media player, that means the camera and the stream work. But when I run RTSPtoWebRTC I get the following error: 2022/01/12 17:29:17 Stream Try Connect H264_AAC 2022/01/12 17:29:17 Server Start Awaiting Signal 2022/01/12 17:29:37 Stream Exit No Video On Stream

When I enable the debug logs, I get this: 2022/01/12 17:29:17 [OPTIONS rtsp://192.168.1.5:554/MediaInput/h264 RTSP/1.0 CSeq: 1 User-Agent: Lavf58.20.100

] 2022/01/12 17:29:17 [RTSP/1.0 200 OK CSeq: 1 Connection: Keep-Alive Date: Wed, 12 Jan 2022 16:38:56 GMT Public: OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, GET_PARAMETER, TEARDOWN, SET_PARAMETER

] 2022/01/12 17:29:17 [DESCRIBE rtsp://192.168.1.5:554/MediaInput/h264 RTSP/1.0 CSeq: 2 Accept: application/sdp User-Agent: Lavf58.20.100

] 2022/01/12 17:29:17 [RTSP/1.0 200 OK CSeq: 2 Connection: Keep-Alive Date: Wed, 12 Jan 2022 16:38:56 GMT Content-Base: rtsp://192.168.1.5/MediaInput/h264/ Content-Type: application/sdp Content-Length: 510

v=0 o=- 1 1 IN IP4 192.168.1.5 s=Media Presentation e=NONE c=IN IP4 0.0.0.0 b=AS:12288 t=0 0 a=control:* a=range:npt=now- m=video 0 RTP/AVP 98 b=AS:12288 a=framerate:30.0 a=control:trackID=1 a=rtpmap:98 H264/90000 a=fmtp:98 packetization-mode=1; profile-level-id=640028; sprop-parameter-sets=J2QAKK2UKQQYIOCDAgQfShSCDBBwYYG7UOggwQcEGBAg+hAEEFGCzgavpSRGI4Q8IfCH4Q/gg/AgfB9//0ImycR4U+EPwh/BB+BA+D7//0gHgCJ+WagQEBIAAAMAyAAALuHAAAAKQQAAAwAdzWVd5cYAAAMAUggAAAMA7msq7y4PCIRq,KO4xEhE= a=h264-esid:201 ] 2022/01/12 17:29:17 [SETUP rtsp://192.168.1.5/MediaInput/h264/trackID=1 RTSP/1.0 CSeq: 3 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 User-Agent: Lavf58.20.100

] 2022/01/12 17:29:17 [RTSP/1.0 200 OK CSeq: 3 Connection: Keep-Alive Date: Wed, 12 Jan 2022 16:38:57 GMT Session: 1911503127901625495373838868015;timeout=120 Transport: RTP/AVP/TCP;unicast;interleaved=20-21;server_port=59104-59105;ssrc=c9878f79

] 2022/01/12 17:29:17 [PLAY rtsp://192.168.1.5/MediaInput/h264/ RTSP/1.0 CSeq: 4 User-Agent: Lavf58.20.100 Session: 1911503127901625495373838868015

] 2022/01/12 17:29:17 [RTSP/1.0 200 OK CSeq: 4 Connection: Keep-Alive Date: Wed, 12 Jan 2022 16:38:57 GMT Session: 1911503127901625495373838868015 Range: clock=20220112T163857Z- RTP-Info: url=trackID=1;seq=40655;rtptime=1551471800

] 2022/01/12 17:29:37 [TEARDOWN rtsp://192.168.1.5/MediaInput/h264/ RTSP/1.0 CSeq: 5 User-Agent: Lavf58.20.100 Session: 1911503127901625495373838868015

] 2022/01/12 17:29:37 [RTSP Client RTP Read Header read tcp 172.18.159.145:47598->192.168.1.5:554: use of closed network connection] 2022/01/12 17:29:37 [RTSP Client Close ]

Can you help please?

deepch commented 2 years ago

try now

YasharSL commented 2 years ago

I have the same problem. I try to stream my webcam video with these parameters

sudo ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 -f rtsp -rtsp_transport tcp rtsp://localhost:8554/mystream
Big-Snowman commented 9 months ago

I have the same problem.