abouut rest api rtmp pull

Discussion in 'Web Call Server 5' started by gurmeet, Jul 8, 2019.

  1. gurmeet

    gurmeet New Member

    i post this josn to server on this end point https://tv1.crakex.in:8888/rest-api/pull/rtmp/pull
    {

    "uri": "rtmp://fms.105.net/live/rmc1",
    "localStreamName" :"5e0c"

    }
    but i got this
    [
    {
    "localMediaSessionId": "a25ec5d1-cd5d-4c39-aea6-2eb779b94efd",
    "localStreamName": "rtmp://fms.105.net/live/rmc1",
    "uri": "rtmp://fms.105.net/live/rmc1",
    "status": "PROCESSED_REMOTE",
    "hasAudio": true,
    "hasVideo": true,
    "record": false
    }
    ]

    why i cant local stream name as i want but server give the name equal to uri
    whats thats
    and i want websocket authenticated with my website user how can i do this
  2. Max

    Max Administrator Staff Member

    Use
    - rest-api/pull/rtmp/pull
    to pull the RTMP stream
    - rest-api/transcoder/startup
    Code:
    {
      "uri": "rtmp://fms.105.net/live/rmc1",
      "localStreamName" :"5e0c"
    }
    to create a new stream with a local name

    rest-api/transcoder/startup can be used to create a transcoded version of a stream, but if the parameters for transcoding are not specified just a new stream will be created (without transcoding).
  3. gurmeet

    gurmeet New Member

    thanks for reply
    and i want websocket authenticated with my website user how can i do this
  4. gurmeet

    gurmeet New Member

    i use transcoder but stream automatically destroyed after some time. i have to update (post) again
    any reason ...?
  5. Max

    Max Administrator Staff Member

    Good day.
    You can use REST hook to authenticate user. Here is described detailed example to authorize users by domain, use this example as basis.
    If there is no any subscriber (viewer) for transcoder output stream, the trascoder stops by inactivity after 60 seonds by default. You can set this timeout in milliseconds with option
    Code:
    transcoder_agent_activity_timer_timeout=60000
  6. gurmeet

    gurmeet New Member

    which property file i have to update this property
  7. Max

    Max Administrator Staff Member

    All the WCS main settings should be set in /usr/local/FlashphonerWebCallServer/conf/flashphoner.properties file.
  8. gurmeet

    gurmeet New Member

  9. Max

    Max Administrator Staff Member

    Stream transcoding requires a lot of CPU resources. So if all you need is to rename pulled RTMP stream, you can do the following:
    1. Set the following parameter in flashphoner.properties file
    Code:
    rtmp_transponder_full_url=true
    and restart WCS
    2. Pull stream
    Code:
    /rest-api/pull/rtmp/pull
    {
    "uri": "rtmp://fms.105.net/live/rmc1"
    }
    
    3. Push stream back to WCS
    Code:
    /rest-api/push/startup
    {
    "streamName": "rtmp://fms.105.net/live/rmc1",
    "rtmpUrl": "rtmp://localhost:1935/live/myStreamName"
    }
    
    Then, stream can be played as WebRTC by name "myStreamName"
    Last edited: Jul 9, 2019
  10. gurmeet

    gurmeet New Member

    its trial version automatically closed why showing flashphoner logo every minute
    can i off this
  11. Max

    Max Administrator Staff Member

    You need change the following parameter in flashphoner.properties file, that was listed in the previous post :
    Code:
    transcoder_agent_activity_timer_timeout=60000
    where 60000 - timeout in milliseconds the trascoder stops by inactivity (if no any viewers on your stream).
    The trial license may add video or audio watermark, it does not affect other features and not display with commercial license.
  12. gurmeet

    gurmeet New Member

    WARN C - pool-77-thread-2 exception: [id: 0x747fdac3, /109.237.25.18:33007 => /188.214.132.50:5119] EXCEPTION: java.lang.RuntimeException: bad value / byte: -12 (hex: F4), java.lang.ArrayIndexOutOfBoundsException
    13:00:25,105 WARN C - pool-77-thread-2 cause: java.lang.RuntimeException: bad value / byte: -12 (hex: F4), java.lang.ArrayIndexOutOfBoundsException
    13:00:25,105 WARN C - pool-77-thread-2 message: bad value / byte: -12 (hex: F4), java.lang.ArrayIndexOutOfBoundsException
    13:00:25,105 WARN C - pool-77-thread-2 stacktrace: java.lang.RuntimeException: bad value / byte: -12 (hex: F4), java.lang.ArrayIndexOutOfBoundsException
    at com.flashphoner.server.rtmp.A.A.A(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.B.E.B(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.G.<init>(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.B.A(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.B.decode(Unknown Source)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(Unknown Source)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(Unknown Source)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(Unknown Source)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(Unknown Source)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(Unknown Source)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

    13:00:25,146 WARN C - pool-77-thread-2 exception: [id: 0x747fdac3, /109.237.25.18:33007 => /188.214.132.50:5119] EXCEPTION: java.lang.NullPointerException
    13:00:25,146 WARN C - pool-77-thread-2 cause: java.lang.NullPointerException
    13:00:25,146 WARN C - pool-77-thread-2 message: null
    13:00:25,146 WARN C - pool-77-thread-2 stacktrace: java.lang.NullPointerException

    13:00:25,149 WARN C - pool-77-thread-2 exception: [id: 0x747fdac3, /109.237.25.18:33007 => /188.214.132.50:5119] EXCEPTION: java.lang.NullPointerException
    13:00:25,149 WARN C - pool-77-thread-2 cause: java.lang.NullPointerException
    13:00:25,149 WARN C - pool-77-thread-2 message: null
    13:00:25,149 WARN C - pool-77-thread-2 stacktrace: java.lang.NullPointerException

    13:00:25,154 WARN C - pool-77-thread-2 exception: [id: 0x747fdac3, /109.237.25.18:33007 => /188.214.132.50:5119] EXCEPTION: java.lang.RuntimeException: bad value / byte: -22 (hex: EA), java.lang.ArrayIndexOutOfBoundsException
    13:00:25,154 WARN C - pool-77-thread-2 cause: java.lang.RuntimeException: bad value / byte: -22 (hex: EA), java.lang.ArrayIndexOutOfBoundsException
    13:00:25,154 WARN C - pool-77-thread-2 message: bad value / byte: -22 (hex: EA), java.lang.ArrayIndexOutOfBoundsException
    13:00:25,154 WARN C - pool-77-thread-2 stacktrace: java.lang.RuntimeException: bad value / byte: -22 (hex: EA), java.lang.ArrayIndexOutOfBoundsException
    at com.flashphoner.server.rtmp.A.A.A(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.B.E.B(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.G.<init>(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.B.A(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.B.decode(Unknown Source)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(Unknown Source)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(Unknown Source)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(Unknown Source)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(Unknown Source)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(Unknown Source)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

    13:00:25,205 WARN C - pool-77-thread-2 exception: [id: 0x747fdac3, /109.237.25.18:33007 => /188.214.132.50:5119] EXCEPTION: java.lang.RuntimeException: bad value / byte: 127 (hex: 7F), java.lang.ArrayIndexOutOfBoundsException
    13:00:25,205 WARN C - pool-77-thread-2 cause: java.lang.RuntimeException: bad value / byte: 127 (hex: 7F), java.lang.ArrayIndexOutOfBoundsException
    13:00:25,205 WARN C - pool-77-thread-2 message: bad value / byte: 127 (hex: 7F), java.lang.ArrayIndexOutOfBoundsException
    13:00:25,205 WARN C - pool-77-thread-2 stacktrace: java.lang.RuntimeException: bad value / byte: 127 (hex: 7F), java.lang.ArrayIndexOutOfBoundsException
    at com.flashphoner.server.rtmp.A.A.A(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.B.E.B(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.G.<init>(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.B.A(Unknown Source)
    at com.flashphoner.server.rtmp.rtmp.B.decode(Unknown Source)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(Unknown Source)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(Unknown Source)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(Unknown Source)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(Unknown Source)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(Unknown Source)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
  13. gurmeet

    gurmeet New Member

    its not working on load and is after commercial license is stream still destroy after 60 seconnd ...............?
  14. gurmeet

    gurmeet New Member

    i want to hide my rtmp url so i have to do pull stream or transcode server have to peform well
    after restart server it still giving me above error
    and also this
    transcoder_agent_activity_timer_timeout=60000 not workoing
    after use this again after some time i have to post this data
    {

    "uri": "rtmp://188.214.132.50:5119/live/HDMI13",
    "localStreamName" :"mycricket"

    }
    again and again
    stream will remain working until iremove it from server
    Last edited: Jul 9, 2019
  15. Max

    Max Administrator Staff Member

    With this setting, stream will stop after 60 seconds (this is 60,000 milliseconds). Change the transcoder_agent_activity_timer_timeout setting, specify the value you need, set this parameter in flashphoner.properties file.

    In the example there was a small typo, now it is fixed, try to accurately reproduce these requests - step 1, step 2 and step 3(and increase the parameter transcoder_agent_activity_timer_timeout).
  16. gurmeet

    gurmeet New Member

    after change that setting it still stop after some time
    is it due to demo version .. ?
    what if we purchase then is is working non stop
  17. Max

    Max Administrator Staff Member

    Good day.
    The trial license may add video or audio watermark, but it does not affect other features.
    Please show settings file flashphoner.properties:
    Code:
    cat /usr/local/FlashphonerWebCallServer/conf/flashphoner.properties
  18. gurmeet

    gurmeet New Member

    still having same problem i follow [ In the example there was a small typo, now it is fixed, try to accurately reproduce these requests - step 1, step 2 and step 3(and increase the parameter transcoder_agent_activity_timer_timeout). (above) provide ]
    stream still lost arround two minute i do all thing suggested above
  19. Max

    Max Administrator Staff Member

    What RTMP stream is this problem (we want to test)?
    Add in the settings file flashphoner.properties:
    Code:
    transcoder_agent_activity_timer_timeout=600000
    and restart WCS:
    Code:
    /usr/local/FlashphonerWebCallServer/bin/webcallserver restart
  20. gurmeet

    gurmeet New Member

    i got this Session does not exist
    while login first and then go on this page https://tv1.crakex.in:8888/admin/demo.html#
    put my stream ub2020 and press start
    it display establish and immediately i got this error Session does not exist
    [ many time i wrote that i follow all the things above u suggeted but its not working we want to purchase this license but i thnk it is not worth full for us if i restream using above and it autumatically lost its not right that we have to minimum on one subscriber its not write it should be running as long as l want not automatically stop ]

Share This Page