Added networked output
This commit is contained in:
parent
7dfdf794b4
commit
d29c68dba6
|
@ -15,6 +15,7 @@ SHM_SIZE = 10000000
|
|||
|
||||
SCREEN_WIDTH = 640
|
||||
SCREEN_HEIGHT = 360
|
||||
OUTPUT_PORT = 6666
|
||||
|
||||
|
||||
|
||||
|
@ -29,7 +30,7 @@ FEED_SINK = 'shmsink socket-path=%(feed_pipe)s shm-size=%(shm_size)d wait-for-co
|
|||
OUTPUT_SOURCE = 'shmsrc socket-path=%(mixer_pipe)s do-timestamp=true is-live=true'
|
||||
SCREEN_OUTPUT = 'videoscale ! video/x-raw-rgb, width=%(screen_width)d, height=%(screen_height)d !'\
|
||||
+ ' timeoverlay ! ximagesink'
|
||||
NETWORK_OUTPUT = 'fakesink'
|
||||
NETWORK_OUTPUT = 'ffmpegcolorspace ! timeoverlay ! x264enc tune="zerolatency" ! mpegtsmux ! tcpserversink host=0.0.0.0 port=%(port)d'
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -35,12 +35,13 @@ class OutputFeed(Feed):
|
|||
def _run(self):
|
||||
src = OUTPUT_SOURCE % {'mixer_pipe' : MIXER_PIPE}
|
||||
mixer_format = MIXER_FORMAT % {'width' : MIXER_WIDTH, 'height' : MIXER_HEIGHT, 'framerate' : MIXER_FRAMERATE}
|
||||
screen_output = SCREEN_OUTPUT % {'screen_width': SCREEN_WIDTH, 'screen_height': SCREEN_HEIGHT}
|
||||
screen_output = SCREEN_OUTPUT % {'screen_width' : SCREEN_WIDTH, 'screen_height' : SCREEN_HEIGHT}
|
||||
network_output = NETWORK_OUTPUT % {'port' : OUTPUT_PORT}
|
||||
|
||||
pipeline = '%s ! %s ! queue leaky=2 ! tee name=split ! queue ! %s split. ! queue ! %s' % (src,
|
||||
pipeline = '%s ! %s ! queue leaky=2 ! tee name=split ! queue leaky=2 ! %s split. ! queue leaky=2 ! %s' % (src,
|
||||
mixer_format,
|
||||
screen_output,
|
||||
NETWORK_OUTPUT)
|
||||
network_output)
|
||||
print pipeline
|
||||
self._pipeline = gst.parse_launch(pipeline)
|
||||
|
||||
|
|
Loading…
Reference in New Issue