Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
curl http://127.0.0.1:8080/pingfrom core_client import Client
client = Client(
Manual version Build for Core v16.11+
{
"router": {
"blocked_prefixes": [
"/api"
],
"routes": {},
"ui_path": ""
}
}CORE_ROUTER_BLOCKED_PREFIXES="/api"
CORE_ROUTER_ROUTES=
CORE_ROUTER_UI_PATH={
"host": {
"name": ["domain.com"],
"auto": true
}
}CORE_HOST_NAME=domain.com
CORE_HOST_AUTO=true{
"metrics": {
"enable": false,
"enable_prometheus": false,
"range_sec": 300,
"interval_sec": 2
}
}CORE_METRICS_ENABLE=false
CORE_METRICS_ENABLE_PROMETHEUS=false
CORE_METRICS_RANGE_SECONDS=300
CORE_METRICS_INTERVAL_SECONDS=2{
"debug": {
"profiling": false,
"force_gc": 0,
"memory_limit_mbytes": 0,
}
}CORE_DEBUG_PROFILING=false
CORE_DEBUG_FORCE_GC=0
CORE_DEBUG_MEMORY_LIMIT_MBYTES=0
docker pull {image} && \
systemctl restart core.servicertmp://127.0.0.1:1935/live/12345.streammake init swagger
make rundocker run -d --name core -p 8080:8080 datarhei/core:latest
curl http://127.0.0.1:8080/api/v3/widget/process/someid \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
core_widget_process = client.v3_widget_get_process(
id="test"
)
print(core_widget_process)
curl http://127.0.0.1:8080/api/v3/rtmp \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
core_rtmp = client.v3_rtmp_get()
print(core_rtmp)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
channels, err := client.RTMPChannels()
fmt.Printf("%+v\n", channels)curl http://127.0.0.1:8080/api/v3/srt \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
core_srt = client.v3_srt_get()
print(core_srt)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
channels, err := client.SRTChannels()
fmt.Printf("%+v\n", channels)A simple SRT server for publishing and playing streams
{
"sessions": {
"enable": true,
"ip_ignorelist": [
"127.0.0.1/32",
"::1/128"
],
"session_timeout_sec": 30,
"persist": false,
"persist_interval_sec": 300,
"max_bitrate_mbit": 0,
"max_sessions": 0
}
}CORE_SESSIONS_ENABLE=false
CORE_SESSIONS_IP_IGNORELIST="127.0.0.1/32,::1/128"
CORE_SESSIONS_SESSION_TIMEOUT_SEC=30
CORE_SESSIONS_PERSIST=false
CORE_SESSIONS_PERSIST_INTERVAL_SEC=300
CORE_SESSIONS_MAXBITRATE_MBIT=0
CORE_SESSIONS_MAXSESSIONS=0A simple RTMP server for publishing and playing streams
{
"rtmp": {
"enable": false,
"enable_tls": false,
"address": ":1935",
"address_tls": ":1936",
"app": "/",
"token": ""
}
}CORE_RTMP_ENABLE=false
CORE_RTMP_ENABLE_TLS=false
CORE_RTMP_ADDRESS=":1935"
CORE_RTMP_ADDRESS_TLS=":1936"
CORE_RTMP_APP="/"
CORE_RTMP_TOKEN=Send a command to a process
{
"storage": {
CORE_STORAGE_MEMORY_AUTH_ENABLE=true
CORE_STORAGE_MEMORY_AUTH_USERNAME=admin
CORE_STORAGE_MEMORY_AUTH_PASSWORD=datarhei
CORE_STORAGE_MEMORY_MAXSIZEMBYTES=0
CORE_STORAGE_MEMORY_PURGE=falsedocker run -d --name core -p 8080:8080 datarhei/core:latestdocker run -d --name restreamer-ui -p 3000:3000 datarhei/restreamer-ui:latestimport "github.com/datarhei/core-client-go/v16"
client, err := coreclient.New(coreclient.Config{
Address: "https://example.com:8080",
Username: "foo",
Password: "bar",
})
if err != nil {
...
}
processes, err := client.ProcessList(coreclient.ProcessListOptions{})
if err != nil {
...
}srt://127.0.0.1:6000?mode=caller&transmode=live&streamid=...{
"log": {
"level": "info",
"topics": [],
"max_lines": 1000
}
}CORE_LOG_LEVEL=info
CORE_LOG_TOPIC=[]
CORE_LOG_MAXLINES=1000text/plain .txt
text/html .htm .html
...srt://127.0.0.1:6000?mode=caller&transmode=live&streamid=...&passphrase=foobarfoobar[resource],mode:[request|publish],token:[token]12345,mode:publish,token:foobar12345,mode:publish1234512345,token:foobarsrt://127.0.0.1:6000?mode=caller&transmode=live&streamid=12345,token:foobar{
"version": 3,
"id": "1",
"name": "super-core-1337",
"address": ":8080",
"log": {
"level": "warn"
}
}CORE_ID=1
CORE_NAME=super-core-1337
CORE_ADDRESS=:8080
CORE_LOG_LEVEL=warn{
"update_check": true,
"service": {
"url": "https://service.datarhei.com"
}
}export CORE_CONFIGFILE=./config/config.json{
"version": 3
}import (
"fmt"
"
curl http://127.0.0.1:8080/api/v3/skills \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
core_ffmpeg_skills = client.v3_skills_get()
print(core_ffmpeg_skills)curl http://127.0.0.1:8080/api/v3/log \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GETfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
core_log = client.v3_log_get(
format="console"
)
print(core_log)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
events, err := client.Log()
for _, e := range events {
fmt.Printf("%+v\n", e)
}curl http://127.0.0.1:8080/api/v3/process/test \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X PUT \
-d '{
"command": "stop"
}'from core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
client.v3_process_put_command(
id="test",
command="stop"
)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
err := client.ProcessCommand("test", "stop")
if err != nil {
...
}{
"storage": {
"disk": {
"dir": "./data",
"max_size_mbytes": 0,
"cache": {
"enable": true,
"max_size_mbytes": 0,
"ttl_seconds": 300,
"max_file_size_mbytes": 1,
"types": {
"allow": [],
"block": []
}
CORE_STORAGE_DISK_DIR="./data"
CORE_STORAGE_DISK_MAXSIZEMBYTES=0
CORE_STORAGE_DISK_CACHE_ENABLE=true
CORE_STORAGE_DISK_CACHE_MAXSIZEMBYTES=0
CORE_STORAGE_DISK_CACHE_TTLSECONDS=300
CORE_STORAGE_DISK_CACHE_MAXFILESIZEMBYTES=1
CORE_STORAGE_DISK_CACHE_TYPES_ALLOW=
CORE_STORAGE_DISK_CACHE_TYPES_BLOCK=".m3u8 .mpd"{
"ffmpeg": {
"binary": "ffmpeg",
"max_processes": 0,
"access": {
"input": {
"allow": [],
"block": []
},
"output": {
"allow": [],
"block": []
}
},
"log": {
CORE_FFMPEG_BINARY="ffmpeg"
CORE_FFMPEG_MAX_PROCESSES=0
CORE_FFMPEG_ACCESS_INPUT_ALLOW=a,b,c
CORE_FFMPEG_ACCESS_INPUT_BLOCK=a,b,c
CORE_FFMPEG_ACCESS_OUTPUT_ALLOW=a,b,c
CORE_FFMPEG_ACCESS_OUTPUT_BLOCK=a,b,cWe offer multiple forms of service and can provide support for any streaming, whether for professional broadcasting or personal use. We are excited to learn more about your project.
CORE_SESSION_BANDWIDTH_LIMIT=800sysctl -w net.core.netdev_budget_usecs=60000
sysctl -w net.core.netdev_budget=900
sysctl -w net.core.rmem_max=26214400
sysctl -w net.core.wmem_max=2621440echo "6" > /proc/irq/33/smp_affinity
echo "1-2" > /proc/irq/33/smp_affinity_list
echo c > /sys/class/net/eth0/queues/rx-0/rps_cpus
echo c > /sys/class/net/eth1/queues/rx-0/rps_cpus
echo c > /sys/class/net/eth0/queues/tx-0/xps_cpus
echo c > /sys/class/net/eth0/queues/tx-1/xps_cpus
echo c > /sys/class/net/eth0/queues/tx-2/xps_cpus
echo c > /sys/class/net/eth0/queues/tx-3/xps_cpus
echo c > /sys/class/net/eth0/queues/tx-4/xps_cpus
/sbin/ethtool -K eth0 rx-checksum on
/sbin/ethtool -K eth1 rx-checksum ondocker run {...params} datarhei/core:latestdocker run {...params} --privileged datarhei/core:rpi-latestdocker run --detach --name core \
--privileged \
--security-opt seccomp=unconfined \
--env CORE_API_AUTH_ENABLE=true \
--env CORE_API_AUTH_USERNAME=admin \
--env CORE_API_AUTH_PASSWORD=datarhei \
--publish 1935:1935 \
--publish 1936:1936 \
--publish 6000:6000/udp \
--publish 8080:8080 \
--publish 8181:8181 \
--volume ${PWD}/core/config:/core/config \
--volume ${PWD}/core/data:/core/data \
datarhei/core:latestdocker run --detach --name core --privileged --security-opt seccomp=unconfined --env CORE_API_AUTH_ENABLE=true --env CORE_API_AUTH_USERNAME=admin --env CORE_API_AUTH_PASSWORD=datarhei --publish 1935:1935 --publish 1936:1936 --publish 6000:6000/udp --publish 8080:8080 --publish 8181:8181 --volume %USERPROFILE%/core/config:/core/config --volume %USERPROFILE%/core/data:/core/data datarhei/core:latestdocker ...
--publish $HOST_PORT:$CORE_PORT \
...--publish 8080:8080docker ...
--volume $HOST_DIR:$CORE_DIR \
...--volume ${PWD}/core/config:/core/config--volume ${PWD}/core/data:/core/datadocker ...
--env CORE_API_AUTH_ENABLE=true \
--env CORE_API_AUTH_USERNAME=admin \
--env CORE_API_AUTH_PASSWORD=datarhei \
...--privileged--security-opt seccomp=unconfineddocker run --detach --name core {params ...} {image}docker stop coredocker kill core
docker rm coredocker pull {image}
docker kill core
docker rm core
docker run {params ...} {image}docker top coredocker logs core -f[Unit]
Description=datarhei Core
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStart=/usr/bin/docker run \
--rm --name core --privileged \
--security-opt seccomp=unconfined \
-v /opt/core/config:/core/config \
-v /opt/core/data:/core/data \
-p 8080:8080 -p 8181:8181 \
-p 1935:1935 -p 1936:1936 \
-p 6000:6000/udp \
datarhei/core:latest
ExecStop=/usr/bin/docker kill core
[Install]
WantedBy=multi-user.targetsystemctl daemon-reload && systemctl enable core.servicesystemctl disable core.servicesystemctl start core.servicesystemctl stop core.servicedocker pull datarhei/core:latest && \
systemctl restart core.servicesystemctl status core.servicejournald -u core.service -fcurl http://127.0.0.1:8080/api/v3/skills/reload \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
client.v3_skills_reload()import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
err := client.SkillsReload()
if err != nil {
...
}
skills, err := client.Skills()
fmt.Printf("%+v\n", skills)pip install https://github.com/datarhei/core-client-python/archive/refs/heads/main.tar.gzfrom core_client import Client
client = Client(
base_url="https://example.com:8080",
username="foo",
password="bar"
)
client.login()
process_list = client.v3_process_get_list()
for process in processes:
print(process.id)import asyncio
from core_client import AsyncClient
client = AsyncClient(
base_url="https://example.com:8080",
username="foo",
password="bar"
)
client.login()
process_list = await client.v3_process_get_list()
for process in processes:
print(process.id)$ git clone [email protected]:datarhei/core.git
$ cd core
$ make$ env GOOS=linux GOARCH=arm go build -o core-linux-arm
$ env GOOS=linux GOARCH=arm64 go build -o core-linux-arm64
$ env GOOS=freebsd GOARCH=amd64 go build -o core-freebsd-amd64
$ env GOOS=windows GOARCH=amd64 go build -o core-windows-amd64
$ env GOOS=macos GOARCH=amd64 go build -o core-macos-amd64
...$ docker build -t core .
$ docker build -f Dockerfile.bundle \
--build-args CORE_IMAGE=core \
--build-args FFMPEG_IMAGE=datarhei/base:alpine-ffmpeg-latest \
-t core-bundle .
$ docker run -it --rm -v ${PWD}/data:/core/data -p 8080:8080 core-bundle{
"storage": {
"s3": [
{
"name": "aws",
"mountpoint": "/aws",
"auth": {
"enable": true,
"username": "foo",
"password": "bar"
},
"endpoint": "...",
"access_key_id": "...,
"secret_access_key": "...",
"bucket": "...",
"region": "...",
"use_ssl": true,
},
...
]
}
}{
"api": {
"read_only": false,
"access": {
"http": {
"allow": [],
"block": []
},
"https": {
"allow": [],
"block": []
}
},
"auth": {
"enable": fals,
"disable_localhost": false,
"username": "",
"password": "",
"jwt": {
"secret": ""
},
"auth0": {
"enable": false,
"tenants": []
}
}
}
}CORE_STORAGE_S3=https://access_key_id:[email protected]/bucket?name=aaa&mount=/abc&username=xxx&password=yyyCORE_API_READ_ONLY=false
CORE_API_ACCESS_HTTP_ALLOW="127.0.0.1/32,::1/128"
CORE_API_ACCESS_HTTP_BLOCK="127.0.0.1/32,::1/128"
CORE_API_ACCESS_HTTPS_ALLOW="127.0.0.1/32,::1/128"
CORE_API_ACCESS_HTTPS_DENY="127.0.0.1/32,::1/128"
CORE_API_AUTH_ENABLE=true
CORE_API_AUTH_DISABLE_LOCALHOST=true
CORE_API_AUTH_USERNAME=
CORE_API_AUTH_PASSWORD=
CORE_API_AUTH_JWT_SECRET=mySecret
CORE_API_AUTH_AUTH0_ENABLE=false
CORE_API_AUTH_AUTH0_TENANTS={
"domain": "",
"audience": "",
"clientid": "",
"users": [],
}auth0://[clientid]@[domain]?aud=[audience]&user=...&user=...curl http://127.0.0.1:8080/api/v3/session?collectors=hls,rtmp \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
core_sessions = client.v3_session_get(
collectors="hls,rtmp"
)
print(core_sessions)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
sessions, err := client.Sessions([]string{"hls", "rtmp"})
fmt.Printf("%+v\n", sessions)curl http://127.0.0.1:8080/api/v3/process/test/metadata/desc \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"title": "My title",
"description": "My description."
}'from core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
client.v3_process_put_metadata(
id="test",
key="desc",
data={
"title": "My title",
"description": "My description."
}
){
"options": ["-err_detect", "ignore_err", "-y"],
"input": [
{
"address": "testsrc2=rate=25:size=640x360",
"id": "input_0",
"options": ["-f", "lavfi", "-re"]
},
{
"address": "anullsrc=r=44100:cl=stereo",
"id": "input_1",
"options": ["-f", "lavfi"]
}
]
}git clone github.com/datarhei/ffmpegcd ffmpeg...
RUN cd /dist/ffmpeg-${FFMPEG_VERSION} && \
patch -p1 < /contrib/ffmpeg-jsonstats.patch && \
patch -p1 < /contrib/ffmpeg-hlsbitrate.patch && \
./configure \
--extra-version=datarhei \
--prefix="${SRC}" \
--extra-libs="-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lz -lc -ldl" \
--enable-nonfree \
--enable-gpl \
--enable-version3 \
--enable-postproc \
--enable-static \
--enable-openssl \
--enable-libxml2 \
--enable-libv4l2 \
--enable-v4l2_m2m \
--enable-libfreetype \
--enable-libsrt \
--enable-libx264 \
--enable-libx265 \
--enable-libvpx \
--enable-libmp3lame \
--enable-libopus \
--enable-libvorbis \
--disable-ffplay \
--disable-shared && \
make -j$(nproc) && \
make install
..../Build.sh defaultgit clone [email protected]:datarhei/core.gitcd coredocker build -t datarhei/base:alpine-core-latest .docker build \
-f Dockerfile.bundle \
--build-arg CORE_IMAGE=datarhei/base:alpine-core-latest \
--build-arg FFMPEG_IMAGE=datarhei/base:alpine-ffmpeg-latest \
-t core-bundle:dev .docker run {...params} --runtime=nvidia datarhei/core:cuda-latestdocker run {...params} --volume /dev/dri:/dev/dri datarhei/core:vaapi-latest--publish 8181:8181--publish 1935:1935--publish 1936:1936--publish 6000:6000/udpdocker ...
--net=host \
...curl http://127.0.0.1:8080/api/v3/session/active?collectors=hls,rtmp \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
core_active_sessions = client.v3_session_get_active(
collectors="hls,rtmp"
)
print(core_active_sessions)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
sessions, err := client.SessionsActive([]string{"hls", "rtmp"})
fmt.Printf("%+v\n", sessions)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
data := map[string]string{
"title": "My title",
"description": "My description.",
}
err := client.ProcessMetadataSet("test", "desc", data)
if err != nil {
...
}curl http://127.0.0.1:8080/api/v3/process/test/metadata/desc \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
client.v3_process_get_metadata(
id="test",
key="desc"
)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
metadata, err := client.ProcessMetadata("test", "desc")
if err != nil {
...
}
fmt.Printf("%+v\n", metadata){
"log": [
"ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers",
" built with Apple clang version 14.0.0 (clang-1400.0.29.102)",
" configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox",
" libavutil 57. 28.100 / 57. 28.100",
" libavcodec 59. 37.100 / 59. 37.100",
" libavformat 59. 27.100 / 59. 27.100",
" libavdevice 59. 7.100 / 59. 7.100",
" libavfilter 8. 44.100 / 8. 44.100",
" libswscale 6. 7.100 / 6. 7.100",
" libswresample 4. 7.100 / 4. 7.100",
" libpostproc 56. 6.100 / 56. 6.100",
"Input #0, lavfi, from 'testsrc2=rate=25:size=640x360':",
" Duration: N/A, start: 0.000000, bitrate: N/A",
" Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn",
"Input #1, lavfi, from 'anullsrc=r=44100:cl=stereo':",
" Duration: N/A, start: 0.000000, bitrate: 705 kb/s",
" Stream #1:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s",
"At least one output file must be specified"
],
"streams": [
{
"bitrate_kbps": 0,
"channels": 0,
"codec": "rawvideo",
"coder": "",
"duration_sec": 0,
"format": "lavfi",
"fps": 0,
"height": 360,
"index": 0,
"language": "und",
"layout": "",
"pix_fmt": "yuv420p",
"sampling_hz": 0,
"stream": 0,
"type": "video",
"url": "testsrc2=rate=25:size=640x360",
"width": 640
},
{
"bitrate_kbps": 705,
"channels": 0,
"codec": "pcm_u8",
"coder": "",
"duration_sec": 0,
"format": "lavfi",
"fps": 0,
"height": 0,
"index": 1,
"language": "und",
"layout": "stereo",
"pix_fmt": "",
"sampling_hz": 44100,
"stream": 0,
"type": "audio",
"url": "anullsrc=r=44100:cl=stereo",
"width": 0
}
]
}{
"tls": {
"address": ":8181",
"enable": false,
"auto": false,
"mail": "[email protected]",
"cert_file": "",
"key_file": "",
}
}CORE_TLS_ADDRESS=":8181"
CORE_TLS_ENABLE=false
CORE_TLS_AUTO=false
[email protected]
CORE_TLS_CERT_FILE=
CORE_TLS_KEY_FILE={
"address": ":80",
"host": {
"name": ["domain.com"],
"auto": false
},
"tls": {
"address": ":8181",
"enable": true,
"auto": true,
"mail": "[email protected]"
}
}CORE_ADDRESS=:80
CORE_HOST_NAME=domain.com
CORE_HOST_AUTO=false
CORE_TLS_ADDRESS=:8181
CORE_TLS_ENABLE=true
CORE_TLS_AUTO=true
[email protected]{
"host": {
"name": ["domain.com"],
"auto": false
},
"tls": {
"address": ":8181",
"enable": true,
"auto": false,
"cert_file": "/core/config/example.cert",
"key_file": "/core/config/example.key"
}
}CORE_HOST_NAME=domain.com
CORE_HOST_AUTO=false
CORE_TLS_ADDRESS=:8181
CORE_TLS_ENABLE=true
CORE_TLS_AUTO=false
CORE_TLS_CERT_FILE=/core/config/example.cert
CORE_TLS_KEY_FILE=/core/config/example.keyopenssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem -subj '/CN=localhost'openssl ecparam -name secp521r1 -genkey -out key.pem
openssl req -new -x509 -key key.pem -out cert.pem -days 365 -subj '/CN=localhost'curl http://127.0.0.1:8080/api/v3/process/test/probe \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
core_process_test_probe = client.v3_process_get_probe(
id="test"
)
print(core_process_test_probe)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
probe, err := client.ProcessProbe("test")
if err != nil {
...
}
fmt.Printf("%+v\n", probe){
"created_at": 1671109892,
"history": [],
"log": [
[
"1671111449",
"[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.m3u8' for writing"
],
[
"1671111449",
"[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4' for writing"
],
[
"1671111451",
"[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_0778.mp4' for writing"
],
[
"1671111451",
"[mp4 @ 0x7fa31f80ee40] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_0768.mp4' for writing"
],
[
"1671111451",
"[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4' for writing"
],
[
"1671111453",
"[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_0779.mp4' for writing"
],
[
"1671111453",
"[mp4 @ 0x7fa31f80ee40] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_0769.mp4' for writing"
],
[
"1671111453",
"[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.m3u8' for writing"
],
...
],
"prelude": [
"ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers",
" built with Apple clang version 14.0.0 (clang-1400.0.29.102)",
" configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox",
" libavutil 57. 28.100 / 57. 28.100",
" libavcodec 59. 37.100 / 59. 37.100",
" libavformat 59. 27.100 / 59. 27.100",
" libavdevice 59. 7.100 / 59. 7.100",
" libavfilter 8. 44.100 / 8. 44.100",
" libswscale 6. 7.100 / 6. 7.100",
" libswresample 4. 7.100 / 4. 7.100",
" libpostproc 56. 6.100 / 56. 6.100",
"Input #0, lavfi, from 'testsrc2=rate=25:size=640x360':",
" Duration: N/A, start: 0.000000, bitrate: N/A",
" Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn",
"Input #1, lavfi, from 'anullsrc=r=44100:cl=stereo':",
" Duration: N/A, start: 0.000000, bitrate: 705 kb/s",
" Stream #1:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s",
"Stream mapping:",
" Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))",
" Stream #1:0 -> #0:1 (pcm_u8 (native) -> aac (native))",
"Press [q] to stop, [?] for help",
"[libx264 @ 0x7fa31ef08540] using SAR=1/1",
"[libx264 @ 0x7fa31ef08540] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2",
"[libx264 @ 0x7fa31ef08540] profile Constrained Baseline, level 3.0, 4:2:0, 8-bit",
"[libx264 @ 0x7fa31ef08540] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=4 lookahead_threads=4 sliced_threads=1 slices=4 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=50 keyint_min=26 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=cbr mbtree=0 bitrate=1024 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1024 vbv_bufsize=1024 nal_hrd=none filler=0 ip_ratio=1.40 aq=0",
"[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4' for writing",
"[http @ 0x7fa31f80fac0] HTTP error 404 Not Found",
"Output #0, tee, to '[f=hls:start_number=0:hls_time=2:hls_list_size=6:hls_flags=append_list+delete_segments+program_date_time+independent_segments+temp_file:hls_delete_threshold=4:hls_segment_type=fmp4:hls_fmp4_init_filename=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4:hls_fmp4_init_resend=1:hls_segment_filename=http\\\\://admin\\\\:xxx@localhost\\\\:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_%04d.mp4:master_pl_name=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.m3u8:master_pl_publish_rate=2:method=PUT]http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0.m3u8|[f=flv]rtmp://localhost:1935/live/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.stream?token=foobar|[f=mpegts]srt://localhost:6000?mode=caller\u0026transtype=live\u0026streamid=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf,mode:publish,token:abc':",
" Metadata:",
" title : http://example.com:8080/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf/oembed.json",
" service_provider: datarhei-Restreamer",
" encoder : Lavf59.27.100",
" Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv420p(progressive), 640x360 [SAR 1:1 DAR 16:9], q=2-31, 1024 kb/s, 25 fps, 25 tbn",
" Metadata:",
" encoder : Lavc59.37.100 libx264",
" Side data:",
" cpb: bitrate max/min/avg: 1024000/0/1024000 buffer size: 1024000 vbv_delay: N/A",
" Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 64 kb/s",
" Metadata:",
" encoder : Lavc59.37.100 aac"
]
}curl http://127.0.0.1:8080/api/login \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}'{
"access_token": "eyJz93a...k4laUWw",
"refresh_token": "eyJz93a...k4laUWx"
}curl http://127.0.0.1:8080/api/ \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJz93a...k4laUWw' \
-X GETcurl http://127.0.0.1:8080/awsfs/path/to/a/file.txt -X PUT -d @somefile.txtcurl http://127.0.0.1:8080/awsfs/path/to/a/file.txt -o file.txtcurl http://127.0.0.1:8080/awsfs/path/to/a/file.txt -X DELETEecho 'test' > example.txt && \
curl http://127.0.0.1:8080/api/v3/fs/aws/example.txt \
-d @example.txt \
-X PUTfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
client.v3_fs_put_file(
name: "aws",
path: "example.txt",
data: b"test"
)import (
"strings"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
data := strings.NewReader("test")
err := client.FilesystemAddFile("aws", "/example.txt", data)curl http://127.0.0.1:8080/api/v3/process/test/report \
-H 'accept: application/json' \
-X GETcurl http://127.0.0.1:8080/api/v3/process/test/state \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080",
username="YOUR_USERNAME",
password="YOUR_PASSWORD",
)
client.login()
print(client.token())import "github.com/datarhei/core-client-go/v16"
client, err := coreclient.New(coreclient.Config{
Address: "http://127.0.0.1:8080",
Username: "YOUR_USERNAME",
Password: "YOUR_PASSWORD",
})
if err != nil {
...
}curl http://127.0.0.1:8080/api/login \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJz93a...k4laUWw' \
-X POSTfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080",
auth0_token="eyJz93a...k4laUWw",
)
client.login()import "github.com/datarhei/core-client-go/v16"
client, err := coreclient.New(coreclient.Config{
Address: "http://127.0.0.1:8080",
Auth0Token: "eyJz93a...k4laUWw",
})
if err != nil {
...
}curl http://127.0.0.1:8080/api/login/refresh \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleGkiOjg2NDAwLCJleHAiOjE2NzA1Mjc2MjUsImlhdCI6MTY3MDQ0MTIyNSwiaXNzIjoiZGF0YXJoZWktY29yZSIsImp0aSI6IjczM2Q4Y2UxLTY3YjEtNDM3Yy04YzQ1LTM3Yjg4MmZjMWExZiIsInN1YiI6ImFkbWluIiwidXNlZm9yIjoicmVmcmVzaCJ9.3lqZFJeN7ILfM4DTi0-ZJ7kAzqTMR-yRgRl3o89O-jY' \
-X GET{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleGkiOjYwMCwiZXhwIjoxNjcwNDQxODI1LCJpYXQiOjE2NzA0NDEyMjUsImlzcyI6ImRhdGFyaGVpLWNvcmUiLCJqdGkiOiJhZWU4OTZhNS05ZThhLTRlMGQtYjk4Zi01NTA3NTUwNzA2YzUiLCJzdWIiOiJhZG1pbiIsInVzZWZvciI6ImFjY2VzcyJ9.xrnIfNZU9Z0nrUxYddpPQOMO7ypHA2vuqrYuAr95elg"
}from core_client import Client
client = Client(
base_url="http://127.0.0.1:8080",
refresh_token="eyJz93a...k4laUWw",
)
client.token_refresh()accessToken, refreshToken := client.Tokens()client, err := coreclient.New(coreclient.Config{
Address: "http://127.0.0.1:8080",
Username: "YOUR_USERNAME",
Password: "YOUR_PASSWORD",
AccessToken: accessToken,
RefreshToken: refreshToken,
})curl http://127.0.0.1:8080/api/login/refresh \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJz93a...k4laUWx' \
-X GETecho 'test' > example.txt && \
curl http://127.0.0.1:8080/api/v3/fs/disk/example.txt \
-d @example.txt \
-X PUTfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
client.v3_fs_put_file(
name: "disk",
path: "example.txt",
data: b"test"
)import (
"strings"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
data := strings.NewReader("test")
err := client.FilesystemAddFile("disk", "/example.txt", data)curl "http://127.0.0.1:8080/api/v3/fs/disk?sort=name&order=asc" \
-X GETfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
core_memfs_list = client.v3_fs_get_file_list(name="disk")
print(core_memfs_list)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
files, err := client.FilesystemList("disk", "/*.", coreclient.SORT_NAME, coreclient.ORDER_ASC)
for _, file := range files {
fmt.Printf("%+v\n", file)
}curl http://127.0.0.1:8080/api/v3/fs/disk/example.txt \
-X GETfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
core_memfs_file = client.v3_fs_get_file(
name="disk",
path="example.txt"
)
print(core_memfs_file)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
data, err := client.FilesystemGetFile("disk", "/example.txt")
defer data.Close()curl http://127.0.0.1:8080/api/v3/fs/disk/example.txt \
-X DELETEfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
client.v3_fs_delete_file(
name="disk",
path="example.txt"
)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
err := client.FilesystemDeleteFile("disk", "/example.txt")curl "http://127.0.0.1:8080/api/v3/fs/aws?sort=name&order=asc" \
-X GETfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
core_memfs_list = client.v3_fs_get_file_list(name="aws")
print(core_memfs_list)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
files, err := client.FilesystemList("aws", "/*.", coreclient.SORT_NAME, coreclient.ORDER_ASC)
for _, file := range files {
fmt.Printf("%+v\n", file)
}curl http://127.0.0.1:8080/api/v3/fs/aws/example.txt \
-X GETfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
core_memfs_file = client.v3_fs_get_file(
name="aws",
path="example.txt"
)
print(core_memfs_file)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
data, err := client.FilesystemGetFile("aws", "/example.txt")
defer data.Close()curl http://127.0.0.1:8080/api/v3/fs/aws/example.txt \
-X DELETEfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
client.v3_fs_delete_file(
name="aws",
path="example.txt"
)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
err := client.FilesystemDeleteFile("aws", "/example.txt")from core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
core_process_test_report = client.v3_process_get_report(
id="test"
)
print(core_process_test_report)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
report, err := client.ProcessReport("test")
if err != nil {
...
}
fmt.Printf("%+v\n", report){
"command": [
"-err_detect",
"ignore_err",
"-y",
"-f",
"lavfi",
"-re",
"-i",
"testsrc2=rate=25:size=640x360",
"-f",
"lavfi",
"-i",
"anullsrc=r=44100:cl=stereo",
"-dn",
"-sn",
"-map",
"0:0",
"-codec:v",
"libx264",
"-preset:v",
"ultrafast",
"-b:v",
"1024k",
"-maxrate:v",
"1024k",
"-bufsize:v",
"1024k",
"-r",
"25",
"-sc_threshold",
"0",
"-pix_fmt",
"yuv420p",
"-g",
"50",
"-keyint_min",
"50",
"-fps_mode",
"cfr",
"-tune:v",
"zerolatency",
"-map",
"1:0",
"-filter:a",
"aresample=osr=44100:ochl=stereo",
"-codec:a",
"aac",
"-b:a",
"64k",
"-shortest",
"-flags",
"+global_header",
"-tag:v",
"7",
"-tag:a",
"10",
"-f",
"tee",
"[f=hls:start_number=0:hls_time=2:hls_list_size=6:hls_flags=append_list+delete_segments+program_date_time+independent_segments+temp_file:hls_delete_threshold=4:hls_segment_type=fmp4:hls_fmp4_init_filename=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4:hls_fmp4_init_resend=1:hls_segment_filename=http\\\\://admin\\\\:xxx@localhost\\\\:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_%04d.mp4:master_pl_name=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.m3u8:master_pl_publish_rate=2:method=PUT]http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0.m3u8|[f=flv]rtmp://localhost:1935/live/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.stream?token=foobar|[f=mpegts]srt://localhost:6000?mode=caller\u0026transtype=live\u0026streamid=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf,mode:publish,token:abc"
],
"cpu_usage": 3.022,
"exec": "running",
"last_logline": "[hls @ 0x7fa31f810240] Opening 'http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4' for writing",
"memory_bytes": 21532672,
"order": "start",
"progress": {
"bitrate_kbit": 0,
"drop": 0,
"dup": 0,
"fps": 24.833,
"frame": 62221,
"inputs": [
{
"address": "testsrc2=rate=25:size=640x360",
"avstream": null,
"bitrate_kbit": 0,
"codec": "rawvideo",
"coder": "",
"format": "lavfi",
"fps": 0,
"frame": 0,
"height": 360,
"id": "input_0",
"index": 0,
"packet": 0,
"pix_fmt": "yuv420p",
"pps": 0,
"size_kb": 0,
"stream": 0,
"type": "video",
"width": 640
},
{
"address": "anullsrc=r=44100:cl=stereo",
"avstream": null,
"bitrate_kbit": 0,
"codec": "pcm_u8",
"coder": "",
"format": "lavfi",
"fps": 0,
"frame": 0,
"id": "input_1",
"index": 1,
"layout": "stereo",
"packet": 0,
"pps": 0,
"sampling_hz": 44100,
"size_kb": 0,
"stream": 0,
"type": "audio"
}
],
"outputs": [
{
"address": "[f=hls:start_number=0:hls_time=2:hls_list_size=6:hls_flags=append_list+delete_segments+program_date_time+independent_segments+temp_file:hls_delete_threshold=4:hls_segment_type=fmp4:hls_fmp4_init_filename=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4:hls_fmp4_init_resend=1:hls_segment_filename=http\\\\://admin\\\\:xxx@localhost\\\\:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_%04d.mp4:master_pl_name=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.m3u8:master_pl_publish_rate=2:method=PUT]http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0.m3u8|[f=flv]rtmp://localhost:1935/live/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.stream?token=foobar|[f=mpegts]srt://localhost:6000?mode=caller\u0026transtype=live\u0026streamid=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf,mode:publish,token:abc",
"avstream": null,
"bitrate_kbit": 0,
"codec": "h264",
"coder": "",
"format": "tee",
"fps": 0,
"frame": 0,
"height": 360,
"id": "output_0",
"index": 0,
"packet": 0,
"pix_fmt": "yuv420p",
"pps": 0,
"size_kb": 0,
"stream": 0,
"type": "video",
"width": 640
},
{
"address": "[f=hls:start_number=0:hls_time=2:hls_list_size=6:hls_flags=append_list+delete_segments+program_date_time+independent_segments+temp_file:hls_delete_threshold=4:hls_segment_type=fmp4:hls_fmp4_init_filename=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.mp4:hls_fmp4_init_resend=1:hls_segment_filename=http\\\\://admin\\\\:xxx@localhost\\\\:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0_%04d.mp4:master_pl_name=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.m3u8:master_pl_publish_rate=2:method=PUT]http://admin:xxx@localhost:8080/memfs/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf_output_0.m3u8|[f=flv]rtmp://localhost:1935/live/f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf.stream?token=foobar|[f=mpegts]srt://localhost:6000?mode=caller\u0026transtype=live\u0026streamid=f13d9ff4-8ac1-458d-8d61-6e7d8ad06faf,mode:publish,token:abc",
"avstream": null,
"bitrate_kbit": 0,
"codec": "aac",
"coder": "",
"format": "tee",
"fps": 0,
"frame": 0,
"id": "output_0",
"index": 0,
"layout": "stereo",
"packet": 0,
"pps": 0,
"sampling_hz": 44100,
"size_kb": 0,
"stream": 1,
"type": "audio"
}
],
"packet": 0,
"q": 29,
"size_kb": 0,
"speed": 1,
"time": 2488.84
},
"reconnect_seconds": -1,
"runtime_seconds": 2489
}from core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
core_process_test_state = client.v3_process_get_state(
id="test"
)
print(core_process_test_state)curl http://127.0.0.1:8080/memfs/path/to/a/file.txt -X DELETEcurl http://127.0.0.1:8080/memfs/path/to/a/file.txt -X PUT -d @somefile.txtcurl http://127.0.0.1:8080/memfs/path/to/a/file.txt -o file.txtimport (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
state, err := client.ProcessState("test")
if err != nil {
...
}
fmt.Printf("%+v\n", state)echo 'test' > example.txt && \
curl http://127.0.0.1:8080/api/v3/fs/mem/example.txt \
-d @example.txt \
-X PUTfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
client.v3_fs_put_file(
name: "mem",
path: "example.txt",
data: b"test"
)import (
"strings"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
data := strings.NewReader("test")
err := client.FilesystemAddFile("mem", "/example.txt", data)curl "http://127.0.0.1:8080/api/v3/fs/mem?sort=name&order=asc" \
-X GETfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
core_memfs_list = client.v3_fs_get_file_list(name="mem")
print(core_memfs_list)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
files, err := client.FilesystemList("mem", "/*.", coreclient.SORT_NAME, coreclient.ORDER_ASC)
for _, file := range files {
fmt.Printf("%+v\n", file)
}curl http://127.0.0.1:8080/api/v3/fs/mem/example.txt \
-X GETfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
core_memfs_file = client.v3_fs_get_file(
name="mem",
path="example.txt"
)
print(core_memfs_file)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
data, err := client.FilesystemGetFile("mem", "/example.txt")
defer data.Close()curl http://127.0.0.1:8080/api/v3/fs/mem/example2.txt \
-d 'example.txt'
-X PATCHMissed.curl http://127.0.0.1:8080/api/v3/fs/mem/example.txt \
-X DELETEfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
client.v3_fs_delete_file(
name="mem",
path="example.txt"
)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
err := client.FilesystemDeleteFile("mem", "/example.txt")ffmpeg -f lavfi -re -i testsrc2=size=640x480:rate=25 -c:v libx264 -preset:v ultrafast -r 25 -g 50 -f hls -start_number 0 -hls_time 2 -hls_list_size 6 -hls_flags delete_segments+temp_file+append_list -method PUT -hls_segment_filename http://127.0.0.1:8080/memfs/foobar_%04d.ts -y http://127.0.0.1:8080/memfs/foobar.m3u8curl http://127.0.0.1:8080/api/v3/config \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GETfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
core_config = client.v3_config_get()
print(core_config)import (
"github.com/datarhei/core-client-go/v16"
"github.com/datarhei/core-client-go/v16/api"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
version, config, err := client.Config()if version == 1 {
configv1 := config.Config.(api.ConfigV1)
} else if version == 2 {
configv2 := config.Config.(api.ConfigV2)
} else if version == 3 {
configv3 := config.Config.(api.ConfigV3)
}{
"version": 3
}curl http://127.0.0.1:8080/api/v3/config \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X PUT \
-d '{
"version": 3,
"name": "core-1",
"log": {
"level": "debug"
}
}'from core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
client.v3_config_put(config: {
"version": 3,
"name": "core-1",
"log": {
"level": "debug"
}
})import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
type cfg struct{
Version int64 `json:"version"`
Name string `json:"name"`
Log struct{
Level string `json:"level"`
} `json:"log"`
}
var config = &cfg{
Version: 3,
Name: "core-1",
}
config.Log.Level = "debug"
err := client.ConfigSet(config)curl http://127.0.0.1:8080/api/v3/config/reload \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GETfrom core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
client.v3_config_reload()import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
err := client.ConfigReload(){
"version": 3,
"id": "03a1d1af-b947-4a13-a169-d3f2238714ee",
"name": "super-core-1337",
"address": ":8080",
"update_check": true,
"log": {
"level": "info",
"topics": [],
"max_lines": 1000
},
"db": {
"dir": "/core/config"
},
"host": {
"name": [
"example.com"
],
"auto": true
},
"api": {
"read_only": false,
"access": {
"http": {
"allow": [],
"block": []
},
"https": {
"allow": [],
"block": []
}
},
"auth": {
"enable": true,
"disable_localhost": false,
"username": "admin",
"password": "datarhei",
"jwt": {
"secret": "cz$L%a(d%%[lLh;Y8dahIjcQx+tBq(%5"
},
"auth0": {
"enable": false,
"tenants": []
}
}
},
"tls": {
"address": ":8181",
"enable": true,
"auto": true,
"email": "[email protected]",
"cert_file": "",
"key_file": ""
},
"storage": {
"disk": {
"dir": "/core/data",
"max_size_mbytes": 50000,
"cache": {
"enable": true,
"max_size_mbytes": 500,
"ttl_seconds": 300,
"max_file_size_mbytes": 1,
"types": {
"allow": [],
"block": [
".m3u8",
".mpd"
]
}
}
},
"memory": {
"auth": {
"enable": true,
"username": "admin",
"password": "WH8y3alD7pHGsuBGwb"
},
"max_size_mbytes": 2000,
"purge": true
},
"s3": [],
"cors": {
"origins": [
"*"
]
},
"mimetypes_file": "./mime.types"
},
"rtmp": {
"enable": true,
"enable_tls": true,
"address": ":1935",
"address_tls": ":1936",
"app": "/",
"token": "n4jk235nNJKN4k5n24k"
},
"srt": {
"enable": true,
"address": ":6000",
"passphrase": "n23jk4DD5DOAn5jk4DSS",
"token": "",
"log": {
"enable": false,
"topics": []
}
},
"ffmpeg": {
"binary": "ffmpeg",
"max_processes": 0,
"access": {
"input": {
"allow": [],
"block": []
},
"output": {
"allow": [],
"block": []
}
},
"log": {
"max_lines": 50,
"max_history": 3
}
},
"playout": {
"enable": false,
"min_port": 0,
"max_port": 0
},
"debug": {
"profiling": false,
"force_gc": 0
},
"metrics": {
"enable": false,
"enable_prometheus": false,
"range_sec": 300,
"interval_sec": 2
},
"sessions": {
"enable": true,
"ip_ignorelist": [
"127.0.0.1/32",
"::1/128"
],
"session_timeout_sec": 30,
"persist": true,
"persist_interval_sec": 300,
"max_bitrate_mbit": 250,
"max_sessions": 50
},
"service": {
"enable": false,
"token": "",
"url": "https://service.datarhei.com"
},
"router": {
"blocked_prefixes": [
"/api"
],
"routes": {},
"ui_path": "/core/ui"
}
}curl http://127.0.0.1:8080/api/
from core_client import Client
client = Client(
import (
"fmt"
"
curl http://127.0.0.1:8080/api/v3/metrics/ \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"metrics": [
{
"name": "cpu_idle"
}, {
"name": "mem_free"
}
]
}'from core_client import Client
client = Client(base_url="http://127.0.0.1:8080")
client.login()
core_metrics = client.v3_metrics_post(
config={
"metrics": [
{
"name": "cpu_idle"
}, {
"name": "mem_free"
}
]
}
)
print(core_metrics)import (
"fmt"
"github.com/datarhei/core-client-go/v16"
"github.com/datarhei/core-client-go/v16/api"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
// get the latest collected value
query := api.MetricsQuery{
Metrics: []api.MetricsQueryMetric{
{
Name: "cpu_idle",
},
{
Name: "mem_free",
},
}
}
metrics, err := client.Metrics(query)
fmt.Printf("%+v\n", metrics)
// get the collected values from the last 10 minutes in
// steps of 5 seconds
query := api.MetricsQuery{
Timerange: 600,
Interval: 5,
Metrics: []api.MetricsQueryMetric{
{
Name: "cpu_idle",
},
{
Name: "mem_free",
},
}
}
metrics, err := client.Metrics(query)
fmt.Printf("%+v\n", metrics)[
{
"name": "cpu_idle",
"description": "Percentage of idle CPU",
"labels": []
},
{
"name": "cpu_ncpu",
"description": "Number of logical CPUs in the system",
"labels": []
},
{
"name": "cpu_other",
"description": "Percentage of CPU used for other subsystems",
"labels": []
},
{
"name": "cpu_system",
"description": "Percentage of CPU used for the system",
"labels": []
},
{
"name": "cpu_user",
"description": "Percentage of CPU used for the user",
"labels": []
}
][
{
"name": "mem_free",
"description": "Free memory in bytes",
"labels": []
},
{
"name": "mem_total",
"description": "Total available memory in bytes",
"labels": []
}
][
{
"name": "disk_total",
"description": "Total size of the disk in bytes",
"labels": [
"path"
]
},
{
"name": "disk_usage",
"description": "Number of used bytes on the disk",
"labels": [
"path"
]
}
][
{
"name": "filesystem_files",
"description": "Number of files on the filesystem (excluding directories)",
"labels": [
"name"
]
},
{
"name": "filesystem_limit",
"description": "Total size of the filesystem in bytes, negative if unlimited",
"labels": [
"name"
]
},
{
"name": "filesystem_usage",
"description": "Number of used bytes on the filesystem",
"labels": [
"name"
]
}
]jso[
{
"name": "net_rx",
"description": "Number of received bytes",
"labels": [
"interface"
]
},
{
"name": "net_tx",
"description": "Number of transmitted bytes",
"labels": [
"interface"
]
}
][{
"name": "ffmpeg_process",
"description": "State of the ffmpeg process",
"labels": [
"state"
]
}][
{
"name": "restream_io",
"description": "Current process IO values by name",
"labels": [
"processid",
"type",
"id",
"address",
"index",
"stream",
"media",
"name"
]
},
{
"name": "restream_process",
"description": "Current process values by name",
"labels": [
"processid",
"state",
"order",
"name"
]
},
{
"name": "restream_process_states",
"description": "Current process state",
"labels": [
"processid",
"state"
]
},
{
"name": "restream_state",
"description": "Summarized process states",
"labels": [
"state"
]
}
][
{
"name": "session_active",
"description": "Number of current sessions",
"labels": [
"collector"
]
},
{
"name": "session_limit",
"description": "Max. number of concurrent sessions",
"labels": [
"collector"
]
},
{
"name": "session_maxrxbitrate",
"description": "Max. allowed receiving bitrate in bit per second",
"labels": [
"collector"
]
},
{
"name": "session_maxtxbitrate",
"description": "Max. allowed transmitting bitrate in bit per second",
"labels": [
"collector"
]
},
{
"name": "session_rxbitrate",
"description": "Current receiving bitrate in bit per second",
"labels": [
"collector"
]
},
{
"name": "session_rxbytes",
"description": "Number of received bytes",
"labels": [
"collector"
]
},
{
"name": "session_total",
"description": "Total sessions",
"labels": [
"collector"
]
},
{
"name": "session_txbitrate",
"description": "Current transmitting bitrate in bit per second",
"labels": [
"collector"
]
},
{
"name": "session_txbytes",
"description": "Number of transmitted bytes",
"labels": [
"collector"
]
}
][
{
"name": "uptime_uptime",
"description": "Current uptime in seconds",
"labels": []
}
]List all currently publishing SRT streams. This endpoint is EXPERIMENTAL and may change in future.
OK
The available space in the receiver's buffer, in bytes
The available space in the sender's buffer, in bytes
Estimated bandwidth of the network link, in Mbps
The number of packets in flight
The maximum number of packets that can be "in flight"
Transmission bandwidth limit, in Mbps
Maximum Segment Size (MSS), in bytes
Accumulated difference between the current time and the time-to-play of a packet that is received late
Current minimum time interval between which consecutive packets are sent, in microseconds
The total number of received ACK (Acknowledgement) control packets
Instantaneous (current) value of pktRcvBuf, expressed in bytes, including payload and all headers (IP, TCP, SRT)
The timespan (msec) of acknowledged packets in the receiver's buffer
The number of acknowledged packets in receiver's buffer
Same as pktRecv, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)
Same as pktRcvDrop, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)
The total number of dropped by the SRT receiver and, as a result, not delivered to the upstream application DATA packets
The total number of received KM (Key Material) control packets
Same as pktRcvLoss, but expressed in bytes, including payload and all the headers (IP, TCP, SRT), bytes for the presently missing (either reordered or lost) packets' payloads are estimated based on the average packet size
The total number of SRT DATA packets detected as presently missing (either reordered or lost) at the receiver side
The total number of received NAK (Negative Acknowledgement) control packets
The total number of received DATA packets, including retransmitted packets
The total number of retransmitted packets registered at the receiver side
Timestamp-based Packet Delivery Delay value set on the socket via SRTO_RCVLATENCY or SRTO_LATENCY
Same as pktRcvUndecrypt, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)
The total number of packets that failed to be decrypted at the receiver side
Same as pktRecvUnique, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)
The total number of unique original, retransmitted or recovered by the packet filter DATA packets received in time, decrypted without errors and, as a result, scheduled for delivery to the upstream application by the SRT receiver.
Instant value of the packet reorder tolerance
Smoothed round-trip time (SRTT), an exponentially-weighted moving average (EWMA) of an endpoint's RTT samples, in milliseconds
Instantaneous (current) value of pktSndBuf, but expressed in bytes, including payload and all headers (IP, TCP, SRT)
The timespan (msec) of packets in the sender's buffer (unacknowledged packets)
The number of packets in the sender's buffer that are already scheduled for sending or even possibly sent, but not yet acknowledged
Same as pktSndDrop, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)
The total number of dropped by the SRT sender DATA packets that have no chance to be delivered in time
The total accumulated time in microseconds, during which the SRT sender has some data to transmit, including packets that have been sent, but not yet acknowledged
The total number of sent KM (Key Material) control packets
The total number of data packets considered or reported as lost at the sender side. Does not correspond to the packets detected as lost at the receiver side.
Timestamp-based Packet Delivery Delay value of the peer
The total number of sent ACK (Acknowledgement) control packets
Same as pktSent, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)
The total number of sent NAK (Negative Acknowledgement) control packets
The total number of sent DATA packets, including retransmitted packets
Same as pktRetrans, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)
The total number of retransmitted packets sent by the SRT sender
Same as pktSentUnique, but expressed in bytes, including payload and all the headers (IP, TCP, SRT)
The total number of unique DATA packets sent by the SRT sender
The time elapsed, in milliseconds, since the SRT socket has been created
OK
Fetch minimal statistics about a process, which is not protected by any auth.
ID of a process
OK
Not Found
Issue a command to a process: start, stop, reload, restart
Process ID
OK
Bad Request
Not Found
List all detected FFmpeg capabilities.
OK
OK
Refresh the available FFmpeg capabilities.
OK
OK
Add arbitrary JSON metadata under the given key. If the key exists, all already stored metadata with this key will be overwritten. If the key doesn't exist, it will be created.
Process ID
Key for data store
OK
Bad Request
Not Found
No content
Retrieve the previously stored JSON metadata under the given key. If the key is empty, all metadata will be returned.
Process ID
Key for data store
OK
Bad Request
Not Found
No content
Probe an existing process to get a detailed stream information on the inputs.
Process ID
OK
video
audio
common
OK
Retrieve valid JWT access and refresh tokens to use for accessing the API. Login either by username/password or Auth0 token
OK
Bad Request
Forbidden
Internal Server Error
Retrieve valid JWT access and refresh tokens to use for accessing the API. Login either by username/password or Auth0 token
OK
Bad Request
Forbidden
Internal Server Error
Get the logs and the log history of a process.
Process ID
OK
Bad Request
Not Found
Get the state and progress data of a process.
Process ID
OK
kbit/s
kbit/s
General
Video
Audio
kbytes
kbit/s
General
Video
Audio
kbytes
kbytes
Bad Request
Not Found
List all files on the memory filesystem. The listing can be ordered by name, size, or date of last modification in ascending or descending order.
glob pattern for file names
none, name, size, lastmod
asc, desc
OK
OK
Create a link to a file in the memory filesystem. The file linked to has to exist.
Path to file
Created
Bad Request
Retrieve the currently active Restreamer configuration
OK
seconds
seconds
OK
Update the current Restreamer configuration by providing a complete or partial configuration. Fields that are not provided will not be changed.
seconds
seconds
OK
Bad Request
Conflict
GET /api/v3/rtmp HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
[
{
"name": "text"
}
]GET /api/v3/srt HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
[
{
"connections": {
"ANY_ADDITIONAL_PROPERTY": {
"log": {
"ANY_ADDITIONAL_PROPERTY": [
{
"msg": [
"text"
],
"ts": 1
}
]
},
"stats": {
"avail_recv_buf_bytes": 1,
"avail_send_buf_bytes": 1,
"bandwidth_mbit": 1,
"flight_size_pkt": 1,
"flow_window_pkt": 1,
"max_bandwidth_mbit": 1,
"mss_bytes": 1,
"pkt_recv_avg_belated_time_ms": 1,
"pkt_send_period_us": 1,
"recv_ack_pkt": 1,
"recv_buf_bytes": 1,
"recv_buf_ms": 1,
"recv_buf_pkt": 1,
"recv_bytes": 1,
"recv_drop_bytes": 1,
"recv_drop_pkt": 1,
"recv_km_pkt": 1,
"recv_loss_bytes": 1,
"recv_loss_pkt": 1,
"recv_nak_pkt": 1,
"recv_pkt": 1,
"recv_retran_pkts": 1,
"recv_tsbpd_delay_ms": 1,
"recv_undecrypt_bytes": 1,
"recv_undecrypt_pkt": 1,
"recv_unique_bytes": 1,
"recv_unique_pkt": 1,
"reorder_tolerance_pkt": 1,
"rtt_ms": 1,
"send_buf_bytes": 1,
"send_buf_ms": 1,
"send_buf_pkt": 1,
"send_drop_bytes": 1,
"send_drop_pkt": 1,
"send_duration_us": 1,
"send_km_pkt": 1,
"send_loss_pkt": 1,
"send_tsbpd_delay_ms": 1,
"sent_ack_pkt": 1,
"sent_bytes": 1,
"sent_nak_pkt": 1,
"sent_pkt": 1,
"sent_retrans_bytes": 1,
"sent_retrans_pkt": 1,
"sent_unique_bytes": 1,
"sent_unique_pkt": 1,
"timestamp_ms": 1
}
}
},
"log": {
"ANY_ADDITIONAL_PROPERTY": [
{
"msg": [
"text"
],
"ts": 1
}
]
},
"publisher": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"subscriber": {
"ANY_ADDITIONAL_PROPERTY": [
1
]
}
}
]GET /api/v3/widget/process/{id} HTTP/1.1
Accept: */*
{
"current_sessions": 1,
"total_sessions": 1,
"uptime": 1
}GET /api/v3/log HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
[
"text"
]PUT /api/v3/process/{id}/command HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"command": "start"
}textGET /api/v3/skills HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"codecs": {
"audio": [
{
"decoders": [
"text"
],
"encoders": [
"text"
],
"id": "text",
"name": "text"
}
],
"subtitle": [
{
"decoders": [
"text"
],
"encoders": [
"text"
],
"id": "text",
"name": "text"
}
],
"video": [
{
"decoders": [
"text"
],
"encoders": [
"text"
],
"id": "text",
"name": "text"
}
]
},
"devices": {
"demuxers": [
{
"devices": [
{
"extra": "text",
"id": "text",
"media": "text",
"name": "text"
}
],
"id": "text",
"name": "text"
}
],
"muxers": [
{
"devices": [
{
"extra": "text",
"id": "text",
"media": "text",
"name": "text"
}
],
"id": "text",
"name": "text"
}
]
},
"ffmpeg": {
"compiler": "text",
"configuration": "text",
"libraries": [
{
"compiled": "text",
"linked": "text",
"name": "text"
}
],
"version": "text"
},
"filter": [
{
"id": "text",
"name": "text"
}
],
"formats": {
"demuxers": [
{
"id": "text",
"name": "text"
}
],
"muxers": [
{
"id": "text",
"name": "text"
}
]
},
"hwaccels": [
{
"id": "text",
"name": "text"
}
],
"protocols": {
"input": [
{
"id": "text",
"name": "text"
}
],
"output": [
{
"id": "text",
"name": "text"
}
]
}
}GET /api/v3/skills/reload HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"codecs": {
"audio": [
{
"decoders": [
"text"
],
"encoders": [
"text"
],
"id": "text",
"name": "text"
}
],
"subtitle": [
{
"decoders": [
"text"
],
"encoders": [
"text"
],
"id": "text",
"name": "text"
}
],
"video": [
{
"decoders": [
"text"
],
"encoders": [
"text"
],
"id": "text",
"name": "text"
}
]
},
"devices": {
"demuxers": [
{
"devices": [
{
"extra": "text",
"id": "text",
"media": "text",
"name": "text"
}
],
"id": "text",
"name": "text"
}
],
"muxers": [
{
"devices": [
{
"extra": "text",
"id": "text",
"media": "text",
"name": "text"
}
],
"id": "text",
"name": "text"
}
]
},
"ffmpeg": {
"compiler": "text",
"configuration": "text",
"libraries": [
{
"compiled": "text",
"linked": "text",
"name": "text"
}
],
"version": "text"
},
"filter": [
{
"id": "text",
"name": "text"
}
],
"formats": {
"demuxers": [
{
"id": "text",
"name": "text"
}
],
"muxers": [
{
"id": "text",
"name": "text"
}
]
},
"hwaccels": [
{
"id": "text",
"name": "text"
}
],
"protocols": {
"input": [
{
"id": "text",
"name": "text"
}
],
"output": [
{
"id": "text",
"name": "text"
}
]
}
}PUT /api/v3/process/{id}/metadata/{key} HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
GET /api/v3/process/{id}/metadata/{key} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
GET /api/v3/process/{id}/probe HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"log": [
"text"
],
"streams": [
{
"bitrate_kbps": 1,
"channels": 1,
"codec": "text",
"coder": "text",
"duration_sec": 1,
"format": "text",
"fps": 1,
"height": 1,
"index": 1,
"language": "text",
"layout": "text",
"pix_fmt": "text",
"sampling_hz": 1,
"stream": 1,
"type": "text",
"url": "text",
"width": 1
}
]
}POST /api/login HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"password": "text",
"username": "text"
}{
"access_token": "text",
"refresh_token": "text"
}POST /api/login HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"password": "text",
"username": "text"
}{
"access_token": "text",
"refresh_token": "text"
}GET /api/login/refresh HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"access_token": "text"
}GET /api/v3/process/{id}/report HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"created_at": 1,
"history": [
{
"created_at": 1,
"log": [
[
"text"
]
],
"prelude": [
"text"
]
}
],
"log": [
[
"text"
]
],
"prelude": [
"text"
]
}GET /api/v3/process/{id}/state HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"command": [
"text"
],
"cpu_usage": 1,
"exec": "text",
"last_logline": "text",
"memory_bytes": 1,
"order": "text",
"progress": {
"bitrate_kbit": 1,
"drop": 1,
"dup": 1,
"fps": 1,
"frame": 1,
"inputs": [
{
"address": "text",
"avstream": {
"aqueue": 1,
"drop": 1,
"dup": 1,
"duplicating": true,
"enc": 1,
"gop": "text",
"input": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"looping": true,
"output": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"queue": 1
},
"bitrate_kbit": 1,
"channels": 1,
"codec": "text",
"coder": "text",
"format": "text",
"fps": 1,
"frame": 1,
"height": 1,
"id": "text",
"index": 1,
"layout": "text",
"packet": 1,
"pix_fmt": "text",
"pps": 1,
"q": 1,
"sampling_hz": 1,
"size_kb": 1,
"stream": 1,
"type": "text",
"width": 1
}
],
"outputs": [
{
"address": "text",
"avstream": {
"aqueue": 1,
"drop": 1,
"dup": 1,
"duplicating": true,
"enc": 1,
"gop": "text",
"input": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"looping": true,
"output": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"queue": 1
},
"bitrate_kbit": 1,
"channels": 1,
"codec": "text",
"coder": "text",
"format": "text",
"fps": 1,
"frame": 1,
"height": 1,
"id": "text",
"index": 1,
"layout": "text",
"packet": 1,
"pix_fmt": "text",
"pps": 1,
"q": 1,
"sampling_hz": 1,
"size_kb": 1,
"stream": 1,
"type": "text",
"width": 1
}
],
"packet": 1,
"q": 1,
"size_kb": 1,
"speed": 1,
"time": 1
},
"reconnect_seconds": 1,
"runtime_seconds": 1
}GET /memfs/{path} HTTP/1.1
Accept: */*
textPUT /memfs/{path} HTTP/1.1
Authorization: Basic username:password
Content-Type: application/data
Accept: */*
Content-Length: 3
[
1
]textDELETE /memfs/{path} HTTP/1.1
Authorization: Basic username:password
Accept: */*
textPUT /api/v3/fs/mem/{path} HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/data
Accept: */*
Content-Length: 3
[
1
]textGET /api/v3/fs/mem HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
[
{
"last_modified": 1,
"name": "text",
"size_bytes": 1
}
]GET /api/v3/fs/mem/{path} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
textPATCH /api/v3/fs/mem/{path} HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/data
Accept: */*
Content-Length: 6
"text"textDELETE /api/v3/fs/mem/{path} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
texttextGET /api/v3/config HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"config": {
"address": "text",
"api": {
"access": {
"http": {
"allow": [
"text"
],
"block": [
"text"
]
},
"https": {
"allow": [
"text"
],
"block": [
"text"
]
}
},
"auth": {
"auth0": {
"enable": true,
"tenants": [
{
"audience": "text",
"clientid": "text",
"domain": "text",
"users": [
"text"
]
}
]
},
"disable_localhost": true,
"enable": true,
"jwt": {
"secret": "text"
},
"password": "text",
"username": "text"
},
"read_only": true
},
"created_at": "text",
"db": {
"dir": "text"
},
"debug": {
"force_gc": 1,
"profiling": true
},
"ffmpeg": {
"access": {
"input": {
"allow": [
"text"
],
"block": [
"text"
]
},
"output": {
"allow": [
"text"
],
"block": [
"text"
]
}
},
"binary": "text",
"log": {
"max_history": 1,
"max_lines": 1
},
"max_processes": 1
},
"host": {
"auto": true,
"name": [
"text"
]
},
"id": "text",
"log": {
"level": "debug",
"max_lines": 1,
"topics": [
"text"
]
},
"metrics": {
"enable": true,
"enable_prometheus": true,
"interval_sec": 1,
"range_sec": 1
},
"name": "text",
"playout": {
"enable": true,
"max_port": 1,
"min_port": 1
},
"router": {
"blocked_prefixes": [
"text"
],
"routes": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"ui_path": "text"
},
"rtmp": {
"address": "text",
"address_tls": "text",
"app": "text",
"enable": true,
"enable_tls": true,
"token": "text"
},
"service": {
"enable": true,
"token": "text",
"url": "text"
},
"sessions": {
"enable": true,
"ip_ignorelist": [
"text"
],
"max_bitrate_mbit": 1,
"max_sessions": 1,
"persist": true,
"persist_interval_sec": 1,
"session_timeout_sec": 1
},
"srt": {
"address": "text",
"enable": true,
"log": {
"enable": true,
"topics": [
"text"
]
},
"passphrase": "text",
"token": "text"
},
"storage": {
"cors": {
"origins": [
"text"
]
},
"disk": {
"cache": {
"enable": true,
"max_file_size_mbytes": 1,
"max_size_mbytes": 1,
"ttl_seconds": 1,
"types": {
"allow": [
"text"
],
"block": [
"text"
]
}
},
"dir": "text",
"max_size_mbytes": 1
},
"memory": {
"auth": {
"enable": true,
"password": "text",
"username": "text"
},
"max_size_mbytes": 1,
"purge": true
},
"mimetypes_file": "text"
},
"tls": {
"address": "text",
"auto": true,
"cert_file": "text",
"email": "text",
"enable": true,
"key_file": "text"
},
"update_check": true,
"version": 1
},
"created_at": "text",
"loaded_at": "text",
"overrides": [
"text"
],
"updated_at": "text"
}PUT /api/v3/config HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1874
{
"address": "text",
"api": {
"access": {
"http": {
"allow": [
"text"
],
"block": [
"text"
]
},
"https": {
"allow": [
"text"
],
"block": [
"text"
]
}
},
"auth": {
"auth0": {
"enable": true,
"tenants": [
{
"audience": "text",
"clientid": "text",
"domain": "text",
"users": [
"text"
]
}
]
},
"disable_localhost": true,
"enable": true,
"jwt": {
"secret": "text"
},
"password": "text",
"username": "text"
},
"read_only": true
},
"created_at": "text",
"db": {
"dir": "text"
},
"debug": {
"force_gc": 1,
"profiling": true
},
"ffmpeg": {
"access": {
"input": {
"allow": [
"text"
],
"block": [
"text"
]
},
"output": {
"allow": [
"text"
],
"block": [
"text"
]
}
},
"binary": "text",
"log": {
"max_history": 1,
"max_lines": 1
},
"max_processes": 1
},
"host": {
"auto": true,
"name": [
"text"
]
},
"id": "text",
"log": {
"level": "debug",
"max_lines": 1,
"topics": [
"text"
]
},
"metrics": {
"enable": true,
"enable_prometheus": true,
"interval_sec": 1,
"range_sec": 1
},
"name": "text",
"playout": {
"enable": true,
"max_port": 1,
"min_port": 1
},
"router": {
"blocked_prefixes": [
"text"
],
"routes": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"ui_path": "text"
},
"rtmp": {
"address": "text",
"address_tls": "text",
"app": "text",
"enable": true,
"enable_tls": true,
"token": "text"
},
"service": {
"enable": true,
"token": "text",
"url": "text"
},
"sessions": {
"enable": true,
"ip_ignorelist": [
"text"
],
"max_bitrate_mbit": 1,
"max_sessions": 1,
"persist": true,
"persist_interval_sec": 1,
"session_timeout_sec": 1
},
"srt": {
"address": "text",
"enable": true,
"log": {
"enable": true,
"topics": [
"text"
]
},
"passphrase": "text",
"token": "text"
},
"storage": {
"cors": {
"origins": [
"text"
]
},
"disk": {
"cache": {
"enable": true,
"max_file_size_mbytes": 1,
"max_size_mbytes": 1,
"ttl_seconds": 1,
"types": {
"allow": [
"text"
],
"block": [
"text"
]
}
},
"dir": "text",
"max_size_mbytes": 1
},
"memory": {
"auth": {
"enable": true,
"password": "text",
"username": "text"
},
"max_size_mbytes": 1,
"purge": true
},
"mimetypes_file": "text"
},
"tls": {
"address": "text",
"auto": true,
"cert_file": "text",
"email": "text",
"enable": true,
"key_file": "text"
},
"update_check": true,
"version": 1
}Writes or overwrites a file on a filesystem
Name of the filesystem
Path to file
Created
No Content
Insufficient Storage
List all files on a filesystem. The listing can be ordered by name, size, or date of last modification in ascending or descending order.
Name of the filesystem
glob pattern for file names
none, name, size, lastmod
asc, desc
OK
OK
PUT /api/v3/fs/{name}/{path} HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/data
Accept: */*
Content-Length: 3
[
1
]textGET /api/v3/fs/{name} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
[
{
"last_modified": 1,
"name": "text",
"size_bytes": 1
}
]GET /api/v3/fs/{name}/{path} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
textDELETE /api/v3/fs/{name}/{path} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
textGET /api/v3/config/reload HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
text{
"input": [{"address": "input"}],
"output": [{"address": "output"}]
}-i input outputaws:report
The logging output from the FFmpeg process and a history of previous runs of the same process. More details.Quick introduction to using the core API and FFmpeg processes.
{
"id": "some_id",
"reference": "some reference"
}[
{
"id": "video_in",
"address": "testsrc=size=1280x720:rate=25",
"options": ["-f", "lavfi", "-re"]
},
{
"id": "audio_in",
"address": "anullsrc=r=44100:stereo=25",
"options": ["-f", "lavfi"]
},
]-f lavfi -re -i testsrc=size=1280x720:rate=25 -f lavfi anullsrc=r=44100:stereo=25[
{
"id": "out",
"address": "rtmp://someip/live/stream",
"options": [
"-codec:v", "libx264",
"-r", "25",
"-g", "50",
"-preset:v", "ultrafast",
"-b:v", "2M",
"-codec:a", "aac",
"-b:a", "64k",
"-f", "flv",
]
}
]-codec:v libx264 -r 25 -g 50 -preset:v ultrafast -b:v 2M -codec:a aac -b:a 64k -f flv rtmp://someip/live/stream {
"input": [
{
"id": "video_in",
"address": "testsrc=size=1280x720:rate=25",
"options": ["-f", "lavfi", "-re"]
},
{
"id": "audio_in",
"address": "anullsrc=r=44100:stereo=25",
"options": ["-f", "lavfi"]
},
],
"output": [
{
"id": "out",
"address": "rtmp://someip/live/stream",
"options": [
"-codec:v", "libx264",
"-r", "25",
"-g", "50",
"-preset:v", "ultrafast",
"-b:v", "2M",
"-codec:a", "aac",
"-b:a", "64k",
"-f", "flv"
]
}
]
}-f lavfi -re -i testsrc=size=1280x720:rate=25 -f lavfi anullsrc=r=44100:stereo=25 -codec:v libx264 -r 25 -g 50 -preset:v ultrafast -b:v 2M -codec:a aac -b:a 64k -f flv rtmp://someip/live/stream {
"options": ["-loglevel", "error"],
"input": [...],
"output": [...]
}-loglevel error -f lavfi -re -i testsrc=size=1280x720:rate=25 -f lavfi anullsrc=r=44100:stereo=25 -codec:v libx264 -r 25 -g 50 -preset:v ultrafast -b:v 2M -codec:a aac -b:a 64k -f flv rtmp://someip/live/stream {
"reconnect": true,
"reconnect_delay_seconds": 10,
"autostart": true,
"stale_timeout_seconds": 15,
"options": [...],
"input": [...],
"output": [...]
}{
"limits": {
"cpu_usage": 10,
"memory_mbytes": 50,
"waitfor_seconds": 30,
},
"options": [...],
"input": [...],
"output": [...]
}{
"output": [
{
"cleanup": [{
"pattern": "memfs:fo*ar",
"max_files": "23",
"max_file_age_seconds": "235",
"purge_on_delete": true
}],
}
],
}diskfs:/{processid}.m3u8diskfs:/{processid}*.(m3u8|ts)diskfs:/{reference}/{processid}/{outputid}/*.tsdiskfs:/{reference}*diskfs:/{reference}**{
"id": "process_1",
"input": [
{
"id": "video_in",
"address": "testsrc=size=1280x720:rate=25",
"options": ["-f", "lavfi", "-re"]
}
],
"output": [
{
"id": "out",
"address": "rtmp://someip/live/stream",
"options": [
"-codec:v", "libx264",
"-r", "25",
"-g", "50",
"-preset:v", "ultrafast",
"-b:v", "2M",
"-f", "flv"
]
}
]
}{
"id": "process_2",
"input": [
{
"id": "video_in",
"address": "#process_1:output=out"
}
],
"output": [
{
"id": "out",
"address": "-",
"options": [
"-codec", "copy",
"-f", "null"
]
}
]
}{
"id": "b",
"reference": "a",
"input: [...],
"output": [
{
"id": "360",
"address": "{diskfs}/{reference}_{processid}_{outputid}.mp4
},
{
"id": "720",
"address": "{diskfs}/{reference}_{processid}_{outputid}.mp4
},
{
"id": "1080",
"address": "{diskfs}/{reference}_{processid}_{outputid}.mp4
}
],
}curl http://127.0.0.1:8080/api/v3/process \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"id": "test",
"options": ["-loglevel", "error"],
"input": [
{
"address": "testsrc=size=1280x720:rate=25",
"id": "0",
"options": ["-f", "lavfi", "-re"]
}
],
"output": [
{
"address": "-",
"id": "0",
"options": ["-c:v", "libx264", "-f", "null"]
}
]
}'from core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
client.v3_process_post(config={
"id": "test",
"options": ["-loglevel", "error"],
"input": [
{
"address": "testsrc=size=1280x720:rate=25",
"id": "input_0",
"options": ["-f", "lavfi", "-re"],
}
],
"output": [
{
"address": "-",
"id": "output_0",
"options": ["-codec:v", "libx264", "-r", "25", "-f", "null"]
}
]
})import (
"github.com/datarhei/core-client-go/v16"
"github.com/datarhei/core-client-go/v16/api"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
process := api.ProcessConfig{
ID: "test",
Options: []string{"-loglevel", "error"},
Input: []api.ProcessConfigIO{
{
"ID": "0",
"Address": "testsrc=size=1280x720:rate=25",
"Options": []string{"-f", "lavfi", "-re"},
},
},
Output: []api.ProcessConfigIO{
{
"ID": "0",
"Address": "-",
"Options": []string{"-c:v", "libx264", "-f", "null"},
},
},
}
err := client.ProcessAdd(process)
if err != nil {
...
}curl http://127.0.0.1:8080/api/v3/process \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
processes = client.v3_process_get_list(
id="", idpattern="",
reference="", refpattern="",
filter=""
)
for process in processes:
print(process)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
processes, err := client.ProcessList(client.ProcessListOptions{})
if err != nil {
...
}curl http://127.0.0.1:8080/api/v3/process/test \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
process_test = client.v3_process_get(
id="test",
filter=""
)
print(process_test)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
process, err := client.Process("test", []string{})
if err != nil {
...
}curl http://127.0.0.1:8080/api/v3/process/test/config \
-H 'accept: application/json' \
-X GETfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
process_config_test = client.v3_process_get_config(
id="test",
)
print(process_config_test)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
config, err := client.ProcessConfig("test")
if err != nil {
...
}curl http://127.0.0.1:8080/api/v3/process/test \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X PUT \
-d '{
"id": "test",
"options": ["-loglevel", "info"],
"input": [
{
"address": "testsrc=size=1280x720:rate=25",
"id": "0",
"options": ["-f", "lavfi", "-re"]
}
],
"output": [
{
"address": "-",
"id": "0",
"options": ["-c:v", "libx264", "-f", "null"]
}
]
}'from core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
client.v3_process_put(
id=test,
config={
"id": "test",
"options": ["-loglevel", "info"],
"input": [
{
"address": "testsrc=size=1280x720:rate=25",
"id": "input_0",
"options": ["-f", "lavfi", "-re"],
}
],
"output": [
{
"address": "-",
"id": "output_0",
"options": ["-codec:v", "libx264", "-r", "25", "-f", "null"]
}
]
}
)import (
"github.com/datarhei/core-client-go/v16"
"github.com/datarhei/core-client-go/v16/api"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
process := api.ProcessConfig{
ID: "test",
Options: []string{"-loglevel", "info"},
Input: []api.ProcessConfigIO{
{
"ID": "0",
"Address": "testsrc=size=1280x720:rate=25",
"Options": []string{"-f", "lavfi", "-re"},
},
},
Output: []api.ProcessConfigIO{
{
"ID": "0",
"Address": "-",
"Options": []string{"-c:v", "libx264", "-f", "null"},
},
},
}
err := client.ProcessUpdate("test", process)
if err != nil {
...
}curl http://127.0.0.1:8080/api/v3/process/test \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X DELETEfrom core_client import Client
client = Client(
base_url="http://127.0.0.1:8080"
)
client.login()
client.v3_process_delete(
id="test",
)import (
"github.com/datarhei/core-client-go/v16"
)
client, _ := coreclient.New(coreclient.Config{
Address: "https://127.0.0.1:8080",
})
err := client.ProcessDelete("test")
if err != nil {
...
}OK
Bad Request
Comma separated list of fields (config, state, report, metadata) that will be part of the output. If empty, all fields will be part of the output.
Return only these process that have this reference value. If empty, the reference will be ignored.
Comma separated list of process ids to list. Overrides the reference. If empty all IDs will be returned.
Glob pattern for process IDs. If empty all IDs will be returned. Intersected with results from refpattern.
Glob pattern for process references. If empty all IDs will be returned. Intersected with results from idpattern.
OK
kbit/s
kbit/s
General
Video
Audio
kbytes
kbit/s
General
Video
Audio
kbytes
kbytes
OK
Process ID
Comma separated list of fields (config, state, report, metadata) to be part of the output. If empty, all fields will be part of the output
OK
kbit/s
kbit/s
General
Video
Audio
kbytes
kbit/s
General
Video
Audio
kbytes
kbytes
Not Found
Process ID
OK
Bad Request
Not Found
Process ID
OK
Bad Request
Not Found
Process ID
OK
Not Found




POST /api/v3/process HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 525
{
"autostart": true,
"id": "text",
"input": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"limits": {
"cpu_usage": 1,
"memory_mbytes": 1,
"waitfor_seconds": 1
},
"options": [
"text"
],
"output": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"reconnect": true,
"reconnect_delay_seconds": 1,
"reference": "text",
"stale_timeout_seconds": 1,
"type": "ffmpeg"
}{
"autostart": true,
"id": "text",
"input": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"limits": {
"cpu_usage": 1,
"memory_mbytes": 1,
"waitfor_seconds": 1
},
"options": [
"text"
],
"output": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"reconnect": true,
"reconnect_delay_seconds": 1,
"reference": "text",
"stale_timeout_seconds": 1,
"type": "ffmpeg"
}GET /api/v3/process HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
[
{
"config": {
"autostart": true,
"id": "text",
"input": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"limits": {
"cpu_usage": 1,
"memory_mbytes": 1,
"waitfor_seconds": 1
},
"options": [
"text"
],
"output": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"reconnect": true,
"reconnect_delay_seconds": 1,
"reference": "text",
"stale_timeout_seconds": 1,
"type": "ffmpeg"
},
"created_at": 1,
"id": "text",
"metadata": null,
"reference": "text",
"report": {
"created_at": 1,
"history": [
{
"created_at": 1,
"log": [
[
"text"
]
],
"prelude": [
"text"
]
}
],
"log": [
[
"text"
]
],
"prelude": [
"text"
]
},
"state": {
"command": [
"text"
],
"cpu_usage": 1,
"exec": "text",
"last_logline": "text",
"memory_bytes": 1,
"order": "text",
"progress": {
"bitrate_kbit": 1,
"drop": 1,
"dup": 1,
"fps": 1,
"frame": 1,
"inputs": [
{
"address": "text",
"avstream": {
"aqueue": 1,
"drop": 1,
"dup": 1,
"duplicating": true,
"enc": 1,
"gop": "text",
"input": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"looping": true,
"output": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"queue": 1
},
"bitrate_kbit": 1,
"channels": 1,
"codec": "text",
"coder": "text",
"format": "text",
"fps": 1,
"frame": 1,
"height": 1,
"id": "text",
"index": 1,
"layout": "text",
"packet": 1,
"pix_fmt": "text",
"pps": 1,
"q": 1,
"sampling_hz": 1,
"size_kb": 1,
"stream": 1,
"type": "text",
"width": 1
}
],
"outputs": [
{
"address": "text",
"avstream": {
"aqueue": 1,
"drop": 1,
"dup": 1,
"duplicating": true,
"enc": 1,
"gop": "text",
"input": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"looping": true,
"output": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"queue": 1
},
"bitrate_kbit": 1,
"channels": 1,
"codec": "text",
"coder": "text",
"format": "text",
"fps": 1,
"frame": 1,
"height": 1,
"id": "text",
"index": 1,
"layout": "text",
"packet": 1,
"pix_fmt": "text",
"pps": 1,
"q": 1,
"sampling_hz": 1,
"size_kb": 1,
"stream": 1,
"type": "text",
"width": 1
}
],
"packet": 1,
"q": 1,
"size_kb": 1,
"speed": 1,
"time": 1
},
"reconnect_seconds": 1,
"runtime_seconds": 1
},
"type": "text"
}
]GET /api/v3/process/{id} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"config": {
"autostart": true,
"id": "text",
"input": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"limits": {
"cpu_usage": 1,
"memory_mbytes": 1,
"waitfor_seconds": 1
},
"options": [
"text"
],
"output": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"reconnect": true,
"reconnect_delay_seconds": 1,
"reference": "text",
"stale_timeout_seconds": 1,
"type": "ffmpeg"
},
"created_at": 1,
"id": "text",
"metadata": null,
"reference": "text",
"report": {
"created_at": 1,
"history": [
{
"created_at": 1,
"log": [
[
"text"
]
],
"prelude": [
"text"
]
}
],
"log": [
[
"text"
]
],
"prelude": [
"text"
]
},
"state": {
"command": [
"text"
],
"cpu_usage": 1,
"exec": "text",
"last_logline": "text",
"memory_bytes": 1,
"order": "text",
"progress": {
"bitrate_kbit": 1,
"drop": 1,
"dup": 1,
"fps": 1,
"frame": 1,
"inputs": [
{
"address": "text",
"avstream": {
"aqueue": 1,
"drop": 1,
"dup": 1,
"duplicating": true,
"enc": 1,
"gop": "text",
"input": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"looping": true,
"output": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"queue": 1
},
"bitrate_kbit": 1,
"channels": 1,
"codec": "text",
"coder": "text",
"format": "text",
"fps": 1,
"frame": 1,
"height": 1,
"id": "text",
"index": 1,
"layout": "text",
"packet": 1,
"pix_fmt": "text",
"pps": 1,
"q": 1,
"sampling_hz": 1,
"size_kb": 1,
"stream": 1,
"type": "text",
"width": 1
}
],
"outputs": [
{
"address": "text",
"avstream": {
"aqueue": 1,
"drop": 1,
"dup": 1,
"duplicating": true,
"enc": 1,
"gop": "text",
"input": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"looping": true,
"output": {
"packet": 1,
"size_kb": 1,
"state": "running",
"time": 1
},
"queue": 1
},
"bitrate_kbit": 1,
"channels": 1,
"codec": "text",
"coder": "text",
"format": "text",
"fps": 1,
"frame": 1,
"height": 1,
"id": "text",
"index": 1,
"layout": "text",
"packet": 1,
"pix_fmt": "text",
"pps": 1,
"q": 1,
"sampling_hz": 1,
"size_kb": 1,
"stream": 1,
"type": "text",
"width": 1
}
],
"packet": 1,
"q": 1,
"size_kb": 1,
"speed": 1,
"time": 1
},
"reconnect_seconds": 1,
"runtime_seconds": 1
},
"type": "text"
}GET /api/v3/process/{id}/config HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"autostart": true,
"id": "text",
"input": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"limits": {
"cpu_usage": 1,
"memory_mbytes": 1,
"waitfor_seconds": 1
},
"options": [
"text"
],
"output": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"reconnect": true,
"reconnect_delay_seconds": 1,
"reference": "text",
"stale_timeout_seconds": 1,
"type": "ffmpeg"
}PUT /api/v3/process/{id} HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 525
{
"autostart": true,
"id": "text",
"input": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"limits": {
"cpu_usage": 1,
"memory_mbytes": 1,
"waitfor_seconds": 1
},
"options": [
"text"
],
"output": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"reconnect": true,
"reconnect_delay_seconds": 1,
"reference": "text",
"stale_timeout_seconds": 1,
"type": "ffmpeg"
}{
"autostart": true,
"id": "text",
"input": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"limits": {
"cpu_usage": 1,
"memory_mbytes": 1,
"waitfor_seconds": 1
},
"options": [
"text"
],
"output": [
{
"address": "text",
"cleanup": [
{
"max_file_age_seconds": 1,
"max_files": 1,
"pattern": "text",
"purge_on_delete": true
}
],
"id": "text",
"options": [
"text"
]
}
],
"reconnect": true,
"reconnect_delay_seconds": 1,
"reference": "text",
"stale_timeout_seconds": 1,
"type": "ffmpeg"
}DELETE /api/v3/process/{id} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
textdocker run --detach --name core --publish 8080:8080 datarhei/core:latestcurl http://127.0.0.1:8080/api/v3/config \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X PUT \
-d '{
"version": 3,
"rtmp": {
"enable": true
}
}'"OK"curl http://127.0.0.1:8080/api/v3/config/reload \
-X GET"OK"curl http://127.0.0.1:8080/api/v3/rtmp \
-X GET[]curl http://127.0.0.1:8080/api/v3/process \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"id": "main",
"options": [],
"input": [
{
"address": "testsrc=size=1280x720:rate=25",
"id": "0",
"options": ["-f", "lavfi", "-re"]
}
],
"output": [
{
"address": "-",
"id": "0",
"options": ["-c:v", "libx264", "-f", "null"]
}
],
"autostart": true,
"reconnect": true,
"reconnect_delay_seconds": 10,
"stale_timeout_seconds": 10
}'{
"id": "main",
"type": "ffmpeg",
"reference": "",
"input": [{
"id": "0",
"address": "testsrc=size=1280x720:rate=25",
"options": ["-f", "lavfi", "-re"]
}],
"output": [{
"id": "0",
"address": "-",
"options": ["-c:v", "libx264", "-f", "null"]
}],
"options": [],
"reconnect": true,
"reconnect_delay_seconds": 10,
"autostart": true,
"stale_timeout_seconds": 10,
"limits": {
"cpu_usage": 0,
"memory_mbytes": 0,
"waitfor_seconds": 0
}
}curl http://127.0.0.1:8080/api/v3/process/main/state \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GET{
"order": "start",
"exec": "running",
"runtime_seconds": 36,
"reconnect_seconds": -1,
"last_logline": "ffmpeg.mapping:{\"graphs\":[{\"index\":0,\"graph\":[{\"src_name\":\"Parsed_null_0\",\"src_filter\":\"null\",\"dst_name\":\"auto_scale_0\",\"dst_filter\":\"scale\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/25\",\"type\":\"video\",\"format\":\"rgb24\",\"width\":1280,\"height\":720},{\"src_name\":\"graph 0 input from stream 0:0\",\"src_filter\":\"buffer\",\"dst_name\":\"Parsed_null_0\",\"dst_filter\":\"null\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/25\",\"type\":\"video\",\"format\":\"rgb24\",\"width\":1280,\"height\":720},{\"src_name\":\"format\",\"src_filter\":\"format\",\"dst_name\":\"out_0_0\",\"dst_filter\":\"buffersink\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/25\",\"type\":\"video\",\"format\":\"yuv444p\",\"width\":1280,\"height\":720},{\"src_name\":\"auto_scale_0\",\"src_filter\":\"scale\",\"dst_name\":\"format\",\"dst_filter\":\"format\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/25\",\"type\":\"video\",\"format\":\"yuv444p\",\"width\":1280,\"height\":720}]}],\"mapping\":[{\"input\":{\"index\":0,\"stream\":0},\"graph\":{\"index\":0,\"name\":\"graph 0 input from stream 0:0\"},\"output\":null},{\"input\":null,\"graph\":{\"index\":0,\"name\":\"out_0_0\"},\"output\":{\"index\":0,\"stream\":0}}]}",
"progress": {
"inputs": [{
"id": "0",
"address": "testsrc=size=1280x720:rate=25",
"index": 0,
"stream": 0,
"format": "lavfi",
"type": "video",
"codec": "rawvideo",
"coder": "rawvideo",
"frame": 910,
"fps": 25.267,
"packet": 910,
"pps": 25.267,
"size_kb": 2457000,
"bitrate_kbit": 545760.000,
"pix_fmt": "rgb24",
"q": 0.000,
"width": 1280,
"height": 720,
"avstream": null
}],
"outputs": [{
"id": "0",
"address": "pipe:",
"index": 0,
"stream": 0,
"format": "null",
"type": "video",
"codec": "h264",
"coder": "libx264",
"frame": 910,
"fps": 25.267,
"packet": 860,
"pps": 25.267,
"size_kb": 332,
"bitrate_kbit": 76.800,
"pix_fmt": "yuv444p",
"q": 28.000,
"width": 1280,
"height": 720,
"avstream": null
}],
"frame": 910,
"packet": 860,
"fps": 25.267,
"q": 28,
"size_kb": 332,
"time": 34.320,
"bitrate_kbit": 76.800,
"speed": 0.943,
"drop": 0,
"dup": 0
},
"memory_bytes": 427692032,
"cpu_usage": 22.015,
"command": ["-f", "lavfi", "-re", "-i", "testsrc=size=1280x720:rate=25", "-c:v", "libx264", "-f", "null", "-"]
}curl http://127.0.0.1:8080/api/v3/process/main \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X PUT \
-d '{
"id": "main",
"options": [],
"input": [
{
"address": "testsrc=size=1280x720:rate=25",
"id": "0",
"options": ["-f", "lavfi", "-re"]
}
],
"output": [
{
"address": "{rtmp,name=main}",
"id": "0",
"options": ["-c:v", "libx264", "-f", "flv"]
}
],
"autostart": true,
"reconnect": true,
"reconnect_delay_seconds": 10,
"stale_timeout_seconds": 10
}'{
"id": "main",
"type": "ffmpeg",
"reference": "",
"input": [{
"id": "0",
"address": "testsrc=size=1280x720:rate=25",
"options": ["-f", "lavfi", "-re"]
}],
"output": [{
"id": "0",
"address": "{rtmp,name=main}",
"options": ["-c:v", "libx264", "-f", "flv"]
}],
"options": [],
"reconnect": true,
"reconnect_delay_seconds": 10,
"autostart": true,
"stale_timeout_seconds": 10,
"limits": {
"cpu_usage": 0,
"memory_mbytes": 0,
"waitfor_seconds": 0
}
}curl http://127.0.0.1:8080/api/v3/process/main/state \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GET{
"order": "start",
"exec": "running",
"runtime_seconds": 32,
"reconnect_seconds": -1,
"last_logline": "ffmpeg.mapping:{\"graphs\":[{\"index\":0,\"graph\":[{\"src_name\":\"Parsed_null_0\",\"src_filter\":\"null\",\"dst_name\":\"auto_scale_0\",\"dst_filter\":\"scale\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/25\",\"type\":\"video\",\"format\":\"rgb24\",\"width\":1280,\"height\":720},{\"src_name\":\"graph 0 input from stream 0:0\",\"src_filter\":\"buffer\",\"dst_name\":\"Parsed_null_0\",\"dst_filter\":\"null\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/25\",\"type\":\"video\",\"format\":\"rgb24\",\"width\":1280,\"height\":720},{\"src_name\":\"format\",\"src_filter\":\"format\",\"dst_name\":\"out_0_0\",\"dst_filter\":\"buffersink\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/25\",\"type\":\"video\",\"format\":\"yuv444p\",\"width\":1280,\"height\":720},{\"src_name\":\"auto_scale_0\",\"src_filter\":\"scale\",\"dst_name\":\"format\",\"dst_filter\":\"format\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/25\",\"type\":\"video\",\"format\":\"yuv444p\",\"width\":1280,\"height\":720}]}],\"mapping\":[{\"input\":{\"index\":0,\"stream\":0},\"graph\":{\"index\":0,\"name\":\"graph 0 input from stream 0:0\"},\"output\":null},{\"input\":null,\"graph\":{\"index\":0,\"name\":\"out_0_0\"},\"output\":{\"index\":0,\"stream\":0}}]}",
"progress": {
"inputs": [{
"id": "0",
"address": "testsrc=size=1280x720:rate=25",
"index": 0,
"stream": 0,
"format": "lavfi",
"type": "video",
"codec": "rawvideo",
"coder": "rawvideo",
"frame": 796,
"fps": 24.833,
"packet": 796,
"pps": 24.833,
"size_kb": 2149200,
"bitrate_kbit": 536400.000,
"pix_fmt": "rgb24",
"q": 0.000,
"width": 1280,
"height": 720,
"avstream": null
}],
"outputs": [{
"id": "0",
"address": "rtmp://localhost:1935/main",
"index": 0,
"stream": 0,
"format": "flv",
"type": "video",
"codec": "h264",
"coder": "libx264",
"frame": 796,
"fps": 24.833,
"packet": 746,
"pps": 24.833,
"size_kb": 284,
"bitrate_kbit": 73.600,
"pix_fmt": "yuv444p",
"q": 25.000,
"width": 1280,
"height": 720,
"avstream": null
}],
"frame": 796,
"packet": 746,
"fps": 24.833,
"q": 25,
"size_kb": 284,
"time": 29.720,
"bitrate_kbit": 73.600,
"speed": 0.934,
"drop": 0,
"dup": 0
},
"memory_bytes": 428478464,
"cpu_usage": 18.249,
"command": ["-f", "lavfi", "-re", "-i", "testsrc=size=1280x720:rate=25", "-c:v", "libx264", "-f", "flv", "rtmp://localhost:1935/main"]
}curl http://127.0.0.1:8080/api/v3/rtmp \
-X GET[{
"name": "/main"
}]curl http://127.0.0.1:8080/api/v3/process \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"id": "sub",
"options": [],
"input": [
{
"address": "{rtmp,name=main}",
"id": "0",
"options": []
}
],
"output": [
{
"address": "{memfs}/{processid}.m3u8",
"id": "0",
"options": ["-f", "hls"]
}
],
"autostart": true,
"reconnect": true,
"reconnect_delay_seconds": 10,
"stale_timeout_seconds": 10
}'{
"id": "sub",
"type": "ffmpeg",
"reference": "",
"input": [{
"id": "0",
"address": "{rtmp,name=main}",
"options": []
}],
"output": [{
"id": "0",
"address": "{memfs}/{processid}.m3u8",
"options": ["-f", "hls"]
}],
"options": [],
"reconnect": true,
"reconnect_delay_seconds": 10,
"autostart": true,
"stale_timeout_seconds": 10,
"limits": {
"cpu_usage": 0,
"memory_mbytes": 0,
"waitfor_seconds": 0
}
}curl http://127.0.0.1:8080/api/v3/process/sub/state \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GET{
"order": "start",
"exec": "running",
"runtime_seconds": 31,
"reconnect_seconds": -1,
"last_logline": "[hls @ 0x7fbf1e8fd340] Opening 'http://admin:irIVvk4miq3JhKGZnY@localhost:8080/memfs/sub_22.ts' for writing",
"progress": {
"inputs": [{
"id": "0",
"address": "rtmp://localhost:1935/main",
"index": 0,
"stream": 0,
"format": "flv",
"type": "video",
"codec": "h264",
"coder": "h264",
"frame": 828,
"fps": 29.704,
"packet": 834,
"pps": 29.926,
"size_kb": 322,
"bitrate_kbit": 93.037,
"pix_fmt": "yuv444p",
"q": 0.000,
"width": 1280,
"height": 720,
"avstream": null
}],
"outputs": [{
"id": "0",
"address": "http://admin:irIVvk4miq3JhKGZnY@localhost:8080/memfs/sub.m3u8",
"index": 0,
"stream": 0,
"format": "hls",
"type": "video",
"codec": "h264",
"coder": "libx264",
"frame": 828,
"fps": 29.704,
"packet": 778,
"pps": 27.852,
"size_kb": 322,
"bitrate_kbit": 92.741,
"pix_fmt": "yuv444p",
"q": 28.000,
"width": 1280,
"height": 720,
"avstream": null
}],
"frame": 828,
"packet": 778,
"fps": 29.704,
"q": 28,
"size_kb": 322,
"time": 31.400,
"bitrate_kbit": 92.741,
"speed": 1.100,
"drop": 0,
"dup": 0
},
"memory_bytes": 467107840,
"cpu_usage": 18.008,
"command": ["-i", "rtmp://localhost:1935/main", "-f", "hls", "http://admin:irIVvk4miq3JhKGZnY@localhost:8080/memfs/sub.m3u8"]
}curl http://127.0.0.1:8080/api/v3/fs/mem \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GET[{
"name": "/sub0.ts",
"size_bytes": 143444,
"last_modified": 1674208099
}, {
"name": "/sub1.ts",
"size_bytes": 139684,
"last_modified": 1674208109
}, {
"name": "/sub2.ts",
"size_bytes": 144008,
"last_modified": 1674208119
}, {
"name": "/sub3.ts",
"size_bytes": 143068,
"last_modified": 1674208129
}, {
"name": "/sub4.ts",
"size_bytes": 141376,
"last_modified": 1674208139
}, {
"name": "/sub5.ts",
"size_bytes": 142504,
"last_modified": 1674208149
}, {
"name": "/sub6.ts",
"size_bytes": 143068,
"last_modified": 1674208159
}, {
"name": "/sub7.ts",
"size_bytes": 141376,
"last_modified": 1674208169
}, {
"name": "/sub8.ts",
"size_bytes": 142504,
"last_modified": 1674208179
}, {
"name": "/sub9.ts",
"size_bytes": 143256,
"last_modified": 1674208189
}, {
"name": "/sub.m3u8",
"size_bytes": 209,
"last_modified": 1674208189
}]jsoncurl http://127.0.0.1:8080/api/v3/process/main/command \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X PUT \
-d '{"command": "stop"}'"OK"curl http://127.0.0.1:8080/api/v3/process/sub/state \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GET{
"order": "start",
"exec": "failed",
"runtime_seconds": 6,
"reconnect_seconds": 3,
"last_logline": "rtmp://localhost:1935/main: Broken pipe",
"progress": {
"inputs": [],
"outputs": [],
"frame": 0,
"packet": 0,
"fps": 0,
"q": 0,
"size_kb": 0,
"time": 0,
"bitrate_kbit": 0,
"speed": 0,
"drop": 0,
"dup": 0
},
"memory_bytes": 0,
"cpu_usage": 0,
"command": ["-i", "rtmp://localhost:1935/main", "-f", "hls", "http://admin:irIVvk4miq3JhKGZnY@localhost:8080/memfs/sub.m3u8"]
}curl http://127.0.0.1:8080/api/v3/process/sub/report \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GE{
"created_at": 1674134954,
"prelude": ["ffmpeg version 5.1.2-datarhei Copyright (c) 2000-2022 the FFmpeg developers", " built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219", " configuration: --extra-version=datarhei --prefix=/usr --extra-libs='-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lz -lc -ldl' --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-libv4l2 --enable-v4l2_m2m --enable-libfreetype --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --disable-ffplay --disable-debug --disable-doc --disable-shared", " libavutil 57. 28.100 / 57. 28.100", " libavcodec 59. 37.100 / 59. 37.100", " libavformat 59. 27.100 / 59. 27.100", " libavdevice 59. 7.100 / 59. 7.100", " libavfilter 8. 44.100 / 8. 44.100", " libswscale 6. 7.100 / 6. 7.100", " libswresample 4. 7.100 / 4. 7.100", " libpostproc 56. 6.100 / 56. 6.100", "rtmp://localhost:1935/main: Broken pipe"],
"log": [
["1674134954", "ffmpeg version 5.1.2-datarhei Copyright (c) 2000-2022 the FFmpeg developers"],
["1674134954", " built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219"],
["1674134954", " configuration: --extra-version=datarhei --prefix=/usr --extra-libs='-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lz -lc -ldl' --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-libv4l2 --enable-v4l2_m2m --enable-libfreetype --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --disable-ffplay --disable-debug --disable-doc --disable-shared"],
["1674134954", " libavutil 57. 28.100 / 57. 28.100"],
["1674134954", " libavcodec 59. 37.100 / 59. 37.100"],
["1674134954", " libavformat 59. 27.100 / 59. 27.100"],
["1674134954", " libavdevice 59. 7.100 / 59. 7.100"],
["1674134954", " libavfilter 8. 44.100 / 8. 44.100"],
["1674134954", " libswscale 6. 7.100 / 6. 7.100"],
["1674134954", " libswresample 4. 7.100 / 4. 7.100"],
["1674134954", " libpostproc 56. 6.100 / 56. 6.100"],
["1674134954", "rtmp://localhost:1935/main: Broken pipe"]
],
"history": [{
"created_at": 1674134924,
"prelude": ["ffmpeg version 5.1.2-datarhei Copyright (c) 2000-2022 the FFmpeg developers", " built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219", " configuration: --extra-version=datarhei --prefix=/usr --extra-libs='-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lz -lc -ldl' --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-libv4l2 --enable-v4l2_m2m --enable-libfreetype --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --disable-ffplay --disable-debug --disable-doc --disable-shared", " libavutil 57. 28.100 / 57. 28.100", " libavcodec 59. 37.100 / 59. 37.100", " libavformat 59. 27.100 / 59. 27.100", " libavdevice 59. 7.100 / 59. 7.100", " libavfilter 8. 44.100 / 8. 44.100", " libswscale 6. 7.100 / 6. 7.100", " libswresample 4. 7.100 / 4. 7.100", " libpostproc 56. 6.100 / 56. 6.100", "rtmp://localhost:1935/main: I/O error"],
"log": [
["1674134924", "ffmpeg version 5.1.2-datarhei Copyright (c) 2000-2022 the FFmpeg developers"],
["1674134924", " built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219"],
["1674134924", " configuration: --extra-version=datarhei --prefix=/usr --extra-libs='-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lz -lc -ldl' --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-libv4l2 --enable-v4l2_m2m --enable-libfreetype --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --disable-ffplay --disable-debug --disable-doc --disable-shared"],
["1674134924", " libavutil 57. 28.100 / 57. 28.100"],
["1674134924", " libavcodec 59. 37.100 / 59. 37.100"],
["1674134924", " libavformat 59. 27.100 / 59. 27.100"],
["1674134924", " libavdevice 59. 7.100 / 59. 7.100"],
["1674134924", " libavfilter 8. 44.100 / 8. 44.100"],
["1674134924", " libswscale 6. 7.100 / 6. 7.100"],
["1674134924", " libswresample 4. 7.100 / 4. 7.100"],
["1674134924", " libpostproc 56. 6.100 / 56. 6.100"],
["1674134924", "rtmp://localhost:1935/main: I/O error"]
]
}, {
"created_at": 1674134934,
"prelude": ["ffmpeg version 5.1.2-datarhei Copyright (c) 2000-2022 the FFmpeg developers", " built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219", " configuration: --extra-version=datarhei --prefix=/usr --extra-libs='-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lz -lc -ldl' --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-libv4l2 --enable-v4l2_m2m --enable-libfreetype --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --disable-ffplay --disable-debug --disable-doc --disable-shared", " libavutil 57. 28.100 / 57. 28.100", " libavcodec 59. 37.100 / 59. 37.100", " libavformat 59. 27.100 / 59. 27.100", " libavdevice 59. 7.100 / 59. 7.100", " libavfilter 8. 44.100 / 8. 44.100", " libswscale 6. 7.100 / 6. 7.100", " libswresample 4. 7.100 / 4. 7.100", " libpostproc 56. 6.100 / 56. 6.100", "rtmp://localhost:1935/main: Broken pipe"],
"log": [
["1674134934", "ffmpeg version 5.1.2-datarhei Copyright (c) 2000-2022 the FFmpeg developers"],
["1674134934", " built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219"],
["1674134934", " configuration: --extra-version=datarhei --prefix=/usr --extra-libs='-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lz -lc -ldl' --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-libv4l2 --enable-v4l2_m2m --enable-libfreetype --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --disable-ffplay --disable-debug --disable-doc --disable-shared"],
["1674134934", " libavutil 57. 28.100 / 57. 28.100"],
["1674134934", " libavcodec 59. 37.100 / 59. 37.100"],
["1674134934", " libavformat 59. 27.100 / 59. 27.100"],
["1674134934", " libavdevice 59. 7.100 / 59. 7.100"],
["1674134934", " libavfilter 8. 44.100 / 8. 44.100"],
["1674134934", " libswscale 6. 7.100 / 6. 7.100"],
["1674134934", " libswresample 4. 7.100 / 4. 7.100"],
["1674134934", " libpostproc 56. 6.100 / 56. 6.100"],
["1674134934", "rtmp://localhost:1935/main: Broken pipe"]
]
}, {
"created_at": 1674134944,
"prelude": ["ffmpeg version 5.1.2-datarhei Copyright (c) 2000-2022 the FFmpeg developers", " built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219", " configuration: --extra-version=datarhei --prefix=/usr --extra-libs='-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lz -lc -ldl' --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-libv4l2 --enable-v4l2_m2m --enable-libfreetype --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --disable-ffplay --disable-debug --disable-doc --disable-shared", " libavutil 57. 28.100 / 57. 28.100", " libavcodec 59. 37.100 / 59. 37.100", " libavformat 59. 27.100 / 59. 27.100", " libavdevice 59. 7.100 / 59. 7.100", " libavfilter 8. 44.100 / 8. 44.100", " libswscale 6. 7.100 / 6. 7.100", " libswresample 4. 7.100 / 4. 7.100", " libpostproc 56. 6.100 / 56. 6.100", "rtmp://localhost:1935/main: I/O error"],
"log": [
["1674134944", "ffmpeg version 5.1.2-datarhei Copyright (c) 2000-2022 the FFmpeg developers"],
["1674134944", " built with gcc 11.2.1 (Alpine 11.2.1_git20220219) 20220219"],
["1674134944", " configuration: --extra-version=datarhei --prefix=/usr --extra-libs='-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lz -lc -ldl' --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-libv4l2 --enable-v4l2_m2m --enable-libfreetype --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libvorbis --disable-ffplay --disable-debug --disable-doc --disable-shared"],
["1674134944", " libavutil 57. 28.100 / 57. 28.100"],
["1674134944", " libavcodec 59. 37.100 / 59. 37.100"],
["1674134944", " libavformat 59. 27.100 / 59. 27.100"],
["1674134944", " libavdevice 59. 7.100 / 59. 7.100"],
["1674134944", " libavfilter 8. 44.100 / 8. 44.100"],
["1674134944", " libswscale 6. 7.100 / 6. 7.100"],
["1674134944", " libswresample 4. 7.100 / 4. 7.100"],
["1674134944", " libpostproc 56. 6.100 / 56. 6.100"],
["1674134944", "rtmp://localhost:1935/main: I/O error"]
]
}]
}curl http://127.0.0.1:8080/api/v3/process/main/command \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X PUT \
-d '{"command":"start"}'"OK"curl http://127.0.0.1:8080/api/v3/process/sub/state \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X GET{
"order": "start",
"exec": "running",
"runtime_seconds": 1,
"reconnect_seconds": -1,
"last_logline": "ffmpeg.mapping:{\"graphs\":[{\"index\":0,\"graph\":[{\"src_name\":\"Parsed_null_0\",\"src_filter\":\"null\",\"dst_name\":\"format\",\"dst_filter\":\"format\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/1000\",\"type\":\"video\",\"format\":\"yuv444p\",\"width\":1280,\"height\":720},{\"src_name\":\"graph 0 input from stream 0:0\",\"src_filter\":\"buffer\",\"dst_name\":\"Parsed_null_0\",\"dst_filter\":\"null\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/1000\",\"type\":\"video\",\"format\":\"yuv444p\",\"width\":1280,\"height\":720},{\"src_name\":\"format\",\"src_filter\":\"format\",\"dst_name\":\"out_0_0\",\"dst_filter\":\"buffersink\",\"inpad\":\"default\",\"outpad\":\"default\",\"timebase\": \"1/1000\",\"type\":\"video\",\"format\":\"yuv444p\",\"width\":1280,\"height\":720}]}],\"mapping\":[{\"input\":{\"index\":0,\"stream\":0},\"graph\":{\"index\":0,\"name\":\"graph 0 input from stream 0:0\"},\"output\":null},{\"input\":null,\"graph\":{\"index\":0,\"name\":\"out_0_0\"},\"output\":{\"index\":0,\"stream\":0}}]}",
"progress": {
"inputs": [{
"id": "0",
"address": "rtmp://localhost:1935/main",
"index": 0,
"stream": 0,
"format": "flv",
"type": "video",
"codec": "h264",
"coder": "h264",
"frame": 116,
"fps": 0.000,
"packet": 122,
"pps": 0.000,
"size_kb": 51,
"bitrate_kbit": 0.000,
"pix_fmt": "yuv444p",
"q": 0.000,
"width": 1280,
"height": 720,
"avstream": null
}],
"outputs": [{
"id": "0",
"address": "http://admin:irIVvk4miq3JhKGZnY@localhost:8080/memfs/sub.m3u8",
"index": 0,
"stream": 0,
"format": "hls",
"type": "video",
"codec": "h264",
"coder": "libx264",
"frame": 116,
"fps": 0.000,
"packet": 66,
"pps": 0.000,
"size_kb": 34,
"bitrate_kbit": 0.000,
"pix_fmt": "yuv444p",
"q": 28.000,
"width": 1280,
"height": 720,
"avstream": null
}],
"frame": 116,
"packet": 66,
"fps": 0,
"q": 28,
"size_kb": 34,
"time": 2.560,
"bitrate_kbit": 0,
"speed": 2.520,
"drop": 0,
"dup": 0
},
"memory_bytes": 463351808,
"cpu_usage": 0,
"command": ["-i", "rtmp://localhost:1935/main", "-f", "hls", "http://admin:irIVvk4miq3JhKGZnY@localhost:8080/memfs/sub.m3u8"]
}curl http://127.0.0.1:8080/api/v3/process/sub \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X DELETE"OK"curl http://127.0.0.1:8080/api/v3/process/main \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-X DELETE"OK"docker kill coredocker rm coreGet a summary of all active and past sessions of the given collector.
Comma separated list of collectors
Sessions summary
mbit/s
mbit/s
kbit/s
kbit/s
mbit/s
mbit/s
Sessions summary
Get a minimal summary of all active sessions (i.e. number of sessions, bandwidth).
Comma separated list of collectors
Active sessions listing
kbit/s
kbit/s
Active sessions listing
Query the collected metrics
OK
Bad Request
GET /api/v3/session HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": {
"active": {
"bandwidth_rx_mbit": 1,
"bandwidth_tx_mbit": 1,
"list": [
{
"bandwidth_rx_kbit": 1,
"bandwidth_tx_kbit": 1,
"bytes_rx": 1,
"bytes_tx": 1,
"created_at": 1,
"extra": "text",
"id": "text",
"local": "text",
"reference": "text",
"remote": "text"
}
],
"max_bandwidth_rx_mbit": 1,
"max_bandwidth_tx_mbit": 1,
"max_sessions": 1,
"sessions": 1
},
"summary": {
"local": {
"ANY_ADDITIONAL_PROPERTY": {
"sessions": 1,
"traffic_rx_mb": 1,
"traffic_tx_mb": 1
}
},
"reference": {
"ANY_ADDITIONAL_PROPERTY": {
"sessions": 1,
"traffic_rx_mb": 1,
"traffic_tx_mb": 1
}
},
"remote": {
"ANY_ADDITIONAL_PROPERTY": {
"local": {
"ANY_ADDITIONAL_PROPERTY": {
"sessions": 1,
"traffic_rx_mb": 1,
"traffic_tx_mb": 1
}
},
"sessions": 1,
"traffic_rx_mb": 1,
"traffic_tx_mb": 1
}
},
"sessions": 1,
"traffic_rx_mb": 1,
"traffic_tx_mb": 1
}
}
}GET /api/v3/session/active HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": [
{
"bandwidth_rx_kbit": 1,
"bandwidth_tx_kbit": 1,
"bytes_rx": 1,
"bytes_tx": 1,
"created_at": 1,
"extra": "text",
"id": "text",
"local": "text",
"reference": "text",
"remote": "text"
}
]
}GET /api/v3/metrics HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
[
{
"description": "text",
"labels": [
"text"
],
"name": "text"
}
]POST /api/v3/metrics HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"interval_sec": 1,
"metrics": [
{
"labels": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"name": "text"
}
],
"timerange_sec": 1
}{
"interval_sec": 1,
"metrics": [
{
"labels": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"name": "text",
"values": [
{
"ts": "text",
"value": 1
}
]
}
],
"timerange_sec": 1
}