abouut rest api rtmp pull

gurmeet

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
 

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).
 

gurmeet

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

Max

Administrator
Staff member
Good day.
and i want websocket authenticated with my website user how can i do this
You can use REST hook to authenticate user. Here is described detailed example to authorize users by domain, use this example as basis.
i use transcoder but stream automatically destroyed after some time. i have to update (post) again
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
 

Max

Administrator
Staff member
All the WCS main settings should be set in /usr/local/FlashphonerWebCallServer/conf/flashphoner.properties file.
 

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:

Max

Administrator
Staff member
its trial version automatically closed
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).
why showing flashphoner logo every minute
The trial license may add video or audio watermark, it does not affect other features and not display with commercial license.
 

gurmeet

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)
 

gurmeet

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

gurmeet

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:

Max

Administrator
Staff member
transcoder_agent_activity_timer_timeout=60000 not workoing after use this again after some time i have to post this data
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.

i want to hide my rtmp url so i have to do pull stream or transcode server have to peform well
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).
 

gurmeet

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
 

Max

Administrator
Staff member
Good day.
is it due to demo version .. ?
what if we purchase then is is working non stop
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
 

gurmeet

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
 

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
 

gurmeet

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 ]
 
Top