Skip to content

Commit

Permalink
Reverted autotrim changes, fixed existing video check, added readme n…
Browse files Browse the repository at this point in the history
…ote about stream resolutions.
  • Loading branch information
CoordSpace committed Apr 8, 2024
1 parent 56c3e7b commit 6656293
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,21 @@ Match patterns use [micromatch](https://github.com/micromatch/micromatch). For e
| Japanology and Lunch ON! | `["*japanology*", "*lunch*"]` |
| Everything except Newsline | `["!(*newsline*\|*nl bridge*)"]` |

### Crop & Trim

These CPU-intensive features are enabled by default so be sure to disable them on resource-limited systems.

Additionally, the source materials they use for detection relies on the NHK World stream being in 1080p. **Using a lower resolution stream URL will result in crashes upon detection if trim or crop is enabled.**

If you desire to use a lower resolution or if NHK discontinues the 1080p stream, disable these features.

## Running as a docker container

Docker images are available on [Docker Hub](https://hub.docker.com/repository/docker/coordspace/nhk-record)

Example docker-compose.yml:

```
version: "3.7"
services:
nhk-record:
image: coordspace/nhk-record:latest
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"logLevelFile": "debug",
"matchPattern": ["*"],
"minimumDuration": 240000,
"safetyBuffer": 5000,
"safetyBuffer": 40000,
"saveDir": "/recordings/",
"scheduleUrl": "https://nwapi.nhk.jp",
"streamUrl": "https://b-nhkwlive-ojp.nhkworld.jp/hls/live/2003459-b/nhkwlive-ojp-en/index_4M.m3u8",
Expand Down
Binary file modified data/newsline_intro.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/ffmpeg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const getFfmpegBoundaryDetectionArguments = (
'-filter_complex',
[
// Extract luma channels
'[0:0]scale=960:540,format=pix_fmts=yuv420p|yuv444p|yuv410p,extractplanes=y[vy]',
'[0:0]extractplanes=y[vy]',
'[1]extractplanes=y[by]',
'[2]extractplanes=y[wy]',
'[3]extractplanes=y[wby]',
Expand Down
2 changes: 1 addition & 1 deletion src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const recordingExists = async (programme: Programme): Promise<boolean> =>
stat(getInProgressPath(programme))
.then((s) => Date.now() - s.mtimeMs < MAX_IN_PROGRESS_AGE)
.catch(() => null),
stat(getSavePath(programme)).catch(() => null)
stat(`${getSavePath(programme)}${getSuffix(FileType.SUCCESSFUL, programme)}`).catch(() => null)
])
).some((s) => !!s);

Expand Down

0 comments on commit 6656293

Please sign in to comment.