1、现场描述
1)gst-lauch-1.0 命令
gst-launch-1.0 -e
rtspsrc location="rtsp://admin:xxx@192.168.230.xxx:554/cam/realmonitor?channel=1&subtype=0" protocols=tcp
! rtph265depay
! h265parse
! mppvideodec
! fakesink sync=false > gst-launch.log &
2)运行一个周末dmesg里提示oom
3)后面又按照上面的命令,运行下面命令查看内存,测了一晚上,
cat /proc/$PID/smaps_rollup |
grep -E "Rss|Anonymous|Private_Dirty"
@@
Tue Jun 9 23:11:49 GMT-8 2026
Rss: 38684 kB
Private_Dirty: 25768 kB
Anonymous: 25768 kB
@@
Wed Jun 10 00:11:49 GMT-8 2026
Rss: 62448 kB
Private_Dirty: 49532 kB
Anonymous: 49532 kB
@@
Wed Jun 10 01:11:49 GMT-8 2026
Rss: 86132 kB
Private_Dirty: 73216 kB
Anonymous: 73216 kB
。。。
2、排错过程
1)生成本地 /tmp/test_annexb.h265
gst-launch-1.0 -e
rtspsrc location="rtsp://192.168.230.xxx:554/cam/realmonitor?channel=1&subtype=0"
user-id=admin
user-pw="xxx"
protocols=tcp
! rtph265depay
! h265parse config-interval=-1
! video/x-h265,stream-format=byte-stream
! filesink location=/tmp/test_annexb.h265
2)按照 buffer mode 三个模式 都跑了一遍,内存都oom
mpi_dec_test
-i /tmp/test_annexb.h265
-t 16777220
或
mpi_dec_test
-i /tmp/test_annexb.h265
-t 16777220
-bufmode i
或
mpi_dec_test
-i /tmp/test_annexb.h265
-t 16777220
-bufmode e
3、排除 h265 问题,摄像头 编码模式改成h264 内存还是线性增长
gst-launch-1.0 -e
rtspsrc location=rtsp://...
user-id=admin
user-pw=xxx
protocols=tcp
! rtph264depay
! h264parse
! mppvideodec
! fakesink
1、现场描述
1)gst-lauch-1.0 命令
gst-launch-1.0 -e
rtspsrc location="rtsp://admin:xxx@192.168.230.xxx:554/cam/realmonitor?channel=1&subtype=0" protocols=tcp
! rtph265depay
! h265parse
! mppvideodec
! fakesink sync=false > gst-launch.log &
2)运行一个周末dmesg里提示oom
3)后面又按照上面的命令,运行下面命令查看内存,测了一晚上,
cat /proc/$PID/smaps_rollup |
grep -E "Rss|Anonymous|Private_Dirty"
@@
Tue Jun 9 23:11:49 GMT-8 2026
Rss: 38684 kB
Private_Dirty: 25768 kB
Anonymous: 25768 kB
@@
Wed Jun 10 00:11:49 GMT-8 2026
Rss: 62448 kB
Private_Dirty: 49532 kB
Anonymous: 49532 kB
@@
Wed Jun 10 01:11:49 GMT-8 2026
Rss: 86132 kB
Private_Dirty: 73216 kB
Anonymous: 73216 kB
。。。
2、排错过程
1)生成本地 /tmp/test_annexb.h265
gst-launch-1.0 -e
rtspsrc location="rtsp://192.168.230.xxx:554/cam/realmonitor?channel=1&subtype=0"
user-id=admin
user-pw="xxx"
protocols=tcp
! rtph265depay
! h265parse config-interval=-1
! video/x-h265,stream-format=byte-stream
! filesink location=/tmp/test_annexb.h265
2)按照 buffer mode 三个模式 都跑了一遍,内存都oom
mpi_dec_test
-i /tmp/test_annexb.h265
-t 16777220
或
mpi_dec_test
-i /tmp/test_annexb.h265
-t 16777220
-bufmode i
或
mpi_dec_test
-i /tmp/test_annexb.h265
-t 16777220
-bufmode e
3、排除 h265 问题,摄像头 编码模式改成h264 内存还是线性增长
gst-launch-1.0 -e
rtspsrc location=rtsp://...
user-id=admin
user-pw=xxx
protocols=tcp
! rtph264depay
! h264parse
! mppvideodec
! fakesink