Suppose you have a video file that needs to be saved with an adjusted default brightness level. Alternatively, you may want to save another video with a different aspect ratio. In this section, we will learn some of the basic and most frequently performed operations on a video. We will develop code using Python and GStreamer for tasks such as resizing a video or adjusting its contrast level.
The data that can flow through an element is described by the capabilities (caps) of a pad on that element. If a decodebin element is decoding video data, the capabilities of its dynamic pad will be described as, for instance, video/x-raw-yuv
. Resizing a video with GStreamer multimedia framework can be accomplished by using a capsfilter
element, that has width
and height
parameters specified. As discussed earlier, the capsfilter
element limits the media data type that can be transferred between two elements. For example, a cap
object described by the string, video...