Skip to content

Debugging GStreamer Pipelines

A practical reference for inspecting GStreamer pipelines, enabling debug output, and narrowing down media negotiation or runtime failures.

This English edition preserves the original commands, configuration fragments, and diagrams so the steps can be reproduced directly.

Commands and configuration

export GST_DEBUG=3  # 输出 warning 级别的日志
  export GST_DEBUG=*:5  # 输出所有组件 debug 级别的日志
export GST_DEBUG="videotestsrc:5,autovideosink:3"  # 设置特定元素的调试级别
export GST_DEBUG=5  # 在控制台输出最详细的调试信息
export GST_DEBUG=5
gst-launch-1.0 videotestsrc ! autovideosink > /path/to/debug_output.log 2>&1
gst-launch-1.0 videotestsrc ! autovideosink  # 播放测试视频
gst-launch-1.0 filesrc location=video.mp4 ! decodebin ! autovideosink  # 播放文件
-v
gst-launch-1.0 -v videotestsrc ! autovideosink
gst-inspect-1.0  # 查看所有插件
gst-inspect-1.0 videotestsrc  # 查看特定插件的详细信息
gst-inspect-1.0 --print-plugin-paths  # 查看插件路径
gst-dot
gst-launch-1.0 videotestsrc ! autovideosink | gst-dot > pipeline.dot
  dot -Tpng pipeline.dot -o pipeline.png
GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(pipeline), GST_DEBUG_GRAPH_SHOW_ALL, "pipeline");

Notes

Use these examples as a starting point and adjust versions, device names, codecs, and network addresses for the target platform.