Skip to content

Commit

Permalink
remove useless host port settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mp3butcher committed Dec 13, 2023
1 parent 76010bc commit bd4a99d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 39 deletions.
10 changes: 2 additions & 8 deletions docker/config.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -333,20 +333,14 @@ 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
streams:
- # > 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
Expand Down
10 changes: 2 additions & 8 deletions docker/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -333,20 +333,14 @@ 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
streams:
- # > 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
Expand Down
10 changes: 2 additions & 8 deletions docker/example/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -333,20 +333,14 @@ 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
streams:
- # > 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
Expand Down
10 changes: 2 additions & 8 deletions installer/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -333,20 +333,14 @@ 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
streams:
- # > 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
Expand Down
3 changes: 0 additions & 3 deletions legacy/application/configs/conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 3 additions & 2 deletions legacy/application/models/StreamSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
]);
}
}
Expand Down
2 changes: 0 additions & 2 deletions shared/libretime_shared/config/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bd4a99d

Please sign in to comment.