简体   繁体   English

Python:在 gstreamer 管道中获取媒体的分辨率

[英]Python: Getting the resolution of the media in a gstreamer pipeline

As the title suggests, I need a way to get the resolution of the media running in the Gstreamer pipeline.正如标题所示,我需要一种方法来获得在 Gstreamer 管道中运行的媒体的分辨率。 I know it has something to do with the caps in the pipeline.我知道这与管道中的上限有关。 But how do I access it?但是我如何访问它? Also, let's say I somehow got it and it is of the type Gst.caps, how do I get the actual width and height from this?另外,假设我以某种方式得到它并且它是 Gst.caps 类型,我如何从中获得实际的宽度和高度?

If running your pipeline by gst-launch-1.0, you can actually see the caps negotiation by putting GST_DEBUG=7 before gst-launch-1.0.如果通过 gst-launch-1.0 运行管道,您实际上可以通过在 gst-launch-1.0 之前放置 GST_DEBUG=7 来查看上限协商。 However, GST_DEBUG=5 may get you the information you need without the huge amount of trace information given by GST_DEBUG=7.但是,GST_DEBUG=5 可能会为您提供所需的信息,而无需 GST_DEBUG=7 提供的大量跟踪信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM