fent / fent/node-ytdl-core

Downloaded has no sounds @latest version

Open
#1,264 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.7k
Forks
852
PR merge metrics
No merged PRs in 30d

Description

Why video has no sounds when downloading it with a normal process i got my code that looks like below and everytime the download was done it doesn't have any sounds, I'd tried `ytdl.downloadFromInfo()` as well but it gives me the same output.

`
await ytdl.getInfo(videoID).then(async (info) => {

if (info.live_playback) {
reject('live-stream');
}

if (Number(info.videoDetails.lengthSeconds) > 720) {
reject('long-music');
}

const final_path = `${path}${videoID}.mp4`;
const stream = Filesystem.createWriteStream(final_path);
await ytdl(videoID).pipe(stream);

stream.on('finish', function () {
let result = {
title: info.videoDetails.title,
dur: Number(info.videoDetails.lengthSeconds),
viewCount: info.videoDetails.viewCount,
likes: info.videoDetails.likes,
author: info.videoDetails.author.name,
path: final_path
}
resolve(result);
});

stream.on('error', function (err) {
reject(err);
});

}).catch((err) => {
reject(err);
});
`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.