ilhamdev commited on
Commit
aa33e4e
·
verified ·
1 Parent(s): ba94397

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
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: 'audioonly', quality: 'lowestaudio' })
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)