mlbserver 2025.7.21 → 2025.7.26-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +24 -24
- package/README.md +100 -100
- package/docker-cli +7 -7
- package/docker-compose.yml +23 -23
- package/index.js +3496 -3491
- package/mlbserver.subfolder.conf +19 -19
- package/package.json +30 -30
- package/session.js +5339 -5339
package/Dockerfile
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
FROM node:16-alpine
|
|
2
|
-
|
|
3
|
-
RUN apk update && apk add tzdata
|
|
4
|
-
|
|
5
|
-
# Create app directory
|
|
6
|
-
WORKDIR /mlbserver
|
|
7
|
-
|
|
8
|
-
# Add data directory
|
|
9
|
-
VOLUME /mlbserver/data_directory
|
|
10
|
-
|
|
11
|
-
# Install app dependencies
|
|
12
|
-
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
|
13
|
-
# where available (npm@5+)
|
|
14
|
-
COPY package*.json ./
|
|
15
|
-
|
|
16
|
-
RUN npm install
|
|
17
|
-
# If you are building your code for production
|
|
18
|
-
# RUN npm ci --only=production
|
|
19
|
-
|
|
20
|
-
# Bundle app source
|
|
21
|
-
COPY . .
|
|
22
|
-
|
|
23
|
-
EXPOSE 9999 10000
|
|
24
|
-
CMD [ "node", "index.js", "--env", "--port", "9999", "--multiview_port", "10000", "--data_directory", "/mlbserver/data_directory" ]
|
|
1
|
+
FROM node:16-alpine
|
|
2
|
+
|
|
3
|
+
RUN apk update && apk add tzdata
|
|
4
|
+
|
|
5
|
+
# Create app directory
|
|
6
|
+
WORKDIR /mlbserver
|
|
7
|
+
|
|
8
|
+
# Add data directory
|
|
9
|
+
VOLUME /mlbserver/data_directory
|
|
10
|
+
|
|
11
|
+
# Install app dependencies
|
|
12
|
+
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
|
13
|
+
# where available (npm@5+)
|
|
14
|
+
COPY package*.json ./
|
|
15
|
+
|
|
16
|
+
RUN npm install
|
|
17
|
+
# If you are building your code for production
|
|
18
|
+
# RUN npm ci --only=production
|
|
19
|
+
|
|
20
|
+
# Bundle app source
|
|
21
|
+
COPY . .
|
|
22
|
+
|
|
23
|
+
EXPOSE 9999 10000
|
|
24
|
+
CMD [ "node", "index.js", "--env", "--port", "9999", "--multiview_port", "10000", "--data_directory", "/mlbserver/data_directory" ]
|
package/README.md
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
[](https://hub.docker.com/r/tonywagner/mlbserver)
|
|
2
|
-
[](https://www.npmjs.com/package/mlbserver)
|
|
3
|
-

|
|
4
|
-
[](https://github.com/tonywagner/mlbserver/graphs/contributors)
|
|
5
|
-
|
|
6
|
-
# mlbserver
|
|
7
|
-
|
|
8
|
-
## Installation
|
|
9
|
-
|
|
10
|
-
### node-cli
|
|
11
|
-
```
|
|
12
|
-
npm install -g mlbserver
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### docker
|
|
16
|
-
```
|
|
17
|
-
docker pull tonywagner/mlbserver:latest
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Launch
|
|
22
|
-
|
|
23
|
-
### node-cli (follow the prompts on first run, or see below for possible command line options)
|
|
24
|
-
```
|
|
25
|
-
mlbserver
|
|
26
|
-
```
|
|
27
|
-
or in application directory:
|
|
28
|
-
```
|
|
29
|
-
node index.js
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### docker-compose
|
|
33
|
-
Update the required environment variables in the sample [docker-compose.yml](https://github.com/tonywagner/mlbserver/blob/master/docker-compose.yml) file, then launch it with ```docker-compose up --detach```
|
|
34
|
-
|
|
35
|
-
### docker-cli
|
|
36
|
-
Update the environment variables in the sample [docker-cli](https://github.com/tonywagner/mlbserver/blob/master/docker-cli) command, then run the command. Subsequent runs can be launched with ```docker start mlbserver```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## Usage
|
|
40
|
-
|
|
41
|
-
After launching the server or Docker container, you can access it at http://localhost:9999 on the same machine, or substitute your computer's IP address for localhost to access it from a different device. Load that address in a web browser to start using the server and to see more documentation.
|
|
42
|
-
|
|
43
|
-
Basic command line or Docker environment options:
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
--port or -p (primary port to run on; defaults to 9999 in Docker or if not specified)
|
|
47
|
-
--debug or -d (false if not specified)
|
|
48
|
-
--version or -v (returns package version number)
|
|
49
|
-
--logout or -l (logs out and clears session)
|
|
50
|
-
--session or -s (clears session)
|
|
51
|
-
--cache or -c (clears cache)
|
|
52
|
-
--env or -e (use environment variables instead of command line arguments; automatically applied in the Docker image)
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Advanced command line or Docker environment options:
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
--account_username (required, email address, default will use stored credentials or prompt user to enter them if not using Docker)
|
|
59
|
-
--account_password (required, default will use stored credentials or prompt user to enter them if not using Docker)
|
|
60
|
-
--fav_teams (optional, comma-separated list of favorite team abbreviations from https://github.com/tonywagner/mlbserver/blob/master/session.js#L23 -- will prompt if not set or stored and not using Docker)
|
|
61
|
-
--http_root (specify the alternative http webroot or initial path prefix, default is none)
|
|
62
|
-
--free (optional, highlights free games)
|
|
63
|
-
--multiview_port (local port for multiview streaming; defaults to 1 more than primary port, or 10000; does not need to be mapped or used externally)
|
|
64
|
-
--multiview_path (where to create the folder for multiview encoded files; defaults to app directory)
|
|
65
|
-
--ffmpeg_path (path to ffmpeg binary to use for multiview encoding; default downloads a binary using ffmpeg-static)
|
|
66
|
-
--ffmpeg_encoder (ffmpeg video encoder to use for multiview; default is the software encoder libx264)
|
|
67
|
-
--ffmpeg_logging (if present, logs all ffmpeg output -- useful for checking encoding speed or troubleshooting)
|
|
68
|
-
--page_username (username to protect pages; default is no protection)
|
|
69
|
-
--page_password (password to protect pages; default is no protection)
|
|
70
|
-
--content_protect (specify the content protection key to include as a URL parameter, if page protection is enabled)
|
|
71
|
-
--gamechanger_delay (specify extra delay for the gamechanger switches in 10 second increments, default is 0)
|
|
72
|
-
--data_directory (defaults to installed application directory; in the Docker image, this defaults to /mlbserver/data_directory for mapping persistent storage)
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Supports [SWAG](https://docs.linuxserver.io/general/swag/#preset-proxy-confs) using the custom [mlbserver.subfolder.conf](https://github.com/tonywagner/mlbserver/blob/master/mlbserver.subfolder.conf) file.
|
|
76
|
-
|
|
77
|
-
For multiview, the default software video encoder is limited by your CPU. You may want to experiment with different ffmpeg hardware video encoders. "h264_videotoolbox" is confirmed to work on supported Macs, and "h264_v4l2m2m" is confirmed to work on a Raspberry Pi 4 (and likely other Linux systems) when ffmpeg is compiled with this patch: https://www.raspberrypi.org/forums/viewtopic.php?p=1780625#p1780625
|
|
78
|
-
|
|
79
|
-
More potential hardware encoders are described at https://stackoverflow.com/a/50703794
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
h264_amf to access AMD gpu, (windows only)
|
|
83
|
-
h264_nvenc use nvidia gpu cards (work with windows and linux)
|
|
84
|
-
h264_omx raspberry pi encoder
|
|
85
|
-
h264_qsv use Intel Quick Sync Video (hardware embedded in modern Intel CPU)
|
|
86
|
-
h264_v4l2m2m use V4L2 Linux kernel api to access hardware codecs
|
|
87
|
-
h264_vaapi use VAAPI which is another abstraction API to access video acceleration hardware (Linux only)
|
|
88
|
-
h264_videotoolbox use videotoolbox an API to access hardware on OS X
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Credits
|
|
92
|
-
|
|
93
|
-
https://github.com/tonycpsu/streamglob
|
|
94
|
-
https://github.com/mafintosh/hls-decryptor
|
|
95
|
-
https://github.com/eracknaphobia/plugin.video.mlbtv
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
## License
|
|
99
|
-
|
|
100
|
-
MIT
|
|
1
|
+
[](https://hub.docker.com/r/tonywagner/mlbserver)
|
|
2
|
+
[](https://www.npmjs.com/package/mlbserver)
|
|
3
|
+

|
|
4
|
+
[](https://github.com/tonywagner/mlbserver/graphs/contributors)
|
|
5
|
+
|
|
6
|
+
# mlbserver
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
### node-cli
|
|
11
|
+
```
|
|
12
|
+
npm install -g mlbserver
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### docker
|
|
16
|
+
```
|
|
17
|
+
docker pull tonywagner/mlbserver:latest
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Launch
|
|
22
|
+
|
|
23
|
+
### node-cli (follow the prompts on first run, or see below for possible command line options)
|
|
24
|
+
```
|
|
25
|
+
mlbserver
|
|
26
|
+
```
|
|
27
|
+
or in application directory:
|
|
28
|
+
```
|
|
29
|
+
node index.js
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### docker-compose
|
|
33
|
+
Update the required environment variables in the sample [docker-compose.yml](https://github.com/tonywagner/mlbserver/blob/master/docker-compose.yml) file, then launch it with ```docker-compose up --detach```
|
|
34
|
+
|
|
35
|
+
### docker-cli
|
|
36
|
+
Update the environment variables in the sample [docker-cli](https://github.com/tonywagner/mlbserver/blob/master/docker-cli) command, then run the command. Subsequent runs can be launched with ```docker start mlbserver```
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
After launching the server or Docker container, you can access it at http://localhost:9999 on the same machine, or substitute your computer's IP address for localhost to access it from a different device. Load that address in a web browser to start using the server and to see more documentation.
|
|
42
|
+
|
|
43
|
+
Basic command line or Docker environment options:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
--port or -p (primary port to run on; defaults to 9999 in Docker or if not specified)
|
|
47
|
+
--debug or -d (false if not specified)
|
|
48
|
+
--version or -v (returns package version number)
|
|
49
|
+
--logout or -l (logs out and clears session)
|
|
50
|
+
--session or -s (clears session)
|
|
51
|
+
--cache or -c (clears cache)
|
|
52
|
+
--env or -e (use environment variables instead of command line arguments; automatically applied in the Docker image)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Advanced command line or Docker environment options:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
--account_username (required, email address, default will use stored credentials or prompt user to enter them if not using Docker)
|
|
59
|
+
--account_password (required, default will use stored credentials or prompt user to enter them if not using Docker)
|
|
60
|
+
--fav_teams (optional, comma-separated list of favorite team abbreviations from https://github.com/tonywagner/mlbserver/blob/master/session.js#L23 -- will prompt if not set or stored and not using Docker)
|
|
61
|
+
--http_root (specify the alternative http webroot or initial path prefix, default is none)
|
|
62
|
+
--free (optional, highlights free games)
|
|
63
|
+
--multiview_port (local port for multiview streaming; defaults to 1 more than primary port, or 10000; does not need to be mapped or used externally)
|
|
64
|
+
--multiview_path (where to create the folder for multiview encoded files; defaults to app directory)
|
|
65
|
+
--ffmpeg_path (path to ffmpeg binary to use for multiview encoding; default downloads a binary using ffmpeg-static)
|
|
66
|
+
--ffmpeg_encoder (ffmpeg video encoder to use for multiview; default is the software encoder libx264)
|
|
67
|
+
--ffmpeg_logging (if present, logs all ffmpeg output -- useful for checking encoding speed or troubleshooting)
|
|
68
|
+
--page_username (username to protect pages; default is no protection)
|
|
69
|
+
--page_password (password to protect pages; default is no protection)
|
|
70
|
+
--content_protect (specify the content protection key to include as a URL parameter, if page protection is enabled)
|
|
71
|
+
--gamechanger_delay (specify extra delay for the gamechanger switches in 10 second increments, default is 0)
|
|
72
|
+
--data_directory (defaults to installed application directory; in the Docker image, this defaults to /mlbserver/data_directory for mapping persistent storage)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Supports [SWAG](https://docs.linuxserver.io/general/swag/#preset-proxy-confs) using the custom [mlbserver.subfolder.conf](https://github.com/tonywagner/mlbserver/blob/master/mlbserver.subfolder.conf) file.
|
|
76
|
+
|
|
77
|
+
For multiview, the default software video encoder is limited by your CPU. You may want to experiment with different ffmpeg hardware video encoders. "h264_videotoolbox" is confirmed to work on supported Macs, and "h264_v4l2m2m" is confirmed to work on a Raspberry Pi 4 (and likely other Linux systems) when ffmpeg is compiled with this patch: https://www.raspberrypi.org/forums/viewtopic.php?p=1780625#p1780625
|
|
78
|
+
|
|
79
|
+
More potential hardware encoders are described at https://stackoverflow.com/a/50703794
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
h264_amf to access AMD gpu, (windows only)
|
|
83
|
+
h264_nvenc use nvidia gpu cards (work with windows and linux)
|
|
84
|
+
h264_omx raspberry pi encoder
|
|
85
|
+
h264_qsv use Intel Quick Sync Video (hardware embedded in modern Intel CPU)
|
|
86
|
+
h264_v4l2m2m use V4L2 Linux kernel api to access hardware codecs
|
|
87
|
+
h264_vaapi use VAAPI which is another abstraction API to access video acceleration hardware (Linux only)
|
|
88
|
+
h264_videotoolbox use videotoolbox an API to access hardware on OS X
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Credits
|
|
92
|
+
|
|
93
|
+
https://github.com/tonycpsu/streamglob
|
|
94
|
+
https://github.com/mafintosh/hls-decryptor
|
|
95
|
+
https://github.com/eracknaphobia/plugin.video.mlbtv
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT
|
package/docker-cli
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
docker run -d \
|
|
2
|
-
--name mlbserver \
|
|
3
|
-
--env TZ="America/New_York" \
|
|
4
|
-
--env account_username=your.account.email@example.com \
|
|
5
|
-
--env account_password=youraccountpassword \
|
|
6
|
-
-p 9999:9999 \
|
|
7
|
-
--volume /path/to/your/desired/local/mlbserver/persistent/data/directory:/mlbserver/data_directory \
|
|
1
|
+
docker run -d \
|
|
2
|
+
--name mlbserver \
|
|
3
|
+
--env TZ="America/New_York" \
|
|
4
|
+
--env account_username=your.account.email@example.com \
|
|
5
|
+
--env account_password=youraccountpassword \
|
|
6
|
+
-p 9999:9999 \
|
|
7
|
+
--volume /path/to/your/desired/local/mlbserver/persistent/data/directory:/mlbserver/data_directory \
|
|
8
8
|
tonywagner/mlbserver
|
package/docker-compose.yml
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
services:
|
|
2
|
-
mlbserver:
|
|
3
|
-
image: tonywagner/mlbserver:latest
|
|
4
|
-
container_name: mlbserver
|
|
5
|
-
environment:
|
|
6
|
-
- TZ=America/New York
|
|
7
|
-
- account_username=your.account.email@example.com
|
|
8
|
-
- account_password=youraccountpassword
|
|
9
|
-
#- fav_teams=AZ,BAL
|
|
10
|
-
#- http_root=/mlbserver
|
|
11
|
-
#- debug=false
|
|
12
|
-
#- multiview_path=
|
|
13
|
-
#- ffmpeg_path=
|
|
14
|
-
#- ffmpeg_encoder=
|
|
15
|
-
#- page_username=
|
|
16
|
-
#- page_password=
|
|
17
|
-
#- content_protect=
|
|
18
|
-
#- gamechanger_delay=0
|
|
19
|
-
#- PUID=1000
|
|
20
|
-
#- PGID=1000
|
|
21
|
-
ports:
|
|
22
|
-
- 9999:9999
|
|
23
|
-
volumes:
|
|
1
|
+
services:
|
|
2
|
+
mlbserver:
|
|
3
|
+
image: tonywagner/mlbserver:latest
|
|
4
|
+
container_name: mlbserver
|
|
5
|
+
environment:
|
|
6
|
+
- TZ=America/New York
|
|
7
|
+
- account_username=your.account.email@example.com
|
|
8
|
+
- account_password=youraccountpassword
|
|
9
|
+
#- fav_teams=AZ,BAL
|
|
10
|
+
#- http_root=/mlbserver
|
|
11
|
+
#- debug=false
|
|
12
|
+
#- multiview_path=
|
|
13
|
+
#- ffmpeg_path=
|
|
14
|
+
#- ffmpeg_encoder=
|
|
15
|
+
#- page_username=
|
|
16
|
+
#- page_password=
|
|
17
|
+
#- content_protect=
|
|
18
|
+
#- gamechanger_delay=0
|
|
19
|
+
#- PUID=1000
|
|
20
|
+
#- PGID=1000
|
|
21
|
+
ports:
|
|
22
|
+
- 9999:9999
|
|
23
|
+
volumes:
|
|
24
24
|
- /path/to/your/desired/local/mlbserver/persistent/data/directory:/mlbserver/data_directory
|