HomeDownloadManualFAQAPIPurchaseContact

IPVTL Web API

IPVTL web API

Since version 6.1.4.4, IPVTL transcoding web API is delivered together with software license, with NO extra cost at all.

The API is based on HTTP interface and JSON format. It is easy and totally free for web developers to integrate IPVTL functions into their own applications.

For OEM resellers, we have white label options including UI text/logo re-branding, at one time cost only.

For expertised developers, we provide IPVT SDK in native c/c++ interface. Please contact our sales for details if you are interested.

IPVT web API requires IPVTL software to run. To evaluate IPVT transcoding API, please download IPVTL trial first. After starting IPVTL, APIs below are accessible through HTTP interface.

Note: If you are accessing IPVT web API from a different computer than IPVTL host, please first make sure firewall is disabled on IPVTL HTTP port and there is no connectivity issue.

Web API Authorization

If IPVTL login password is enabled in Global Settings, web API requires authorization to work as well. To do that, add HTTP cookie "auth=<passwd>" in the header to each GET/POST API below.

Remember IPVTL web API will NOT work if login authorization fails.

Trancoding Config API

1. Set Config

POST http://<server_ip>:<service_port>/config

Example: http://127.0.0.1:8888/config

HTTP request body:

{
  "name": "IP Video Transcoding Live Configuration",
  "global": { # global settings
    "log": 0, # 32 if enable channel log file
    "httpPort": 8888, # web service port
    "aclFile": "", # IP ACL file path
    "autoRun": false, # auto start program on system boot (windows only)
    "autoRestart": 1, # auto restart channel on failure
    "folderRecur": false, # recursive folder streaming
    "loginPass": "" # login password
  },
  "channels": [ # channel configurations
    { # channel 1
      "enable": false, # true if start streaming on program start
      "input": { # transcoding input
        "sources": [
          {
            "format": "file", # input format
            "url": "", # source address
            "video": {
              "options": [] # gpu decode options
            }
          }
        ],
        "formatOptions": [], # blackmagic card options
        "customOptions": "" # custom source options
      },
      "output": { # transcoding output
        "targets": [
          { # target 1
            "format": "udp", # output format
            "url": "udp://127.0.0.1:1234", # target address
            "video": {
              "enable": true, # enable video output
              "codec": "h264", # video codec (see more)
              "width": 0, # video frame width
              "height": 0, # video frame height
              "frameRate": 0, # video frame rate
              "keyFrameInterval": 5, # key frame interval in seconds
              "quality": 0,
              "bitRate": 0, # video bitrate in Kb/s
              "scanType": 0, # 0: none;
                             # 1: deinterlace;
                             # 2: top-first interlace;
                             # 3: bottom-first interlace
              "options": ["-preset:v faster"] # codec specific options
            },
            "audio": {
              "enable": true, # enable audio output
              "codec": "aac", # audio codec (see more)
              "sampleRate": 0, # audio sample rate in Hz
              "channels": 2, # audio channels
              "bitRate": 0, # audio bitrate in Kb/s
            },
            "mux": {
              "bitRate": 0, # mux bitrate in Kb/s, should be larger than
                            # <video bitrate> + <audio bitrate>
              "cbr": false # true if output strict CBR
            },
            "rtmp": {
              "flashVer": "",
              "swfUrl": "",
              "user": "", # rtmp login username
              "passwd": "" # rtmp login password
            }
          },
          { # target 2 (if multi bitrate output)
            ...
          },
          ...
        ],
        "mapOptions": [], # MPTS source select options
        "formatOptions": [], # hls output options
        "filters": [""], # text/logo overlay
        "customOptions": "" # custom target options
      },
      "memo": ""
    },
    { # channel 2
      ...
    },
    ...
  ]
}
 

2. Get Config

GET http://<server_ip>:<service_port>/config

HTTP response body (same as above)

Transcoding Control API

1. Start Transcoding Channel

GET http://<server_ip>:<service_port>/channel<id>?start

Example: http://127.0.0.1:8888/channel1?start

2. Stop Transcoding Channel

GET http://<server_ip>:<service_port>/channel<id>?stop

Example: http://127.0.0.1:8888/channel1?stop

3. Get Transcoding Status

GET http://<server_ip>:<service_port>/status

Example: http://127.0.0.1:8888/status

HTTP response body:

{
  "channels": [
    {
      "state": "idle", # channel state (idle/running/stopping)
      "status": "12:34:56 30fps@1234Kbps" # channel running status
                                          # (onair time, fps, bitrate, etc)
    },
    ...
  ],
  "cpu": [
    10,11,12,13 # cpu load in percentage (per core)
  ]
}