Definition video sizes

Olivia_Kelly chibi.moon at mail.ru
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
gobject.threads_init()
import pygst
pygst.require("0.10")
import gst
import datetime
import math
import numpy

pipeline = raw_input("Enter the path: ")
d = gst.parse_launch("multifilesrc location="+pipeline+" ! decodebin2 !
appsink")
d.set_state(gst.STATE_PLAYING)
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: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list