Fix bitrate value used for video transcoding (#5183)
* Fix bitrate value used for video transcoding: It should be 1000 times what it is now. The video size estimation was wrong since the retrieved duration value was in milliseconds, not seconds. * Use `Duration` as the result type for `getDuration`
This commit is contained in:
committed by
GitHub
parent
aac9642159
commit
5feb7a99a9
@@ -38,7 +38,7 @@ class VideoCompressorHelper(
|
||||
val pixelsPerFrame = outputSize.width * outputSize.height
|
||||
// Apparently, 0.1 bits per pixel is a sweet spot for video compression
|
||||
val bitsPerPixel = 0.1f
|
||||
return (pixelsPerFrame * bitsPerPixel * frameRate).toLong() / 1000
|
||||
return (pixelsPerFrame * bitsPerPixel * frameRate).toLong()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user