The ScreenCapture project captures the main display, encodes the video into H.264, and transmits the encoded stream over a network socket using CocoaAsyncSocket.
- Captures the main display using
CGDisplayStream
. - Compresses video using H.264 via VideoToolbox.
- Sends the encoded video stream through a socket.
- macOS with Xcode installed.
- CocoaPods installed (
sudo gem install cocoapods
).
- Navigate to the
ScreenCapture
project directory. - Run the following command to install dependencies:
pod install
- Open the
.xcworkspace
file in Xcode. - Build and run the project.
If you encounter build issues:
- Remove the Pods directory and lock file:
rm -rf Pods/ Podfile.lock
- Reinstall CocoaPods:
pod install
- Launch the ScreenCapture app.
- The app starts capturing the main display and encoding the content in real-time.
- The encoded H.264 stream is sent over the network to the configured IP address and port using CocoaAsyncSocket.
- Captures the main display via
CGDisplayStream
. - Compresses frames to H.264 using VideoToolbox.
- Streams the encoded video over a network socket.