如何在C#中减少视频的文件大小。 [英] How to reduce file size of video in C#.

查看:137
本文介绍了如何在C#中减少视频的文件大小。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在服务器上上传视频时,如果在服务器上上传视频,减少文件大小。请建议正确的算法。



我尝试过:



如何减少C#中视频的文件大小。

how to reduce file size of Video in C#.when upload a video on server than this file store on server with reduce file size. Please Suggest proper Algorithm.

What I have tried:

how to reduce file size of Video in C#.

推荐答案

差不多,你不能 - 不能丢弃信息。

视频数据通常已经压缩了,所以使用非损耗压缩(如ZIP或RAR)可以获得很少的收益(甚至可以使生成的文件更大!)

您可以通过转码使视频更小它 - 例如MKV视频通常小于AVI - 但转码是处理器和内存饥渴的操作,需要大量时间,并且需要大量工作来实现自己。您可以从应用程序中查看使用类似FFMPEG的内容 - Google会帮助您。

唯一的其他选择是减小帧大小或频率 - 这两者都会对视频质量产生不利影响。 FFMPEG可能也是你想要的。
Pretty much, you can't - not without throwing away information.
Video data is generally compressed already, so using non-lossy compression such as ZIP or RAR gains you very little (and can even make the resulting file bigger!)
You may be able to get the video smaller by transcoding it - MKV video is generally smaller than AVI for example - but transcoding is a processor and memory hungry operation which takes significant time, and requires a lot of work to implement yourself. You could look at using something like FFMPEG from your app - Google will help you there.
The only other option is to reduce the frame size or frequency - both of which will be detrimental to video quality. Again FFMPEG is probably what you want.


这篇关于如何在C#中减少视频的文件大小。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆