ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.23k stars 619 forks source link

Cannot write audio frame to muxer #6387

Open deanzhang380 opened 3 months ago

deanzhang380 commented 3 months ago

Hello, I am experiencing an issue when trying to live stream using a mobile phone device with RTMP by Ant-Media-Server version: 2.9.0

On mobile, I am using the "@api.video-reactnative-live-stream" library for streaming. It works on iOS, but when using an Android device, I encounter a problem and cannot watch the stream on the player. The error is as follows:

2024-06-06 10:24:51,427 [RTMPConnectionExecutor-4] INFO o.r.s.stream.ClientBroadcastStream - Stream start: 1234 2024-06-06 10:24:51,428 [RTMPConnectionExecutor-4] INFO i.a.AntMediaApplicationAdapter - W3C x-category:stream x-event:publish c-ip:10.86.161.70 x-sname:323398e8-4126-4101-addf-bd314daccf13 x-name:1234 2024-06-06 10:24:51,429 [RTMPConnectionExecutor-4] ERROR io.antmedia.muxer.MuxAdaptor - io.antmedia.enterprise.adaptive.EncoderAdaptor 2024-06-06 10:24:51,429 [RTMPConnectionExecutor-4] INFO i.a.AntMediaApplicationAdapter - Saving zombi broadast to data store with streamId:1234 2024-06-06 10:24:51,430 [RTMPConnectionExecutor-4] INFO io.antmedia.muxer.MuxAdaptor - serverSettings exist io.antmedia.settings.ServerSettings@47fe9de2 2024-06-06 10:24:51,430 [RTMPConnectionExecutor-4] INFO io.antmedia.muxer.MuxAdaptor - vertx exist io.vertx.core.impl.VertxImpl@3511cafe 2024-06-06 10:24:51,430 [RTMPConnectionExecutor-4] INFO io.antmedia.muxer.MuxAdaptor - adding HLS Muxer for 1234 2024-06-06 10:24:51,431 [RTMPConnectionExecutor-4] INFO io.antmedia.muxer.HLSMuxer - hls time:2, hls list size:5 hls playlist type:null for stream:1234 2024-06-06 10:24:51,431 [RTMPConnectionExecutor-4] INFO io.antmedia.muxer.MuxAdaptor - Number of items in the queue while adaptor is being started to prepare is 0 2024-06-06 10:24:51,431 [vert.x-worker-thread-23] INFO io.antmedia.muxer.MuxAdaptor - before prepare for 1234 2024-06-06 10:24:51,431 [vert.x-worker-thread-23] INFO io.antmedia.muxer.MuxAdaptor - Number of items in the queue while starting: 0 for stream: 1234 2024-06-06 10:24:51,528 [RTMPConnectionExecutor-2] INFO o.red5.server.stream.AbstractStream - metadata read data type -->>>> core map 2024-06-06 10:24:51,529 [RTMPConnectionExecutor-2] INFO io.antmedia.muxer.MuxAdaptor - first received frame timestamp: 0 for stream:1234 2024-06-06 10:24:51,942 [vert.x-worker-thread-75] INFO i.a.muxer.parser.AACConfigParser - AAC object type:AAC_LC 2024-06-06 10:24:51,943 [vert.x-worker-thread-75] INFO i.a.muxer.parser.AACConfigParser - AAC Sample rate:44100 2024-06-06 10:24:51,943 [vert.x-worker-thread-75] INFO io.antmedia.muxer.MuxAdaptor - Video and audio is enabled in stream:1234 queue size: 16 2024-06-06 10:24:51,943 [vert.x-worker-thread-75] INFO io.antmedia.muxer.MuxAdaptor - Incoming video width: 720 height:1280 stream:1234 2024-06-06 10:24:51,944 [vert.x-worker-thread-75] INFO io.antmedia.muxer.HLSMuxer - Adding timebase to the input time base map index:0 value: 1/1000 for stream:1234 type:video 2024-06-06 10:24:51,944 [vert.x-worker-thread-75] INFO io.antmedia.muxer.HLSMuxer - Adding timebase to the input time base map index:1 value: 1/1000 for stream:1234 type:audio 2024-06-06 10:24:51,944 [vert.x-worker-thread-75] INFO io.antmedia.muxer.HLSMuxer - Header is written for stream:1234 and url:/usr/local/antmedia/webapps/EvnDev/streams/1234.m3u8 2024-06-06 10:24:51,944 [vert.x-worker-thread-75] INFO i.a.AntMediaApplicationAdapter - start publish leaved for stream:1234 2024-06-06 10:24:51,944 [vert.x-worker-thread-75] INFO io.antmedia.muxer.MuxAdaptor - Stream queue size:15 speed:0.0 for streamId:1234 2024-06-06 10:24:51,945 [vert.x-worker-thread-75] WARN io.antmedia.muxer.HLSMuxer - First key frame received for stream: 1234 2024-06-06 10:24:51,945 [vert.x-worker-thread-73] INFO i.a.AntMediaApplicationAdapter - Status of stream 1234 is set to broadcasting with result: true 2024-06-06 10:24:53,945 [vert.x-eventloop-thread-118] INFO i.a.AntMediaApplicationAdapter - Broadcast absolute time is not available for stream:1234 2024-06-06 10:24:56,152 [vert.x-worker-thread-113] INFO io.antmedia.muxer.HLSMuxer - cannot write audio frame to muxer(1234.m3u8). Error is Invalid argument 2024-06-06 10:24:56,863 [vert.x-worker-thread-53] INFO io.antmedia.muxer.HLSMuxer - cannot write audio frame to muxer(1234.m3u8). Error is Invalid argument 2024-06-06 10:24:57,074 [vert.x-worker-thread-81] INFO io.antmedia.muxer.HLSMuxer - cannot write audio frame to muxer(1234.m3u8). Error is Invalid argument 2024-06-06 10:24:57,509 [vert.x-eventloop-thread-3] INFO io.antmedia.statistic.ViewerStats - Update hls viewer in stream ID:1234 increment count:1 decrement count:0 diff:1 2024-06-06 10:24:59,422 [vert.x-worker-thread-69] INFO io.antmedia.muxer.HLSMuxer - cannot write audio frame to muxer(1234.m3u8). Error is Invalid argument 2024-06-06 10:24:59,532 [vert.x-worker-thread-77] INFO io.antmedia.muxer.HLSMuxer - cannot write audio frame to muxer(1234.m3u8). Error is Invalid argument

I would greatly appreciate your support. Thank you.

burak-58 commented 3 months ago

Hello @deanzhang380, Thank you for the report. I couldn't understand the problem clearly. Could you please write a report like in the bug report templete here. Especially please mention what you expect and what you observe as a user. The logs you sent doesn't help me to understand the problem. Please tell the affect of these logs on your end.

mekya commented 2 months ago

Hi @burak-58

I think the step should try to stream by using "@api.video-reactnative-live-stream" with Android device and confirm that it's working or not.

I'm just putting to the backlog.

@deanzhang380 If you need this to be resolved soon, please reach out to contact@antmedia.io by mentioning this issue and this message.

Cheers Oz