Add mobile mpd stream

This commit is contained in:
sonny 2024-08-21 12:23:28 +02:00
parent f72994664c
commit a80f21e57c
3 changed files with 20 additions and 3 deletions

View file

@ -89,20 +89,35 @@ auto_update "yes"
# Use a fixed format for the HTTP stream because it cannot switch its audio # Use a fixed format for the HTTP stream because it cannot switch its audio
# format on-the-fly when the song changes. # format on-the-fly when the song changes.
# see https://mpd.readthedocs.io/en/latest/plugins.html#httpd # See https://mpd.readthedocs.io/en/latest/plugins.html#httpd.
# See https://wiki.xiph.org/Opus_Recommended_Settings#Recommended_Bitrates for
# recommended Opus settings.
audio_output { audio_output {
type "httpd" type "httpd"
name "HTTP Stream" name "HTTP high quality stream"
encoder "opus" encoder "opus"
port "{{ mpd_http_stream_port }}" port "{{ mpd_http_stream_port }}"
bind_to_address "{{ vpn_listen_address }}" bind_to_address "{{ vpn_listen_address }}"
bitrate "128000" bitrate "128000"
format "48000:16:1" format "192000:24:2"
always_on "yes" always_on "yes"
tags "yes" tags "yes"
max_clients "0" max_clients "0"
} }
audio_output {
type "httpd"
name "HTTP mobile stream"
encoder "opus"
port "{{ mpd_http_mobile_stream_port }}"
bind_to_address "{{ vpn_listen_address }}"
bitrate "96000"
format "44100:16:2"
always_on "yes"
tags "yes"
max_clients "1"
}
# #
# Character Encoding ########################################################## # Character Encoding ##########################################################

View file

@ -32,6 +32,7 @@ table ip filter {
iifname "{{ vpn_interface }}" tcp dport { {{ syncthing_gui_port }}, {{ syncthing_protocol_port }} } ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "Syncthing" iifname "{{ vpn_interface }}" tcp dport { {{ syncthing_gui_port }}, {{ syncthing_protocol_port }} } ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "Syncthing"
iifname "{{ vpn_interface }}" tcp dport {{ mpd_port }} ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "MPD" iifname "{{ vpn_interface }}" tcp dport {{ mpd_port }} ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "MPD"
iifname "{{ vpn_interface }}" tcp dport {{ mpd_http_stream_port }} ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "MPD HTTP stream" iifname "{{ vpn_interface }}" tcp dport {{ mpd_http_stream_port }} ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "MPD HTTP stream"
iifname "{{ vpn_interface }}" tcp dport {{ mpd_http_mobile_stream_port }} ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "MPD HTTP mobile stream"
iifname "{{ vpn_media_interface }}" tcp dport {{ jellyfin_http_port }} ip saddr {{ vpn_media_source_range }} ip daddr {{ vpn_media_destination_range }} accept comment "Jellyfin HTTP" iifname "{{ vpn_media_interface }}" tcp dport {{ jellyfin_http_port }} ip saddr {{ vpn_media_source_range }} ip daddr {{ vpn_media_destination_range }} accept comment "Jellyfin HTTP"

View file

@ -10,6 +10,7 @@ ssh_port: 39901
mpd_port: 21000 mpd_port: 21000
mpd_http_stream_port: 8000 mpd_http_stream_port: 8000
mpd_http_mobile_stream_port: 8001
gitlab_ip: '127.0.0.1' gitlab_ip: '127.0.0.1'
gitlab_port: '9090' gitlab_port: '9090'