{"id":25074613,"url":"https://github.com/skippia/simple-video-cutter-cli","last_synced_at":"2026-05-02T22:39:51.508Z","repository":{"id":275741688,"uuid":"926662239","full_name":"Skippia/simple-video-cutter-cli","owner":"Skippia","description":"Cut part from video and compress it with preset using FFmpeg library.","archived":false,"fork":false,"pushed_at":"2025-02-04T12:15:44.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T12:29:15.593Z","etag":null,"topics":["compression","cutter","ffmpeg","fluent-ffmpeg","node","typescript","video-compression","video-cutter"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Skippia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-03T16:45:31.000Z","updated_at":"2025-02-04T12:15:47.000Z","dependencies_parsed_at":"2025-02-04T12:29:32.711Z","dependency_job_id":null,"html_url":"https://github.com/Skippia/simple-video-cutter-cli","commit_stats":null,"previous_names":["skippia/simple-video-cutter","skippia/simple-video-cutter-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skippia%2Fsimple-video-cutter-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skippia%2Fsimple-video-cutter-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skippia%2Fsimple-video-cutter-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Skippia%2Fsimple-video-cutter-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Skippia","download_url":"https://codeload.github.com/Skippia/simple-video-cutter-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246531983,"owners_count":20792735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compression","cutter","ffmpeg","fluent-ffmpeg","node","typescript","video-compression","video-cutter"],"created_at":"2025-02-07T00:17:50.529Z","updated_at":"2026-05-02T22:39:51.500Z","avatar_url":"https://github.com/Skippia.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Video Cutter\n\n## Description\n\nA CLI tool to cut a segment from a video and compress it using FFmpeg (with one of predefined presets). Built with Node.js and TypeScript using [fluent-ffmpeg](https://www.npmjs.com/package/fluent-ffmpeg) and [ffmpeg-static](https://www.npmjs.com/package/ffmpeg-static).\n\n## Features\n\n- **Cross-Platform**: Works on Linux and Windows\n- **Video Segment Cutting**: Specify start and end times to extract a portion of the video\n- **Compression**: Compress video with preset options\n- **Auto-search**: Automatically finds a file by name within the specified directory\n\n## Pre-requisites\n\n- Node.js (tested on v22.13)\n- pnpm\n\n## Installation\n\n1. Clone the repository\n```sh\ngit clone --depth 1 https://github.com/Skippia/simple-video-cutter-cli.git\n```\n2. Install dependencies\n```sh\ncd ./simple-video-cutter-cli \u0026\u0026 pnpm i\n```\n3. Create `.env` file with output directory for compressed videos:\n```sh\ncp .env.example .env\n```\nSet the following variables:\n- `VITE_APP_STORAGE_WINDOWS_PATH` — output directory on Windows (e.g. `\"X:\\\\OBS\"`)\n- `VITE_APP_STORAGE_LINUX_PATH` — output directory on Linux (e.g. `\"/mnt/x/OBS\"`)\n\n4. Build\n```sh\npnpm build\n```\n\n## Usage\n\n```sh\npnpm start --filename \u003cfilename_or_path\u003e --start \u003cstart_time\u003e --end \u003cend_time\u003e [--disk \u003csearch_dir\u003e] [--preset \u003cpreset\u003e]\n```\n\n| Argument | Required | Description |\n|---|---|---|\n| `--filename` | Yes | File name or absolute path to the video |\n| `--start` | Yes | Start time (`hh:mm:ss`, `mm:ss`, or `ss`) |\n| `--end` | Yes | End time (`hh:mm:ss`, `mm:ss`, or `ss`) |\n| `--disk` | No | Directory to search for the file (default: `$HOME`) |\n| `--preset` | No | Preset: `540p`, `720p`, `lossless`, `copy` (default: `540p`) |\n\nFor development (without build step):\n```sh\npnpm dev --filename \u003cfilename_or_path\u003e --start \u003cstart_time\u003e --end \u003cend_time\u003e\n```\n\n## Global Install (standalone binary)\n\nBuild a self-contained binary via [Bun](https://bun.sh/) — no Node.js or pnpm required at runtime.\n\n### Prerequisites\n\n- [Bun](https://bun.sh/) (for building)\n- `ffmpeg` installed and available in `$PATH`\n\n### Build\n\n```sh\npnpm build:bin\n```\n\nThis produces `dist/cutter`.\n\n### Setup\n\n1. Copy the config file:\n```sh\nmkdir -p ~/.config/cutter\ncp .env.example ~/.config/cutter/.env\n# Edit ~/.config/cutter/.env with your output directories\n```\n\n2. Symlink the binary into your PATH:\n```sh\nln -s \"$(pwd)/dist/cutter\" ~/.local/bin/cutter\n```\n\nIf `~/.local/bin` is not in your PATH (e.g. fish shell):\n```sh\nfish_add_path ~/.local/bin\n```\n\n### Usage\n\n```sh\ncutter --filename \"video.mkv\" --start 00:01:00 --end 00:05:00\ncutter --filename \"/path/to/video.mkv\" --start 00:01:00 --end 00:05:00 --preset copy\n```\n\n## Demo\n\n1. Search by filename — the file will be found automatically in `$HOME`:\n```sh\npnpm start --filename \"video-about-cat.mkv\" --start 01:01:01 --end 01:05:05\n```\n\n2. Search in a specific directory:\n```sh\npnpm start --disk /mnt/d --filename \"video-about-cat.mkv\" --start 01:01:01 --end 01:05:05\n```\n\n3. Absolute path (`--disk` is not needed):\n```sh\npnpm start --filename \"/mnt/d/cats/video-about-cat.mkv\" --start 01:01:01 --end 01:05:05\n```\n\n4. With compression preset:\n```sh\npnpm start \\\n  --filename \"/mnt/d/cats/video-about-cat.mkv\" \\\n  --start 01:01:01 \\\n  --end 01:05:05 \\\n  --preset lossless\n```\n\n5. Fast cut without re-encoding:\n```sh\npnpm start \\\n  --filename \"/mnt/d/cats/video-about-cat.mkv\" \\\n  --start 01:01:01 \\\n  --end 01:05:05 \\\n  --preset copy\n```\n\n## Presets\n\n| Preset | Mode | CRF | Audio | Resolution |\n|---|---|---|---|---|\n| `540p` (default) | re-encode (H.265) | 26 | 128k | 540p |\n| `720p` | re-encode (H.265) | 26 | 128k | 720p |\n| `lossless` | re-encode (H.265) | 18 | 128k | original |\n| `copy` | stream copy | — | — | original |\n\n`copy` copies video and audio streams without re-encoding — **~100x faster**, but no compression or resizing. Cut points snap to the nearest keyframe.\n\n![](https://github.com/Skippia/simple-video-cutter-cli/blob/master/docs/demo.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskippia%2Fsimple-video-cutter-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskippia%2Fsimple-video-cutter-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskippia%2Fsimple-video-cutter-cli/lists"}