youtube-player-screenshot
v0.4.4
Published
Capture YouTube player screenshot and, optionally, generate markdown code for it.
Downloads
122
Maintainers
Readme
youtube-player-screenshot
Capture YouTube player screenshot and, optionally, generate markdown code for it.
This project was developed to make embedding what appears to be clickable YouTube players (like the one bellow) effortless and scriptable.
Features
- Super simple to use
- Uses trusted dependencies (chalk, clipboardy, puppeteer, etc...)
- Very light codebase to audit (less than 100 lines)
- Written in TypeScript
Installation
npm install youtube-player-screenshot -g
Usage
$ cd /Users/sunknudsen/Desktop
$ youtube-player-screenshot -h
Usage: youtube-player-screenshot [options]
Options:
--url <url> YouTube URL
--width <width> screenshot width (default: "1920")
--height <height> screenshot height (default: "1080")
--scale <scale> scale factor (default: "2")
--type <type> screenshot type (choices: "jpeg", "png", default: "png")
--output <output> output folder (default: "/Users/sunknudsen/Code/sunknudsen/youtube-player-screenshot")
--filename <filename> filename (example: "b9aMJZjZ4pw.png")
--privacy enable privacy-conscious mode
--clipboard copy markdown to clipboard
--stdout output markdown to stdout
-h, --help display help for command
--output
defaults to folder in which youtube-player-screenshot
is executed.
Example
$ cd /Users/sunknudsen/Desktop
$ youtube-player-screenshot --url "https://www.youtube.com/watch?v=b9aMJZjZ4pw" --scale 3 --privacy --clipboard --stdout
[![How to create Signal account without using personal phone number](how-to-create-signal-account-without-using-personal-phone-number.png)](https://www.youtube.com/watch?v=b9aMJZjZ4pw "How to create Signal account without using personal phone number")
Markdown copied to clipboard 👍
$ file how-to-create-signal-account-without-using-personal-phone-number.png
how-to-create-signal-account-without-using-personal-phone-number.png: PNG image data, 1920 x 1080, 8-bit/color RGB, non-interlaced