-
-
Notifications
You must be signed in to change notification settings - Fork 626
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
Twitch stream stutters on key frames when using H264 main profile with Safari. #1676
Comments
Thank u feedback. I thought it was caused by the 2.0.0 series, but the same issue occurred in the 1.9.x series as well. Since it's the main profile, I believe it's related to the handling of compositionTimeStamp, so I'll take a look. MAIN PROFILE2.0.x
1.9.x
BASE PROFILE1.9.x
|
Great, thanks. We're currently working on implementing live streaming in the Detail iOS app and so far everything else is working great, we're testing YouTube/Instagram/LinkedIn streaming on a variety of devices. Just having some trouble with Twitch. Let us know if we can help test on any devices/platforms! |
Hello, and thank you for your long-term support. As expected, it seemed to be an issue related to the calculation of compositionTimeStamp. |
I believe it was fixed in 52c707b. Please try. |
Observed behavior
When using the recommended Twitch settings of:
The stream stutters every 2 seconds, presumably when a key frame is sent. I'm not 100% sure, but I believe this is because the video encoder takes longer to encode the key frames, and P frames are sent before the key frame is sent. They have correct timestamps, but it seems like Twitch doesn't like how far apart they are, and drops frames. Streaming with the exact same settings to YouTube works fine.
Expected behavior
The video should be smooth and not drop any frames.
To Reproduce
This can be reproduced in the iOS example project by adding:
in the
HKStreamSwitcher
and commenting out the slider code where the bitrate is set. Then streaming to Twitch drops frames.Version
2.0.3
Smartphone info.
iPhone 16 Pro
iOS 18.3
Additional context
The text was updated successfully, but these errors were encountered: