youtube mp3 converter
v1.0.3
YouTube ビデオをダウンロードして mp3 に変換するためのシンプルなノード モジュール。 ytdl および ffmped ライブラリのシンプルなラッパー。YouTube リンクを mp3 に変換するための使いやすい API を提供します。
YouTube からビデオまたはその音声をダウンロードすることは、ポリシーに直接違反します。このモジュールを自分の動画以外で使用すると、YouTube から訴訟を起こされる可能性があります。
このモジュールはffmpegライブラリに依存しています。 ffmpeg がインストールされていることを確認してください。インストールされていない場合は、インストールの詳細についてはここを参照してください。
npm install youtube-mp3-converter
npm run test
// Sets up the downloader
const youtubeMp3Converter = require ( 'youtube-mp3-converter' )
// creates Download function
const convertLinkToMp3 = youtubeMp3Converter ( pathToSaveFiles )
// Downloads mp3 and Returns path were it was saved.
const pathToMp3 = await convertLinkToMp3 ( 'https://www.youtube.com/watch?v=_cyND_1y1k0' )
const youtubeMp3Converter = require ( 'youtube-mp3-converter' )
const convertLinkToMp3 = youtubeMp3Converter ( pathToSaveFiles )
const pathToMp3 = await convertLinkToMp3 ( 'https://www.youtube.com/watch?v=_cyND_1y1k0' , {
startTime : "00:00:10" , // from where in the video the mp3 should start
duration : 20 , // Length of mp3 in seconds (from start point)
title : 'fooo' // The tile of the mp3 file, undefined it takes the youtube title
} )
このモジュールには現在、いくつかの本格的なテストが欠けています。それを延長したい場合は、私のゲストになってください。