feat: add CLI argument handling and build script
- Added command-line argument parsing to accept input file path instead of hardcoded value - Added build task to compile standalone executable with deno compile - Added usage message for incorrect invocation
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# dvdsubconvert
|
||||
|
||||
A command-line tool built with Deno to extract, convert, and remux DVD subtitles
|
||||
from MKV video files into SRT format, then combine them back into a new MKV
|
||||
file.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Ensure the following tools are installed and available in your PATH:
|
||||
|
||||
- [MKVToolNix](https://mkvtoolnix.download/) (provides `mkvmerge` and
|
||||
`mkvextract`)
|
||||
- [FFmpeg](https://ffmpeg.org/)
|
||||
- [vobsub2srt](https://github.com/ruediger/VobSub2SRT) (for converting VobSub
|
||||
subtitles to SRT)
|
||||
|
||||
## Installation
|
||||
|
||||
Clone the repository and ensure Deno is installed
|
||||
([Deno installation guide](https://deno.land/manual/getting_started/installation)).
|
||||
|
||||
## Usage
|
||||
|
||||
Run the tool with a single MKV file as input:
|
||||
|
||||
```bash
|
||||
deno run --allow-run --allow-write --allow-read src/main.ts input.mkv
|
||||
```
|
||||
|
||||
The tool will:
|
||||
|
||||
1. Analyze the MKV file for subtitle tracks.
|
||||
2. Extract supported subtitle languages.
|
||||
3. Convert VobSub subtitles to SRT format.
|
||||
4. Remux the SRT subtitles into a new MKV file named `subit.mkv`.
|
||||
|
||||
Supported languages (ISO 639-1 codes):
|
||||
|
||||
- English (en)
|
||||
- Finnish (fi)
|
||||
|
||||
## Output
|
||||
|
||||
- `subit.mkv`: The resulting MKV file with converted SRT subtitles.
|
||||
- Temporary files (`.srt`, `.idx`, `.sub`) are cleaned up automatically.
|
||||
|
||||
## License
|
||||
|
||||
[Include license info from LICENSE file]
|
||||
Reference in New Issue
Block a user