React JS文件/视频压缩机
是否有任何可用于文件或视频压缩机在React JS或JavaScript中的库? 如果不可用,请在上传前提出一种调整文件大小或视频大小的替代方法。
Is there any library available for File or Video compressor in react JS or javascript?
If unavailable, suggest an alternative way to resize file size or video size before upload.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您应该尝试一下: https://github.com/ffrmpeg.com/ffmpegwasm/ffmpeg.fffmpeg.wasm
I think You should try this one: https://github.com/ffmpegwasm/ffmpeg.wasm
我不确定是否有任何Java-script库可以压缩视频客户端(但是有一个用于图像压缩: https://medium.com/front-end-weekly/image-compression/image-compression-in-reactjs-a07ec0066b24
)例如,使用nodejs运行shell命令来压缩上传的视频)。但是,这将需要完全访问托管服务器,因为您需要在其中安装FFMPEG。
您还可以使用此类内容,例如 https://mediamachine.io/
google google“视频transcoding pipelines”以上
I am not sure if there is any java-script library to compress videos client side (however there is one for image compression: https://medium.com/front-end-weekly/image-compression-in-reactjs-a07ec0066b24)
You can try ffmpeg to compress videos server side (for example by using NodeJS to run the shell commands to compress the uploaded video). However this would require full access to the hosting server because you need to install ffmpeg in it.
You can also use something like this https://mediamachine.io/
Google "video transcoding pipelines" for more information regarding the above