Output in kbps

This commit is contained in:
richardsonjack 2017-11-24 10:08:29 +10:30
parent 2c6d1442af
commit 7ff09c4b82
1 changed files with 2 additions and 1 deletions

View File

@ -261,7 +261,8 @@ func readWriteVideo(input string, output string) error {
bitRateOutCount += deltaTime bitRateOutCount += deltaTime
if bitRateOutCount > bitrateOutputDelay { if bitRateOutCount > bitrateOutputDelay {
noOfBits := clipSize * bitsInByte noOfBits := clipSize * bitsInByte
fmt.Printf("Bitrate: %d bps\n", int64(float64(noOfBits)/deltaTime)) noOfBits = noOfBits/(1024*1) //to kbps
fmt.Printf("Bitrate: %d kbps\n", int64(float64(noOfBits)/deltaTime))
bitRateOutCount = 0.0 bitRateOutCount = 0.0
} }
clipSize = 0 clipSize = 0