diff --git a/docker/config.template.yml b/docker/config.template.yml index 5a99400a29..cb4e21ab88 100644 --- a/docker/config.template.yml +++ b/docker/config.template.yml @@ -320,7 +320,7 @@ stream: hls: - # Whether the output is enabled. # > default is false - enabled: true + enabled: false # > must be one of ('mpegts', 'mp3', 'adts', 'mp4') # > this field is REQUIRED format: mpegts @@ -333,12 +333,6 @@ stream: # Output public url, If not defined, the value will be generated from # the [general.public_url] hostname, the output port and mount. public_url: - # web server host. - # > default is localhost - host: localhost - # webs server server port. - # > default is 80 - port: 80 # hls mount point # > this field is REQUIRED mount: hls/main @@ -346,7 +340,7 @@ stream: - # > prefix of generated fragment # > this field is REQUIRED fragment_prefix: mp3_low - # > must be one of ( 'libmp3lame', 'flac', 'aac', 'libopus', 'libvorbis') + # > codec must be one of ( 'libmp3lame', 'flac', 'aac', 'libopus', 'libvorbis') # > this field is REQUIRED codec: libmp3lame # > bitrate of the stream diff --git a/docker/config.yml b/docker/config.yml index 3f423d9f85..c1adac5f87 100644 --- a/docker/config.yml +++ b/docker/config.yml @@ -320,7 +320,7 @@ stream: hls: - # Whether the output is enabled. # > default is false - enabled: true + enabled: false # > must be one of ('mpegts', 'mp3', 'adts', 'mp4') # > this field is REQUIRED format: mpegts @@ -333,12 +333,6 @@ stream: # Output public url, If not defined, the value will be generated from # the [general.public_url] hostname, the output port and mount. public_url: - # web server host. - # > default is localhost - host: localhost - # webs server server port. - # > default is 80 - port: 80 # hls mount point # > this field is REQUIRED mount: hls/main @@ -346,7 +340,7 @@ stream: - # > prefix of generated fragment # > this field is REQUIRED fragment_prefix: mp3_low - # > must be one of ( 'libmp3lame', 'flac', 'aac', 'libopus', 'libvorbis') + # > codec must be one of ( 'libmp3lame', 'flac', 'aac', 'libopus', 'libvorbis') # > this field is REQUIRED codec: libmp3lame # > bitrate of the stream diff --git a/docker/example/config.yml b/docker/example/config.yml index 5ebd51254c..09c60f03ab 100644 --- a/docker/example/config.yml +++ b/docker/example/config.yml @@ -320,7 +320,7 @@ stream: hls: - # Whether the output is enabled. # > default is false - enabled: true + enabled: false # > must be one of ('mpegts', 'mp3', 'adts', 'mp4') # > this field is REQUIRED format: mpegts @@ -333,12 +333,6 @@ stream: # Output public url, If not defined, the value will be generated from # the [general.public_url] hostname, the output port and mount. public_url: - # web server host. - # > default is localhost - host: localhost - # webs server server port. - # > default is 80 - port: 80 # hls mount point # > this field is REQUIRED mount: hls/main @@ -346,7 +340,7 @@ stream: - # > prefix of generated fragment # > this field is REQUIRED fragment_prefix: mp3_low - # > must be one of ( 'libmp3lame', 'flac', 'aac', 'libopus', 'libvorbis') + # > codec must be one of ( 'libmp3lame', 'flac', 'aac', 'libopus', 'libvorbis') # > this field is REQUIRED codec: libmp3lame # > bitrate of the stream diff --git a/installer/config.yml b/installer/config.yml index 294e9ab1ca..ef8f619a5a 100644 --- a/installer/config.yml +++ b/installer/config.yml @@ -320,7 +320,7 @@ stream: hls: - # Whether the output is enabled. # > default is false - enabled: true + enabled: false # > must be one of ('mpegts', 'mp3', 'adts', 'mp4') # > this field is REQUIRED format: mpegts @@ -333,12 +333,6 @@ stream: # Output public url, If not defined, the value will be generated from # the [general.public_url] hostname, the output port and mount. public_url: - # web server host. - # > default is localhost - host: localhost - # webs server server port. - # > default is 80 - port: 80 # hls mount point # > this field is REQUIRED mount: hls/main @@ -346,7 +340,7 @@ stream: - # > prefix of generated fragment # > this field is REQUIRED fragment_prefix: mp3_low - # > must be one of ( 'libmp3lame', 'flac', 'aac', 'libopus', 'libvorbis') + # > codec must be one of ( 'libmp3lame', 'flac', 'aac', 'libopus', 'libvorbis') # > this field is REQUIRED codec: libmp3lame # > bitrate of the stream diff --git a/legacy/application/configs/conf.php b/legacy/application/configs/conf.php index f6bb878a49..1baaad23f4 100644 --- a/legacy/application/configs/conf.php +++ b/legacy/application/configs/conf.php @@ -225,11 +225,8 @@ public function getConfigTreeBuilder() /* */->integerNode('segment_count')->defaultValue(5)->end() /* */->integerNode('segments_overhead')->defaultValue(5)->end() /* */->booleanNode('enabled')->defaultFalse()->end() - /* */->enumNode('kind')->values(['hls'])->defaultValue('hls')->end() /* */->scalarNode('public_url')->end() - /* */->scalarNode('host')->defaultValue('localhost')->end() - /* */->integerNode('port')->defaultValue(80)->end() /* */->scalarNode('mount')->cannotBeEmpty() /* */->validate()->ifString()->then($trim_leading_slash)->end() /* */->end() diff --git a/legacy/application/models/StreamSetting.php b/legacy/application/models/StreamSetting.php index 7b640b5112..61d9abe7c1 100644 --- a/legacy/application/models/StreamSetting.php +++ b/legacy/application/models/StreamSetting.php @@ -68,10 +68,11 @@ public static function getOutput($key, $add_prefix = false) $prefix . 'bitrate' => $output['audio']['bitrate'] ?? 128, $prefix . 'type' => $output['audio']['format'], ]); - } else { - // assume HLS : set web server port + } else if ($output['kind'] == 'hls') { + // HLS : set web server host and port $result = array_merge($result, [ $prefix . 'port' => $_SERVER['SERVER_PORT'], + $prefix . 'host' => $_SERVER['SERVER_NAME'], ]); } } diff --git a/shared/libretime_shared/config/_models.py b/shared/libretime_shared/config/_models.py index c6713b8bee..e621f8dc04 100644 --- a/shared/libretime_shared/config/_models.py +++ b/shared/libretime_shared/config/_models.py @@ -208,8 +208,6 @@ class HlsOutput(BaseModel): kind: Literal["hls"] = "hls" enabled: bool = False public_url: Optional[AnyUrl] = None - host: str = "localhost" - port: int = 80 format: str = "mpegts" segment_duration: float = 2.0 segment_count: int = 5