FFMPEG commands in JavaScript
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.:
![Vladyslav Semeniuk](https://lh4.googleusercontent.com/-NXvpMdUUtIQ/AAAAAAAAAAI/AAAAAAAAACM/SMzdmLb1DJ4/photo.jpg?sz=256)
Vladyslav Semeniuk
Updated on June 15, 2022Comments
-
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.