Compress a video on client side web [closed]

荒凉一梦 提交于 2019-12-29 01:36:13

问题


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?


回答1:


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/




回答2:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!