FFMPEG commands in JavaScript

16,728

If you want to do the work in the browser, i.e. on the users machine rather than your server, there are a number of projects which provide an ffmpeg wrapper in Javascript. This one is the most popular at the moment, I believe:

You would need to do some testing - video processing is very compute intensive and may not work well for you in the browser.

If you want to do it server side, in a Javascript based server like node for example, then again there are libraries available - e.g.:

Share:
16,728
Vladyslav Semeniuk
Author by

Vladyslav Semeniuk

Updated on June 15, 2022

Comments

  • Vladyslav Semeniuk
    Vladyslav Semeniuk about 2 years

    Is it possible to use command like: ffmpeg -i video_1920.mp4 -vf scale=640:360 video_640.mp4 -hide_banner to reduce the resolution of a video in the pure JavaScript. For example I got a dropdown menu in which I have < a > tag, so I want to do a video quality selection by clicking on that menu hyperlink with JS. How to implement that properly, please help.