Vivoh Logo

Vivoh Media Server General Usage

🔗

Usage: ./vivoh-media-server-linux


Vivoh Media Server 1.0.28


Usage: ./vivoh-media-server-linux -c 

-c config file in JSON format [REQUIRED]

Admin Pages

🔗

Usage: ./vivoh-media-server-linux

View server information, including details on CPU usage, streams and client connections. Immediately jump to player pages to preview video.

Access admin pages: http://SERVER_NAME:8000/admin

Websocket Streaming

🔗

Usage: ./vivoh-media-server-linux -c ws.json

Ingest a media source via RTMP. Stream via websocket.

Access player page at http://SERVER_NAME:8000/live/STREAM_NAME/ws.html

ws.json

{
  "rtmp": {
    "port": 1935,
    "chunk_size": 60000,
    "gop_cache": true,
    "ping": 60,
    "ping_timeout": 30
  },
  "http": {
    "port": 8000,
    "allow_origin": "*"
  }
}

RTMP Streaming

🔗

Usage: ./vivoh-media-server-linux -c rtmp.json

Ingest a media source via RTMP. Stream via RTMP.

Access stream via: rtmp://SERVER_NAME/live/STREAM_NAME

rtmp.json

{
  "logType": 2,
  "rtmp": {
    "port": 1935,
    "chunk_size": 60000,
    "gop_cache": true,
    "ping": 60,
    "ping_timeout": 30
  },
  "http": {
    "port": 8000,
    "allow_origin": "*"
  }
}

Stream Multicast

🔗

Usage: ./vivoh-media-server-linux -c multicast.json

Ingest a media source via RTMP. Stream via multicast.

Access stream via: rtp://239.0.0.1:1234
Requires FFmpeg (https://ffmpeg.org)

multicast.json

{
  "logType": 2,
  "rtmp" : {
    "port" : 1935,
    "chunk_size" : 60000,
    "gop_cache" : true,
    "ping" : 60,
    "ping_timeout" : 30
  },
  "http" : {
    "port" : 8000,
    "allow_origin" : "*"
  },
  "broadcast" : {
    "ffmpeg" : "/usr/local/bin/ffmpeg",
    "tasks" : [
      {
        "app" : "live",
        "edge" : "rtp://239.0.0.1:1234?pkt_size=1316",
        "flags" : "-codec copy -f rtp_mpegts"
      }
    ]
  }
}     

HLS Streaming

🔗

Usage: ./vivoh-media-server-linux -c hls.json

Ingest a media source via RTMP. Stream via HLS (HTTP Live Streaming).

Access stream via: http://SERVER_NAME:8000/live/STREAM_NAME/index.m3u8
Access player page at http://SERVER_NAME:8000/live/STREAM_NAME/hls.html
Requires FFmpeg (https://ffmpeg.org)

hls.json

{
    "logType": 2,
    "rtmp" : {
	"port" : 1935,
	"chunk_size" : 60000,
	"gop_cache" : true,
	"ping" : 60,
	"ping_timeout" : 30
    },
    "http" : {
	"port" : 8000,
	"mediaroot" : "./media",
	"allow_origin" : "*"
  },
    "trans" : {
	"ffmpeg" : "/usr/local/bin/ffmpeg",
	"tasks" : [
      {
          "app" : "live",
          "hls" : true,
          "hlsFlags" : "[hls_time=2 :hls_list_size=3 :hls_flags=delete_segments]"
      }
    ]
  }
}

RTMP Push

🔗

Usage: ./vivoh-media-server-linux -c push.json

Ingest a media source via RTMP. Relay via RTMP to another server.

Requires FFmpeg (https://ffmpeg.org)

push.json

{
  "logType": 2,
  "rtmp": {
    "port": 1935,
    "chunk_size": 60000,
    "gop_cache": true,
    "ping": 60,
    "ping_timeout": 30
  },
  "http": {
    "port": 8000,
    "allow_origin": "*"
  },
  "relay": {
    "ffmpeg": "/usr/local/bin/ffmpeg",
    "tasks": [
    {
      "app": "live",
      "mode": "push",
      "edge": "rtmp://192.168.0.10"
    }
    ]
  }
}

Ingest IPTV Mode

🔗

Usage: ./vivoh-media-server-linux -c ingest.json

Ingest IPTV with input flags and multiple output streams, each with independent flags

ingest.json

{
  "logLevel": "4",
  "rtmp": {
    "port": 1935,
    "chunk_size": 60000,
    "gop_cache": true,
    "ping": 60,
    "ping_timeout": 30
  },
  "http": {
    "port": 8010,
    "allow_origin": "*"
  },
  "ingest": {
    "ffmpeg": "/usr/local/bin/ffmpeg",
    "tasks": [
      {
        "inputFlags": "-f     rtp_mpegts",
        "input": "rtp://239.0.0.1:1234",
        "outputs": [
          {
            "name": "server1",
            "outputFlags": "-codec copy -f rtp_mpegts",
            "output": "rtp://239.0.0.2:1234"
          },
          {
            "name": "server2",
            "outputFlags": "-c:a aac -ar 48000 -b:a 128k -c:v h264 -profile:v main -crf 20 -g 48 -keyint_min 48 -sc_threshold 0 -b:v 2500k -maxrate 2675k -bufsize 3750k -bsf:a aac_adtstoasc -f flv",
            "output": "rtmp://localhost/live/iptv"
          }
        ]
      }
    ]
  }
}

HTTPS Access

🔗

Usage: ./vivoh-media-server-linux -c secure.json

Vivoh Media Server can serve player pages (websockets) over HTTPS+WSS. Configuration is compatible with Lets Encrypt certificates: to use, make sure you have key, cert and ca fields in the certs section of https. These certs are examples only.

Access websocket stream via: https://SERVER_NAME:8888/live/STREAM_NAME/ws.html

secure.json

{
  "logType": 2,
  "rtmp": {
    "port": 1935,
    "chunk_size": 60000,
    "gop_cache": true,
    "ping": 60,
    "ping_timeout": 30
  },
  "http": {
    "off": true,
    "allow_origin": "*"
  },
  "https": {
    "certs": {
      "key": "-----BEGIN RSA PRIVATE KEY-----\nYOURKEYHERE\n-----END RSA PRIVATE KEY-----\n",
      "cert": "-----BEGIN CERTIFICATE-----\nYOURCERTHERE\n-----END CERTIFICATE-----\n",
      "ca": "-----BEGIN CERTIFICATE---\nYOURCHAINFILEHERE\n-----END CERTIFICATE-----\n"
    },
    "port": 8888
  }
}

HTTPS Access (serving HLS)

🔗

Usage: ./vivoh-media-server-linux -c secure_with_hls.json

Vivoh Media Server can serve HLS over HTTPS. These certificates are self signed for use with testing only, and should not be used in production.

Access stream via: https://SERVER_NAME:8888/live/STREAM_NAME/hls.html
Requires FFmpeg (https://ffmpeg.org)

secure_with_hls.json

{
  "logType": 2,
  "rtmp": {
    "port": 1935,
    "chunk_size": 60000,
    "gop_cache": true,
    "ping": 60,
    "ping_timeout": 30
  },
  "http": {
    "off": true,
    "allow_origin": "*",
    "mediaroot": "./media"
  },
  "trans": {
    "ffmpeg": "/usr/local/bin/ffmpeg",
    "tasks": [
      {
        "app": "live",
        "hls": true,
        "hlsFlags": "[hls_time=2 :hls_list_size=3 :hls_flags=delete_segments]"
      }
    ]
  },
  "https": {
    "certs": {
      "key": "-----BEGIN RSA PRIVATE KEY-----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w0BCQEWEXN1cHBvcnRAdml2b2gu\nY29tMB4XDTE5MDIwODIyMDMyMFoXDTE5MDMxMDIyMDMyMFowZDELMAkGA1UEBhMC\nVVMxCzAJBgNVBAgMAk9SMREwDwYDVQQHDAhQb3J0bGFuZDETMBEGA1UECgwKVml2\nb2gsIExMQzEgMB4GCSqGSIb3DQEJARYRc3VwcG9ydEB2aXZvaC5jb20wgZ8wDQYJ\nKoZIhvcNAQEBBQADgY0AMIGJAoGBAKypnhFQi99DuDJQJfMq1XtD054aNNb2QBi7\nTZsRdR3wRuh1S5BjxytJ1vwlhSrlqOORO3NpmDMZ+L/I660hpce1AGQZkaH+U9C7\nk+jrJ0qtFW0fUQVYv+n5RmPTQlHIbg4CpFJYLkpJdOMkTuB3IOQe+OaAfhI8TYE0\n2t54rXgdAgMBAAEwDQYJKoZIhvcNAQELBQADgYEAABZ2frN659zNd8UBW7TjOg3B\nxoWCRUX3VZ0B02p2Wsxl3X9kkVsIHZtQQJp0JoHl4+L8xrJRFS0n9ZKegLanSBTO\nmFcAyvmBNcomNmnB3rMobdQo690cgCoFRvxNW3nYHomAfyQvRUInpPNz8Tk4l6/N\noKBJzG7TNAe3JxopofU=\n-----END CERTIFICATE-----\n"
    },
    "port": 8888
  }
}

Splunk Monitoring

🔗

Usage: ./vivoh-media-server-linux -c with_splunk.json

Monitor Vivoh Media Server status and events with Splunk Usage of the "stats" attribute is optional. If you include "stats", Vivoh Media Server will log server stats (CPU/memory/details) and stream statistics to you Splunk server. The interval is the time in seconds at which to log: (i.e.: interval: 1200 would be 20 minutes, 10 is every ten seconds, etc.).

with_splunk.json

{
  "rtmp": {
    "port": 1935,
    "chunk_size": 60000,
    "gop_cache": true,
    "ping": 60,
    "ping_timeout": 30
  },
  "logger": [ {
     "type": "splunk",
     "username" : "user123",
     "password":"pwd123",
     "scheme": "https",
     "host": "splunkd",
     "port" : "8089",
     "version": "default",
     "stats": { "server": true, "streams: "true", "interval": 10 }
    } ],
  "http": {
    "port": 8010,
    "allow_origin": "*"
  }
}