Comments (5)
Listen to progress
and info
events to make sure your code runs correctly.
I run your code and it works normally. "ytdl-core": "npm:@distube/ytdl-core@^4.13.2"
(async function(){
var ytdl = require("ytdl-core");
var ended = false;
ytdl("videoidplaceholder", {
"quality": "highestvideo"
})
.on("info", (info, format) =>console.log(format)) // The format will be downloaded
.on("progress", console.log)
.pipe(require("fs").createWriteStream("video.mp4"))
.on("finish", function () {
ended = true;
console.log("Finished!")
});
while (ended === false) {
await new Promise(resolve => setTimeout(resolve, 100));
}
})()
from ytdl-core.
I am also running into this issue. I upgraded to this package from base package recently and I see that even when I am using the same youtube link, it sometimes downloads 0 byte empty file.
from ytdl-core.
I am also running into this issue. I upgraded to this package from base package recently and I see that even when I am using the same youtube link, it sometimes downloads 0 byte empty file.
I don't test the built-in stream too much. But it doesn't happen on my side. I will roll back the stream system and see if it works.
from ytdl-core.
I rolled back the old stream system with 304a43a.
miniget has built-in retry system while undici doesn't. This may cause your issue. Try it with @distube/[email protected]
from ytdl-core.
If this problem still exists, feel free to re-open this issue.
from ytdl-core.
Related Issues (17)
- Downloading files way slower than usual HOT 3
- Error when parsing watch.html, maybe YouTube made a change HOT 1
- Audio plays for a few seconds, then stops HOT 3
- Generated IP address not being used in outgoing undici request HOT 1
- TypeScript compilation fails HOT 3
- Cannot play age restricted videos after adding cookies HOT 25
- proxy error HOT 1
- Discord invite is invalid HOT 1
- what i should do? HOT 7
- Could not parse n transform function.
- Could not parce n transform function HOT 7
- Please report this issue with the "1690327295451-base.js" file on https://github.com/distubejs/ytdl-core/issues. HOT 2
- SyntaxError: Invalid left-hand side expression in postfix operation HOT 1
- WARNING: Could not parse n transform function. HOT 8
- if i play a song i got this file in my code HOT 2
- How to use proxy with `@distube/ytdl-core` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ytdl-core.