# 摄像头编码

Source: [https://docs.qualcomm.com/doc/80-70015-50SC/topic/camera-encode.html](https://docs.qualcomm.com/doc/80-70015-50SC/topic/camera-encode.html)

**gst-camera-encode-example** 程序允许您录制和编码单个摄像头流，然后保存输出。

**命令：**`python3 /usr/bin/gst-camera-encode.py`

## 预期输出

文件路径在 Python 脚本中固定配置为： `OUTPUT_FILE = "/opt/data/det_recording_720p.mp4`

## Pipeline 流程

| **Pipeline** | **说明** |
| --- | --- |
| 视频编码 | <ol class="ol" id="camera-encode__ol_vkx_p1g_zcc"><br>                                        <li class="li"><strong class="ph b">qtiqmmfsrc</strong> 采集摄像头实时流。</li><br><br>                                        <li class="li">在应用 capsfilter 时对原始视频数据强制实施约束。</li><br><br>                                        <li class="li">使用 H.264 格式对视频进行编码。v4l2h264enc</li><br><br>                                        <li class="li">使用 H264parse 解析视频。</li><br><br>                                        <li class="li">使用 Mp4mux 将视频多路复用到 MP4 容器中。</li><br><br>                                        <li class="li">使用 filesink 将视频写入文件。</li><br><br>                                    </ol> |

**Parent Topic:** [摄像头应用示例](https://docs.qualcomm.com/doc/80-70015-50SC/topic/sample-applications-for-camera.html)

Last Published: Nov 11, 2025

[Previous Topic
摄像头应用示例](https://docs.qualcomm.com/bundle/publicresource/80-70015-50SC/topics/sample-applications-for-camera.md) [Next Topic
摄像头检测显示](https://docs.qualcomm.com/bundle/publicresource/80-70015-50SC/topics/camera-detection-display.md)