Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Out of bound exception in live transmission

  1. #1

    Default Out of bound exception in live transmission

    Hi,

    Basin on pass thru example I'm trying to implement small live stream delay. The idea is to buffer data received from encoder in my custom MediaStream module and pass it forward to the client after specified timeout. Generally it works but sometimes I receive following exceptions.

    WARN server comment - LiveReceiver.startVideoPacket: Video packet sync issue.
    ERROR server comment - addDataA[this.size:9491 this.dataA.length:9491 this.startDataLoc:7418 this.dataLoc:7418 data.length:24000 offset:2676 size:3411 missing:2073 ]: java.lang.ArrayIndexOutOfBoundsException
    java.lang.ArrayIndexOutOfBoundsException
    INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[test_live/_definst_/testStream]: Add chunk: type:audio id:10 count:94 duration:2005
    at java.lang.System.arraycopy(Native Method)
    at com.wowza.wms.amf.AMFPacket.addData(Unknown Source)
    at com.wowza.wms.stream.live.LiveReceiver.addVideoData(Unknown Source)
    at com.mp.wowza.MediaStreamLowLatency.addVideoData(MediaStreamLowLatency.java:143)
    at com.wowza.wms.request.RequestProcessData.processNextRequest(Unknown Source)
    at com.wowza.wms.client.ClientWorker.processNextReq(Unknown Source)
    at com.wowza.wms.request.RTMPRequestAdapter.service(Unknown Source)
    at com.wowza.wms.server.ServerHandler.serviceRequest(Unknown Source)
    at com.wowza.wms.server.ServerHandler.handleMessageReceived(Unknown Source)
    at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)
    at com.wowza.wms.server.ServerHandlerThreadedSession.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)

    MediaStreamLowLatency is my module.
    It happens that after this exception everything works fine but after few hours it happens that video packets are not delivered to the client anymore. Do you know what can be wrong here?
    Other question. Could you describe which Wowza modules are involved in live transmission? It would be great if you could describe (with high degree of details) the path that packets goes in case of RTMP transmission from encoder to the client. In example when packetizer is involved, where is the buffer between encoder connection and client connection etc. Thanks in advance.

    Regards,
    Marek

  2. #2
    Join Date
    Sep 2011
    Posts
    1,931

    Default

    Hi
    This error,
    missing:2073 ]: java.lang.ArrayIndexOutOfBoundsException
    suggests that you are trying to access a point in the array that doesn't exist

    This error,
    at com.mp.wowza.MediaStreamLowLatency.addVideoData(Me diaStreamLowLatency.java:143)
    suggest that this problem is on line 143 in your code

    Jason

  3. #3

    Default

    Hi Jason,

    I know that this is problem with array bounds. Question is why this bound is exceeded. This function is called several times per second but the exceptions happens 1 time per hour. What I'm trying to know is the synchronization mechanism between date source (encoder connection) and data sink (client connection). Do you have knowledge from this area?

    Regards,
    Marek

  4. #4
    Join Date
    Sep 2011
    Posts
    1,931

    Default

    Hi
    The best way to provide sync is off the packets,
    so every time you receive one, send one out of the buffer.

    Jason

  5. #5

    Default

    Do you mean that I should resing from buffering packets? But this is the functionality that I'm trying to implement. If I would like just pass the packets just in time I receive it I would just use live stream type...

    Regards,
    Marek

  6. #6
    Join Date
    Sep 2011
    Posts
    1,931

    Default

    Hi
    Ok, what I mean is to keep the buffer at 30 seconds long, when the buffer is +1 packet (after 30 seconds) -1 through the outbound stream, this puts you 30 seconds behind and keeps your buffer in sync with your inbound stream.

    Jason

  7. #7

    Default

    Hi Jason,

    Thanks for the idea. There is hopefully last issue that I would like to clarify. Probably this solution will not work properly if there will be some short break of input data (in example poor exception issue). Then it may happen that input packets will be not available during lets say 5s. Then if I will follow the initial rule (one packet +, one packet -) delay period will be shortened by 5s. Do you know how to solve it?

    Regards,
    Marek

  8. #8

    Default

    If you follow the suggestion of one packet in, one packet out, then if no packets come in, no packets will be sent out...

    Shamrock

  9. #9

    Default

    Hi,

    After about 12 hours of tests I had following problem:

    ERROR server comment - Zero sized function (client:2121400362:FMLE/3.0 (compatible; Lavf52.48.0)): type:20 size:0

    and all packetizers were destroyed.
    Do you know what may be the problem?

    Regards,
    Marek

  10. #10

    Default

    Anyone has idea what may be wrong here? I would like to renew my primary question regarding architecture. What is the processing path for packets coming from encoder to client? Where is the buffer between encoder connection and client connection? What are the synchronization mechanisms?
    I believe this would be very beneficial in solving my problem.

    Regards,
    Marek

Page 1 of 3 123 LastLast

Similar Threads

  1. Live stream record module exception if format mp4
    By azhurb in forum AddOn: Other AddOns
    Replies: 7
    Last Post: 12-14-2011, 08:02 AM
  2. Configuration of transmission
    By kleberrvf in forum General Forum
    Replies: 1
    Last Post: 12-05-2011, 03:35 PM
  3. Help with video transmission to mobile devices
    By inforsepulveda in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 10-12-2011, 04:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •