Definition video sizes

Olivia_Kelly chibi.moon at
Wed Jul 24 09:47:16 UTC 2019

Hello everyone, I'm trying to determine the height and width of the video.
But I do not quite get it done.
I enter the path to the video from the command line.

import sys
import gobject
import pygst
import gst
import datetime
import math
import numpy

pipeline = raw_input("Enter the path: ")
d = gst.parse_launch("multifilesrc location="+pipeline+" ! decodebin2 !
buf = d.get_buffer()
caps = d.get_caps()
print caps.get_structure(0).get_value('format')
print caps.get_structure(0).get_value('height')
print caps.get_structure(0).get_value('width')

print buf.get_size()

And received the following error
AttributeError: 'gst.Pipeline' object has no attribute 'get_buffer'

what am I doing wrong? Please, help

Sent from:

More information about the gstreamer-devel mailing list