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:
parent
90ad9616c0
commit
85b0f11ab6
5 changed files with 15 additions and 8 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue