我用C# winform做了个摄像头录像程序,但是录制下来的视频一分钟就很大,我想用视频压缩方法。 15
最好是压缩率高一些,请问哪位做过视频压缩的?源代码发到778656764,请各位高手帮忙。晚上回来给分...
最好是压缩率高一些,请问哪位做过视频压缩的?源代码发到778656764,请各位高手帮忙。晚上回来给分
展开
3个回答
展开全部
C#的我没有,我改过ultravnc的源码。。。哪个是一个视频监控的开源项目,但是里面涉及到视频压缩和解压,使用的是C++开发的,你可以参考下,解压和压缩的核心就是使用zlib库,这个库也是开源的,你也可以在C#中使用,抱歉没用过C#开发这个,只能帮到这啦~~~~楼下的给力点
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
深圳量子动力
2024-10-28 广告
2024-10-28 广告
在量子动力(深圳)计算机科技有限公司,我们致力于将前沿技术融入安防与智能识别领域。摄像头人脸捕捉技术,依托深度学习算法与高效图像处理能力,能够在复杂环境中迅速锁定并精准捕捉人脸信息。这一技术不仅提升了监控系统的智能化水平,还在公共安全、门禁...
点击进入详情页
本回答由深圳量子动力提供
展开全部
''' <summary>
''' 压缩字节数据
''' </summary>
''' <param name="data"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function CompressBytes(ByVal data As Byte()) As Byte()
Dim ms As MemoryStream = New MemoryStream()
Dim gzip As System.IO.Compression.GZipStream = New Compression.GZipStream(ms, Compression.CompressionMode.Compress, True)
gzip.Write(data, 0, data.Length)
gzip.Close()
Return ms.ToArray()
End Function
''' <summary>
''' 解压字节数据
''' </summary>
''' <param name="data"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function DecompressBytes(ByVal data As Byte()) As Byte()
Dim ms As MemoryStream = New MemoryStream()
ms.Write(data, 0, data.Length)
ms.Position = 0
Dim gzip As System.IO.Compression.GZipStream = New System.IO.Compression.GZipStream(ms, Compression.CompressionMode.Decompress, True)
Dim output As MemoryStream = New MemoryStream()
Dim buff(4096) As Byte
Dim read As Integer = -1
read = gzip.Read(buff, 0, buff.Length)
While (read > 0)
output.Write(buff, 0, read)
read = gzip.Read(buff, 0, buff.Length)
End While
gzip.Close()
Return output.ToArray()
End Function
End Class
''' 压缩字节数据
''' </summary>
''' <param name="data"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function CompressBytes(ByVal data As Byte()) As Byte()
Dim ms As MemoryStream = New MemoryStream()
Dim gzip As System.IO.Compression.GZipStream = New Compression.GZipStream(ms, Compression.CompressionMode.Compress, True)
gzip.Write(data, 0, data.Length)
gzip.Close()
Return ms.ToArray()
End Function
''' <summary>
''' 解压字节数据
''' </summary>
''' <param name="data"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function DecompressBytes(ByVal data As Byte()) As Byte()
Dim ms As MemoryStream = New MemoryStream()
ms.Write(data, 0, data.Length)
ms.Position = 0
Dim gzip As System.IO.Compression.GZipStream = New System.IO.Compression.GZipStream(ms, Compression.CompressionMode.Decompress, True)
Dim output As MemoryStream = New MemoryStream()
Dim buff(4096) As Byte
Dim read As Integer = -1
read = gzip.Read(buff, 0, buff.Length)
While (read > 0)
output.Write(buff, 0, read)
read = gzip.Read(buff, 0, buff.Length)
End While
gzip.Close()
Return output.ToArray()
End Function
End Class
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我也想知道
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询