core

command module
v16.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

Core

dsdsds

CodeQL tests codecov Go Report Card PkgGoDev Gitbook

The datarhei Core is a process management solution for FFmpeg that offers a range of interfaces for media content, including HTTP, RTMP, SRT, and storage options. It is optimized for use in virtual environments such as Docker. It has been implemented in various contexts, from small-scale applications like Restreamer to large-scale, multi-instance frameworks spanning multiple locations, such as dedicated servers, cloud instances, and single-board computers. The datarhei Core stands out from traditional media servers by emphasizing FFmpeg and its capabilities rather than focusing on media conversion.

Objectives of development

The objectives of development are:

  • Unhindered use of FFmpeg processes
  • Portability of FFmpeg, including management across development and production environments
  • Scalability of FFmpeg-based applications through the ability to offload processes to additional instances
  • Streamlining of media product development by focusing on features and design.

What issues have been resolved thus far?

Process management
  • Run multiple processes via API
  • Unrestricted FFmpeg commands in process configuration.
  • Error detection and recovery (e.g., FFmpeg stalls, dumps)
  • Referencing for process chaining (pipelines)
  • Placeholders for storage, RTMP, and SRT usage (automatic credentials management and URL resolution)
  • Logs (access to current stdout/stderr)
  • Log history (configurable log history, e.g., for error analysis)
  • Resource limitation (max. CPU and MEMORY usage per process)
  • Statistics (like FFmpeg progress per input and output, CPU and MEMORY, state, uptime)
  • Input verification (like FFprobe)
  • Metadata (option to store additional information like a title)
Media delivery
  • Configurable file systems (in-memory, disk-mount, S3)
  • HTTP/S, RTMP/S, and SRT services, including Let's Encrypt
  • Bandwidth and session limiting for HLS/MPEG DASH sessions (protects restreams from congestion)
  • Viewer session API and logging
Misc
  • HTTP REST and GraphQL API
  • Swagger documentation
  • Metrics incl. Prometheus support (also detects POSIX and cgroups resources)
  • Docker images for fast setup of development environments up to the integration of cloud resources

Docker images

  • datarhei/core:latest (AMD64, ARM64, ARMv7)
  • datarhei/core:cuda-latest (Nvidia CUDA 11.7.1, AMD64)
  • datarhei/core:rpi-latest (Raspberry Pi / OMX/V4L2-M2M, AMD64/ARMv7)
  • datarhei/core:vaapi-latest (Intel VAAPI, AMD64)

Quick start

  1. Run the Docker image
docker run --name core -d \
    -e CORE_API_AUTH_USERNAME=admin \
    -e CORE_API_AUTH_PASSWORD=secret \
    -p 8080:8080 \
    -v ${HOME}/core/config:/core/config \
    -v ${HOME}/core/data:/core/data \
    datarhei/core:latest
  1. Open Swagger http://host-ip:8080/api/swagger/index.html

  2. Log in with Swagger Authorize > Basic authorization > Username: admin, Password: secret

Documentation

Documentation is available on docs.datarhei.com/core.

License

datarhei/core is licensed under the Apache License 2.0

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
api
Package config implements types for handling the configuation for the app.
Package config implements types for handling the configuation for the app.
v1
v2
Code generated by swaggo/swag.
Code generated by swaggo/swag.
encoding
json
Package json implements
Package json implements
skills
Package skills provides an easy way to find out which codec, de/muxers, filters, and formats ffmpeg supports and which devices are available for ffmpeg on the system.
Package skills provides an easy way to find out which codec, de/muxers, filters, and formats ffmpeg supports and which devices are available for ffmpeg on the system.
api
Package api provides types for communicating with the REST API
Package api provides types for communicating with the REST API
cors
Package cors implements a validator for CORS origins
Package cors implements a validator for CORS origins
fs
handler/api
Package api implements various handlers for the API routes
Package api implements various handlers for the API routes
jwt
jwt/jwks
Package jwks implements a JSON Web Key Set Based on https://github.com/MicahParks/keyfunc without implementing the KeyFunc
Package jwks implements a JSON Web Key Set Based on https://github.com/MicahParks/keyfunc without implementing the KeyFunc
middleware/cache
Package cache is an in-memory LRU cache middleware
Package cache is an in-memory LRU cache middleware
middleware/log
Package log implements a logging middleware
Package log implements a logging middleware
middleware/mime
mime-type middleware
mime-type middleware
middleware/redirect
Package redirect is an echo middleware that applies defined redirects
Package redirect is an echo middleware that applies defined redirects
middleware/session
Package session is a HLS session middleware for Gin
Package session is a HLS session middleware for Gin
internal
io
fs
Package fs provides a simple interface for a filesystem
Package fs provides a simple interface for a filesystem
Package log provides an opiniated logging facility as it provides only 4 log levels.
Package log provides an opiniated logging facility as it provides only 4 log levels.
math
net
Package net provides convenience types around types from the golang/net package.
Package net provides convenience types around types from the golang/net package.
url
Package process is a wrapper of exec.Cmd for controlling a ffmpeg process.
Package process is a wrapper of exec.Cmd for controlling a ffmpeg process.
app
fs
Package rtmp provides an RTMP server
Package rtmp provides an RTMP server
api
Package session provides functions to track sessions with a throughput of data
Package session provides functions to track sessions with a throughput of data

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL