yt-trimmer
yt-trimmer copied to clipboard
🤖 Bot to download and trim YouTube video, passing start and end point, saving video to local folder
Download and trim some YouTube Video
It will download and cut a youtube video, by adding start and end values, save it to root directory
How to use it?
Clone this repo, go to repo folder, and install with npm install
Obs.: You need ffmpeg and yt-dlp in your machine
WEB
- Start project with
npm start
- Open your browser at http://localhost:3000/
- Follow page instructions
CLI
Download single cut (part) of the video
- Start with
npm run trim
- You will be prompted and will be asked for:
-
Youtube url
Youtube video url with http(s) -
Video starts in
When video start? formatHH:mm:ss.ms
-
Video ends in
When video will end? formatHH:mm:ss.ms
-
Filename
Filename that will be output. Don't need to provide .extension of file. If no filenamepart.mp4
will be the filename.
- When it's finished, the video will be saved at local project folder
Download multiples parts (cuts) of the video
- Go to src/actions/
- Edit multiple-parts.js
const data = {
url: 'https://www.youtube.com/watch?v=gBmnB7BwSRA', // the Youtube video Url
intervals: [
// the parts of you want to cut
['00:01:19', '00:01:40.200'],
['00:04:30', '00:05:00']
],
concat: true // If you want to concatenate (join) in a single final.mp4 file, leave it as true. If not, make it false
}
- save your file
- run
npm run trimall
Tecnologies
- node.js
- readline-sync
- youtube-dl
- ffmpeg
- webpack
- sass