I found this project. It is a conversion of FFMPEG decoder in javascript language. So you can use it to work images, video and audio files without upload file to server.
Homepage: https://bgrins.github.io/videoconverter.js/
GitHub: https://github.com/bgrins/videoconverter.js
I have not tried yet, but the demo page says that it works: https://bgrins.github.io/videoconverter.js/demo/