Getting the stream resolution from the API

Getting the stream resolution from the API

Support ForumCategory: Usage and FeaturesGetting the stream resolution from the API
luuk_jansen asked 10 years ago
Is there currently a way of getting the stream resolution form the API? I am looking at the scenario that I want to create e.g. 3 HLS steams. The highest one is 1280×720 at 1.2 Mb/s. The stream comes in at 1280×720 at 1 Mb/s. In this case, I just want to copy the audio and video stream when issuing the ‘encode’ command instead of try to re-encode the video to a higher bit-rate. Currently I use the nitrate as only selection, but is not fool proof. [EDIT] I think there might be an option using the ‘width’ in the ‘pull stream’ setting when inquiring ‘getstreaminfo’. However, this seems not to work correctly for me. I issue the command: http://192.168.1.201:7777/getStreamInfo?param=aWQ9MzU with params "id=35" I got this from the uniqueId of listStreams (matching up the stream name which I know):
{"appName":"evostreamms","audio":{"bytesCount":12,"codec":"AAAC","codecNumeric":0,"droppedBytesCount":0,"droppedPacketsCount":0,"packetsCount":3},"bandwidth":1064,"connectionType":1,"creationTimestamp":1.391875691190346E12,"edgePid":0,"farIp":"127.0.0.1","farPort":1935,"ip":"127.0.0.1","name":"a1","nearIp":"127.0.0.1","nearPort":50449,"outStreamsUniqueIds":null,"port":50449,"pullSettings":{"audioCodecBytes":"","configId":1,"emulateUserAgent":"EvoStream Media Server (www.evostream.com) player","forceTcp":true,"httpProxy":"","isAudio":true,"keepAlive":false,"localStreamName":"a1","operationType":1,"pageUrl":"","ppsBytes":"","rangeEnd":-1,"rangeStart":-2,"rtcpDetectionInterval":10,"sendRenewStream":false,"spsBytes":"","ssmIp":"","swfUrl":"","tcUrl":"","tos":256,"ttl":256,"uri":"rtmp://localhost/live/test"},"queryTimestamp":1.391875691643597E12,"type":"INR","typeNumeric":0,"uniqueId":35,"upTime":453.251,"video":{"bytesCount":0,"codec":"VUNK","codecNumeric":0,"droppedBytesCount":0,"droppedPacketsCount":0,"packetsCount":0}}
However, the result is: FAIL(Syntax error. Parameter id is invalid) Which corresponds with the log:
1391875545:3:/applications/evorouter/src/protocols/cli/cliappprotocolhandler.cpp:540:ProcessMessage:command: getstreaminfo
1391875545:0:/applications/evorouter/src/protocols/cli/cliappprotocolhandler.cpp:1358:ProcessMessageGetStreamInfo:Syntax error. Parameter id is invalid



Offcanvas

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.