{"id":13469676,"url":"https://github.com/yuanqing/vdx","last_synced_at":"2025-04-08T02:41:53.946Z","repository":{"id":39982639,"uuid":"131492775","full_name":"yuanqing/vdx","owner":"yuanqing","description":":film_strip: An intuitive CLI for processing video, powered by FFmpeg","archived":false,"fork":false,"pushed_at":"2021-02-27T07:45:42.000Z","size":615,"stargazers_count":1663,"open_issues_count":4,"forks_count":28,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-01T01:42:46.217Z","etag":null,"topics":["ffmpeg","gif","video"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/yuanqing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/funding.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://paypal.me/yuanqinglim"}},"created_at":"2018-04-29T12:29:58.000Z","updated_at":"2025-03-27T12:22:57.000Z","dependencies_parsed_at":"2022-06-26T00:19:54.557Z","dependency_job_id":null,"html_url":"https://github.com/yuanqing/vdx","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanqing%2Fvdx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanqing%2Fvdx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanqing%2Fvdx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuanqing%2Fvdx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuanqing","download_url":"https://codeload.github.com/yuanqing/vdx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767232,"owners_count":20992538,"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":["ffmpeg","gif","video"],"created_at":"2024-07-31T15:01:50.333Z","updated_at":"2025-04-08T02:41:53.928Z","avatar_url":"https://github.com/yuanqing.png","language":"TypeScript","funding_links":["https://paypal.me/yuanqinglim"],"categories":["TypeScript","应用相关","HarmonyOS","video"],"sub_categories":["Windows Manager"],"readme":"# vdx [![npm Version](https://img.shields.io/npm/v/vdx?cacheSeconds=1800)](https://www.npmjs.org/package/vdx) [![build](https://github.com/yuanqing/vdx/workflows/build/badge.svg)](https://github.com/yuanqing/vdx/actions?query=workflow%3Abuild)\n\n\u003e An intuitive CLI for processing video, powered by [FFmpeg](https://ffmpeg.org)\n\n- Crop, trim, resize, reverse, rotate, remove audio, change the speed, change the frame rate, change the volume, convert to a different file format\n- Run multiple operations on multiple video files concurrently\n\n## Quick start\n\n*Requires [FFmpeg](https://ffmpeg.org) and [Node.js](https://nodejs.org).*\n\n```sh\n$ npm install --global vdx\n```\n\nA variety of common video processing operations are supported:\n\n```sh\n$ vdx '*.mov' --crop 360,640    # Crop to width 360, height 640\n$ vdx '*.mov' --format gif      # Convert to GIF\n$ vdx '*.mov' --fps 12          # Change the frame rate to 12\n$ vdx '*.mov' --no-audio        # Remove audio\n$ vdx '*.mov' --resize 360,-1   # Resize to width 360, maintaining the aspect ratio\n$ vdx '*.mov' --reverse         # Reverse\n$ vdx '*.mov' --rotate 90       # Rotate 90 degrees clockwise\n$ vdx '*.mov' --speed 2         # Double the speed\n$ vdx '*.mov' --trim 0:05,0:10  # Trim from 0:05 to 0:10\n$ vdx '*.mov' --volume 0.5      # Halve the volume\n```\n\nWe can also run multiple operations all at once:\n\n```sh\n$ vdx '*.mov' --format gif --fps 12 --resize 360,640 --speed 2 --trim 0:05,0:10\n```\n\nBy default, the processed files will be written to a directory called `./build`. To change this, use the `--output` option:\n\n```sh\n$ vdx '*.mov' --format gif --output './gifs'\n```\n\nBy default, up to 3 video files will be processed concurrently. To change this, use the `--parallel` option:\n\n```sh\n$ vdx '*.mov' --format gif --output './gifs' --parallel 5\n```\n\n## Usage\n\n```\nUsage: vdx \u003cfiles\u003e [options]\n```\n\n### \u0026lt;files\u0026gt;\n\nOne or more globs of video files to process.\n\n### [options]\n\nUse the `-d` or `--debug` option to print the underlying FFmpeg commands that are being run.\n\n#### -c, --crop\n\nCrop the video to `\u003cwidth\u003e,\u003cheight\u003e` or `\u003cx\u003e,\u003cy\u003e,\u003cwidth\u003e,\u003cheight\u003e`.\n\n```sh\n# Crop to width 360, height 640\n$ vdx '*.mov' --crop 360,640\n\n# Crop to width 360, height 640, starting from coordinates (10, 20)\n$ vdx '*.mov' --crop 10,20,360,640\n```\n\n#### -f, --format\n\nConvert the video to a different file format.\n\n```sh\n# Convert to GIF\n$ vdx '*.mov' --format gif\n```\n\n#### -fp, --fps\n\nChange the frame rate of the video.\n\n```sh\n# Change the frame rate to 12\n$ vdx '*.mov' --fps 12\n```\n\n#### --no-audio\n\nRemove audio from the video.\n\n```sh\n# Remove audio\n$ vdx '*.mov' --no-audio\n```\n\n#### -o, --output\n\nSet the output directory. Defaults to `./build`.\n\n```sh\n# Output files to './gifs'\n$ vdx '*.mov' --format gif --output './gifs'\n```\n\n#### -p, --parallel\n\nSet the maximum number of video files to process concurrently. Defaults to `3`.\n\n```sh\n# Process up to 5 files concurrently\n$ vdx '*.mov' --format gif --parallel 5\n```\n\n#### -r, --resize\n\nResize the video to `\u003cwidth\u003e,\u003cheight\u003e`. Set either `\u003cwidth\u003e` or `\u003cheight\u003e` to `-1` to maintain the aspect ratio.\n\n```sh\n# Resize to width 360, height 640\n$ vdx '*.mov' --resize 360,640\n\n# Resize to width 360, maintaining the aspect ratio\n$ vdx '*.mov' --resize 360,-1\n\n# Resize to height 640, maintaining the aspect ratio\n$ vdx '*.mov' --resize -1,640\n```\n\n#### -rv, --reverse\n\nReverse the video.\n\n```sh\n# Reverse\n$ vdx '*.mov' --reverse\n```\n\n#### -ro, --rotate\n\nRotate the video by `-90`, `90`, or `180` degrees.\n\n```sh\n# Rotate 90 degrees clockwise\n$ vdx '*.mov' --rotate 90\n\n# Rotate 90 degrees counter-clockwise\n$ vdx '*.mov' --rotate -90\n\n# Rotate 180 degrees\n$ vdx '*.mov' --rotate 180\n```\n\n#### -s, --speed\n\nChange the speed of the video. To slow down, set to a number greater than `0` and less than `1`. To speed up, set to a number greater than `1`.\n\n```sh\n# Halve the speed\n$ vdx '*.mov' --speed 0.5\n\n# Double the speed\n$ vdx '*.mov' --speed 2\n```\n\n#### -t, --trim\n\nTrim to `\u003cstart\u003e,\u003cend\u003e` where `\u003cstart\u003e` and `\u003cend\u003e` are timestamps in the format `HH:MM` or `HH:MM.mmm`. Omit `\u003cend\u003e` to trim from `\u003cstart\u003e` to the end of the video.\n\n```sh\n# Trim from 0:05 to 0:10\n$ vdx '*.mov' --trim 0:05,0:10\n\n# Trim from 0:05 to the end of the video\n$ vdx '*.mov' --trim 0:05\n```\n\n#### -vo, --volume\n\nChange the volume of the video. To remove audio from the video, set to `0`. To decrease the volume, set to a number greater than `0` and less than `1`. To increase the volume, set to a number greater than `1`.\n\n```sh\n# Remove audio from the video\n$ vdx '*.mov' --volume 0\n\n# Halve the volume\n$ vdx '*.mov' --volume 0.5\n\n# Double the volume\n$ vdx '*.mov' --volume 2\n```\n\n## Installation\n\n```sh\n$ npm install --global vdx\n```\n\n## Prior art\n\n- [fluent-ffmpeg](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg)\n\n## See also\n\n- [FFmpeg Cheatsheet](https://github.com/yuanqing/ffmpeg-cheatsheet)\n\n## License\n\n[MIT](/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanqing%2Fvdx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuanqing%2Fvdx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuanqing%2Fvdx/lists"}