Giter Club home page Giter Club logo

Comments (5)

skick1234 avatar skick1234 commented on July 28, 2024

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.

minjaes avatar minjaes commented on July 28, 2024

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.

skick1234 avatar skick1234 commented on July 28, 2024

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.

skick1234 avatar skick1234 commented on July 28, 2024

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.

skick1234 avatar skick1234 commented on July 28, 2024

If this problem still exists, feel free to re-open this issue.

from ytdl-core.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.