I have two Macs in my network. On the first one I want to capture the FaceTime camera via ffmpeg and make a RTSP feed available on the network, which I can watch on the second Mac.
RTSP feed with ffmpeg and the Mac camera
cameraterminalwebcamwebserver
Related Question
- Does iPod Touch 5th gen 16GB (mid 2013) still have built-in Camera app for use with front-facing camera
- Thunderbolt Display Camera No Longer Recognized by the Macbook Pro
- MacOS – Diagnosing 2011 Macbook Air Webcam
- IPhone: Show clean Camera feed without any on-screen controls
- MacOS – FFMpeg access AVFoundation usb subdevice camera on OSX Mojave
- External iSight camera with M1 Mac
Best Answer
I successfully implemented something close to this (not true RTSP, but instead RTP streaming over UDP) with the following hardware and software:
ffplay4
)List the audio and video input devices with
ffmpeg -f avfoundation -list_devices true -i ""
On the 2012 MBP, the first video device (index
0
) isFaceTime HD Camera (Built-in)
and the first audio device (index0
) isBuilt-in Microphone
.The video capture/sending and the video receipt/playback can be done on the same machine, or
ffmpeg
can send to a remote IP. In this example, it is sending an MPEG transport stream over UDP to the loopback address127.0.0.1:9988
but that could just as easily be the IP address and port of another Mac:To receive and play the video:
It may take a few seconds to start up and there will be a few errors at first, but the video should begin playing in
ffplay4
within a couple seconds.Bonus: this stream is also viewable with VLC (version 3.0.12).
File
->Open Network
->URL
rtp://@127.0.0.1:9988
. Again, it will take a few seconds (5-10) to begin displaying the video.Happy streaming.