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.
Command line tools ffmpeg is a command-line tool that converts audio or video formats.
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.:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With