ytmp3dl-core

    0.0.34 • Public • Published

    ytmp3dl-core

    Async YouTube downloader - core Node.js module.

    This project will be rewritten to use modern features available in recent Node.js releases. Main functionality and project architecture will stay roughly the same. The development of the new ytmp3dl-core project will happen simultaneously with the upgrade of the ytmp3dl-server project.

    Build Status npm


    Install

    npm install ytmp3dl-core

    Requirements

    • Node.js (>=10.16.0) + NPM
    • Globally installed ffmpeg

    Use

    const Download = require('ytmp3dl-core').Download;
    
    new Download({ v: 'NnTg4vzli5s' })
      .on('callMethod', method => console.log(`callMethod: ${method}`))
      .on('stream-progress', prog => console.log('stream-progress', prog))
      .on('conversion-progress', prog => console.log('conversion-progress', prog))
      .on('error', err => console.log('error', err))
      .on('succes', result => console.log('succes', result))
      .callMethod('start');

    Events

    error

    success

    callMethod

    streamProgress

    conversionProgress

    Example:

    const dl = new Download({ v: 'NnTg4vzli5s' });
    
    dl.on('conversionProgress', progress =>
      console.log('conversionProgress', progress)
    );

    Custom event binding:

    const dl = new Download({ v: 'NnTg4vzli5s' });
    
    for (let eventName in dl._events)
      dl.on(eventName, (...args) => {
        console.log('event', eventName, args);
      });

    Up next

    • Better README.md & examples
    • Clean logging
    • Better logging
    • Better error handling more try catch
    • Command line interface ytmp3dl-cli.
    • REST server ytmp3dl-server to CRUD (manage) downloads
    • Front-end features. Which will be maintained in a new project repo.. More info soon. ytmp3dl-server will be used in the process of creating user friendly experiences

    Develop

    Previously this project was developed using Babel.js, but since Node.js LTS supports all the features that we were transpiling Babel.js is no longer used. To develop I run node insta.js, the insta.js file starts downloads when invoked.

    Contributing

    1. Fork
    2. Create your feature branch (git checkout -b my-epic-feature)
    3. Commit your changes (git commit -am 'Add epic feature :)')
    4. Push to the branch (git push origin my-epic-feature)
    5. Create new Pull Request

    Copyright

    Copyright (c) 2019 Sam @ Opensoars. See LICENSE for details.

    Install

    npm i ytmp3dl-core

    DownloadsWeekly Downloads

    5

    Version

    0.0.34

    License

    MIT

    Unpacked Size

    2.1 MB

    Total Files

    42

    Last publish

    Collaborators

    • opensoars