FFmpeg Unsupported Frame Rate Screen Recording on macOS
In this article, we will discuss how to record your screen using FFmpeg on macOS, focusing on the issue of unsupported frame rates. We will cover the key concepts related to this topic, including how to check available devices and how to set the frame rate correctly.
Checking Available Devices
To start, you can check the available devices on your system using the following command:
ffmpeg -f avfoundation -list_devices true -iThis command will list all the available devices on your system, including audio and video devices. The output will look something like this:
[AVFoundation indev @ 0x12ff058a0] AVFoundation video devices:
[AVFoundation indev @ 0x12ff058a0] [0] FaceTime HD Camera
[AVFoundation indev @ 0x12ff058a0] [1] Capture screen 0In this example, there are two video devices available: the FaceTime HD Camera and the screen capture device. The screen capture device is what we are interested in for screen recording.
Setting the Frame Rate
When recording the screen, you may encounter an issue with an unsupported frame rate. This can happen if you try to set a frame rate that is not supported by your system or by FFmpeg. To avoid this issue, you should check the frame rates that are supported by your system and by FFmpeg.
On macOS, the default frame rate for screen recording is 30 fps. However, you can set a different frame rate if you prefer. To do this, you can use the -r option followed by the desired frame rate. For example, the following command will record the screen at 60 fps:
ffmpeg -f avfoundation -i 1 out.mp4 -r 60In this example, the -i 1 option specifies the screen capture device as the input, and the -r 60 option sets the frame rate to 60 fps. The output will be saved to a file called out.mp4.
It is important to note that not all frame rates are supported by FFmpeg. The following frame rates are known to be supported:
- 23.976 fps
- 24 fps
- 25 fps
- 29.97 fps
- 30 fps
- 50 fps
- 59.94 fps
- 60 fps
If you try to set a frame rate that is not supported, you may encounter the unsupported frame rate issue. In this case, you should try setting a different frame rate that is supported.
In this article, we have discussed how to record your screen using FFmpeg on macOS, focusing on the issue of unsupported frame rates. We have covered the key concepts related to this topic, including how to check available devices and how to set the frame rate correctly. By following the steps outlined in this article, you should be able to record your screen using FFmpeg on macOS without encountering the unsupported frame rate issue.
References
- FFmpeg Documentation
- Capture Video Frames (Apple Developer Documentation)