mirror of
https://github.com/algora-io/tv.git
synced 2025-02-14 01:59:50 +02:00
allow configuring flame
This commit is contained in:
parent
50248ee74b
commit
5354597eb1
@ -21,10 +21,13 @@ EVENT_SINK_URL=""
|
||||
|
||||
RESUME_RTMP=false
|
||||
RESUME_RTMP_ON_UNPUBLUSH=false
|
||||
RESUME_RTMP_TIMEOUT=3200
|
||||
RESUME_RTMP_RECONNECT_TIMEOUT=12
|
||||
RESUME_RTMP_TIMEOUT=3600
|
||||
|
||||
#TRANSCODE=4320p60@32000000|2160p60@16000000|1440p60@8000000|1440p30@4000000|720p30@2000000|360p30@1000000|180p30@500000
|
||||
SUPPORTS_H265=false
|
||||
TRANSCODE=4320p60@32000000|2160p60@16000000|1440p60@8000000|1440p30@4000000|720p30@2000000|360p30@1000000|180p30@500000
|
||||
|
||||
FLAME_BACKEND=local
|
||||
FLAME_MAX=1
|
||||
FLAME_MAX_CONCURRENCY=10
|
||||
FLAME_IDLE_SHUTDOWN_AFTER=30
|
||||
#FLAME_MIX_TARGET=nvidia
|
||||
|
@ -19,7 +19,6 @@ config :algora,
|
||||
supports_h265: System.get_env("SUPPORTS_H265", "false") == "true",
|
||||
transcode: System.get_env("TRANSCODE"),
|
||||
transcode_backend: transcode_backend,
|
||||
flame_backend: flame_backend,
|
||||
rtmp_port: String.to_integer(System.get_env("RTMP_PORT", "9006"))
|
||||
|
||||
config :algora, :buckets,
|
||||
@ -36,6 +35,14 @@ config :algora, :restream,
|
||||
|
||||
config :algora, :event_sink, url: System.get_env("EVENT_SINK_URL")
|
||||
|
||||
config :algora, :flame,
|
||||
backend: flame_backend,
|
||||
min: String.to_integer(System.get_env("FLAME_MAX", "1")),
|
||||
max: String.to_integer(System.get_env("FLAME_MAX", "1")),
|
||||
max_concurrency: String.to_integer(System.get_env("FLAME_MAX_CONCURRENCY", "10")),
|
||||
idle_shutdown_after: String.to_integer(System.get_env("FLAME_IDLE_SHUTDOWN_AFTER", "30")),
|
||||
log: String.to_atom(System.get_env("FLAME_LOG", "debug"))
|
||||
|
||||
config :ex_aws,
|
||||
# debug_requests: true,
|
||||
json_codec: Jason,
|
||||
|
@ -119,6 +119,14 @@ if config_env() == :prod do
|
||||
|
||||
config :algora, :event_sink, url: System.get_env("EVENT_SINK_URL")
|
||||
|
||||
config :algora, :flame,
|
||||
backend: flame_backend,
|
||||
min: String.to_integer(System.get_env("FLAME_MAX", "1")),
|
||||
max: String.to_integer(System.get_env("FLAME_MAX", "1")),
|
||||
max_concurrency: String.to_integer(System.get_env("FLAME_MAX_CONCURRENCY", "10")),
|
||||
idle_shutdown_after: String.to_integer(System.get_env("FLAME_IDLE_SHUTDOWN_AFTER", "30")),
|
||||
log: System.get_env("FLAME_LOG", "debug")
|
||||
|
||||
config :ex_aws,
|
||||
json_codec: Jason,
|
||||
access_key_id: System.fetch_env!("AWS_ACCESS_KEY_ID"),
|
||||
|
@ -8,9 +8,16 @@ config :algora,
|
||||
supports_h265: System.get_env("SUPPORTS_H265", "false") == "true",
|
||||
transcode: System.get_env("TRANSCODE"),
|
||||
transcode_backend: nil,
|
||||
flame_backend: FLAME.LocalBackend,
|
||||
rtmp_port: String.to_integer(System.get_env("RTMP_PORT", "9006"))
|
||||
|
||||
config :algora, :flame,
|
||||
flame_backend: FLAME.LocalBackend,
|
||||
min: String.to_integer(System.get_env("FLAME_MAX", "1")),
|
||||
max: String.to_integer(System.get_env("FLAME_MAX", "1")),
|
||||
max_concurrency: String.to_integer(System.get_env("FLAME_MAX_CONCURRENCY", "10")),
|
||||
idle_shutdown_after: String.to_integer(System.get_env("FLAME_IDLE_SHUTDOWN_AFTER", "30")),
|
||||
log: System.get_env("FLAME_LOG", "debug")
|
||||
|
||||
# Configure your database
|
||||
#
|
||||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
|
@ -43,11 +43,11 @@ defmodule Algora.Application do
|
||||
{FLAME.Pool,
|
||||
name: Algora.Pipeline.Pool,
|
||||
backend: Algora.config([:flame_backend]),
|
||||
min: 0,
|
||||
max: String.to_integer(System.get_env("FLAME_MAX", "1")),
|
||||
max_concurrency: String.to_integer(System.get_env("FLAME_MAX_CONCURRENCY", "10")),
|
||||
idle_shutdown_after: String.to_integer(System.get_env("FLAME_IDLE_SHUTDOWN_AFTER", "30")),
|
||||
log: :debug,
|
||||
min: Algora.config([:flame, :min]),
|
||||
max: Algora.config([:flame, :max]),
|
||||
max_concurrency: Algora.config([:flame, :max_concurrency]),
|
||||
idle_shutdown_after: Algora.config([:flame, :idle_shutdown_after]),
|
||||
log: Algora.config([:flame, :log]),
|
||||
},
|
||||
# Start the PubSub system
|
||||
{Phoenix.PubSub, name: Algora.PubSub},
|
||||
|
Loading…
x
Reference in New Issue
Block a user