Hunter的大杂烩

November 3, 2019

ffmpeg视频压缩文件大小计算方法

Filed under: 技术话题 — hunter @ 11:46 pm

文件大小计算:

文件的大小是是音视频流大小的和。
视频流的大小的方程式是(除以8是由bits到bytes的转换):
video_size = video_bitrate * time_in_seconds / 8;
如果音频是解压缩的,计算公式是:
audio_size = smpaling_rate * bit_depth * channels * time_in_second / 8;

例如:计算10分钟的视频, 1500kbits/s 视频比特率和 128kbits/s的音频比特率,用下面的计算方法:
file_size = video_size + audio_size;
file_size = (video_bitrate + audio_bitrate) * time_in_seconds / 8;
file_size = (1500 kbits/s + 128kbits/s) * 600s
file_size = 1628kbits/s * 600s
file_size = 976800kb = 976800000 b / 8 = 122100000 B / 1024 = 119238.28125KB
file_size = 119238.28125 KB / 1024 = 116.443634033203125MB = 116.44M

参考链接:

https://blog.csdn.net/rootusers/article/details/41646557

更多参考:https://blog.csdn.net/qq_41498261/article/details/84193592

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress