{"id":47963366,"url":"https://github.com/jparkerweb/shrinkray","last_synced_at":"2026-04-21T23:00:48.987Z","repository":{"id":346075162,"uuid":"1188423952","full_name":"jparkerweb/shrinkray","owner":"jparkerweb","description":"📽️ A cross-platform CLI video compression tool powered by FFmpeg, featuring a wizard-style TUI built with Go and Charm's Bubble Tea.","archived":false,"fork":false,"pushed_at":"2026-04-01T04:29:06.000Z","size":604,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T10:26:29.999Z","etag":null,"topics":["ffmpeg","golang","movie-processing","shrink","video-compression"],"latest_commit_sha":null,"homepage":"https://jparkerweb.github.io/shrinkray/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jparkerweb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-22T03:47:16.000Z","updated_at":"2026-04-01T04:29:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jparkerweb/shrinkray","commit_stats":null,"previous_names":["jparkerweb/shrinkray"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jparkerweb/shrinkray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparkerweb%2Fshrinkray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparkerweb%2Fshrinkray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparkerweb%2Fshrinkray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparkerweb%2Fshrinkray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jparkerweb","download_url":"https://codeload.github.com/jparkerweb/shrinkray/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jparkerweb%2Fshrinkray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32113748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ffmpeg","golang","movie-processing","shrink","video-compression"],"created_at":"2026-04-04T10:07:01.269Z","updated_at":"2026-04-21T23:00:48.982Z","avatar_url":"https://github.com/jparkerweb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shrinkray\n\n**Less bytes, same vibes.**\n\nA cross-platform CLI video compression tool powered by FFmpeg,  \nfeaturing a wizard-style TUI built with Go and Charm's Bubble Tea.\n\n\u003cimg src=\"https://github.com/jparkerweb/shrinkray/blob/main/docs/shrinkray.jpg?raw=true\" width=\"600\"\u003e\n\n## Features\n\n- **Interactive TUI wizard** -- step-by-step guided compression with real-time preview\n- **18 built-in presets** -- quality tiers, purpose-driven, and platform-specific (Discord, YouTube, TikTok, etc.)\n- **Smart recommendations** -- analyzes your video and suggests the optimal preset\n- **Hardware acceleration** -- auto-detects NVIDIA NVENC, AMD AMF, Apple VideoToolbox, Intel QSV\n- **Batch processing** -- compress entire folders with parallel workers and progress tracking\n- **Headless mode** -- scriptable `--no-tui` mode with stdin pipe support for CI/CD pipelines\n- **Cross-platform** -- single static binary for Windows, macOS, and Linux\n\n## Quick Install\n\n### GitHub Releases\n\nDownload the latest binary for your platform from the [Releases page](https://github.com/jparkerweb/shrinkray/releases).\n\n### Shell Script (macOS / Linux)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/jparkerweb/shrinkray/main/scripts/install.sh | bash\n```\n\n### PowerShell (Windows)\n\n```powershell\nirm https://raw.githubusercontent.com/jparkerweb/shrinkray/main/scripts/install.ps1 | iex\n```\n\n### Go Install\n\n```bash\ngo install github.com/jparkerweb/shrinkray/cmd/shrinkray@latest\n```\n\n## Quick Start\n\n```bash\n# Interactive TUI mode (default)\nshrinkray\n\n# Compress a single video with a preset\nshrinkray -i video.mp4 -p balanced --no-tui\n\n# Batch compress a folder\nshrinkray -i ./videos/ -p compact -j 4 --recursive --no-tui\n```\n\n## Presets\n\n### Quality Tier\n\n| Key | Name | Description |\n|-----|------|-------------|\n| `lossless` | Lossless | Mathematically identical output -- no quality loss |\n| `ultra` | Ultra Quality | Near-lossless H.265 -- ideal for archival or mastering |\n| `high` | High Quality | Excellent quality with good compression |\n| `balanced` | Balanced | Best trade-off between quality and file size (recommended) |\n| `compact` | Compact | Smaller files capped at 720p -- good for sharing |\n| `tiny` | Tiny | Maximum compression at 480p -- smallest files |\n\n### Purpose-Driven\n\n| Key | Name | Description |\n|-----|------|-------------|\n| `web` | Web Delivery | Optimized for web streaming and downloads |\n| `email` | Email Friendly | Targets ~20MB output for email attachments |\n| `archive` | Archive | Maximum quality retention with H.265 |\n| `slideshow` | Slideshow / Screencast | Optimized for low-motion content |\n| `4k-to-1080` | 4K to 1080p | Downscale 4K footage to 1080p |\n\n### Platform-Specific\n\n| Key | Name | Description |\n|-----|------|-------------|\n| `discord` | Discord | Fits within Discord's 10MB free-tier limit |\n| `discord-nitro` | Discord Nitro | Fits within Discord Nitro's 50MB limit at 1080p |\n| `whatsapp` | WhatsApp | Fits within WhatsApp's 16MB limit, capped at 30fps |\n| `twitter` | Twitter / X | Optimized for Twitter upload -- 1080p max, 60fps |\n| `instagram` | Instagram | Optimized for Instagram -- 1080p max, 30fps |\n| `tiktok` | TikTok | Optimized for TikTok -- 1080p max, 60fps, portrait-aware |\n| `youtube` | YouTube Upload | Upload-optimized for YouTube |\n\nView preset details:\n\n```bash\nshrinkray presets              # List all presets\nshrinkray presets show compact # Show detailed settings for a preset\n```\n\n## CLI Reference\n\n```\nshrinkray [flags]\nshrinkray [command]\n```\n\n### Commands\n\n| Command | Description |\n|---------|-------------|\n| `version` | Print version information |\n| `presets` | List all available encoding presets |\n| `presets show \u003ckey\u003e` | Show detailed info about a preset |\n| `probe` | Probe a video file and display metadata |\n| `completion` | Generate shell completion scripts |\n| `help` | Help about any command |\n\n### Flags\n\n| Flag | Short | Description |\n|------|-------|-------------|\n| `--input` | `-i` | Input video file or directory |\n| `--inputs` | | Additional input video file paths (repeatable) |\n| `--preset` | `-p` | Preset name (e.g., balanced, compact, tiny) |\n| `--output` | `-o` | Output file path |\n| `--no-tui` | | Disable interactive TUI, use headless mode |\n| `--crf` | | CRF value override |\n| `--codec` | | Video codec (h264, h265, av1, vp9) |\n| `--resolution` | | Output resolution (e.g., 1920x1080) |\n| `--fps` | | Maximum output framerate |\n| `--speed-preset` | | Encoder speed preset (e.g., fast, medium, slow) |\n| `--target-size` | | Target output size (e.g., 25mb, 1gb) -- forces two-pass |\n| `--two-pass` | | Force two-pass encoding |\n| `--hw-accel` | | Auto-detect and use hardware encoder |\n| `--no-hw-accel` | | Force software encoding |\n| `--audio-codec` | | Audio codec: aac, opus, copy, none |\n| `--audio-bitrate` | | Audio bitrate: 64k, 96k, 128k, 192k, 256k |\n| `--audio-channels` | | Audio channels: stereo, mono, source |\n| `--suffix` | | Output filename suffix (default: _shrunk) |\n| `--output-dir` | | Output directory (mirrors input structure) |\n| `--overwrite` | | Overwrite existing output files |\n| `--auto-rename` | | Auto-rename output if file exists |\n| `--in-place` | | Replace source files after verification |\n| `--jobs` | `-j` | Number of parallel encoding workers |\n| `--recursive` | `-r` | Recurse into directories for video files |\n| `--sort` | | Sort order: size-asc, size-desc, name, duration |\n| `--skip-existing` | | Skip files whose output already exists |\n| `--skip-optimal` | | Skip files already compressed with target codec |\n| `--retry-failed` | | Retry failed jobs from persisted queue |\n| `--max-retries` | | Maximum retry attempts per file (default: 2) |\n| `--dry-run` | | Print FFmpeg command without executing |\n| `--stdin` | | Read file paths from stdin (one per line) |\n| `--extra-args` | | Extra FFmpeg arguments (repeatable) |\n| `--strip-metadata` | | Remove all metadata from output |\n| `--keep-metadata` | | Preserve source metadata (default: true) |\n| `--metadata-title` | | Set output title metadata |\n| `--open` | | Open output folder after completion |\n| `--config` | | Path to config file |\n| `--log-level` | | Log level (debug, info, warn, error) |\n| `--no-color` | | Disable color output |\n\n## Configuration\n\nshrinkray looks for a config file at:\n\n- **Linux/macOS:** `~/.config/shrinkray/config.yaml`\n- **Windows:** `%APPDATA%\\shrinkray\\config.yaml`\n\nExample config:\n\n```yaml\ndefaults:\n  preset: balanced\n  codec: h265\n\noutput:\n  suffix: _shrunk\n  mode: suffix\n  conflict: rename\n\nbatch:\n  jobs: 2\n  skipExisting: false\n  sort: size-asc\n\nui:\n  theme: neon-dusk\n  animations: true\n\nffmpeg:\n  ffmpegPath: \"\"\n  ffprobePath: \"\"\n```\n\n## Requirements\n\n- **FFmpeg** and **FFprobe** must be installed and available on your PATH\n  - macOS: `brew install ffmpeg`\n  - Linux: `sudo apt install ffmpeg` (or your distro's package manager)\n  - Windows: `scoop install ffmpeg` or `choco install ffmpeg`\n- **Go 1.25+** (only required for building from source)\n\n## Development\n\n### Building from Source\n\n```bash\ngit clone https://github.com/jparkerweb/shrinkray.git\ncd shrinkray\nmake build\n./shrinkray version\n```\n\n### Local Development (Windows)\n\nBuild and install to your local PATH for testing:\n\n```powershell\n.\\scripts\\install-local.ps1\n```\n\nThis builds with version info from `git describe --tags`, installs to `%LOCALAPPDATA%\\shrinkray\\`, and adds it to your user PATH. The version string (e.g., `v0.2.0-3-gabcdef-dirty`) reflects the latest tag, commits since that tag, and whether there are uncommitted changes.\n\n### Running Tests\n\n```bash\nmake test          # Run tests\nmake lint          # Run linter\nmake ci            # Run lint + test + build (full CI pipeline locally)\n```\n\n### Releasing\n\nThis project uses [Semantic Versioning](https://semver.org/) with automated releases via GoReleaser.\n\n**Workflow:**\n\n1. Ensure all changes are committed and `CHANGELOG.md` `[Unreleased]` section is up to date\n2. Rename `[Unreleased]` to `[X.Y.Z] - YYYY-MM-DD` in `CHANGELOG.md`\n3. Add a fresh `[Unreleased]` section and update comparison links at the bottom\n4. Commit: `git commit -m \"Release vX.Y.Z\"`\n5. Tag: `git tag -a vX.Y.Z -m \"vX.Y.Z\"`\n6. Push: `git push origin main --tags`\n\nPushing a `v*` tag triggers the GitHub Actions [release workflow](.github/workflows/release.yml), which runs tests and then GoReleaser builds binaries for Windows, macOS, and Linux (amd64 + arm64). Binaries appear on the [Releases page](https://github.com/jparkerweb/shrinkray/releases).\n\n**Version bumping:**\n- Breaking changes → major (X+1.0.0)\n- New features → minor (X.Y+1.0)\n- Bug fixes only → patch (X.Y.Z+1)\n\nIf using Claude Code, you can run `/release` to automate this workflow.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjparkerweb%2Fshrinkray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjparkerweb%2Fshrinkray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjparkerweb%2Fshrinkray/lists"}