Update index.js
Browse files
index.js
CHANGED
|
@@ -293,9 +293,9 @@ async function ytAPI(url) {
|
|
| 293 |
let videoStream = await ytdl(ID, { filter: 'audioandvideo', quality: 'highestvideo' });
|
| 294 |
let audioStream = await ytdl(ID, {filter: "audioandvideo", quality:"lowest"})
|
| 295 |
let video = await ytdl(ID, { filter: 'videoonly', quality: 'highestvideo' })
|
| 296 |
-
let audio = await ytdl(ID, { filter: '
|
| 297 |
video = await streamToBuffer(video)
|
| 298 |
-
audio = await streamToBuffer(audio)
|
| 299 |
let buffmerge = await mergeVideoAndAudio(video, audio)
|
| 300 |
buffmerge = await fileDitch(buffmerge)
|
| 301 |
let buffermp4 = await streamToBuffer(videoStream)
|
|
|
|
| 293 |
let videoStream = await ytdl(ID, { filter: 'audioandvideo', quality: 'highestvideo' });
|
| 294 |
let audioStream = await ytdl(ID, {filter: "audioandvideo", quality:"lowest"})
|
| 295 |
let video = await ytdl(ID, { filter: 'videoonly', quality: 'highestvideo' })
|
| 296 |
+
let audio = await ytdl(ID, { filter: 'audioandvideo', quality: 'lowestaudio' })
|
| 297 |
video = await streamToBuffer(video)
|
| 298 |
+
audio = await convertMp4ToAudio(await streamToBuffer(audio))
|
| 299 |
let buffmerge = await mergeVideoAndAudio(video, audio)
|
| 300 |
buffmerge = await fileDitch(buffmerge)
|
| 301 |
let buffermp4 = await streamToBuffer(videoStream)
|