{"id":8785,"date":"2021-05-13T17:44:50","date_gmt":"2021-05-13T09:44:50","guid":{"rendered":"https:\/\/www.kiloview.com\/en\/support\/docs\/ndi-device-http-apiversion-1-0\/current-decoding-output\/"},"modified":"2021-05-13T17:44:50","modified_gmt":"2021-05-13T09:44:50","slug":"current-decoding-output","status":"publish","type":"docs","link":"https:\/\/www.kiloview.com\/en\/docs\/ndi-device-http-apiversion-1-0\/current-decoding-output\/","title":{"rendered":"Current decoding output"},"content":{"rendered":"<p><strong>Module name:<\/strong> decoder\/current<\/p>\n<p><strong>Basic URL:<\/strong> \/api\/v1\/decoder\/current\/<\/p>\n<h2>Get current decoding status<\/h2>\n<hr \/>\n<h4>API URL<\/h4>\n<p>\u200b   <strong>\/api\/v1\/decoder\/current\/status<\/strong><\/p>\n<h4>Request<\/h4>\n<p>\u200b   Method: <strong>GET\/POST<\/strong><\/p>\n<p>\u200b   Parameters: NONE<\/p>\n<h4>Response<\/h4>\n<p>Example:<\/p>\n<pre><code class=\"language-json\">{\n    &quot;result&quot;: &quot;ok&quot;,\n    &quot;data&quot;: {\n        &quot;name&quot;: &quot;Spark_IO-1916001002 (Channel 1)&quot;,\n        &quot;url&quot;: &quot;192.168.100.168:5961&quot;,\n        &quot;ip&quot;: &quot;192.168.100.168&quot;,\n        &quot;online&quot;: true, \/*or false*\/\n        &quot;resolution&quot;: &quot;1920x1080p 59.94Hz&quot;,\n        &quot;codec&quot;: &quot;SHQ7&quot;,\n        &quot;xRes&quot;: 1920,\n        &quot;yRes&quot;: 1080,\n        &quot;frame_rate&quot;: 59.94,\n        &quot;inst_frame_rate&quot;: 59.93,\n        &quot;interlaced&quot;: false,\n        &quot;de_interlace&quot;: false,\n        &quot;bitrate&quot;: 125000,\n        &quot;audio_format&quot;: &quot;48KHz \/ 2CH&quot;,\n        &quot;audio_sampling&quot;: 48000,\n        &quot;audio_channels&quot;: 2,\n        &quot;warning&quot;: &quot;&quot;\n    }\n}<\/code><\/pre>\n<p><strong>Data field description: <\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Value<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>name<\/td>\n<td><strong>[STRING]<\/strong><\/td>\n<td>The NDI Source Name that currently decoded. If currently output Preset 0 (Blank), then name should be <strong>&quot;(Blank)&quot;<\/strong><\/td>\n<\/tr>\n<tr>\n<td>url<\/td>\n<td><strong>[STRING]<\/strong><\/td>\n<td>The original URL of NDI Source that currently decoded. If there no decoding NDI Source\uff0cthen url = &quot;&quot; (empty strings)<\/td>\n<\/tr>\n<tr>\n<td>ip<\/td>\n<td><strong>[STRING]<\/strong><\/td>\n<td>IP address of of NDI Source that currently decoded. If no decoding,  ip = &quot;0.0.0.0&quot;<\/td>\n<\/tr>\n<tr>\n<td>online<\/td>\n<td><strong>[BOOLEAN]<\/strong><\/td>\n<td><strong>true<\/strong>: Current NDI Source is online\uff1b<br \/><strong>false<\/strong>: current NDI Source is not online<\/td>\n<\/tr>\n<tr>\n<td>resolution<\/td>\n<td><strong>[STRING]<\/strong><\/td>\n<td>Resolution of the current NDI Source (friendly name). If you need to obtain the program-friendly information of the video, such as width\/height, please refer to <code>xRes<\/code>, <code>yRes<\/code>, <code>frame_rate<\/code>, <code>interlaced<\/code> fields.<\/td>\n<\/tr>\n<tr>\n<td>codec<\/td>\n<td><strong>[STRING]<\/strong><\/td>\n<td>CODEC ID of of the current NDI Source: <\/p>\n<p><strong>SHQ0 \/ shq0<\/strong>: NDI YUV4:2:0 format encoding<br \/><strong>SHQ2 \/ shq2<\/strong>: NDI YUV4:2:2 format encoding<br \/><strong>SHQ7 \/ shq7<\/strong>: NDI YUVA4:2:2:4 format encoding<\/p>\n<p>Other CODEC ID may exist, but can&#8217;t be supported yet.<\/td>\n<\/tr>\n<tr>\n<td>xRes<\/td>\n<td><strong>[INT]<\/strong><\/td>\n<td>Video resolution width of the current NDI Source<\/td>\n<\/tr>\n<tr>\n<td>yRes<\/td>\n<td><strong>[INT]<\/strong><\/td>\n<td>Video resolution height of the current NDI Source<\/td>\n<\/tr>\n<tr>\n<td>frame_rate<\/td>\n<td><strong>[NUMBER]<\/strong><\/td>\n<td>Frame-rate of the current NDI Source.<br \/><strong>Please note<\/strong>: <code>frame_rate<\/code> means the original frame_rate of NDI Source. The other field <code>inst_frame_rate<\/code> means (Instant Frame Rate)\uff0cinst_frame_rate means the actual frame rate calculated by the program.<\/td>\n<\/tr>\n<tr>\n<td>inst_frame_rate<\/td>\n<td><strong>[NUMBER]<\/strong><\/td>\n<td>Instant Frame Rate\uff0cthe actual framerate calculated by the program.<\/td>\n<\/tr>\n<tr>\n<td>interlaced<\/td>\n<td><strong>[BOOLEAN]<\/strong><\/td>\n<td><strong>true<\/strong>: NDI Source is Interlaced video<br \/><strong>false<\/strong>: NDI Source is progressive video<\/td>\n<\/tr>\n<tr>\n<td>de_interlace<\/td>\n<td><strong>[BOOLEAN]<\/strong><\/td>\n<td>The NDI decoder has the ability to execute deinterlace of interlaced video and output it in progressive format. It needs you to configure via API <code>8.3 \/api\/v1\/decoder\/output\/set <\/code>(deinterlace operation is not performed by default). <br \/>If you configure deinterlace, and the original video of the current NDI Source is interlaced\uff0cthen <code>de_interlace<\/code> will be true\uff0cwhich used to instruct you that the Decoder has now undergone deinterlace conversion.<\/td>\n<\/tr>\n<tr>\n<td>bitrate<\/td>\n<td><strong>[INT]<\/strong><\/td>\n<td>Current real-time bitrate statistics, in <strong>Kbps<\/strong><\/td>\n<\/tr>\n<tr>\n<td>audio_format<\/td>\n<td><strong>[STRING]<\/strong><\/td>\n<td>The current audio formats (friendly name). If you need to get the program-friendly information of the audio, please refer to <code>audio_sampling<\/code>\uff0c<code>audio_channels<\/code><\/td>\n<\/tr>\n<tr>\n<td>audio_sampling<\/td>\n<td><strong>[INT]<\/strong><\/td>\n<td>Audio sampling of the current audio<\/td>\n<\/tr>\n<tr>\n<td>audio_channels<\/td>\n<td><strong>[INT]<\/strong><\/td>\n<td>Channels of of the current audio<\/td>\n<\/tr>\n<tr>\n<td>warning<\/td>\n<td><strong>[STRING]<\/strong><\/td>\n<td>The following defined string ID (<strong>bold text <\/strong>) is used to describe warnings\/errors that occur when decoding output:<\/p>\n<p><strong>WARN:url-changed<\/strong><br \/>    Meaning: NDI source URL changed<\/p>\n<p><strong>WARN:offline<\/strong><br \/>    Meaning: Offline<\/p>\n<p><strong>ERROR:no-video-output<\/strong><br \/>    Meaning: Video output config error<\/p>\n<p><strong>ERROR:no-audio-output<\/strong><br \/>    Meaning: Audio output config error<\/p>\n<p><strong>WARN:invalid<\/strong><br \/>    Meaning: Invalid output configuration<\/p>\n<p><strong>WARN:match-error<\/strong><br \/>    Meaning: Format\/resolution is unsupported<\/p>\n<p><strong>WARN:unsupported-codec<\/strong><br \/>    Meaning: CODEC is unsupported<\/p>\n<p><strong>WARN:unsupported-resolution<\/strong><br \/>    Meaning: Resolution is unsupported: <\/p>\n<p><strong>WARN:url-changed<\/strong><br \/>    Meaning: NDI source URL changed<\/p>\n<p><strong>WARN:offline<\/strong><br \/>    Meaning: Offline<\/p>\n<p><strong>ERROR:no-video-output<\/strong><br \/>    Meaning: Video output config error<\/p>\n<p><strong>ERROR:no-audio-output<\/strong><br \/>    Meaning: Audio output config error<\/p>\n<p><strong>WARN:invalid<\/strong><br \/>    Meaning: Invalid output configuration<\/p>\n<p><strong>WARN:match-error<\/strong><br \/>    Meaning: Format\/resolution is unsupported<\/p>\n<p><strong>WARN:unsupported-codec<\/strong><br \/>    Meaning: CODEC is unsupported<\/p>\n<p><strong>WARN:unsupported-resolution<\/strong><br \/>    Meaning: Resolution is unsupported<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Switch preset or specified NDI source to the current decoding output<\/h2>\n<hr \/>\n<h4>API URL<\/h4>\n<p>\u200b   <strong>\/api\/v1\/decoder\/current\/set<\/strong><\/p>\n<h4>Request<\/h4>\n<p>\u200b   Method: <strong>GET\/POST<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Value<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>id<\/td>\n<td><strong>[STRING]<\/strong>, <strong>Optional<\/strong><\/td>\n<td>Specify preset ID (0~9)\uff0cswitch the NDI source saved in preset ID to the current decoding output. This parameter is optional. If ID is specified, the following other parameters will be meaningless; if ID is not specified, you must specify the following <code>name<\/code> and<code> url<\/code> parameters. <\/p>\n<p> If you specify <strong>id = &quot;0&quot;<\/strong>, it means that Blank is output directly without decoding. Please refer to section <code>6<\/code> for preset 0 description.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>name<\/td>\n<td><strong>[STRING]<\/strong>, <strong>Optional<\/strong><\/td>\n<td>If you don&#8217;t specify the parameter of the above <code>id<\/code>\uff0cthen <code>name<\/code> and <code>url<\/code> parameter is a must; otherwise no need to specify. <br \/>name is the name of NDI Source\uff0cusually you can get via 5.1 <code>\/api\/v1\/decoder\/discovery\/get<\/code>. According to the current rules of NDI SDK\uff0c<code>url<\/code> is the key parameter to get NDI Source connection\uff0cname only providing reference for discovering NDI source. So, in a sense, you can ignore name or provide an arbitrary string. <strong>But we strongly recommend<\/strong> that you should provide the correct and legal name.<\/td>\n<\/tr>\n<tr>\n<td>url<\/td>\n<td><strong>[STRING]<\/strong>, <strong>Optional<\/strong><\/td>\n<td>The original URL of NDI source. If you don&#8217;t specify parameter <code>id<\/code>\uff0cthen url parameter is required.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Response<\/h4>\n<p>Example:<\/p>\n<pre><code class=\"language-json\">{\n    &quot;result&quot;: &quot;ok&quot;\n}<\/code><\/pre>\n<p>If set successfully, it will return the message of result = &quot;ok&quot;, or please refer to 1.3 for error message descriptions. <\/p>\n","protected":false},"featured_media":0,"parent":48319,"menu_order":6,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-8785","docs","type-docs","status-publish","hentry"],"acf":[],"aioseo_notices":[],"comment_count":0,"_links":{"self":[{"href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/docs\/8785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/comments?post=8785"}],"version-history":[{"count":0,"href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/docs\/8785\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/docs\/48319"}],"next":[{"title":"Advanced options of encoding output and switching","link":"https:\/\/www.kiloview.com\/en\/docs\/ndi-device-http-apiversion-1-0\/advanced-options-of-encoding-output-and-switching\/","href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/docs\/8787"}],"prev":[{"title":"NDI decoding Preset","link":"https:\/\/www.kiloview.com\/en\/docs\/ndi-device-http-apiversion-1-0\/ndi-decoding-preset\/","href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/docs\/8783"}],"wp:attachment":[{"href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/media?parent=8785"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.kiloview.com\/en\/wp-json\/wp\/v2\/doc_tag?post=8785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}