Jump to content
  • 0

Exceptions when using adaptive bitrate in on


Anurag Goel
 Share

Question

Getting  lot of exceptions  when  adaptive  bitrate is on, I'm using  latest antmedia enterprise edition.

2020-09-17 17:44:39,233 [vertx-blocked-thread-checker] WARN  i.v.core.impl.BlockedThreadChecker - Thread Thread[vert.x-worker-thread-12,5,main] has been blocked for 5781 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
    at org.bytedeco.javacpp.avcodec.avcodec_encode_video2(Native Method)
    at io.antmedia.enterprise.preview.PngEncoder.writeFrameInternal(PngEncoder.java:153)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeFrame(VideoEncoder.java:136)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeRawVideo(VideoEncoder.java:125)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeRawVideo(WebRTCEncoderAdaptor.java:530)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeYuvPlanes(WebRTCEncoderAdaptor.java:455)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.prepareAndEncodeBuffer(WebRTCEncoderAdaptor.java:431)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.encodeVideoRunner(WebRTCEncoderAdaptor.java:383)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.lambda$null$8(WebRTCEncoderAdaptor.java:1379)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor$$Lambda$245/716588441.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273)
    at io.vertx.core.impl.ContextImpl$$Lambda$181/2026371507.run(Unknown Source)
    at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
    at io.vertx.core.impl.TaskQueue$$Lambda$27/523211332.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)
2020-09-17 17:44:40,232 [vertx-blocked-thread-checker] WARN  i.v.core.impl.BlockedThreadChecker - Thread Thread[vert.x-worker-thread-12,5,main] has been blocked for 6781 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
    at org.bytedeco.javacpp.avcodec.avcodec_encode_video2(Native Method)
    at io.antmedia.enterprise.adaptive.H264Encoder.writeFrameInternal(H264Encoder.java:165)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeFrame(VideoEncoder.java:136)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeRawVideo(VideoEncoder.java:125)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeRawVideo(WebRTCEncoderAdaptor.java:530)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeYuvPlanes(WebRTCEncoderAdaptor.java:455)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.prepareAndEncodeBuffer(WebRTCEncoderAdaptor.java:431)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.encodeVideoRunner(WebRTCEncoderAdaptor.java:383)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.lambda$null$8(WebRTCEncoderAdaptor.java:1379)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor$$Lambda$245/716588441.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273)
    at io.vertx.core.impl.ContextImpl$$Lambda$181/2026371507.run(Unknown Source)
    at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
    at io.vertx.core.impl.TaskQueue$$Lambda$27/523211332.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)
2020-09-17 17:44:41,122 [vert.x-worker-thread-12] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - Dropping video frame. Pending Frame:20, Frame number: 150 Last Frame Number: 147 Received Audio Frame Count: 755 Drop video frame count: 100 for stream: stream1
2020-09-17 17:44:41,229 [vertx-blocked-thread-checker] WARN  i.v.core.impl.BlockedThreadChecker - Thread Thread[vert.x-worker-thread-12,5,main] has been blocked for 7781 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
    at org.bytedeco.javacpp.avcodec.avcodec_encode_video2(Native Method)
    at io.antmedia.enterprise.adaptive.VP8Encoder.writeFrameInternal(VP8Encoder.java:145)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeFrame(VideoEncoder.java:136)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeRawVideo(VideoEncoder.java:125)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeRawVideo(WebRTCEncoderAdaptor.java:530)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeYuvPlanes(WebRTCEncoderAdaptor.java:455)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.prepareAndEncodeBuffer(WebRTCEncoderAdaptor.java:431)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.encodeVideoRunner(WebRTCEncoderAdaptor.java:383)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.lambda$null$8(WebRTCEncoderAdaptor.java:1379)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor$$Lambda$245/716588441.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273)
    at io.vertx.core.impl.ContextImpl$$Lambda$181/2026371507.run(Unknown Source)
    at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
    at io.vertx.core.impl.TaskQueue$$Lambda$27/523211332.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)
2020-09-17 17:44:41,996 [audio-poller-stream1 thread-2] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - Pending audio frames: 3, audio thread entrance interval: 9.989311ms, total received audio frames: 842 for stream stream1 hash: 1865093010
2020-09-17 17:44:42,230 [vertx-blocked-thread-checker] WARN  i.v.core.impl.BlockedThreadChecker - Thread Thread[vert.x-worker-thread-12,5,main] has been blocked for 8782 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
    at org.bytedeco.javacpp.avcodec.avcodec_encode_video2(Native Method)
    at io.antmedia.enterprise.adaptive.VP8Encoder.writeFrameInternal(VP8Encoder.java:145)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeFrame(VideoEncoder.java:136)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeRawVideo(VideoEncoder.java:125)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeRawVideo(WebRTCEncoderAdaptor.java:530)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeYuvPlanes(WebRTCEncoderAdaptor.java:455)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.prepareAndEncodeBuffer(WebRTCEncoderAdaptor.java:431)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.encodeVideoRunner(WebRTCEncoderAdaptor.java:383)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.lambda$null$8(WebRTCEncoderAdaptor.java:1379)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor$$Lambda$245/716588441.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273)
    at io.vertx.core.impl.ContextImpl$$Lambda$181/2026371507.run(Unknown Source)
    at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
    at io.vertx.core.impl.TaskQueue$$Lambda$27/523211332.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)
2020-09-17 17:44:42,998 [network_thread - 17644] INFO  org.webrtc.Logging - Tag:WebRtcAudioTrackExternal - Message:GetPlayoutUnderrunCount
2020-09-17 17:44:42,999 [network_thread - 17644] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - audio stats: { timestampUs: 1600364682998050, type: inbound-rtp, id: RTCInboundRTPAudioStream_3770088611, ssrc: 3770088611, isRemote: false, mediaType: "audio", kind: "audio", trackId: "RTCMediaStreamTrack_receiver_3", transportId: "RTCTransport_0_1", codecId: "RTCCodec_0_Inbound_111", packetsReceived: 480, bytesReceived: 36930, headerBytesReceived: 11520, packetsLost: 0, lastPacketReceivedTimestamp: 1345990.486, jitter: 0.002 }
2020-09-17 17:44:43,000 [network_thread - 17644] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - Publish Stats StreamId: stream1 TransferedByte: 822785 Stream Duration: 9441 Bitrate: 87 Source IP:  User-Agent: N/A
2020-09-17 17:44:43,234 [vertx-blocked-thread-checker] WARN  i.v.core.impl.BlockedThreadChecker - Thread Thread[vert.x-worker-thread-12,5,main] has been blocked for 9782 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
    at org.bytedeco.javacpp.avcodec.avcodec_encode_video2(Native Method)
    at io.antmedia.enterprise.adaptive.VP8Encoder.writeFrameInternal(VP8Encoder.java:145)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeFrame(VideoEncoder.java:136)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeRawVideo(VideoEncoder.java:125)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeRawVideo(WebRTCEncoderAdaptor.java:530)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeYuvPlanes(WebRTCEncoderAdaptor.java:455)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.prepareAndEncodeBuffer(WebRTCEncoderAdaptor.java:431)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.encodeVideoRunner(WebRTCEncoderAdaptor.java:383)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.lambda$null$8(WebRTCEncoderAdaptor.java:1379)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor$$Lambda$245/716588441.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273)
    at io.vertx.core.impl.ContextImpl$$Lambda$181/2026371507.run(Unknown Source)
    at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
    at io.vertx.core.impl.TaskQueue$$Lambda$27/523211332.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)
2020-09-17 17:44:43,431 [incomingVideoSt - 17655] INFO  i.a.e.adaptive.WebRTCEncoderAdaptor - Number of video frames pending in the queue: 23, received total video frames: 200  received fps: 22 for stream stream1
2020-09-17 17:44:44,230 [vertx-blocked-thread-checker] WARN  i.v.core.impl.BlockedThreadChecker - Thread Thread[vert.x-worker-thread-12,5,main] has been blocked for 10782 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
    at org.bytedeco.javacpp.avcodec.avcodec_encode_video2(Native Method)
    at io.antmedia.enterprise.adaptive.VP8Encoder.writeFrameInternal(VP8Encoder.java:145)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeFrame(VideoEncoder.java:136)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeRawVideo(VideoEncoder.java:125)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeRawVideo(WebRTCEncoderAdaptor.java:530)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeYuvPlanes(WebRTCEncoderAdaptor.java:455)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.prepareAndEncodeBuffer(WebRTCEncoderAdaptor.java:431)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.encodeVideoRunner(WebRTCEncoderAdaptor.java:383)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.lambda$null$8(WebRTCEncoderAdaptor.java:1379)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor$$Lambda$245/716588441.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273)
    at io.vertx.core.impl.ContextImpl$$Lambda$181/2026371507.run(Unknown Source)
    at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
    at io.vertx.core.impl.TaskQueue$$Lambda$27/523211332.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)
2020-09-17 17:44:45,230 [vertx-blocked-thread-checker] WARN  i.v.core.impl.BlockedThreadChecker - Thread Thread[vert.x-worker-thread-12,5,main] has been blocked for 11782 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
    at org.bytedeco.javacpp.avcodec.avcodec_encode_video2(Native Method)
    at io.antmedia.enterprise.adaptive.VP8Encoder.writeFrameInternal(VP8Encoder.java:145)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeFrame(VideoEncoder.java:136)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeRawVideo(VideoEncoder.java:125)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeRawVideo(WebRTCEncoderAdaptor.java:530)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeYuvPlanes(WebRTCEncoderAdaptor.java:455)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.prepareAndEncodeBuffer(WebRTCEncoderAdaptor.java:431)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.encodeVideoRunner(WebRTCEncoderAdaptor.java:383)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.lambda$null$8(WebRTCEncoderAdaptor.java:1379)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor$$Lambda$245/716588441.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273)
    at io.vertx.core.impl.ContextImpl$$Lambda$181/2026371507.run(Unknown Source)
    at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
    at io.vertx.core.impl.TaskQueue$$Lambda$27/523211332.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)
2020-09-17 17:44:46,230 [vertx-blocked-thread-checker] WARN  i.v.core.impl.BlockedThreadChecker - Thread Thread[vert.x-worker-thread-12,5,main] has been blocked for 12782 ms, time limit is 2000
io.vertx.core.VertxException: Thread blocked
    at org.bytedeco.javacpp.avcodec.avcodec_encode_video2(Native Method)
    at io.antmedia.enterprise.adaptive.VP8Encoder.writeFrameInternal(VP8Encoder.java:145)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeFrame(VideoEncoder.java:136)
    at io.antmedia.enterprise.adaptive.base.VideoEncoder.writeRawVideo(VideoEncoder.java:125)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeRawVideo(WebRTCEncoderAdaptor.java:530)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.writeYuvPlanes(WebRTCEncoderAdaptor.java:455)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.prepareAndEncodeBuffer(WebRTCEncoderAdaptor.java:431)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.encodeVideoRunner(WebRTCEncoderAdaptor.java:383)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor.lambda$null$8(WebRTCEncoderAdaptor.java:1379)
    at io.antmedia.enterprise.adaptive.WebRTCEncoderAdaptor$$Lambda$245/716588441.handle(Unknown Source)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273)
    at io.vertx.core.impl.ContextImpl$$Lambda$181/2026371507.r
Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0

Hi 

It seems AMS doesn't get video properly. Could you please send your streaming publish side encoder settings?

Also please make sure that some of your encoder settings are below:
Encoder: H264
Profile: Baseline
Tune: Zero Latency
CPU Preset: Medium
Keyframe Interval: 1

For more detail, please check our documentation.

I hope, I could help you!

Best Regards,
Selim

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...