FFmpeg 预设
默认情况下,FFmpeg 会提供一些参数预设,以方便配置。所有预置可在 ffmpeg_presets.py 中查看。
Hwaccel 预设
强烈建议在配置中使用 hwaccel 预设值。这些预设不仅能取代较长的参数,还能为 Frigate 提供可用硬件的提示,并允许 Frigate 使用 GPU 进行其他优化,例如在编码鸟瞰 restream 或缩放大小不同于原始流大小的流时。
见 hwaccel 文档以获取更多有关如何为 GPU / iGPU 设置 hwaccel 的信息。
Preset | Usage | Other Notes |
---|---|---|
preset-rpi-64-h264 | 64 bit Rpi with h264 stream | |
preset-rpi-64-h265 | 64 bit Rpi with h265 stream | |
preset-vaapi | Intel & AMD VAAPI | Check hwaccel docs to ensure correct driver is chosen |
preset-intel-qsv-h264 | Intel QSV with h264 stream | If issues occur recommend using vaapi preset instead |
preset-intel-qsv-h265 | Intel QSV with h265 stream | If issues occur recommend using vaapi preset instead |
preset-nvidia-h264 | Nvidia GPU with h264 stream | |
preset-nvidia-h265 | Nvidia GPU with h265 stream | |
preset-nvidia-mjpeg | Nvidia GPU with mjpeg stream | Recommend restreaming mjpeg and using nvidia-h264 |
preset-jetson-h264 | Nvidia Jetson with h264 stream | |
preset-jetson-h265 | Nvidia Jetson with h265 stream | |
preset-rk-h264 | Rockchip MPP with h264 stream | Use image with *-rk suffix and privileged mode |
preset-rk-h265 | Rockchip MPP with h265 stream | Use image with *-rk suffix and privileged mode |
输入参数预设
输入参数预设有助于提高配置的可读性,并处理不同类型数据流的用例,以确保最大的兼容性。
有关非标准摄像机的更多信息以及在 Frigate 中使用它们的建议,请参阅摄像机专用配置。
Preset | Usage | Other Notes |
---|---|---|
preset-http-jpeg-generic | HTTP Live Jpeg | Recommend restreaming live jpeg instead |
preset-http-mjpeg-generic | HTTP Mjpeg Stream | Recommend restreaming mjpeg stream instead |
preset-http-reolink | Reolink HTTP-FLV Stream | Only for reolink http, not when restreaming as rtsp |
preset-rtmp-generic | RTMP Stream | |
preset-rtsp-generic | RTSP Stream | This is the default when nothing is specified |
preset-rtsp-restream | RTSP Stream from restream | Use for rtsp restream as source for Frigate |
preset-rtsp-restream-low-latency | RTSP Stream from restream | Use for rtsp restream as source for Frigate to lower latency, may cause issues with some cameras |
preset-rtsp-udp | RTSP Stream via UDP | Use when camera is UDP only |
preset-rtsp-blue-iris | Blue Iris RTSP Stream | Use when consuming a stream from Blue Iris |
警告
使用 restream 时必须注意输入参数,因为可以混合使用多种协议。http
和 rtmp
预置不能与 rtsp
流一起使用。例如,当使用 rtsp restream 作为录像源的 reolink cam 时,preset-http-reolink 会导致崩溃。在这种情况下,需要在流级别设置预置。请参阅下面的示例。
go2rtc:
streams:
reolink_cam: http://192.168.0.139/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=password
cameras:
reolink_cam:
ffmpeg:
inputs:
- path: http://192.168.0.139/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=password
input_args: preset-http-reolink
roles:
- detect
- path: rtsp://127.0.0.1:8554/reolink_cam
input_args: preset-rtsp-generic
roles:
- record
输出参数预设
输出参数预设有助于提高配置的可读性,并处理不同类型流的用例,以确保录像的一致性。
Preset | Usage | Other Notes |
---|---|---|
preset-record-generic | Record WITHOUT audio | This is the default when nothing is specified |
preset-record-generic-audio-copy | Record WITH original audio | Use this to enable audio in recordings |
preset-record-generic-audio-aac | Record WITH transcoded aac audio | Use this to transcode to aac audio. If your source is already aac, use preset-record-generic-audio-copy instead to avoid re-encoding |
preset-record-mjpeg | Record an mjpeg stream | Recommend restreaming mjpeg stream instead |
preset-record-jpeg | Record live jpeg | Recommend restreaming live jpeg instead |
preset-record-ubiquiti | Record ubiquiti stream with audio | Recordings with ubiquiti non-standard audio |