{"id":50434027,"url":"https://github.com/gdjdkid/screenrecorder-cli","last_synced_at":"2026-05-31T16:01:43.427Z","repository":{"id":349881871,"uuid":"1203943480","full_name":"gdjdkid/ScreenRecorder-cli","owner":"gdjdkid","description":"一个基于ffmpeg的跨平台命令行录屏工具 🎬 | A cross-platform CLI screen recorder powered by ffmpeg 🎬","archived":false,"fork":false,"pushed_at":"2026-05-16T14:56:10.000Z","size":408,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-16T16:51:47.404Z","etag":null,"topics":["command-line","ffmpeg","linux","macos","mp4","nodejs","screen-recorder","screencast","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gdjdkid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-07T14:36:34.000Z","updated_at":"2026-05-16T14:55:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gdjdkid/ScreenRecorder-cli","commit_stats":null,"previous_names":["gdjdkid/screenrecorder-cli"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gdjdkid/ScreenRecorder-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdjdkid%2FScreenRecorder-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdjdkid%2FScreenRecorder-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdjdkid%2FScreenRecorder-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdjdkid%2FScreenRecorder-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gdjdkid","download_url":"https://codeload.github.com/gdjdkid/ScreenRecorder-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdjdkid%2FScreenRecorder-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33737692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["command-line","ffmpeg","linux","macos","mp4","nodejs","screen-recorder","screencast","windows"],"created_at":"2026-05-31T16:01:42.549Z","updated_at":"2026-05-31T16:01:43.403Z","avatar_url":"https://github.com/gdjdkid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ScreenRecorder-cli 🎬\n\nEnglish | [中文](./README_zh.md) | [日本語](README_jp.md) | [한국어](README_kr.md) | [Deutsch](./README_de.md) | [Français](./README_fr.md) | [Español](./README_es.md)\n\n\u003e A cross-platform CLI screen recorder powered by ffmpeg — record your screen with a single command.\n\n[![npm version](https://img.shields.io/badge/version-1.1.0-blue.svg)](https://www.npmjs.com/package/screenrecorder-cli)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-green.svg)](https://nodejs.org)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg)]()\n\n---\n\n![ScreenRecDemo](https://raw.githubusercontent.com/gdjdkid/ScreenRecorder-cli/master/assets/ScreenrecDemo.gif)\n\n---\n\n## Features\n\n- 🎥 **Screen + Audio Recording** — Captures desktop video with system audio and microphone mixed together\n- 📁 **Flexible Output Path** — Set a persistent default output directory or specify one per recording\n- 🎛️ **Device Config** — Save your audio device names once, use forever\n- 🔍 **ffmpeg Auto-Detection** — Checks for ffmpeg at install time and at runtime; guides you if it's missing\n- 🖥️ **Cross-Platform** — Windows (gdigrab), macOS (avfoundation), Linux (x11grab)\n- ⚡ **Simple Commands** — Start, stop, configure with one command\n\n---\n\n## Requirements\n\n- Node.js \u003e= 18.0.0\n- npm \u003e= 6.0.0\n- **ffmpeg** (must be installed separately and available in your PATH)\n\n### Install ffmpeg\n\n| Platform | Command |\n|---|---|\n| Windows | `winget install ffmpeg` or download from [ffmpeg.org](https://ffmpeg.org/download.html) |\n| macOS | `brew install ffmpeg` |\n| Linux | `sudo apt install ffmpeg` |\n\n\u003e **Windows audio note:** To record system audio, install [screen-capture-recorder](https://github.com/rdp/screen-capture-recorder-to-video-windows-free) first.\n\n---\n\n## Installation\n\n**Option 1: Install via npm (recommended)**\n```bash\nnpm install -g screenrecorder-cli\n```\n\n**Option 2: Clone from GitHub (for developers)**\n```bash\ngit clone https://github.com/gdjdkid/ScreenRecorder-cli.git\ncd ScreenRecorder-cli\nnpm install\nnpm install -g .\n```\n\n**Verify installation:**\n```bash\nscreenrec -v\n```\n\n---\n\n## Quick Start\n\n```bash\n# 1. List available audio devices (Windows / macOS)\nscreenrec devices\n\n# 2. Save your audio device names\nscreenrec set-device --mic \"Microphone (Your Device)\" --system \"virtual-audio-capturer\"\n\n# 3. Start recording\nscreenrec start\n```\n\nPress `Ctrl+C` to stop — the file saves automatically.\n\n---\n\n## Usage\n\n**Start recording (uses saved or default output directory):**\n```bash\nscreenrec start\n```\n\n**Start recording to a specific folder:**\n```bash\nscreenrec start -o D:\\MyRecordings\n```\n\n**Record without audio:**\n```bash\nscreenrec start --no-audio\n```\n\n**Override mic for this session only:**\n```bash\nscreenrec start --mic \"USB Microphone\"\n```\n\n**Set a persistent default output directory:**\n```bash\nscreenrec set-output D:\\MyRecordings\n# or interactive mode:\nscreenrec set-output\n```\n\n**Save audio device names to config:**\n```bash\n# Interactive mode\nscreenrec set-device\n\n# Direct mode (recommended)\nscreenrec set-device --mic \"Microphone (Conexant ISST Audio)\" --system \"virtual-audio-capturer\"\n```\n\n**Show current configuration:**\n```bash\nscreenrec show-config\n```\n\n**List audio devices:**\n```bash\nscreenrec devices\n```\n\n**Stop recording:** Press `Ctrl+C` — the file saves automatically.\n\n---\n\n## CLI Reference\n\n```\nUsage: screenrec [command] [options]\n\nCommands:\n  start          Start screen recording (default)\n  set-output     Set default output directory\n  set-device     Configure and save audio device names\n  show-config    Show current configuration\n  devices        List available audio input devices\n\nOptions for start:\n  -o, --output \u003cdir\u003e    Output directory (overrides saved config, this session only)\n  -r, --framerate \u003cfps\u003e Frame rate (default: 30)\n  --no-audio            Disable audio recording\n  --mic \u003cname\u003e          Microphone device name (overrides saved config, this session only)\n  --system \u003cname\u003e       System audio device name (overrides saved config, this session only)\n  -v, --version         Print version number\n  -h, --help            Show help\n\nOptions for set-device:\n  --mic \u003cname\u003e          Microphone device name to save\n  --system \u003cname\u003e       System audio device name to save\n```\n\n---\n\n## Output Directory Priority\n\n```\n-o flag (this session only)\n  ↓ not set\nSaved config (screenrec set-output)\n  ↓ not set\nDefault: ~/Videos/ScreenRecords\n```\n\n---\n\n## Platform Support\n\n| Platform | Video Capture | System Audio | Microphone |\n|---|---|---|---|\n| Windows | ✅ gdigrab | ✅ dshow | ✅ dshow |\n| macOS | ✅ avfoundation | ✅ built-in | ✅ built-in |\n| Linux | ✅ x11grab | ✅ pulseaudio | ✅ pulseaudio |\n\n---\n\n## Configuration\n\nConfig is saved to `~/.config/screenrec/config.json` and persists across sessions.\n\n```json\n{\n  \"outputDir\": \"D:\\\\MyRecordings\",\n  \"micDevice\": \"Microphone (Conexant ISST Audio)\",\n  \"systemDevice\": \"virtual-audio-capturer\"\n}\n```\n\n---\n\n## Updating\n\n**Option 1: Installed via npm**\n```bash\nnpm install -g screenrecorder-cli@latest\n```\n\n**Option 2: Cloned from GitHub**\n```bash\ncd ScreenRecorder-cli\ngit pull\nnpm install -g .\n```\n\n**Verify the update:**\n```bash\nscreenrec -v\n```\n\n---\n\n## FAQ\n\n**Q: I get \"ffmpeg not found\" after installing?**  \nA: ffmpeg must be installed separately. See the Requirements section above.\n\n**Q: No system audio on Windows?**  \nA: Install [screen-capture-recorder](https://github.com/rdp/screen-capture-recorder-to-video-windows-free) and use `virtual-audio-capturer` as the system audio device.\n\n**Q: How do I find my device names?**  \nA: Run `screenrec devices` to list all available audio devices, then save them with `screenrec set-device`.\n\n**Q: How do I stop recording?**  \nA: Press `Ctrl+C`. The output file is saved automatically.\n\n**Q: Where is the output file?**  \nA: Run `screenrec show-config` to see your current output directory.\n\n---\n\n## License\n\nThis project is open source under the [MIT License](./LICENSE).\n\n---\n\n## Contributing\n\nPRs and Issues are welcome!\n\n1. Fork this repository\n2. Create your branch: `git checkout -b feat/your-feature`\n3. Commit your changes: `git commit -m \"feat: describe your change\"`\n4. Push the branch: `git push origin feat/your-feature`\n5. Open a Pull Request\n\n**Commit message conventions:**\n- `feat:` — new feature\n- `fix:` — bug fix\n- `docs:` — documentation update\n- `chore:` — maintenance\n\n---\n\n## Buy Me a Coffee ☕\n\nIf this tool saves you time, consider supporting development:\n\n| WeChat Pay | Alipay | PayPal |\n|------------|--------|--------|\n| ![WeChat](assets/WeChatPay.JPG) | ![Alipay](assets/AliPay.JPG) | ![PayPal](assets/PayPal.jpg) |\n\n---\n\n## Changelog\n\n- **v1.1.0** — Add `set-device` command; fix SIGINT handler; add macOS device listing; refactor codec args; remove hardcoded device names\n- **v1.0.0** — Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdjdkid%2Fscreenrecorder-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgdjdkid%2Fscreenrecorder-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdjdkid%2Fscreenrecorder-cli/lists"}