Skip to content

Commit

Permalink
new fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishpathak2 committed Sep 16, 2024
1 parent 38ce129 commit 125ec1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ router.post('/download', async function (req, res) {
const outputFile = path.resolve(tempDir, `${sanitizedTitle}_merged.mp4`);

// Download video and audio separately to temp files
const videoStream = ytdl(url, { quality: itag });
const audioStream = ytdl(url, { quality: 'highestaudio' });
const videoStream = ytdl(url, { quality: itag , requestOptions: { proxy: 'http://localhost:3000'} });
const audioStream = ytdl(url, { quality: 'highestaudio' , requestOptions: { proxy: 'http://localhost:3000'}});

// Pipe video and audio to files
const videoWriteStream = fs.createWriteStream(videoPath);
Expand Down

0 comments on commit 125ec1c

Please sign in to comment.