Update Docs and move Stream Method Setting
This commit is contained in:
parent
14d60921ca
commit
1c685f7839
@ -1,45 +0,0 @@
|
||||
[main]
|
||||
# uuid =
|
||||
# cache_dir =
|
||||
# servicename = LocalNow
|
||||
# reponame = fHDHR_LocalNow
|
||||
|
||||
[fhdhr]
|
||||
# address = 0.0.0.0
|
||||
# discovery_address = 0.0.0.0
|
||||
# port = 5004
|
||||
# stream_type = direct
|
||||
# tuner_count = 4
|
||||
# friendlyname = fHDHR-LocalNow
|
||||
# reporting_firmware_name = fHDHR_LocalNow
|
||||
# reporting_manufacturer = BoronDust
|
||||
# reporting_model = fHDHR
|
||||
# reporting_firmware_ver = 20201001
|
||||
# reporting_tuner_type = Antenna
|
||||
# device_auth = fHDHR
|
||||
|
||||
[epg]
|
||||
# images = pass
|
||||
# method = origin
|
||||
# update_frequency = 43200
|
||||
|
||||
[ffmpeg]
|
||||
# path = ffmpeg
|
||||
# bytes_per_read = 1152000
|
||||
|
||||
[vlc]
|
||||
# path = cvlc
|
||||
# bytes_per_read = 1152000
|
||||
|
||||
[direct_stream]
|
||||
# chunksize = 1048576
|
||||
|
||||
[logging]
|
||||
# level = WARNING
|
||||
|
||||
[database]
|
||||
# type = sqlite
|
||||
# driver = None
|
||||
|
||||
[localnow]
|
||||
# force_best = False
|
||||
@ -55,11 +55,6 @@
|
||||
"config_file": true,
|
||||
"config_web": true
|
||||
},
|
||||
"stream_type":{
|
||||
"value": "direct",
|
||||
"config_file": true,
|
||||
"config_web": true
|
||||
},
|
||||
"tuner_count":{
|
||||
"value": 4,
|
||||
"config_file": true,
|
||||
|
||||
@ -9,6 +9,11 @@
|
||||
"value": "none",
|
||||
"config_file": true,
|
||||
"config_web": true
|
||||
},
|
||||
"method": {
|
||||
"value": "direct",
|
||||
"config_file": true,
|
||||
"config_web": true
|
||||
}
|
||||
},
|
||||
"ffmpeg":{
|
||||
|
||||
@ -28,14 +28,28 @@ Here's the `main` section.
|
||||
# cache_dir =
|
||||
````
|
||||
|
||||
## streaming
|
||||
|
||||
* `method` can be set to `ffmpeg`, `vlc` or `direct`.
|
||||
* `bytes_per_read` determines how many bytes of the stream to read before sending the data to your client. Increasing this value may cause longer load times, and lowering it may effect `stuttering`.
|
||||
|
||||
|
||||
````
|
||||
[streaming]
|
||||
# method = direct
|
||||
````
|
||||
|
||||
|
||||
## fhdhr
|
||||
|
||||
The `fhdhr` contains all the configuration options for interfacing between this script and your media platform.
|
||||
* `address` and `port` are what we will allow the script to listen on. `0.0.0.0` is the default, and will respond to all.
|
||||
* `discovery_address` may be helpful for making SSDP work properly. If `address` is not `0.0.0.0`, we will use that. If this is not set to a real IP, we won't run SSDP. SSDP is only really helpful for discovering in Plex/Emby. It's a wasted resource since you can manually add the `ip:port` of the script to Plex.
|
||||
* `tuner_count` is a limit of devices able to stream from the script.
|
||||
* `tuner_count` is a limit of devices able to stream from the script. The default is 3, as per Locast's documentation. A 4th is possible, but is not reccomended.
|
||||
* `friendlyname` is to set the name that Plex sees the script as.
|
||||
* `stream_type` can be set to `ffmpeg`, `vlc` or `direct`.
|
||||
* `reporting_*` are settings that show how the script projects itself as a hardware device.
|
||||
* `device_auth` and `require_auth` are for an unimplemented Authentication feature.
|
||||
* `chanscan_on_start` Scans Origin for new channels at startup.
|
||||
|
||||
|
||||
````
|
||||
@ -43,61 +57,56 @@ The `fhdhr` contains all the configuration options for interfacing between this
|
||||
# address = 0.0.0.0
|
||||
# discovery_address = 0.0.0.0
|
||||
# port = 5004
|
||||
# stream_type = direct
|
||||
# tuner_count = 4
|
||||
# friendlyname = fHDHR-LocalNow
|
||||
# reporting_firmware_name = fHDHR_LocalNow
|
||||
# friendlyname = fHDHR-Locast
|
||||
# reporting_firmware_name = fHDHR_Locast
|
||||
# reporting_manufacturer = BoronDust
|
||||
# reporting_model = fHDHR
|
||||
# reporting_firmware_ver = 20201001
|
||||
# reporting_tuner_type = Antenna
|
||||
# device_auth = fHDHR
|
||||
# require_auth = False
|
||||
# chanscan_on_start = True
|
||||
````
|
||||
|
||||
# EPG
|
||||
* `images` can be set to `proxy` or `pass`. If you choose `proxy`, images will be reverse proxied through fHDHR.
|
||||
* `method` defaults to `origin` and will pull the xmltv data from LocalNow. Other Options include `blocks` which is an hourly schedule with minimal channel information. Another option is `zap2it`, which is another source of EPG information. Channel Numbers may need to be manually mapped.
|
||||
* `update_frequency` * `epg_update_frequency` determines how often we check for new scheduling information. In Seconds.
|
||||
* `method` defaults to `origin` and will pull the xmltv data from Locast. Other Options include `blocks` which is an hourly schedule with minimal channel information. Another option is `zap2it`, which is another source of EPG information. Channel Numbers may need to be manually mapped.
|
||||
* `update_frequency` determines how often we check for new scheduling information. In Seconds.
|
||||
* `reverse_days` allows Blocks of EPG data to be created prior to the start of the EPG Source data.
|
||||
* `forward_days` allows Blocks of EPG data to be created after the end of the EPG Source data.
|
||||
* `block_size` in seconds, sets the default block size for data before, after and missing timeslots.
|
||||
* `xmltv_offset` allows the final xmltv file to have an offset for users with timezone issues.
|
||||
|
||||
````
|
||||
[epg]
|
||||
# images = pass
|
||||
# method = origin
|
||||
# update_frequency = 43200
|
||||
# reverse_days = -1
|
||||
# forward_days = 7
|
||||
# block_size = 1800
|
||||
# xmltv_offset = +0000
|
||||
````
|
||||
|
||||
## ffmpeg
|
||||
|
||||
The `ffmpeg` section includes:
|
||||
* `path` is useful if ffmpeg is not in your systems PATH, or you want to manually specify.
|
||||
* `bytes_per_read` determines how many bytes of the stream to read before sending the data to your client. Increasing this value may cause longer load times, and lowering it may effect `stuttering`.
|
||||
|
||||
````
|
||||
[ffmpeg]
|
||||
# path = ffmpeg
|
||||
# bytes_per_read = 1152000
|
||||
````
|
||||
|
||||
## vlc
|
||||
|
||||
The `vlc` section includes:
|
||||
* `path` is useful if ffmpeg is not in your systems PATH, or you want to manually specify.
|
||||
* `bytes_per_read` determines how many bytes of the stream to read before sending the data to your client. Increasing this value may cause longer load times, and lowering it may effect `stuttering`.
|
||||
|
||||
````
|
||||
[vlc]
|
||||
# path = ffmpeg
|
||||
# bytes_per_read = 1152000
|
||||
````
|
||||
|
||||
## direct_stream
|
||||
|
||||
The `direct_stream` section is for when you set the `[fhdhr]stream_type` to `direct`
|
||||
* `chunksize` is how much data to read at a time.
|
||||
|
||||
````
|
||||
[direct_stream]
|
||||
# chunksize = 1024*1024
|
||||
# path = cvlc
|
||||
````
|
||||
|
||||
# Logging
|
||||
@ -117,6 +126,27 @@ TODO: improve documentation here.
|
||||
[database]
|
||||
# type = sqlite
|
||||
# driver = None
|
||||
user = None
|
||||
pass = None
|
||||
host = None
|
||||
port = None
|
||||
name = None
|
||||
````
|
||||
|
||||
## RMG
|
||||
|
||||
````
|
||||
# enabled = True
|
||||
````
|
||||
|
||||
## SSDP
|
||||
|
||||
````
|
||||
# enabled = True
|
||||
# max_age = 1800
|
||||
# proto = ipv6
|
||||
# iface = None
|
||||
# multicast_address = None
|
||||
````
|
||||
|
||||
## LocalNow
|
||||
|
||||
@ -103,7 +103,7 @@ class Config():
|
||||
isdocker = is_docker()
|
||||
self.internal["versions"]["Docker"] = isdocker
|
||||
|
||||
if self.dict["fhdhr"]["stream_type"] == "ffmpeg":
|
||||
if self.dict["streaming"]["method"] == "ffmpeg":
|
||||
try:
|
||||
ffmpeg_command = [self.dict["ffmpeg"]["path"],
|
||||
"-version",
|
||||
@ -121,7 +121,7 @@ class Config():
|
||||
print("Failed to find ffmpeg.")
|
||||
self.internal["versions"]["ffmpeg"] = ffmpeg_version
|
||||
|
||||
if self.dict["fhdhr"]["stream_type"] == "vlc":
|
||||
if self.dict["streaming"]["method"] == "vlc":
|
||||
try:
|
||||
vlc_command = [self.dict["vlc"]["path"],
|
||||
"--version",
|
||||
@ -310,7 +310,7 @@ class Config():
|
||||
|
||||
self.dict["database"]["path"] = pathlib.Path(cache_dir).joinpath('fhdhr.db')
|
||||
|
||||
if self.dict["fhdhr"]["stream_type"] not in ["direct", "ffmpeg", "vlc"]:
|
||||
if self.dict["streaming"]["method"] not in ["direct", "ffmpeg", "vlc"]:
|
||||
raise fHDHR.exceptions.ConfigurationError("Invalid stream type. Exiting...")
|
||||
|
||||
if not self.dict["fhdhr"]["discovery_address"] and self.dict["fhdhr"]["address"] != "0.0.0.0":
|
||||
|
||||
@ -190,7 +190,7 @@ class Channel():
|
||||
|
||||
@property
|
||||
def api_stream_url(self):
|
||||
return '/api/tuners?method=%s&channel=%s' % (self.fhdhr.config.dict["fhdhr"]["stream_type"], self.number)
|
||||
return '/api/tuners?method=%s&channel=%s' % (self.fhdhr.config.dict["streaming"]["method"], self.number)
|
||||
|
||||
@property
|
||||
def m3u_url(self):
|
||||
|
||||
@ -29,7 +29,7 @@ class Tuners():
|
||||
|
||||
accessed_url = request.args.get('accessed', default=request.url, type=str)
|
||||
|
||||
method = request.args.get('method', default=self.fhdhr.config.dict["fhdhr"]["stream_type"], type=str)
|
||||
method = request.args.get('method', default=self.fhdhr.config.dict["streaming"]["method"], type=str)
|
||||
|
||||
tuner_number = request.args.get('tuner', default=None, type=str)
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class Auto():
|
||||
|
||||
def get(self, channel, *args):
|
||||
|
||||
method = request.args.get('method', default=self.fhdhr.config.dict["fhdhr"]["stream_type"], type=str)
|
||||
method = request.args.get('method', default=self.fhdhr.config.dict["streaming"]["method"], type=str)
|
||||
|
||||
redirect_url = "/api/tuners?method=%s" % (method)
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class Tuner():
|
||||
|
||||
def get(self, tuner_number, channel, *args):
|
||||
|
||||
method = request.args.get('method', default=self.fhdhr.config.dict["fhdhr"]["stream_type"], type=str)
|
||||
method = request.args.get('method', default=self.fhdhr.config.dict["streaming"]["method"], type=str)
|
||||
|
||||
redirect_url = "/api/tuners?method=%s" % (method)
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ class RMG_Devices_DeviceKey_Media():
|
||||
param = request.args.get('method', default=None, type=str)
|
||||
self.fhdhr.logger.debug("param:%s" % param)
|
||||
|
||||
method = self.fhdhr.config.dict["fhdhr"]["stream_type"]
|
||||
method = self.fhdhr.config.dict["streaming"]["method"]
|
||||
|
||||
redirect_url = "/api/tuners?method=%s" % (method)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user