You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I needed to use gi libraries in python3.6 and I came across your library, and I decided to use it. So here is my code:
importpgipgi.install_as_gi()
importgi## in order to verify that gi belongs to pgi, here is the testcode:## >>> print(gi)## <module 'pgi' from '/usr/local/lib/python3.6/dist-packages/pgi/__init__.py'>gi.require_version('Gst', '1.0')
gi.require_version('GstController', '1.0')
fromgi.repositoryimportGstGst.init(None)
command="filesrc location=/home/yilmazali/Downloads/video.wmv ! decodebin ! videoscale ! video/x-raw,width=400,height=300 ! x264enc ! queue2 ! mpegtsmux ! filesink location=/home/yilmazali/videoedited.wmv"pipeline=Gst.parse_launch(command)
print("Starting operation...")
pipeline.set_state(Gst.State.PLAYING)
print("Operation completed!")
I have used this code in a python3.5 environment, using gi libraries. However, I couldn't make gi work on python3.6 so I wanted to use your pgi library. At the code above, Gst.init(None) gives error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 5, in init
TypeError: object of type 'NoneType' has no len()
can you help me with this? I would appreciate any feedback. Thank you for your time.
The text was updated successfully, but these errors were encountered:
Thank you for the feedback. I'll test it and edit this message with results once I get home.
Edit: it works, thanks again. However, in my humble opinion, calling Gst.init with args=None should be possible since original gi library accepts it that way.
Hello, I needed to use gi libraries in python3.6 and I came across your library, and I decided to use it. So here is my code:
I have used this code in a python3.5 environment, using gi libraries. However, I couldn't make gi work on python3.6 so I wanted to use your pgi library. At the code above,
Gst.init(None)
gives error:can you help me with this? I would appreciate any feedback. Thank you for your time.
The text was updated successfully, but these errors were encountered: