mediaconv

1.0.4 • Public • Published

mediaconv

This project consists of functionalities to convert video files to audio and play audio files using Node.js and ffmpeg.

Installation:

    npm install mediaconv

Note:

Make sure you have ffmpeg installed on your system. The ffmpeg command-line tool is used for audio conversion and playback functionalities. to download ffmpeg click on this--> https://ffmpeg.org/download.html

Usage:

  1. conversion- To convert a video file to audio, use the converter function provided:
    const conv = require('mediaconv');

    // Example usage:
    conv.convert('input.mp4', 'output.mp3');
    conv.convert('input.mp4','out.wav');
  1. playback- To play audio or video file use 'play function'.
    const conv = require('mediaconv');

    // Example usage:
    conv.play('output.mp3');
    //inside play function give filename with extension.
  1. click- To click the picture use 'click function'.
    const conv = require('mediaconv');
    //conv.click(width,height,time_delay,"image_name")

    conv.click(1000,500,4,"output.jpg");

    //here 1000 refers to the width (x-axis) of the image to be click.

    //here 500 refers to the height (y-axis) of the image.


    //4 referes the time delay it means if u call click function image will taken after 4 seconds. for instant click use 0 at the play of 4.

    //"output.jpg" image name.
  1. video- To record video use 'video function'.
     const conv = require('mediaconv');

     //conv.video(delay,"duration of video","filename");
     conv.video(5,"00:00:4","example.mp4");
     // video recording will started after 5 seconds after calling video function.
     //"00:00:4" 4 seconds of video will be recorded.
     //"example.mp4" video file name.

Acknowledgments:

  • This project utilizes the ffmpeg library for audio conversion and playback.
  • Special thanks to contributors and the open-source community.

Package Sidebar

Install

npm i mediaconv

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

5.88 kB

Total Files

8

Last publish

Collaborators

  • suraj_chandra