Advertisement
Guest User

Untitled

a guest
Oct 9th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. import gi
  2. from time import sleep
  3. from threading import Event
  4.  
  5. gi.require_version('Gst', '1.0')
  6.  
  7. from gi.repository import Gst, GstPbutils  # noqa
  8.  
  9. Gst.init(None)
  10.  
  11. preset = None
  12.  
  13. encodebin = Gst.ElementFactory.make('encodebin')
  14.  
  15. ogg = Gst.Caps.from_string("application/ogg")
  16. cprof = GstPbutils.EncodingContainerProfile("myprofile", None, ogg, None)
  17.  
  18. vorbis = Gst.Caps.from_string("audio/x-vorbis")
  19. cprof.add_profile(GstPbutils.EncodingAudioProfile(vorbis, preset, vorbis, 0))
  20.  
  21. encodebin.set_property("profile", cprof)
  22.  
  23. encodebin.get_request_pad('video_%u') is None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement