-
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?
Conversation
src/livekit/options.ts
Outdated
videoSimulcastLayers: [ | ||
VideoPresets.h180, | ||
VideoPresets.h360, | ||
VideoPresets.h540, | ||
] as VideoPreset[], |
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.
I might be misunderstanding the livekit docs. But can we actually hand it three presets here? Livekit docs stated up to 2 custom layers. Or are those standard preset no custom layers?
videoSimulcastLayers: [VideoPreset]
custom video simulcast layers for camera tracks, defaults to h180, h360, h540.
You can specify**up to two custom layers** that will be used instead of the LiveKit default layers.
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.
nope its limited to three in total including the base layer.
3c08780
to
717bd1c
Compare
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.
Just a small comment regarding the loglevel
@@ -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 comment
The 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 comment
The 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.
VideoPresets, | ||
} from "livekit-client"; | ||
|
||
const VideoPresetsH264 = { |
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.
VideoPresetsH264.h144, | ||
VideoPresets.h360, |
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.
why the mixture of VideoPresetsH264
and VideoPresets
?
Recent research has confirmed that the number of devices lacking H.264 decoding capabilities is negligible.
In contrast, many modern devices come equipped with native H.264 encoders and decoders. By switching to the H.264 codec, we can significantly reduce CPU usage. Especially mobile devices will benefit, where it can lead to better battery life.
Furthermore, we add a 540p simulcast video layer.
fixes #3166 #2579 #2373