@tynopia/canvas
v1.0.3
Published
Convert YouTube videos to 9:16 Spotify Canvas format
Readme
@tynopia/canvas
A CLI tool to create Spotify Canvas videos from YouTube — and to strip subtitle overlays from MP4 files.
Requirements
- Node.js 18 or later
- FFmpeg is bundled automatically via
@ffmpeg-installer/ffmpeg
Installation
npm install -g @tynopia/canvasCommands
canvas banner
Downloads a YouTube video and converts it to the 9:16 vertical format required for Spotify Canvas.
canvas bannerYou will be prompted for:
| Prompt | Description | Default |
|---|---|---|
| YouTube URL | The URL of the video to download | — |
| Scale | How much to scale up the cropped video (%) | 45 |
| Start time | Clip start position (MM:SS) | — |
| Duration | Clip length in seconds | 7 |
The output file is saved as <video title>.mp4 in the current directory.
Example session:
? What is the YouTube Video URL? https://www.youtube.com/watch?v=dQw4w9WgXcQ
? How much percent do you want to scale the video? 45
? Provide a start time for the video (MM:SS) 00:43
? How long should the output video be? (seconds) 7
⠋ Downloading and converting video
✔ Saved as Never Gonna Give You Up.mp4canvas video
Converts every MP4 file in the current directory from 16:9 to the 9:16 vertical format required for Spotify Canvas.
canvas video- Scans the current directory for
.mp4files - Crops and scales each file to 1080×1920 (9:16)
- Writes the processed files into an
out/subdirectory - The original files are not modified
Example session:
canvas video
✔ clip1.mp4
✔ clip2.mp4License
MIT — Lukas Leisten
