I have to upload a video from front-end web to my Django back-end.
I need to compress the video before to upload it.
So, I need some libraries (for example javascript libraries) to use on client-side (browser) to compress the video and call my ajax function to upload it.
Is possible this?
Can we suggest me something like javascript libraries to make this?
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/
No. No browser offers a video encoding API, for JavaScript to tap into. Perhaps one day there will be an official MediaEncoding API - wouldn't that be something?!
来源:https://stackoverflow.com/questions/31316791/compress-a-video-on-client-side-web