* Google Live Encoder: https://support.google.com/youtube/answer/2853702?hl=en
* YouTube Video Info (tested with random music video): https://www.h3xed.com/blogmedia/youtube-info.php
*/
-export function getBaseBitrate (resolution: VideoResolution) {
+function getBaseBitrate (resolution: VideoResolution) {
switch (resolution) {
case VideoResolution.H_240P:
// quality according to Google Live Encoder: 300 - 700 Kbps
* getBaseBitrate() * 1.4. All other values are calculated linearly
* between these two points.
*/
-export function getTargetBitrate (resolution: VideoResolution, fps: number,
- fpsTranscodingConstants: VideoTranscodingFPS) {
+export function getTargetBitrate (resolution: VideoResolution, fps: number, fpsTranscodingConstants: VideoTranscodingFPS) {
const baseBitrate = getBaseBitrate(resolution)
// The maximum bitrate, used when fps === VideoTranscodingFPS.MAX
// Based on numbers from Youtube, 60 fps bitrate divided by 30 fps bitrate:
/**
* The maximum bitrate we expect to see on a transcoded video in bytes per second.
*/
-export function getMaxBitrate (resolution: VideoResolution, fps: number,
- fpsTranscodingConstants: VideoTranscodingFPS) {
+export function getMaxBitrate (resolution: VideoResolution, fps: number, fpsTranscodingConstants: VideoTranscodingFPS) {
return getTargetBitrate(resolution, fps, fpsTranscodingConstants) * 2
}