-
Notifications
You must be signed in to change notification settings - Fork 119
Changing the video codec from VP8 to H.264 #3345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: livekit
Are you sure you want to change the base?
Changes from all commits
2f93d0c
80ebfca
8b3af00
717bd1c
9a38c23
e74f168
790cd82
51b6d26
9a83eb9
045b8b1
c2b7558
4fa26a0
f2e6e86
dab1383
ec99fc5
6d78338
dc26658
0a18451
64f5d46
af7ef0e
2162383
d1aabde
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,20 @@ import { | |
type RoomOptions, | ||
ScreenSharePresets, | ||
type TrackPublishDefaults, | ||
type VideoPreset, | ||
VideoPreset, | ||
VideoPresets, | ||
} from "livekit-client"; | ||
|
||
const VideoPresetsH264 = { | ||
h144: new VideoPreset(256, 144, 155_000, 20), | ||
h240: new VideoPreset(480, 234, 160_000, 20), | ||
h176: new VideoPreset(320, 176, 160_000, 20), | ||
h288: new VideoPreset(382, 288, 180_000, 20), | ||
// h360: VideoPresets.h360, | ||
h360: new VideoPreset(640, 360, 450_000, 20), | ||
h540: new VideoPreset(960, 540, 800_000, 20), | ||
} as const; | ||
|
||
const defaultLiveKitPublishOptions: TrackPublishDefaults = { | ||
audioPreset: AudioPresets.music, | ||
dtx: true, | ||
|
@@ -23,10 +33,13 @@ const defaultLiveKitPublishOptions: TrackPublishDefaults = { | |
red: false, | ||
forceStereo: false, | ||
simulcast: true, | ||
videoSimulcastLayers: [VideoPresets.h180, VideoPresets.h360] as VideoPreset[], | ||
videoSimulcastLayers: [ | ||
VideoPresetsH264.h144, | ||
VideoPresets.h360, | ||
Comment on lines
+37
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why the mixture of |
||
] as VideoPreset[], | ||
screenShareEncoding: ScreenSharePresets.h1080fps30.encoding, | ||
stopMicTrackOnMute: false, | ||
videoCodec: "vp8", | ||
videoCodec: "h264", | ||
videoEncoding: VideoPresets.h720.encoding, | ||
backupCodec: { codec: "vp8", encoding: VideoPresets.h720.encoding }, | ||
} as const; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ window.setLKLogLevel = setLKLogLevel; | |
initRageshake().catch((e) => { | ||
logger.error("Failed to initialize rageshake", e); | ||
}); | ||
setLKLogLevel("info"); | ||
setLKLogLevel("debug"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this on purpose? or a left over of a dev setup? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is part of debugging why h264 with simulcast is not working on iOS devices. |
||
setLKLogExtension((level, msg, context) => { | ||
// we pass a synthetic logger name of "livekit" to the rageshake to make it easier to read | ||
global.mx_rage_logger.log(level, "livekit", msg, context); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what makes this specific H264 presets? Aren't those just regular presets that could also be used with other encordings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this PR is in draft -- this is part of debugging why h264 with simulcast is not working on iOS devices.
using h264 specific presets help finding out if the h264 macro-block constraint is the problem here.