diff --git a/README.md b/README.md index fed7973..85f3335 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ -CasparCG Media-Scanner -=============== +# CasparCG Media-Scanner This project facilitates CasparCG Server since version 2.2.0. It abstracts the collection of metadata and generation of thumbnails into a separate process. -Usage ------ +## Usage This project is designed to be used via the AMCP protocol in CasparCG server. However, there are some endpoints for additional data which can only be access directly over http. @@ -14,6 +12,7 @@ The scanner needs a copy of `ffmpeg` to be able to scan any media files. On wind You can override these locations in the scanner configuration. ### Configuration + There are various options that can be changed for the scanner. These can all be set by environment variables or as arguments. Some features are disabled by default and should be enabled in this way. @@ -24,23 +23,26 @@ The full set of available options and their default values can be found at [conf By default the scanner expects there to be a casparcg.config file next to the executable to specify the paths to media. To disable use of this file `scanner.exe --caspar null` ### AMCP Endpoints + These endpoints are exposed by the AMCP protocol in CasparCG Server. This means that they have some AMCP syntax wrappings, which will likely need to be stripped off if using in an external client -* `/tls` - Lists available template files -* `/cls` - Lists available media files -* `/fls` - Lists available font files -* `/cinf/` - Gets information on specified media file -* `/thumbnail/generate` - Backwards compatibility, has no effect -* `/thumbnail/generate/` - Backwards compatibility, has no effect -* `/thumbnail` - Lists the available thumbnails -* `/thumbnail/` - Gets the thumbnail for a media file -* `/templates` - Detailed list of templates in JSON format. -* `/media` - Lists available media files in json form with an enhanced set of metadata -* `/media/info/` - Gets the json enhanced metadata for the specified media file -* `/media/thumbnail/` - Gets the thumbnail for a media file +- `/tls` - Lists available template files +- `/cls` - Lists available media files +- `/fls` - Lists available font files +- `/cinf/` - Gets information on specified media file +- `/thumbnail/generate` - Backwards compatibility, has no effect +- `/thumbnail/generate/` - Backwards compatibility, has no effect +- `/thumbnail` - Lists the available thumbnails +- `/thumbnail/` - Gets the thumbnail for a media file +- `/templates` - Detailed list of templates in JSON format. +- `/media` - Lists available media files in json form with an enhanced set of metadata +- `/media/info/` - Gets the json enhanced metadata for the specified media file +- `/media/thumbnail/` - Gets the thumbnail for a media file ### Changes + A stream of changes can be accessed with the following. [Full docs](https://pouchdb.com/api.html#changes) + ``` const PouchDB = require('pouchdb-node') const db = new PouchDB('http://localhost:8000/db/_media') @@ -67,22 +69,23 @@ We also use Leveldown which uses native modules so if you're on Windows you need `npm install --global --production windows-build-tools` After this: -* Clone the repository -* [Required] Obtain the [_FFmpeg_ and _FFprobe_](https://ffmpeg.org/download.html) executables and place them in the root folder (or add them to your PATH). - * FFmpeg 6.1 is currently recommended, newer versions have not been tested and may have issues - * A full list of known working versions can be found at https://github.com/CasparCG/media-scanner/blob/master/src/__tests__/ffmpegReleases.json -* [Optional] Copy a `casparcg.config` file into the root folder -* Run `yarn install` -* Run `yarn dev` to start the development server + +- Clone the repository +- [Required] Obtain the [_FFmpeg_ and _FFprobe_](https://ffmpeg.org/download.html) executables and place them in the root folder (or add them to your PATH). + - FFmpeg 6.1 is currently recommended, newer versions have not been tested and may have issues + - A full list of known working versions can be found at https://github.com/CasparCG/media-scanner/blob/master/src/__tests__/ffmpegReleases.json +- [Optional] Copy a `casparcg.config` file into the root folder +- Run `yarn install` +- Run `yarn dev` to start the development server ## Building executable -Be aware that because of the native extensions, you can only build for the target you are currently on. +Be aware that because of the native extensions, you may only be able to build for the target you are currently on. -* On Windows - * `yarn build-win32` -* On Linux - * `yarn build-linux` +- On Windows + - `yarn build-win32-x64` +- On Linux + - `yarn build-linux-x64` or `yarn build-linux-arm64` depending on cpu architecture The built files will be placed in `./dist`, make sure you copy all files into the main CasparCG directory. @@ -93,7 +96,6 @@ higher, see [LICENSE](LICENSE) for details. More information is available at http://casparcg.com/ - # Documentation The most up-to-date documentation is always available at diff --git a/package.json b/package.json index ac63dbb..7cf3c1a 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ "dev": "nodemon ./src", "build": "run build:ts && node tools/build.mjs", "build:ts": "rimraf dist && tsc -b tsconfig.build.json", - "build-linux-arm64": "node tools/build.mjs linux arm64", - "build-linux-x64": "node tools/build.mjs linux x64", - "build-win32-x64": "node tools/build.mjs win32 x64", + "build-linux-arm64": "run build linux arm64", + "build-linux-x64": "run build linux x64", + "build-win32-x64": "run build win32 x64", "lint:raw": "run eslint --ext .ts --ext .js --ext .tsx --ext .jsx --ext .mts --ext .mjs --ignore-pattern dist", "lint": "yarn lint:raw .", "lint-fix": "yarn lint --fix",