Skip to content

A simple cli-app that allows you to divide a YouTube video into multiple separate videos base on a video's time stamps. Powered by pkg and yt-scissors library.

License

Guuzzeji/youtube-scissors-cli

Repository files navigation

YouTube-Scissors CLI

GitHub GitHub release (latest by date) GitHub release (latest by date) GitHub contributors

GitHub Repo stars Twitter URL

A simple CLI app that allows you to divide a YouTube video into multiple separate videos base on a video's time stamps. This project is built on top of another one of my projects, yt-scissors.

💡 Features

  • Can generate multiple videos or extract a single video, based on a YouTube video's time stamps (time stamps from a comment, video description, or chapters)

    • Important: Generated time stamps from the description and comments works about 85% of the time. Make sure the video's time stamps are spaced out and have nothing that would make it hard to find them. There is also a bug with any video that is +10 hours long, so video length should be below 10 hours.

    • Note: Make sure the description or comment has a full time stamp list for the best results.

  • Can download videos directly from CLI

    • Note: Downloading is slow compare to other YouTube download methods.

    • If you need good download speeds try pytube or yt-dlp. You can still use this program with other YouTube download methods.

  • Can process already downloaded YouTube videos

  • Simple CLI structure

  • 100% Open Source (MIT license)

📂 How to Download & Install

  1. Download it here or go to the release tab of this repository.

  2. Once you downloaded the YouTube-Scissors-CLI executable, download ffmpeg. FFmpeg Downloads

  3. After downloading ffmpeg, open up the config.json file and paste the path to where you have saved the ffmpeg executable. Make sure you put config.json in the same directory as your YouTube-Scissors executable.

  4. Edit config.json to your liking.

Example of How config.json is Setup

{
    "ffmpeg_path": "Your ffmpeg executable path goes here",
    "hide_ffmpeg": true, // hides ffmpeg logs
    "hide_yt_download": true, // hides download logs
    "hide_logo": false // hides youtube-scissors banner on startup
}

🕹️ Usage

  1. Find a YouTube video that you want to extract videos from

    • Make sure the YouTube video has either chapters or time stamps in the description or comments section

    • Note: For comments, follow this tutorial to figure out how to get a YouTube comment's URL.

    • Tip: Make sure the description or comment has a full time stamp list for the best results.

  2. Run YouTube-Scissors CLI and paste the YouTube video's URL or the YouTube comment's URL

  3. Then enter in what you want for each prompt

    • Important: When extracting multiple videos, YouTube-scissors will NOT create a folder for all the videos to be saved in. You must create an empty folder beforehand and save all the videos there.

🎥 Video Demo

📷 Screenshots

🛠️ Developer Instructuions (Build From Source)

Most users do not need to build from source. You can download the builds from here.

If you are looking for an API / wrapper library for this CLI app, look here.

What you will need

  • Download a copy of ffmpeg
  • Have Node.js installed on your system
  • (Optional) Have git installed on your system

How To Build From Source

(Step 1) Download the source code and cd into it

git clone https://github.com/Guuzzeji/youtube-scissors-cli.git
cd youtube-scissors-cli

(Step 2) Install pkg (Learn more about pkg)

npm install -g pkg

(Step 3) Then run npm install to install all needed dependencies

npm install

(Step 4) Build using npm

npm run build

(Step 5) Setting up config.json

cd build
  • cd into the build directory and copy the config.json file into it. Make sure you edit the config.json file to your liking and type in the path to your ffmpeg executable.

🤝 How to Contribute

  • Fork the main branch

  • Open your fork and add your changes / features / bug fixes

  • (Important) Run npm test if you made any changes to fetch folder or fetch files. You need to do this to make sure everything is working properly when grabbing data and parsing it from YouTube

  • (Important) Test and make sure your changes can still create a functional executable file. (check the build guide above)

  • Create a pull request

    • Make sure to add a description of what changes you have made and why your changes are important.

Helpful Infomation

License

MIT

About

A simple cli-app that allows you to divide a YouTube video into multiple separate videos base on a video's time stamps. Powered by pkg and yt-scissors library.

Topics

Resources

License

Stars

Watchers

Forks