whoops need to do it again, I don't know if that worked

This commit is contained in:
Saxon1 2017-11-24 11:04:19 +10:30
parent d3d01090ed
commit 76cba026a1
1 changed files with 1 additions and 2 deletions

View File

@ -260,8 +260,7 @@ func readWriteVideo(input string, output string) error {
deltaTime := now.Sub(prevTime) // Convert nanosecs to secs deltaTime := now.Sub(prevTime) // Convert nanosecs to secs
elapsedTime += deltaTime elapsedTime += deltaTime
if elapsedTime > bitrateOutputDelay*time.Nanosecond { if elapsedTime > bitrateOutputDelay*time.Nanosecond {
noOfBits := float64(clipSize * bitsInByte) noOfBits := float64(clipSize * bitsInByte) / 1024.0 // to kbits
noOfBits = noOfBits / 1024.0 //to kbps
fmt.Printf("Bitrate: %d kbps\n", int64(noOfBits/float64(deltaTime/1e9))) fmt.Printf("Bitrate: %d kbps\n", int64(noOfBits/float64(deltaTime/1e9)))
elapsedTime = time.Duration(0) elapsedTime = time.Duration(0)
} }