Ant-Media-Server icon indicating copy to clipboard operation
Ant-Media-Server copied to clipboard

Unable to view RTMP stream when using a USB camera on Rpi with local ant media server setup

Open Harshavardhan034 opened this issue 1 year ago • 1 comments

I have set up a local ant media server (version: 2.6.4) and am trying to stream my USB camera feed using RTMP, however, all I can see is a black screen. I have attached the screenshot with the black screen and the log output as seen on the dashboard. I am kindly requesting assistance in this regard. Thanks, Harshavardhan

Screenshot from 2024-01-12 00-58-18

Logs:


2024-01-11 19:22:52,148 [NioProcessor-5] WARN  o.r.s.net.rtmp.InboundHandshake - Client not compatible
2024-01-11 19:22:52,154 [RTMPConnectionExecutor-3] INFO  i.a.e.webrtc.WebRTCApplication - W3C x-category:session x-event:connect c-ip:192.168.10.100 c-client-id:19
2024-01-11 19:22:52,258 [RTMPConnectionExecutor-3] INFO  i.a.s.AcceptOnlyStreamsWithWebhook - AcceptOnlyStreamsWithWebhook is not activated for stream test2
2024-01-11 19:22:52,258 [RTMPConnectionExecutor-3] INFO  org.red5.server.scope.BasicScope - ClientBroadcastStream already exists: org.red5.server.stream.ClientBroadcastStream@59fc99e8 new: org.red5.server.stream.ClientBroadcastStream@59fc99e8
2024-01-11 19:22:52,258 [RTMPConnectionExecutor-3] INFO  o.r.s.stream.ClientBroadcastStream - Stream start: test2
2024-01-11 19:22:52,259 [RTMPConnectionExecutor-3] INFO  i.a.e.webrtc.WebRTCApplication - W3C x-category:stream x-event:publish c-ip:192.168.10.100 x-sname:5c5131ce-4b2f-4ab3-98a4-d61cf14bffb5 x-name:test2
2024-01-11 19:22:52,259 [RTMPConnectionExecutor-3] INFO  i.a.AntMediaApplicationAdapter -  Status of stream test2 is set to Broadcasting with result: true
2024-01-11 19:22:52,259 [RTMPConnectionExecutor-3] INFO  io.antmedia.muxer.MuxAdaptor - serverSettings exist io.antmedia.settings.ServerSettings@3d9c7c4a
2024-01-11 19:22:52,259 [RTMPConnectionExecutor-3] INFO  io.antmedia.muxer.MuxAdaptor - vertx exist io.vertx.core.impl.VertxImpl@f02a440
2024-01-11 19:22:52,259 [RTMPConnectionExecutor-3] INFO  io.antmedia.muxer.MuxAdaptor - adding HLS Muxer for test2
2024-01-11 19:22:52,260 [RTMPConnectionExecutor-3] INFO  io.antmedia.muxer.HLSMuxer - hls time: 2, hls list size: 5 for stream:test2
2024-01-11 19:22:52,260 [RTMPConnectionExecutor-3] INFO  io.antmedia.muxer.MuxAdaptor - serverSettings exist io.antmedia.settings.ServerSettings@3d9c7c4a
2024-01-11 19:22:52,260 [RTMPConnectionExecutor-3] INFO  io.antmedia.muxer.MuxAdaptor - Number of items in the queue while adaptor is being started to prepare is 0
2024-01-11 19:22:52,260 [vert.x-worker-thread-82] INFO  io.antmedia.muxer.MuxAdaptor - before prepare for test2
2024-01-11 19:22:52,260 [vert.x-worker-thread-82] INFO  io.antmedia.muxer.MuxAdaptor - Number of items in the queue while starting: 0 for stream: test2
2024-01-11 19:22:52,260 [vert.x-eventloop-thread-123] INFO  io.antmedia.muxer.MuxAdaptor - muxadaptor start has finished with true for stream: test2
2024-01-11 19:22:52,321 [RTMPConnectionExecutor-2] INFO  o.red5.server.stream.AbstractStream - metadata read data type -->>>> core map
2024-01-11 19:22:52,321 [RTMPConnectionExecutor-2] INFO  io.antmedia.muxer.MuxAdaptor - first received frame timestamp: 0 for stream:test2 
2024-01-11 19:22:55,270 [vert.x-worker-thread-22] ERROR io.antmedia.muxer.MuxAdaptor - Total max time(3000) is spent to determine video and audio existence for stream:test2. It's skipped waiting
2024-01-11 19:22:55,270 [vert.x-worker-thread-22] INFO  io.antmedia.muxer.MuxAdaptor - Streams for test2 enableVideo:true enableAudio:false total spend time: 3000 elapsed frame timestamp:1900 stop request exists: false
2024-01-11 19:22:55,270 [vert.x-worker-thread-22] INFO  io.antmedia.muxer.MuxAdaptor - Incoming video width: 640 height:480 stream:test2
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  io.antmedia.muxer.HLSMuxer - Adding timebase to the input time base map index:0 value: 1/1000 for stream:test2
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  io.antmedia.muxer.MuxAdaptor - There is no audio in the stream or not received AAC Sequence header for stream:test2 muting the audio
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  io.antmedia.muxer.HLSMuxer - Header is written for stream:test2 and url:/usr/local/antmedia/webapps/WebRTCAppEE/streams/test2.m3u8
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  i.a.e.adaptive.EncoderAdaptor - not decoding video for stream: test2
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  i.a.e.adaptive.EncoderAdaptor - No audio in stream: test2
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  i.a.e.adaptive.StreamAdaptor - Stream adaptor scheduled job id 1355 stream adaptor:699913921 for stream:test2
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  i.a.enterprise.webrtc.WebRTCAdaptor - registering test2 muxer with 480p and codec::H264 to webrtc adaptor
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  i.a.enterprise.webrtc.WebRTCAdaptor - Increasing number of live streams: 1 and stream id:test2
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  i.a.AntMediaApplicationAdapter - start publish leaved for stream:test2
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  i.a.e.webrtc.WebRTCApplication - startPublish for streamId:test2
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] WARN  i.a.e.webrtc.WebRTCApplication - Couldnt connect signalling medium. Medium server can be offline. Couldnt register stream with id test2
2024-01-11 19:22:55,271 [vert.x-worker-thread-22] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:55 speed:0.0 for streamId:test2 
2024-01-11 19:22:55,272 [vert.x-worker-thread-22] WARN  io.antmedia.muxer.HLSMuxer - First key frame received for stream: test2
2024-01-11 19:22:55,272 [vert.x-worker-thread-105] INFO  i.a.AntMediaApplicationAdapter -  Status of stream test2 is set to Broadcasting with result: true
2024-01-11 19:22:57,272 [vert.x-eventloop-thread-123] INFO  i.a.AntMediaApplicationAdapter - Broadcast absolute time is not available for stream:test2
2024-01-11 19:23:00,280 [vert.x-worker-thread-14] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.3841086045118787 for streamId:test2 
2024-01-11 19:23:05,281 [vert.x-worker-thread-69] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.002397841942252 for streamId:test2 
2024-01-11 19:23:10,311 [vert.x-worker-thread-5] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:0.9969095803010667 for streamId:test2 
2024-01-11 19:23:15,341 [vert.x-worker-thread-73] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:0.9969095803010667 for streamId:test2 
2024-01-11 19:23:20,360 [vert.x-worker-thread-126] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.001497155404731 for streamId:test2 
2024-01-11 19:23:25,400 [vert.x-worker-thread-31] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.0003988433542725 for streamId:test2 
2024-01-11 19:23:26,971 [vert.x-worker-thread-67] INFO  i.a.e.adaptive.StreamAdaptor - Stream adaptor queue size: 0 for stream: test2
2024-01-11 19:23:30,411 [vert.x-worker-thread-110] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.002197582659075 for streamId:test2 
2024-01-11 19:23:35,420 [vert.x-worker-thread-84] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.0012974051896208 for streamId:test2 
2024-01-11 19:23:40,450 [vert.x-worker-thread-81] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:0.9995019424245443 for streamId:test2 
2024-01-11 19:23:45,480 [vert.x-worker-thread-69] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:0.9971083856815236 for streamId:test2 
2024-01-11 19:23:50,501 [vert.x-worker-thread-0] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:0.9969095803010667 for streamId:test2 
2024-01-11 19:23:55,530 [vert.x-worker-thread-12] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.0013973450444156 for streamId:test2 
2024-01-11 19:24:00,490 [vert.x-worker-thread-13] INFO  i.a.e.adaptive.StreamAdaptor - Stream adaptor queue size: 0 for stream: test2
2024-01-11 19:24:00,561 [vert.x-worker-thread-126] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.0013972055888223 for streamId:test2 
2024-01-11 19:24:05,581 [vert.x-worker-thread-94] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.0012974051896208 for streamId:test2 
2024-01-11 19:24:10,591 [vert.x-worker-thread-127] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.0002991026919241 for streamId:test2 
2024-01-11 19:24:15,601 [vert.x-worker-thread-84] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:0.998003992015968 for streamId:test2 
2024-01-11 19:24:20,630 [vert.x-worker-thread-62] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:0.999000999000999 for streamId:test2 
2024-01-11 19:24:25,631 [vert.x-worker-thread-79] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.0002991026919241 for streamId:test2 
2024-01-11 19:24:30,661 [vert.x-worker-thread-75] INFO  io.antmedia.muxer.MuxAdaptor - Stream queue size:0 speed:1.0002990728740904 for streamId:test2 
2024-01-11 19:24:34,011 [vert.x-worker-thread-83] INFO  i.a.e.adaptive.StreamAdaptor - Stream adaptor queue size: 0 for stream: test2

Harshavardhan034 avatar Jan 12 '24 08:01 Harshavardhan034

Thanks for the report. To reproduce it in our side can you record the RTMP output of your RPI to an mp4 file and share it with us?

burak-58 avatar Jan 15 '24 10:01 burak-58

Hi

Closing this issue for the inacitivity.

Please feel free to re-open

Cheers Oguz

mekya avatar May 06 '24 17:05 mekya