Skip to content

Instantly share code, notes, and snippets.

@mekya
mekya / ams-service.yaml
Created May 26, 2020 09:09
Ant Media Server Service file for K8S
apiVersion: v1
kind: Service
metadata:
name: ant-media-server
labels:
run: ant-media-server
spec:
type: LoadBalancer
ports:
- port: 5080
@mekya
mekya / ams-k8s-deployment.yaml
Created May 26, 2020 09:05
Ant Media Server K8S deployment file
apiVersion: apps/v1
kind: Deployment
metadata:
name: ant-media-server
spec:
selector:
matchLabels:
run: ant-media-server
replicas: 1
template:
@mekya
mekya / ams-gpu-k8s-deployment.yaml
Created May 26, 2020 09:03
Ant Media Server GPU K8S Deployment YAML
apiVersion: apps/v1
kind: Deployment
metadata:
name: ant-media-server
spec:
selector:
matchLabels:
run: ant-media-server
replicas: 1
template:
FROM nvidia/cuda:10.0-runtime-ubuntu18.04
ARG AntMediaServer
ARG MongoDBServer=
ARG MongoDBUsername=
ARG MongoDBPassword=
RUN apt-get update
RUN apt-get install -y libcap2 wget net-tools
FROM ubuntu:18.04
ARG AntMediaServer
ARG MongoDBServer=
ARG MongoDBUsername=
ARG MongoDBPassword=
RUN apt-get update
RUN apt-get install -y libcap2 wget net-tools
@mekya
mekya / simple_canvas_publish.html
Created March 31, 2020 10:25
Canvas publish to Ant Media Server
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<html>
<body>
<h1>local</h1>
<video id="local_video" autoplay></video>
<br />
<h1>remote</h1>
<video id="remote_video" autoplay></video>
</body>
{
"streamId":"650320906975923279669775",
"status":"created",
"type":"liveStream",
"name":"test_video",
"description":null,
"publish":true,
"date":1555431732095,
"plannedStartDate":null,
"duration":null,
@mekya
mekya / prepare_4_aws.sh
Created January 18, 2019 08:12
Prepare AWS Marketplace image of Ant Media Server
#!/bin/bash
#get the init script
sudo wget https://gist.githubusercontent.com/mekya/f8b85706e2ccbc24d6cfea29d64a042e/raw/init.sh -O /usr/local/antmedia/conf/init.sh
sudo chmod 755 /usr/local/antmedia/conf/init.sh
#get the antmedia file
sudo wget https://gist.githubusercontent.com/mekya/c58351d865aca77b3e00c50656c8482e/raw/antmedia -O /etc/init.d/antmedia
sudo systemctl daemon-reload
@mekya
mekya / antmedia
Last active January 18, 2019 08:06
AWS Marketplace service script
#!/bin/sh
# /etc/init.d/antmedia
### BEGIN INIT INFO
# Provides: antmedia
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts the ant media service