QuickRecorder icon indicating copy to clipboard operation
QuickRecorder copied to clipboard

Implementing RTMP live streaming support (YouTube, Twitch, ...)

Open kyr0 opened this issue 6 months ago • 5 comments

Apparently, QuickRecorder is the only screen recording software for macOS that uses the most recent APIs correctly and does a decent job with the system performance.

https://github.com/HaishinKit/HaishinKit.swift on the other hand is the only software that does RTMP/SRT streaming correctly using Metal rendering and a great video/audio muxing/mixing/scene rendering.

I'm working on adding RTMP livestreaming to QuickRecorder using HaishinKit. It will allow content creators to just use QuickRecorder instead of any other fancy, expensive but slow solution.

Currently I'm facing some technical challenges with implementing this, but I'm trying to get this done this week. I just wanted to ask for feedback and input, comments and collaborators on the upcoming PR.

  • I'm adding a new entry to the preferences window called "Broadcast". Could anyone create a nice Icon for this please?
  • I'm starting with single endpoint streaming for RTMP with a stream URL and stream key. I primarily focus on YouTube for the moment (this is my use-case). Do you believe multi-streaming is immediately needed or can we post-pone it?
  • Do you think we need a control window to watch the muxed video stream (control screen which would be auto-hidden from capturing of course) while it is streamed to the RTMP endpoint (aka. "to YouTube/Twitch/...")?

What else would you need for live streaming? Any suggestions?

WIP: https://github.com/lihaoyun6/QuickRecorder/compare/main...kyr0:QuickRecorder:main#diff-67786b6d0ec9050f31ab5646aaead5c75219f99f12fee00d2d81b8588f620839

kyr0 avatar Jul 02 '25 11:07 kyr0

I managed to implement the core functionality. Will cleanup my code and push a PR soon.

kyr0 avatar Jul 03 '25 16:07 kyr0

Status: YouTube accepts the stream; mic audio and video is transported; currently H264 only; working on H265 and system audio transport

kyr0 avatar Jul 03 '25 22:07 kyr0

Status: HVEC and flexible bitrate calculation implemented.

Image Image Image

RTMP Live Streaming to YouTube with HVEC @ 1440p with hardware encoding. Macbook M3 2024, 16 GB -> ~60MB memory footprint with video recording (file recording) disabled; 15% single core usage footprint.

kyr0 avatar Jul 03 '25 22:07 kyr0

By now, this is the most performant and flexible implementation for YouTube screencast live streaming I could think of. OBS and everything else I know would render the machine unusable; I'll finish this and PR soon.

kyr0 avatar Jul 03 '25 22:07 kyr0

Image

It's becoming more stable recently.

kyr0 avatar Jul 05 '25 00:07 kyr0