retold-remote 0.0.13 → 0.0.15
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/css/retold-remote.css +75 -0
- package/docs/_sidebar.md +2 -0
- package/docs/ultravisor-configuration.md +212 -0
- package/docs/ultravisor-integration.md +140 -0
- package/package.json +121 -96
- package/source/cli/RetoldRemote-Server-Setup.js +26 -0
- package/source/providers/Pict-Provider-GalleryNavigation.js +11 -3
- package/source/providers/keyboard-handlers/KeyHandler-AudioExplorer.js +5 -0
- package/source/providers/keyboard-handlers/KeyHandler-VideoExplorer.js +16 -0
- package/source/server/RetoldRemote-AudioWaveformService.js +101 -23
- package/source/server/RetoldRemote-EbookService.js +119 -6
- package/source/server/RetoldRemote-ImageService.js +144 -0
- package/source/server/RetoldRemote-MediaService.js +208 -34
- package/source/server/RetoldRemote-ToolDetector.js +27 -3
- package/source/server/RetoldRemote-UltravisorDispatcher.js +288 -0
- package/source/server/RetoldRemote-VideoFrameService.js +309 -77
- package/source/views/PictView-Remote-AudioExplorer.js +28 -14
- package/source/views/PictView-Remote-ImageExplorer.js +31 -11
- package/source/views/PictView-Remote-VLCSetup.js +22 -12
- package/source/views/PictView-Remote-VideoExplorer.js +29 -14
- package/web-application/css/retold-remote.css +75 -0
- package/web-application/docs/_sidebar.md +2 -0
- package/web-application/docs/ultravisor-configuration.md +212 -0
- package/web-application/docs/ultravisor-integration.md +140 -0
- package/web-application/retold-remote.js +58 -22
- package/web-application/retold-remote.js.map +1 -1
- package/web-application/retold-remote.min.js +6 -6
- package/web-application/retold-remote.min.js.map +1 -1
package/css/retold-remote.css
CHANGED
|
@@ -2345,6 +2345,31 @@ html, body
|
|
|
2345
2345
|
white-space: nowrap;
|
|
2346
2346
|
text-align: center;
|
|
2347
2347
|
}
|
|
2348
|
+
.retold-remote-iex-actions
|
|
2349
|
+
{
|
|
2350
|
+
display: flex;
|
|
2351
|
+
align-items: center;
|
|
2352
|
+
gap: 6px;
|
|
2353
|
+
flex-shrink: 0;
|
|
2354
|
+
}
|
|
2355
|
+
.retold-remote-iex-action-btn
|
|
2356
|
+
{
|
|
2357
|
+
padding: 3px 10px;
|
|
2358
|
+
border: 1px solid var(--retold-border);
|
|
2359
|
+
border-radius: 3px;
|
|
2360
|
+
background: transparent;
|
|
2361
|
+
color: var(--retold-text-muted);
|
|
2362
|
+
font-size: 0.75rem;
|
|
2363
|
+
cursor: pointer;
|
|
2364
|
+
transition: color 0.15s, border-color 0.15s;
|
|
2365
|
+
font-family: inherit;
|
|
2366
|
+
white-space: nowrap;
|
|
2367
|
+
}
|
|
2368
|
+
.retold-remote-iex-action-btn:hover
|
|
2369
|
+
{
|
|
2370
|
+
color: var(--retold-text-primary);
|
|
2371
|
+
border-color: var(--retold-accent);
|
|
2372
|
+
}
|
|
2348
2373
|
.retold-remote-iex-info
|
|
2349
2374
|
{
|
|
2350
2375
|
display: flex;
|
|
@@ -2504,6 +2529,31 @@ html, body
|
|
|
2504
2529
|
white-space: nowrap;
|
|
2505
2530
|
text-align: center;
|
|
2506
2531
|
}
|
|
2532
|
+
.retold-remote-aex-actions
|
|
2533
|
+
{
|
|
2534
|
+
display: flex;
|
|
2535
|
+
align-items: center;
|
|
2536
|
+
gap: 6px;
|
|
2537
|
+
flex-shrink: 0;
|
|
2538
|
+
}
|
|
2539
|
+
.retold-remote-aex-action-btn
|
|
2540
|
+
{
|
|
2541
|
+
padding: 3px 10px;
|
|
2542
|
+
border: 1px solid var(--retold-border);
|
|
2543
|
+
border-radius: 3px;
|
|
2544
|
+
background: transparent;
|
|
2545
|
+
color: var(--retold-text-muted);
|
|
2546
|
+
font-size: 0.75rem;
|
|
2547
|
+
cursor: pointer;
|
|
2548
|
+
transition: color 0.15s, border-color 0.15s;
|
|
2549
|
+
font-family: inherit;
|
|
2550
|
+
white-space: nowrap;
|
|
2551
|
+
}
|
|
2552
|
+
.retold-remote-aex-action-btn:hover
|
|
2553
|
+
{
|
|
2554
|
+
color: var(--retold-text-primary);
|
|
2555
|
+
border-color: var(--retold-accent);
|
|
2556
|
+
}
|
|
2507
2557
|
.retold-remote-aex-info
|
|
2508
2558
|
{
|
|
2509
2559
|
display: flex;
|
|
@@ -2797,6 +2847,31 @@ html, body
|
|
|
2797
2847
|
white-space: nowrap;
|
|
2798
2848
|
text-align: center;
|
|
2799
2849
|
}
|
|
2850
|
+
.retold-remote-vex-actions
|
|
2851
|
+
{
|
|
2852
|
+
display: flex;
|
|
2853
|
+
align-items: center;
|
|
2854
|
+
gap: 6px;
|
|
2855
|
+
flex-shrink: 0;
|
|
2856
|
+
}
|
|
2857
|
+
.retold-remote-vex-action-btn
|
|
2858
|
+
{
|
|
2859
|
+
padding: 3px 10px;
|
|
2860
|
+
border: 1px solid var(--retold-border);
|
|
2861
|
+
border-radius: 3px;
|
|
2862
|
+
background: transparent;
|
|
2863
|
+
color: var(--retold-text-muted);
|
|
2864
|
+
font-size: 0.75rem;
|
|
2865
|
+
cursor: pointer;
|
|
2866
|
+
transition: color 0.15s, border-color 0.15s;
|
|
2867
|
+
font-family: inherit;
|
|
2868
|
+
white-space: nowrap;
|
|
2869
|
+
}
|
|
2870
|
+
.retold-remote-vex-action-btn:hover
|
|
2871
|
+
{
|
|
2872
|
+
color: var(--retold-text-primary);
|
|
2873
|
+
border-color: var(--retold-accent);
|
|
2874
|
+
}
|
|
2800
2875
|
.retold-remote-vex-info
|
|
2801
2876
|
{
|
|
2802
2877
|
display: flex;
|
package/docs/_sidebar.md
CHANGED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Ultravisor Beacon Tool Setup
|
|
2
|
+
|
|
3
|
+
This guide covers installing the media processing tools on the machine running the Ultravisor beacon worker. Each tool enables a specific set of capabilities in retold-remote.
|
|
4
|
+
|
|
5
|
+
## ffmpeg & ffprobe
|
|
6
|
+
|
|
7
|
+
Used for video thumbnails, frame extraction, audio waveform generation, and media metadata probing.
|
|
8
|
+
|
|
9
|
+
### Ubuntu / Debian
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
sudo apt update
|
|
13
|
+
sudo apt install ffmpeg
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Both `ffmpeg` and `ffprobe` are included in the same package.
|
|
17
|
+
|
|
18
|
+
### macOS
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
brew install ffmpeg
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Windows
|
|
25
|
+
|
|
26
|
+
1. Download a release build from [gyan.dev/ffmpeg](https://www.gyan.dev/ffmpeg/builds/) — choose the **ffmpeg-release-full** zip.
|
|
27
|
+
2. Extract to a permanent location, e.g. `C:\ffmpeg`.
|
|
28
|
+
3. Add `C:\ffmpeg\bin` to the system PATH:
|
|
29
|
+
- Open **Settings → System → About → Advanced system settings → Environment Variables**.
|
|
30
|
+
- Edit the **Path** variable under System variables and add `C:\ffmpeg\bin`.
|
|
31
|
+
4. Open a new terminal and verify:
|
|
32
|
+
|
|
33
|
+
```cmd
|
|
34
|
+
ffmpeg -version
|
|
35
|
+
ffprobe -version
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## ImageMagick
|
|
39
|
+
|
|
40
|
+
Used as a fallback for image thumbnails and for image format conversion.
|
|
41
|
+
|
|
42
|
+
### Ubuntu / Debian
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
sudo apt update
|
|
46
|
+
sudo apt install imagemagick
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
By default ImageMagick restricts some operations via a security policy. If you encounter permission errors processing certain formats, edit `/etc/ImageMagick-6/policy.xml` (or the ImageMagick-7 equivalent) and adjust the relevant policy lines.
|
|
50
|
+
|
|
51
|
+
### macOS
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
brew install imagemagick
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Windows
|
|
58
|
+
|
|
59
|
+
1. Download the installer from [imagemagick.org/script/download.php](https://imagemagick.org/script/download.php) — choose the **Win64 dynamic** installer.
|
|
60
|
+
2. During installation, check **Add application directory to your system path** and **Install legacy utilities (e.g. convert)**.
|
|
61
|
+
3. Open a new terminal and verify:
|
|
62
|
+
|
|
63
|
+
```cmd
|
|
64
|
+
magick --version
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
On Windows, use `magick convert` instead of bare `convert` to avoid conflicts with the built-in Windows `convert` command.
|
|
68
|
+
|
|
69
|
+
## dcraw
|
|
70
|
+
|
|
71
|
+
Used for converting raw camera images (CR2, NEF, ARW, DNG, ORF, RW2, etc.).
|
|
72
|
+
|
|
73
|
+
### Ubuntu / Debian
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
sudo apt update
|
|
77
|
+
sudo apt install dcraw
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### macOS
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
brew install dcraw
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Windows
|
|
87
|
+
|
|
88
|
+
1. Download the precompiled binary from [dechifro.org/dcraw](https://www.dechifro.org/dcraw/) or build from source.
|
|
89
|
+
2. Place `dcraw.exe` in a directory on your PATH, e.g. `C:\tools`.
|
|
90
|
+
3. Add that directory to the system PATH if it is not already present.
|
|
91
|
+
4. Verify:
|
|
92
|
+
|
|
93
|
+
```cmd
|
|
94
|
+
dcraw
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
dcraw prints usage information when run without arguments.
|
|
98
|
+
|
|
99
|
+
## audiowaveform
|
|
100
|
+
|
|
101
|
+
Used for generating audio waveform peak data displayed in the audio viewer.
|
|
102
|
+
|
|
103
|
+
### Ubuntu / Debian
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
sudo add-apt-repository ppa:chris-needham/ppa
|
|
107
|
+
sudo apt update
|
|
108
|
+
sudo apt install audiowaveform
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
If the PPA is not available for your Ubuntu version, build from source:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
sudo apt install cmake libmad0-dev libid3tag0-dev libsndfile1-dev \
|
|
115
|
+
libgd-dev libboost-filesystem-dev libboost-program-options-dev \
|
|
116
|
+
libboost-regex-dev
|
|
117
|
+
git clone https://github.com/bbc/audiowaveform.git
|
|
118
|
+
cd audiowaveform
|
|
119
|
+
mkdir build && cd build
|
|
120
|
+
cmake ..
|
|
121
|
+
make
|
|
122
|
+
sudo make install
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### macOS
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
brew install audiowaveform
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
If the formula is not in the default tap:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
brew tap bbc/audiowaveform
|
|
135
|
+
brew install audiowaveform
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Windows
|
|
139
|
+
|
|
140
|
+
audiowaveform does not provide official Windows binaries. Options:
|
|
141
|
+
|
|
142
|
+
1. **WSL** (recommended) — install Ubuntu via WSL and follow the Ubuntu instructions above. Run the beacon worker inside WSL.
|
|
143
|
+
2. **Build from source** — requires CMake, Visual Studio, and the Boost, libmad, libsndfile, and libgd libraries. See the [audiowaveform GitHub repo](https://github.com/bbc/audiowaveform) for build instructions.
|
|
144
|
+
|
|
145
|
+
## ebook-convert (Calibre)
|
|
146
|
+
|
|
147
|
+
Used for converting MOBI and AZW ebooks to EPUB format for the in-browser reader.
|
|
148
|
+
|
|
149
|
+
### Ubuntu / Debian
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
sudo apt update
|
|
153
|
+
sudo apt install calibre
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
This installs the full Calibre suite. Only `ebook-convert` is used by the beacon.
|
|
157
|
+
|
|
158
|
+
### macOS
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
brew install --cask calibre
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
After installation, the `ebook-convert` command-line tool is at:
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
/Applications/calibre.app/Contents/MacOS/ebook-convert
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Add it to your PATH or create a symlink:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
sudo ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin/ebook-convert
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Windows
|
|
177
|
+
|
|
178
|
+
1. Download and install Calibre from [calibre-ebook.com/download_windows](https://calibre-ebook.com/download_windows).
|
|
179
|
+
2. The default install path is `C:\Program Files\Calibre2`.
|
|
180
|
+
3. Add `C:\Program Files\Calibre2` to the system PATH.
|
|
181
|
+
4. Verify:
|
|
182
|
+
|
|
183
|
+
```cmd
|
|
184
|
+
ebook-convert --version
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Verifying the Beacon
|
|
188
|
+
|
|
189
|
+
After installing tools, start the beacon and check its reported capabilities. The Ultravisor server exposes `GET /Beacon/Capabilities` which lists the aggregate capabilities of all connected beacons.
|
|
190
|
+
|
|
191
|
+
You can also verify each tool individually:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
ffmpeg -version
|
|
195
|
+
ffprobe -version
|
|
196
|
+
convert --version # ImageMagick (use 'magick --version' on Windows)
|
|
197
|
+
dcraw # prints usage
|
|
198
|
+
audiowaveform --help
|
|
199
|
+
ebook-convert --version
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
retold-remote only dispatches commands for tools the beacon has available. Missing tools simply mean those operations fall back to local processing on the NAS.
|
|
203
|
+
|
|
204
|
+
## Quick Reference
|
|
205
|
+
|
|
206
|
+
| Tool | Ubuntu | macOS | Windows |
|
|
207
|
+
|------|--------|-------|---------|
|
|
208
|
+
| ffmpeg / ffprobe | `apt install ffmpeg` | `brew install ffmpeg` | Download from gyan.dev, add to PATH |
|
|
209
|
+
| ImageMagick | `apt install imagemagick` | `brew install imagemagick` | Installer from imagemagick.org |
|
|
210
|
+
| dcraw | `apt install dcraw` | `brew install dcraw` | Download binary, add to PATH |
|
|
211
|
+
| audiowaveform | PPA or build from source | `brew install audiowaveform` | WSL or build from source |
|
|
212
|
+
| ebook-convert | `apt install calibre` | `brew install --cask calibre` + symlink | Calibre installer, add to PATH |
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Ultravisor Integration
|
|
2
|
+
|
|
3
|
+
retold-remote can offload heavy media processing to a remote machine running an Ultravisor beacon worker. This is useful when the server (e.g. a NAS) has limited CPU and RAM but needs to process large video files, raw camera images, audio waveforms, and ebook conversions.
|
|
4
|
+
|
|
5
|
+
## How It Works
|
|
6
|
+
|
|
7
|
+
When configured, retold-remote dispatches shell commands (ffmpeg, ffprobe, dcraw, ImageMagick, audiowaveform, ebook-convert) to a beacon worker via HTTP instead of running them locally. The beacon downloads the source file from retold-remote's content API, executes the command, and returns the result as base64-encoded data.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
NAS (retold-remote) Fast Machine (Ultravisor)
|
|
11
|
+
┌──────────────────────┐ ┌──────────────────────┐
|
|
12
|
+
│ Request → Check Cache│ │ Ultravisor Server │
|
|
13
|
+
│ ↓ (miss) │ HTTP │ └─ Beacon Worker │
|
|
14
|
+
│ Dispatch command ───┼──────────►│ 1. Download src │
|
|
15
|
+
│ │ │ 2. Run command │
|
|
16
|
+
│ ◄─ base64 result ◄──┼────────────┤ 3. Return output│
|
|
17
|
+
│ ↓ │ │ │
|
|
18
|
+
│ Decode → Cache │ └──────────────────────┘
|
|
19
|
+
│ Serve response │
|
|
20
|
+
│ │
|
|
21
|
+
│ ↓ (dispatch fails) │
|
|
22
|
+
│ Local fallback │
|
|
23
|
+
└──────────────────────┘
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
All caching, metadata, and storage remain on the NAS. Only the tool execution changes.
|
|
27
|
+
|
|
28
|
+
## Setup
|
|
29
|
+
|
|
30
|
+
### 1. Start Ultravisor on the Fast Machine
|
|
31
|
+
|
|
32
|
+
Install and run the Ultravisor server with a beacon worker:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# On the fast machine
|
|
36
|
+
npm install ultravisor
|
|
37
|
+
node ultravisor-server.js --port 55555
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The beacon worker must have the processing tools installed:
|
|
41
|
+
|
|
42
|
+
| Tool | Used For |
|
|
43
|
+
|------|----------|
|
|
44
|
+
| **ffmpeg** | Video thumbnails, frame extraction, audio waveform generation |
|
|
45
|
+
| **ffprobe** | Media metadata (duration, dimensions, codec, bitrate) |
|
|
46
|
+
| **dcraw** | Raw camera image conversion (CR2, NEF, ARW, etc.) |
|
|
47
|
+
| **ImageMagick** | Image format conversion, thumbnails |
|
|
48
|
+
| **audiowaveform** | Audio waveform peak data |
|
|
49
|
+
| **ebook-convert** | MOBI/AZW to EPUB conversion (from Calibre) |
|
|
50
|
+
|
|
51
|
+
Only install the tools you need. The beacon reports its capabilities and retold-remote only dispatches commands for tools the beacon has available.
|
|
52
|
+
|
|
53
|
+
### 2. Configure retold-remote
|
|
54
|
+
|
|
55
|
+
Pass two settings when starting the server:
|
|
56
|
+
|
|
57
|
+
| Setting | Description | Example |
|
|
58
|
+
|---------|-------------|---------|
|
|
59
|
+
| `UltravisorURL` | URL of the Ultravisor server | `http://192.168.1.100:55555` |
|
|
60
|
+
| `ContentAPIURL` | URL where the beacon can reach retold-remote's content API | `http://192.168.1.50:8086` |
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# CLI
|
|
64
|
+
retold-remote serve /mnt/media \
|
|
65
|
+
--ultravisor-url http://192.168.1.100:55555 \
|
|
66
|
+
--content-api-url http://192.168.1.50:8086
|
|
67
|
+
|
|
68
|
+
# Or via server setup options
|
|
69
|
+
node server.js /mnt/media
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The `ContentAPIURL` must be reachable from the beacon machine over the network. This is the URL the beacon uses to download source files before processing them.
|
|
73
|
+
|
|
74
|
+
### 3. Verify Connection
|
|
75
|
+
|
|
76
|
+
On startup, retold-remote pings the Ultravisor server and logs whether beacons are available. Check the server logs for:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Ultravisor Dispatcher: connection check passed, beacons available.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
If no `UltravisorURL` is configured, the dispatcher is disabled and all processing runs locally, identical to the default behavior.
|
|
83
|
+
|
|
84
|
+
## Offloaded Operations
|
|
85
|
+
|
|
86
|
+
The following operations are dispatched to the beacon when available:
|
|
87
|
+
|
|
88
|
+
| Service | Operation | Command |
|
|
89
|
+
|---------|-----------|---------|
|
|
90
|
+
| **MediaService** | Video thumbnails | `ffmpeg -ss ... -vframes 1 -vf scale=WxH ...` |
|
|
91
|
+
| **MediaService** | Image thumbnails (ImageMagick path) | `convert ... -thumbnail WxH ...` |
|
|
92
|
+
| **MediaService** | Media probing | `ffprobe -v quiet -print_format json ...` |
|
|
93
|
+
| **VideoFrameService** | Frame extraction | `ffmpeg -ss T -vframes 1 -vf scale=WxH ...` |
|
|
94
|
+
| **VideoFrameService** | Video probing | `ffprobe -v quiet -print_format json ...` |
|
|
95
|
+
| **AudioWaveformService** | Audio probing | `ffprobe -v quiet -print_format json ...` |
|
|
96
|
+
| **EbookService** | MOBI/AZW conversion | `ebook-convert source.mobi output.epub` |
|
|
97
|
+
| **ImageService** | Raw conversion (dcraw) | `dcraw -c -w "{SourcePath}" \| convert ppm:- jpeg:"{OutputPath}"` |
|
|
98
|
+
| **ImageService** | Image conversion (ImageMagick) | `convert "{SourcePath}" -quality 92 "{OutputPath}"` |
|
|
99
|
+
|
|
100
|
+
## File Transfer
|
|
101
|
+
|
|
102
|
+
Since the beacon worker runs on a separate machine without shared filesystem access, files are transferred over HTTP:
|
|
103
|
+
|
|
104
|
+
1. **Source download**: The beacon downloads the source file from retold-remote's content API (`ContentAPIURL + '/content/' + relativePath`) before executing the command.
|
|
105
|
+
2. **Result return**: The beacon base64-encodes the output file and includes it in the HTTP response.
|
|
106
|
+
3. **Decode and cache**: retold-remote decodes the base64 data and stores it in the local cache (Parime storage).
|
|
107
|
+
|
|
108
|
+
The `{SourcePath}` and `{OutputPath}` placeholders in commands are automatically replaced with local staging paths on the beacon.
|
|
109
|
+
|
|
110
|
+
## Affinity and Download Caching
|
|
111
|
+
|
|
112
|
+
When the same source file is used for multiple operations (e.g. generating a video thumbnail, then extracting frames from the same video), the beacon caches the downloaded file using an affinity key. The download only happens once per file.
|
|
113
|
+
|
|
114
|
+
Affinity keys are derived from the relative file path. All operations on the same source file reuse the cached download. Affinity staging is cleaned up when the beacon shuts down or when the affinity TTL expires (default: 1 hour).
|
|
115
|
+
|
|
116
|
+
## Fallback Behavior
|
|
117
|
+
|
|
118
|
+
Every dispatched operation has automatic fallback to local processing:
|
|
119
|
+
|
|
120
|
+
- If `UltravisorURL` is not configured, all operations run locally (no behavior change).
|
|
121
|
+
- If the Ultravisor server is unreachable, operations fall back to local tools.
|
|
122
|
+
- If the beacon returns an error, the operation falls back to local execution.
|
|
123
|
+
- If no beacons are registered, dispatch returns an error and local processing takes over.
|
|
124
|
+
|
|
125
|
+
This means the Ultravisor integration is purely additive. Removing the configuration or shutting down the Ultravisor server does not break any functionality.
|
|
126
|
+
|
|
127
|
+
## Synchronous Dispatch
|
|
128
|
+
|
|
129
|
+
retold-remote uses synchronous HTTP dispatch (`POST /Beacon/Work/Dispatch`). The HTTP connection stays open until the beacon completes the work item. This avoids polling complexity and works well for the request-response pattern of thumbnail generation and media probing.
|
|
130
|
+
|
|
131
|
+
The default timeout is 5 minutes (300,000 ms). Individual operations may specify shorter timeouts.
|
|
132
|
+
|
|
133
|
+
## Troubleshooting
|
|
134
|
+
|
|
135
|
+
| Symptom | Cause | Fix |
|
|
136
|
+
|---------|-------|-----|
|
|
137
|
+
| All operations run locally | `UltravisorURL` not configured or Ultravisor unreachable | Check URL and network connectivity |
|
|
138
|
+
| Beacon downloads fail | `ContentAPIURL` not reachable from beacon machine | Verify network route between machines |
|
|
139
|
+
| Timeouts on large files | File too large for default timeout | Increase `TimeoutMs` in Ultravisor settings |
|
|
140
|
+
| Beacon missing capabilities | Required tools not installed on beacon machine | Install ffmpeg, dcraw, etc. on the beacon |
|
package/package.json
CHANGED
|
@@ -1,98 +1,123 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
2
|
+
"name": "retold-remote",
|
|
3
|
+
"version": "0.0.15",
|
|
4
|
+
"description": "Retold Remote - NAS media browser with gallery views and keyboard navigation",
|
|
5
|
+
"main": "source/Pict-RetoldRemote-Bundle.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"retold-remote": "source/cli/RetoldRemote-CLI-Run.js",
|
|
8
|
+
"rr": "source/cli/RetoldRemote-CLI-Run.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"source/",
|
|
12
|
+
"web-application/",
|
|
13
|
+
"html/",
|
|
14
|
+
"css/",
|
|
15
|
+
"docs/",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"start": "node source/cli/RetoldRemote-CLI-Run.js serve",
|
|
21
|
+
"build": "npx quack build && npx quack copy",
|
|
22
|
+
"test": "npx mocha -u tdd --exit --timeout 30000 test/*_tests.js",
|
|
23
|
+
"prepack": "npm run build",
|
|
24
|
+
"tests": "npx mocha -u tdd --exit -R spec --grep",
|
|
25
|
+
"coverage": "npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",
|
|
26
|
+
"examples": "npx quack examples",
|
|
27
|
+
"docs": "npx quack prepare-docs ./docs -d ./modules",
|
|
28
|
+
"docs-serve": "npx quack docs-serve ./docs"
|
|
29
|
+
},
|
|
30
|
+
"author": "steven velozo <steven@velozo.com>",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@xmldom/xmldom": "^0.8.11",
|
|
34
|
+
"dcraw": "^1.0.3",
|
|
35
|
+
"epubjs": "^0.3.93",
|
|
36
|
+
"exifr": "^7.1.3",
|
|
37
|
+
"fable": "^3.1.63",
|
|
38
|
+
"fable-serviceproviderbase": "^3.0.19",
|
|
39
|
+
"node-unrar-js": "^2.0.2",
|
|
40
|
+
"orator": "^6.0.4",
|
|
41
|
+
"orator-serviceserver-restify": "^2.0.9",
|
|
42
|
+
"parime": "^1.0.3",
|
|
43
|
+
"pdf-parse": "^1.1.1",
|
|
44
|
+
"pict": "^1.0.357",
|
|
45
|
+
"pict-application": "^1.0.33",
|
|
46
|
+
"pict-docuserve": "^0.0.32",
|
|
47
|
+
"pict-provider": "^1.0.12",
|
|
48
|
+
"pict-section-code": "^1.0.3",
|
|
49
|
+
"pict-section-filebrowser": "^0.0.2",
|
|
50
|
+
"pict-service-commandlineutility": "^1.0.19",
|
|
51
|
+
"pict-view": "^1.0.67",
|
|
52
|
+
"retold-content-system": "^1.0.8",
|
|
53
|
+
"yauzl": "^3.2.0"
|
|
54
|
+
},
|
|
55
|
+
"optionalDependencies": {
|
|
56
|
+
"@img/sharp-wasm32": "^0.34.5",
|
|
57
|
+
"sharp": "^0.34.5"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"puppeteer": "^24.0.0",
|
|
61
|
+
"quackage": "^1.0.63"
|
|
62
|
+
},
|
|
63
|
+
"copyFilesSettings": {
|
|
64
|
+
"whenFileExists": "overwrite"
|
|
65
|
+
},
|
|
66
|
+
"copyFiles": [
|
|
67
|
+
{
|
|
68
|
+
"from": "./html/*",
|
|
69
|
+
"to": "./web-application/"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"from": "./css/**",
|
|
73
|
+
"to": "./web-application/css/"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"from": "./node_modules/pict/dist/pict.min.js",
|
|
77
|
+
"to": "./web-application/js/"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"from": "./node_modules/pict/dist/pict.min.js.map",
|
|
81
|
+
"to": "./web-application/js/"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"from": "./node_modules/jszip/dist/jszip.min.js",
|
|
85
|
+
"to": "./web-application/js/"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"from": "./node_modules/epubjs/dist/epub.min.js",
|
|
89
|
+
"to": "./web-application/js/"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"from": "./node_modules/pict-docuserve/dist/pict-docuserve.min.js",
|
|
93
|
+
"to": "./web-application/js/"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"from": "./node_modules/pict-docuserve/css/docuserve.css",
|
|
97
|
+
"to": "./web-application/css/"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"from": "./docs/*.md",
|
|
101
|
+
"to": "./web-application/docs/"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"mocha": {
|
|
105
|
+
"diff": true,
|
|
106
|
+
"extension": [
|
|
107
|
+
"js"
|
|
108
|
+
],
|
|
109
|
+
"package": "./package.json",
|
|
110
|
+
"reporter": "spec",
|
|
111
|
+
"slow": "75",
|
|
112
|
+
"timeout": "5000",
|
|
113
|
+
"ui": "tdd",
|
|
114
|
+
"spec": "test/*_tests.js",
|
|
115
|
+
"watch-files": [
|
|
116
|
+
"source/**/*.js",
|
|
117
|
+
"test/**/*.js"
|
|
118
|
+
],
|
|
119
|
+
"watch-ignore": [
|
|
120
|
+
"lib/vendor"
|
|
121
|
+
]
|
|
122
|
+
}
|
|
98
123
|
}
|