Skip to content
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

Stutter on AWS IVS(real-time) RTMP Publishing #867

Open
jeekpark opened this issue Feb 1, 2025 · 1 comment
Open

Stutter on AWS IVS(real-time) RTMP Publishing #867

jeekpark opened this issue Feb 1, 2025 · 1 comment
Labels

Comments

@jeekpark
Copy link

jeekpark commented Feb 1, 2025

Hello, Sir.

I'm encountering an intermittent stutter (brief buffering or playback freeze) when publishing RTMP streams to AWS IVS. The same stream configuration works fine with AWS MediaLive, but AWS IVS(real-time) consistently exhibits this stutter. Below are my current encoder settings and environment details:

Environment & Settings: (Tried things...)

  • Platform: Android
  • Encoder Library: SrsEncoder (latest commit)
  • Video Settings:
    • Codec: H.264
    • Profile: Baseline
      (We set the "profile" to MediaCodecInfo.CodecProfileLevel.AVCProfileBaseline to disable B-frames)
        videoFormat.setInteger("profile", MediaCodecInfo.CodecProfileLevel.AVCProfileBaseline);
        videoFormat.setInteger("level", MediaCodecInfo.CodecProfileLevel.AVCLevel3); 
  • Keyframe Interval (IDR Interval):
    VGOP = 48 and VFPS = 24 (i.e., a 2-second interval; we have also tested with a 1-second interval)
  • x264 Preset: "veryfast,zerolatency,b-frames=0, sliced-threads=0"
    public void setVideoHDMode() {
        vBitrate = 1200 * 1024;  // 1200 kbps
        x264Preset = "veryfast,zerolatency,bframes=0,sliced-threads=0";
    }
  • Resoultion: 1280 * 720
  • Bitrate: 1200 kbps

Current Situation:

  • The methods onGetPcmFrame and onGetRgbaFrame in SrsEncoder log normal frame cache values and steadily increasing presentation timestamps (PTS), with no apparent issues in encoding or buffer processing.
  • When publishing via AWS MediaLive, the stream plays without stutter. However, when publishing to AWS IVS, the viewer experiences a brief stutter every second.
  • The AWS IVS RTMP Publishing documentation recommends a keyframe interval of 1–2 seconds, disabling B-frames, and using a lower maximum bitrate (e.g., below 6 Mbps) to prevent stream disconnects. We have applied these recommended settings.

Please

  • Are there any additional encoding settings or stream configuration adjustments we should consider to mitigate the 1-second stutter on AWS IVS?

We have implemented all the recommended settings (keyframe interval of 1–2 seconds, B-frame disablement via Baseline profile, and a conservative maximum bitrate) as outlined in the documentation, yet the issue persists.

Thank you for your assistance.


Reference

https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html

@begeekmyfriend
Copy link
Owner

Sorry for my late responding. Maybe this comment could help you with your question. It seems that you need to set some parameters on AWS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants