mirror of
https://github.com/fHDHR/fHDHR_NextPVR.git
synced 2025-12-06 11:16:58 -05:00
Merge pull request #137 from deathbybandaid/dev
Update Docs and move Stream Method Setting
This commit is contained in:
commit
b72a26c96c
@ -1,62 +0,0 @@
|
|||||||
[main]
|
|
||||||
# uuid =
|
|
||||||
# cache_dir =
|
|
||||||
# servicename = NextPVR
|
|
||||||
# reponame = fHDHR_NextPVR
|
|
||||||
|
|
||||||
[fhdhr]
|
|
||||||
# address = 0.0.0.0
|
|
||||||
# discovery_address = 0.0.0.0
|
|
||||||
# port = 5004
|
|
||||||
# stream_type = direct
|
|
||||||
# tuner_count = 4
|
|
||||||
# friendlyname = fHDHR-NextPVR
|
|
||||||
# reporting_firmware_name = fHDHR_NextPVR
|
|
||||||
# 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
|
|
||||||
|
|
||||||
[nextpvr]
|
|
||||||
# address = localhost
|
|
||||||
# port = 8866
|
|
||||||
# ssl =
|
|
||||||
# pin =
|
|
||||||
|
|
||||||
[zap2it]
|
|
||||||
# delay = 5
|
|
||||||
# postalcode = None
|
|
||||||
# affiliate_id = gapzap
|
|
||||||
# country = USA
|
|
||||||
# device = -
|
|
||||||
# headendid = lineupId
|
|
||||||
# isoverride = True
|
|
||||||
# languagecode = en
|
|
||||||
# pref =
|
|
||||||
# timespan = 6
|
|
||||||
# timezone =
|
|
||||||
# userid = -
|
|
||||||
@ -55,11 +55,6 @@
|
|||||||
"config_file": true,
|
"config_file": true,
|
||||||
"config_web": true
|
"config_web": true
|
||||||
},
|
},
|
||||||
"stream_type":{
|
|
||||||
"value": "direct",
|
|
||||||
"config_file": true,
|
|
||||||
"config_web": true
|
|
||||||
},
|
|
||||||
"tuner_count":{
|
"tuner_count":{
|
||||||
"value": 4,
|
"value": 4,
|
||||||
"config_file": true,
|
"config_file": true,
|
||||||
|
|||||||
@ -9,6 +9,11 @@
|
|||||||
"value": "none",
|
"value": "none",
|
||||||
"config_file": true,
|
"config_file": true,
|
||||||
"config_web": true
|
"config_web": true
|
||||||
|
},
|
||||||
|
"method": {
|
||||||
|
"value": "direct",
|
||||||
|
"config_file": true,
|
||||||
|
"config_web": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ffmpeg":{
|
"ffmpeg":{
|
||||||
|
|||||||
@ -28,14 +28,28 @@ Here's the `main` section.
|
|||||||
# cache_dir =
|
# 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
|
## fhdhr
|
||||||
|
|
||||||
The `fhdhr` contains all the configuration options for interfacing between this script and your media platform.
|
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.
|
* `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.
|
* `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.
|
* `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
|
# address = 0.0.0.0
|
||||||
# discovery_address = 0.0.0.0
|
# discovery_address = 0.0.0.0
|
||||||
# port = 5004
|
# port = 5004
|
||||||
# stream_type = direct
|
|
||||||
# tuner_count = 4
|
# tuner_count = 4
|
||||||
# friendlyname = fHDHR-NextPVR
|
# friendlyname = fHDHR-Locast
|
||||||
# reporting_firmware_name = fHDHR_NextPVR
|
# reporting_firmware_name = fHDHR_Locast
|
||||||
# reporting_manufacturer = BoronDust
|
# reporting_manufacturer = BoronDust
|
||||||
# reporting_model = fHDHR
|
# reporting_model = fHDHR
|
||||||
# reporting_firmware_ver = 20201001
|
# reporting_firmware_ver = 20201001
|
||||||
# reporting_tuner_type = Antenna
|
# reporting_tuner_type = Antenna
|
||||||
# device_auth = fHDHR
|
# device_auth = fHDHR
|
||||||
|
# require_auth = False
|
||||||
|
# chanscan_on_start = True
|
||||||
````
|
````
|
||||||
|
|
||||||
# EPG
|
# EPG
|
||||||
* `images` can be set to `proxy` or `pass`. If you choose `proxy`, images will be reverse proxied through fHDHR.
|
* `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 NextPVR. 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.
|
* `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` * `epg_update_frequency` determines how often we check for new scheduling information. In Seconds.
|
* `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]
|
[epg]
|
||||||
# images = pass
|
# images = pass
|
||||||
# method = origin
|
# method = origin
|
||||||
# update_frequency = 43200
|
# update_frequency = 43200
|
||||||
|
# reverse_days = -1
|
||||||
|
# forward_days = 7
|
||||||
|
# block_size = 1800
|
||||||
|
# xmltv_offset = +0000
|
||||||
````
|
````
|
||||||
|
|
||||||
## ffmpeg
|
## ffmpeg
|
||||||
|
|
||||||
The `ffmpeg` section includes:
|
The `ffmpeg` section includes:
|
||||||
* `path` is useful if ffmpeg is not in your systems PATH, or you want to manually specify.
|
* `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]
|
[ffmpeg]
|
||||||
# path = ffmpeg
|
# path = ffmpeg
|
||||||
# bytes_per_read = 1152000
|
|
||||||
````
|
````
|
||||||
|
|
||||||
## vlc
|
## vlc
|
||||||
|
|
||||||
The `vlc` section includes:
|
The `vlc` section includes:
|
||||||
* `path` is useful if ffmpeg is not in your systems PATH, or you want to manually specify.
|
* `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]
|
[vlc]
|
||||||
# path = ffmpeg
|
# path = cvlc
|
||||||
# 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
|
|
||||||
````
|
````
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
@ -117,6 +126,27 @@ TODO: improve documentation here.
|
|||||||
[database]
|
[database]
|
||||||
# type = sqlite
|
# type = sqlite
|
||||||
# driver = None
|
# 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
|
||||||
````
|
````
|
||||||
|
|
||||||
## NextPVR
|
## NextPVR
|
||||||
|
|||||||
@ -103,7 +103,7 @@ class Config():
|
|||||||
isdocker = is_docker()
|
isdocker = is_docker()
|
||||||
self.internal["versions"]["Docker"] = isdocker
|
self.internal["versions"]["Docker"] = isdocker
|
||||||
|
|
||||||
if self.dict["fhdhr"]["stream_type"] == "ffmpeg":
|
if self.dict["streaming"]["method"] == "ffmpeg":
|
||||||
try:
|
try:
|
||||||
ffmpeg_command = [self.dict["ffmpeg"]["path"],
|
ffmpeg_command = [self.dict["ffmpeg"]["path"],
|
||||||
"-version",
|
"-version",
|
||||||
@ -121,7 +121,7 @@ class Config():
|
|||||||
print("Failed to find ffmpeg.")
|
print("Failed to find ffmpeg.")
|
||||||
self.internal["versions"]["ffmpeg"] = ffmpeg_version
|
self.internal["versions"]["ffmpeg"] = ffmpeg_version
|
||||||
|
|
||||||
if self.dict["fhdhr"]["stream_type"] == "vlc":
|
if self.dict["streaming"]["method"] == "vlc":
|
||||||
try:
|
try:
|
||||||
vlc_command = [self.dict["vlc"]["path"],
|
vlc_command = [self.dict["vlc"]["path"],
|
||||||
"--version",
|
"--version",
|
||||||
@ -310,7 +310,7 @@ class Config():
|
|||||||
|
|
||||||
self.dict["database"]["path"] = pathlib.Path(cache_dir).joinpath('fhdhr.db')
|
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...")
|
raise fHDHR.exceptions.ConfigurationError("Invalid stream type. Exiting...")
|
||||||
|
|
||||||
if not self.dict["fhdhr"]["discovery_address"] and self.dict["fhdhr"]["address"] != "0.0.0.0":
|
if not self.dict["fhdhr"]["discovery_address"] and self.dict["fhdhr"]["address"] != "0.0.0.0":
|
||||||
|
|||||||
@ -190,7 +190,7 @@ class Channel():
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def api_stream_url(self):
|
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
|
@property
|
||||||
def m3u_url(self):
|
def m3u_url(self):
|
||||||
|
|||||||
@ -29,7 +29,7 @@ class Tuners():
|
|||||||
|
|
||||||
accessed_url = request.args.get('accessed', default=request.url, type=str)
|
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)
|
tuner_number = request.args.get('tuner', default=None, type=str)
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class Auto():
|
|||||||
|
|
||||||
def get(self, channel, *args):
|
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)
|
redirect_url = "/api/tuners?method=%s" % (method)
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ class Tuner():
|
|||||||
|
|
||||||
def get(self, tuner_number, channel, *args):
|
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)
|
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)
|
param = request.args.get('method', default=None, type=str)
|
||||||
self.fhdhr.logger.debug("param:%s" % param)
|
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)
|
redirect_url = "/api/tuners?method=%s" % (method)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user