0.0.5 • Published 5 months ago

ytdlp_video_processor v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

npm ytdlp_video_processor 0.0.1

ytdlp_video_processor

Module for downloading, processing, and optionally converting YouTube videos. This package uses yt-dlp for downloading videos and ffmpeg for processing and converting them.

Installation

Run the following command in your project directory to install the package:

npm install ytdlp_video_processor

Usage

To use this module, first, import it:

const ytdlp_video_processor = require("ytdlp_video_processor")

Then, call ytdlp_video_processor with the necessary parameters:

async function downloadAndProcessVideo() {
  const youtubeId = "7W6RCTE0ZKM"
  const startTime = 0 // Optional: Start time in seconds for trimming the video
  const endTime = 120 // Optional: End time in seconds for trimming the video
  const format = "ogg" // Optional: Desired output format (default is 'ogg')

  try {
    const processedFilePath = await ytdlp_video_processor(
      youtubeId,
      startTime,
      endTime,
      format,
    )
    console.log("Processed video saved at:", processedFilePath)
  } catch (error) {
    console.error("Error:", error)
  }
}

downloadAndProcessVideo()

You can find more usage examples in the examples/index.examples.js file in the examples folder.

Features

  • Downloads YouTube videos using yt-dlp.
  • Optionally trims videos using specified start and end times.
  • Converts videos to specified formats using ffmpeg.
  • Returns the absolute path of the processed video file.

Contributing

Contributions are welcome. Please ensure that your contributions adhere to the project coding standards and include appropriate tests.

When contributing:

  • Fork the repository.
  • Create a new branch for each feature or improvement.
  • Submit a pull request with comprehensive description of changes.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago