1- import { AudioCodec , VideoCodec } from "bolt/types " ;
1+ import type { AudioCodec , VideoCodec } from "bolt" ;
22
33const DEFAULT_AUDIO_BITRATE : Record < number , Record < AudioCodec , number > > = {
44 2 : {
5- [ AudioCodec . aac ] : 128000 ,
6- [ AudioCodec . ac3 ] : 192000 ,
7- [ AudioCodec . eac3 ] : 96000 ,
5+ aac : 128000 ,
6+ ac3 : 192000 ,
7+ eac3 : 96000 ,
88 } ,
99 6 : {
10- [ AudioCodec . aac ] : 256000 ,
11- [ AudioCodec . ac3 ] : 384000 ,
12- [ AudioCodec . eac3 ] : 192000 ,
10+ aac : 256000 ,
11+ ac3 : 384000 ,
12+ eac3 : 192000 ,
1313 } ,
1414} ;
1515
@@ -19,44 +19,44 @@ export function getDefaultAudioBitrate(channels: number, codec: AudioCodec) {
1919
2020const DEFAULT_VIDEO_BITRATE : Record < number , Record < VideoCodec , number > > = {
2121 144 : {
22- [ VideoCodec . h264 ] : 108000 ,
23- [ VideoCodec . hevc ] : 96000 ,
24- [ VideoCodec . vp9 ] : 96000 ,
22+ h264 : 108000 ,
23+ hevc : 96000 ,
24+ vp9 : 96000 ,
2525 } ,
2626 240 : {
27- [ VideoCodec . h264 ] : 242000 ,
28- [ VideoCodec . hevc ] : 151000 ,
29- [ VideoCodec . vp9 ] : 151000 ,
27+ h264 : 242000 ,
28+ hevc : 151000 ,
29+ vp9 : 151000 ,
3030 } ,
3131 360 : {
32- [ VideoCodec . h264 ] : 400000 ,
33- [ VideoCodec . hevc ] : 277000 ,
34- [ VideoCodec . vp9 ] : 277000 ,
32+ h264 : 400000 ,
33+ hevc : 277000 ,
34+ vp9 : 277000 ,
3535 } ,
3636 480 : {
37- [ VideoCodec . h264 ] : 1000000 ,
38- [ VideoCodec . hevc ] : 512000 ,
39- [ VideoCodec . vp9 ] : 512000 ,
37+ h264 : 1000000 ,
38+ hevc : 512000 ,
39+ vp9 : 512000 ,
4040 } ,
4141 720 : {
42- [ VideoCodec . h264 ] : 2000000 ,
43- [ VideoCodec . hevc ] : 1000000 ,
44- [ VideoCodec . vp9 ] : 1000000 ,
42+ h264 : 2000000 ,
43+ hevc : 1000000 ,
44+ vp9 : 1000000 ,
4545 } ,
4646 1080 : {
47- [ VideoCodec . h264 ] : 4000000 ,
48- [ VideoCodec . hevc ] : 2000000 ,
49- [ VideoCodec . vp9 ] : 2000000 ,
47+ h264 : 4000000 ,
48+ hevc : 2000000 ,
49+ vp9 : 2000000 ,
5050 } ,
5151 1440 : {
52- [ VideoCodec . h264 ] : 9000000 ,
53- [ VideoCodec . hevc ] : 6000000 ,
54- [ VideoCodec . vp9 ] : 6000000 ,
52+ h264 : 9000000 ,
53+ hevc : 6000000 ,
54+ vp9 : 6000000 ,
5555 } ,
5656 2160 : {
57- [ VideoCodec . h264 ] : 17000000 ,
58- [ VideoCodec . hevc ] : 12000000 ,
59- [ VideoCodec . vp9 ] : 12000000 ,
57+ h264 : 17000000 ,
58+ hevc : 12000000 ,
59+ vp9 : 12000000 ,
6060 } ,
6161} ;
6262
0 commit comments