mediatuna 1.21.11
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/LICENSE +21 -0
- package/README.md +65 -0
- package/index.js +804 -0
- package/lib/archive.js +66 -0
- package/lib/audio-policy.js +53 -0
- package/lib/cleanup.js +77 -0
- package/lib/cli-config.js +336 -0
- package/lib/constants.js +17 -0
- package/lib/discover.js +38 -0
- package/lib/dupe-report.js +223 -0
- package/lib/encode.js +194 -0
- package/lib/everything.js +154 -0
- package/lib/extensions.js +22 -0
- package/lib/filename-dates.js +155 -0
- package/lib/format.js +33 -0
- package/lib/globs.js +58 -0
- package/lib/hash.js +12 -0
- package/lib/jobs.js +51 -0
- package/lib/log.js +61 -0
- package/lib/paths.js +38 -0
- package/lib/preflight.js +75 -0
- package/lib/probe.js +115 -0
- package/lib/recup-map.js +366 -0
- package/lib/resolve-inputs.js +125 -0
- package/lib/resume-state.js +136 -0
- package/lib/run.js +288 -0
- package/lib/safety.js +84 -0
- package/lib/stamp-dates.js +468 -0
- package/lib/status.js +78 -0
- package/lib/tags.js +35 -0
- package/lib/time.js +29 -0
- package/lib/timestamps.js +46 -0
- package/lib/tools.js +13 -0
- package/lib/trash.js +31 -0
- package/lib/verify.js +60 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Catalyst Forge LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="site/static/logo.png" alt="MediaTuna" width="440">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# MediaTuna
|
|
6
|
+
|
|
7
|
+
The old files are hard to play, hard to date, and hard to find. MediaTuna is the local workflow that turns that pile into playable **MP4** and **MP3** without losing the dates, tags, or work you've already done.
|
|
8
|
+
|
|
9
|
+
A home archive is mixed types, interlaced DV, missing tags, and Windows dates that broke after a copy. One pass. A preflight table. Skip of work that is already done. Deletes only after you confirm.
|
|
10
|
+
|
|
11
|
+
**Docs:** [mediatuna.dev/docs](https://mediatuna.dev/docs) · **Site:** [mediatuna.dev](https://mediatuna.dev)
|
|
12
|
+
|
|
13
|
+
Your **local agent** can run this for you — dry-run, sample, convert. It should call `mediatuna`, not invent an ffmpeg command line. [Agents](docs/agents.md).
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
[Node.js](https://nodejs.org/) 18+ and **ffmpeg** / **ffprobe** on PATH. [Full install](docs/install.md).
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm install
|
|
21
|
+
npm link
|
|
22
|
+
mediatuna --version
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
Keep a backup you can restore. Preview, then write somewhere other than the source folder.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
mediatuna "./archives/media" --dry-run
|
|
31
|
+
mediatuna "./archives/media" --sample 20 --output "./samples"
|
|
32
|
+
mediatuna "./archives/media" --output "./converted"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
More examples: [docs/usage.md](docs/usage.md). Every flag: [docs/options.md](docs/options.md).
|
|
36
|
+
|
|
37
|
+
## What you get
|
|
38
|
+
|
|
39
|
+
- One pass over video and audio (or `--video-only` / `--audio-only`)
|
|
40
|
+
- Safe defaults — dry-run, duration verify, Recycle Bin, hash before recup cleanup
|
|
41
|
+
- Dates survive container tags, filenames, and Windows Created/Modified
|
|
42
|
+
- Skip normalized MP3s and existing outputs; `--resume` a long batch
|
|
43
|
+
- AAC copy when the source is already AAC LC (`--reencode-audio` to force 192k)
|
|
44
|
+
- Recovery helpers — Everything dupes, PhotoRec folder rebuild
|
|
45
|
+
|
|
46
|
+
Stays 100% local. Flags, logging, dates, and recovery live in the [docs](docs/README.md).
|
|
47
|
+
|
|
48
|
+
## Safety
|
|
49
|
+
|
|
50
|
+
Hardening is care, not a guarantee. Encoding is lossy; “same file” is usually size or duration. **Keep a backup you can restore from.** Details: [docs/safety.md](docs/safety.md).
|
|
51
|
+
|
|
52
|
+
`pnpm test` is assurance the safety rules still mean what we think they mean, not a certificate for your files. [specs/testing.md](specs/testing.md).
|
|
53
|
+
|
|
54
|
+
## Development
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pnpm test # unit suite; ffmpeg cases run only if ffmpeg is on PATH
|
|
58
|
+
pnpm test:ffmpeg # synthetic encode checks
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Core logic is in `lib/`; `index.js` is the CLI. Site (FilePress + docs mount): `pnpm site:dev`. [Install / development](docs/install.md).
|
|
62
|
+
|
|
63
|
+
## Roadmap
|
|
64
|
+
|
|
65
|
+
Shipped work and open items: [specs/improvements.md](specs/improvements.md), [specs/mediatuna.md](specs/mediatuna.md), [specs/partial/hardening.md](specs/partial/hardening.md), [specs/testing.md](specs/testing.md). Parked: [output formats](specs/output-formats.md), [agents](specs/agents.md).
|