We will now see how to resize a streaming video using the width
and height
parameters described by a GStreamer cap
object.
Download the file
VideoManipulations.py
from the Packt website. The overall class design is identical to the one studied in the Playing a video section.The methods
self.constructAudioPipeline()
andself.constructVideoPipeline()
, respectively, define and link elements related to audio and video portions of the main pipeline objectself.player
. As we have already discussed most of the audio/video processing elements in earlier sections, we will only review theconstructVideoPipeline
method here.1 def constructVideoPipeline(self): 2 # Autoconvert element for video processing 3 self.autoconvert = gst.element_factory_make( 4 "autoconvert") 5 self.videosink = gst.element_factory_make( 6 "autovideosink") 7 8 # Set the capsfilter 9 if self...