Esempio n. 1
0
 def __init__(self, profile):
     self.description = "Theora encoder"
     self.type = "video"
     sbin = "theoraenc bitrate=%s keyframe-auto=False keyframe-force=%s keyframe-freq=%s" % (
         profile.video_bitrate, profile.keyframe_freq,
         profile.keyframe_freq)
     VideoEncoder.__init__(self, sbin, profile=profile)
Esempio n. 2
0
 def __init__(self, bytestream="False", profile=DefaultEncodingProfile()):
     self.description = "h264 encoder"
     self.type = "video"
     if hasattr(profile, 'keyframe_freq'):
         keyframe_freq = profile.keyframe_freq
     else:
         keyframe_freq = 0
     sbin = "videobalance name=vlivemute ! x264enc bitrate=%s threads=%s byte-stream=%s key-int-max=%s" % (profile.video_bitrate, profile.encoding_threads, bytestream, keyframe_freq)
     VideoEncoder.__init__(self, sbin, profile)
Esempio n. 3
0
 def __init__(self, profile):
     self.description = "Jpeg encoder"
     self.type = "video"
     if hasattr(profile, 'venc_buffer_s'):
         buffersize = profile.venc_buffer_s
     else:
         buffersize = 5
     if hasattr(profile, 'video_bitrate'):
         bitrate = profile.video_bitrate*MBIT
     else:
         bitrate = 100*MBIT
     large_queue = 'queue max-size-bytes=0 max-size-buffers=0 max-size-time=%s' % (buffersize*gst.SECOND)
     if hasattr(profile, 'video_leaky'):
         large_queue = "%s leaky=2" % large_queue
     sbin = "%s name=ffenc_mjpeg ! ffenc_mjpeg bitrate=%s" % (large_queue, bitrate)
     VideoEncoder.__init__(self, sbin, profile=profile)
Esempio n. 4
0
 def __init__(self, profile):
     self.description = "Jpeg encoder"
     self.type = "video"
     if hasattr(profile, 'venc_buffer_s'):
         buffersize = profile.venc_buffer_s
     else:
         buffersize = 5
     if hasattr(profile, 'video_bitrate'):
         bitrate = profile.video_bitrate * MBIT
     else:
         bitrate = 100 * MBIT
     large_queue = 'queue max-size-bytes=0 max-size-buffers=0 max-size-time=%s' % (
         buffersize * gst.SECOND)
     if hasattr(profile, 'video_leaky'):
         large_queue = "%s leaky=2" % large_queue
     sbin = "%s name=ffenc_mjpeg ! ffenc_mjpeg bitrate=%s" % (large_queue,
                                                              bitrate)
     VideoEncoder.__init__(self, sbin, profile=profile)
Esempio n. 5
0
 def __init__(self, profile):
     self.description = "Mpeg4 encoder"
     self.type = "video"
     sbin = "queue ! ffenc_mpeg4 bitrate=%s ! queue" % profile.video_bitrate
     VideoEncoder.__init__(self, sbin, profile=profile)
Esempio n. 6
0
 def __init__(self, profile):
     self.description = "Mpeg4 encoder"
     self.type = "video"
     sbin = "queue ! ffenc_mpeg4 bitrate=%s ! queue" % profile.video_bitrate
     VideoEncoder.__init__(self, sbin, profile=profile)
Esempio n. 7
0
 def __init__(self, profile):
     self.description = "Theora encoder"
     self.type = "video"
     sbin = "theoraenc bitrate=%s keyframe-auto=False keyframe-force=%s keyframe-freq=%s" % (profile.video_bitrate, profile.keyframe_freq, profile.keyframe_freq)
     VideoEncoder.__init__(self, sbin, profile=profile)