From 943ab31a0f32b7bb50fa1ff90c9ce8d72b232cfd Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Wed, 13 May 2015 19:35:20 +0200 Subject: experiment with transporting uncompressed a/v together in a matroska stream --- voctocore/README.md | 20 +-- voctocore/default-config.ini | 7 +- voctocore/lib/audio/mix.py | 19 --- voctocore/lib/audio/rawoutput.py | 64 --------- voctocore/lib/audio/src.py | 87 ------------ voctocore/lib/audiomix.py | 19 +++ voctocore/lib/avrawoutput.py | 81 +++++++++++ voctocore/lib/avsource.py | 99 ++++++++++++++ voctocore/lib/commands.py | 18 +-- voctocore/lib/pipeline.py | 79 ++--------- voctocore/lib/video/mix.py | 167 ----------------------- voctocore/lib/video/rawoutput.py | 84 ------------ voctocore/lib/video/src.py | 88 ------------ voctocore/lib/videomix.py | 167 +++++++++++++++++++++++ voctocore/scripts/audio-play-cam1-mirror.sh | 4 +- voctocore/scripts/audio-play-cam2-mirror.sh | 6 +- voctocore/scripts/audio-source-cam1.sh | 6 - voctocore/scripts/audio-source-cam2.sh | 6 - voctocore/scripts/audio-visualize-cam1-mirror.sh | 4 +- voctocore/scripts/av-play-cam1-mirror.sh | 13 +- voctocore/scripts/av-record-cam1-mirror.sh | 9 +- voctocore/scripts/av-source-avsync.sh | 29 ++-- voctocore/scripts/av-source-cam1.sh | 13 ++ voctocore/scripts/av-source-cam2.sh | 13 ++ voctocore/scripts/av-source-eevblog.sh | 29 ++-- voctocore/scripts/video-play-cam1-mirror.sh | 2 +- voctocore/scripts/video-play-cam2-mirror.sh | 2 +- voctocore/scripts/video-play-mixer-output.sh | 2 +- voctocore/scripts/video-source-cam1.sh | 7 - voctocore/scripts/video-source-cam2.sh | 7 - 30 files changed, 480 insertions(+), 671 deletions(-) delete mode 100644 voctocore/lib/audio/mix.py delete mode 100644 voctocore/lib/audio/rawoutput.py delete mode 100644 voctocore/lib/audio/src.py create mode 100644 voctocore/lib/audiomix.py create mode 100644 voctocore/lib/avrawoutput.py create mode 100644 voctocore/lib/avsource.py delete mode 100644 voctocore/lib/video/mix.py delete mode 100644 voctocore/lib/video/rawoutput.py delete mode 100644 voctocore/lib/video/src.py create mode 100644 voctocore/lib/videomix.py delete mode 100755 voctocore/scripts/audio-source-cam1.sh delete mode 100755 voctocore/scripts/audio-source-cam2.sh create mode 100755 voctocore/scripts/av-source-cam1.sh create mode 100755 voctocore/scripts/av-source-cam2.sh delete mode 100755 voctocore/scripts/video-source-cam1.sh delete mode 100755 voctocore/scripts/video-source-cam2.sh (limited to 'voctocore') diff --git a/voctocore/README.md b/voctocore/README.md index 14bd785..55d19e3 100644 --- a/voctocore/README.md +++ b/voctocore/README.md @@ -1,16 +1,16 @@ # Server-Pipeline Structure ```` - /-> Encoder -> PreviewPort 12000 - /-> VideoMix --> OutputPort 11000 - / \-> StreamBlanker -> StreamOutputPort 11001 -10000… VideoSrc --> MirrorPort 13000… + /-> VideoMix + / \ + / \ /-> StreamBlanker -> StreamOutputPort 11001 + / ------> OutputPort 11000 + / / \-> Encoder -> PreviewPort 14000… + / / + /----- -> AudioMix + / +10000… AVSource --> MirrorPort 13000… \-> Encoder -> PreviewPort 14000… - /-> Encoder -> PreviewPort 22000 - /-> AudioMix --> OutputPort 21000 - / \-> StreamBlanker -> StreamOutputPort 21001 -20000… AudioSrc --> MirrorPort 23000… - \-> Encoder -> PreviewPort 24000… ```` # Control Protocol @@ -22,7 +22,7 @@ TCP-Port 9999 < set_composite_mode side_by_side_equal > ok -< get_video_output_port +< get_output_port > ok 11000 < get_video_a diff --git a/voctocore/default-config.ini b/voctocore/default-config.ini index cb1a722..517afa6 100644 --- a/voctocore/default-config.ini +++ b/voctocore/default-config.ini @@ -5,13 +5,8 @@ audiocaps=audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000,chan ; disable if ui & server run on the same computer and excahnge uncompressed video frames encode_previews=true -[sources] ; tcp-ports will be 10000,10001 -; video=cam1,cam2,grabber -video=cam1,cam2 - -; tcp-ports will be 20000,20001 -audio=cam1,cam2 +sources=cam1,cam2,grabber [pause] ;image=/video/pause.png diff --git a/voctocore/lib/audio/mix.py b/voctocore/lib/audio/mix.py deleted file mode 100644 index bd803b2..0000000 --- a/voctocore/lib/audio/mix.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/python3 -import logging -from gi.repository import Gst -from enum import Enum - -from lib.config import Config - -class AudioMix(object): - log = logging.getLogger('VideoMix') - - mixingPipeline = None - - caps = None - names = [] - - selectedSource = 0 - - def __init__(self): - pass diff --git a/voctocore/lib/audio/rawoutput.py b/voctocore/lib/audio/rawoutput.py deleted file mode 100644 index e268827..0000000 --- a/voctocore/lib/audio/rawoutput.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/python3 -import logging, socket -from gi.repository import GObject, Gst - -from lib.config import Config - -class AudioRawOutput(object): - log = logging.getLogger('AudioRawOutput') - - name = None - port = None - caps = None - - boundSocket = None - receiverPipeline = None - - currentConnections = [] - - def __init__(self, channel, port, caps): - self.log = logging.getLogger('AudioRawOutput['+channel+']') - - self.channel = channel - self.port = port - self.caps = caps - - pipeline = """ - interaudiosrc channel={channel} ! - {caps} ! - gdppay ! - multifdsink resend-streamheader=false name=fd - """.format( - channel=self.channel, - caps=self.caps - ) - self.log.debug('Launching Pipeline:\n%s', pipeline) - self.receiverPipeline = Gst.parse_launch(pipeline) - self.receiverPipeline.bus.add_signal_watch() - self.receiverPipeline.set_state(Gst.State.PLAYING) - - self.log.debug('Binding to Mirror-Socket on [::]:%u', port) - self.boundSocket = socket.socket(socket.AF_INET6) - self.boundSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - self.boundSocket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, False) - self.boundSocket.bind(('::', port)) - self.boundSocket.listen(1) - - self.log.debug('Setting GObject io-watch on Socket') - GObject.io_add_watch(self.boundSocket, GObject.IO_IN, self.on_connect) - - def on_connect(self, sock, *args): - conn, addr = sock.accept() - self.log.info("Incomming Connection from %s", addr) - - self.log.info('Adding fd %u to multifdsink', conn.fileno()) - self.receiverPipeline.get_by_name('fd').emit('add', conn.fileno()) - - self.currentConnections.append(conn) - self.log.info('Now %u Receiver connected', len(self.currentConnections)) - - return True - - def disconnect(self, receiverPipeline, currentConnection): - self.currentConnections.remove(currentConnection) - self.log.info('Disconnected Receiver, now %u Receiver connected', len(self.currentConnections)) diff --git a/voctocore/lib/audio/src.py b/voctocore/lib/audio/src.py deleted file mode 100644 index 03c7bcc..0000000 --- a/voctocore/lib/audio/src.py +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/python3 -import logging, socket -from gi.repository import GObject, Gst - -from lib.config import Config - -class AudioSrc(object): - log = logging.getLogger('AudioSrc') - - name = None - port = None - caps = None - - receiverPipeline = None - - boundSocket = None - currentConnection = None - - def __init__(self, name, port, caps): - self.log = logging.getLogger('AudioSrc['+name+']') - - self.name = name - self.port = port - self.caps = caps - - self.log.debug('Binding to Source-Socket on [::]:%u', port) - self.boundSocket = socket.socket(socket.AF_INET6) - self.boundSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - self.boundSocket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, False) - self.boundSocket.bind(('::', port)) - self.boundSocket.listen(1) - - self.log.debug('Setting GObject io-watch on Socket') - GObject.io_add_watch(self.boundSocket, GObject.IO_IN, self.on_connect) - - def on_connect(self, sock, *args): - conn, addr = sock.accept() - self.log.info("Incomming Connection from %s", addr) - - if self.currentConnection is not None: - self.log.warn("Another Source is already connected") - return True - - pipeline = """ - fdsrc fd={fd} ! - gdpdepay ! - {caps} ! - queue ! - tee name=tee - - tee. ! queue ! interaudiosink channel=audio_{name}_mixer - tee. ! queue ! interaudiosink channel=audio_{name}_mirror - """.format( - fd=conn.fileno(), - name=self.name, - caps=self.caps - ) - self.log.debug('Launching Source-Receiver-Pipeline:\n%s', pipeline) - self.receiverPipeline = Gst.parse_launch(pipeline) - - self.log.debug('Binding End-of-Stream-Signal on Source-Receiver-Pipeline') - self.receiverPipeline.bus.add_signal_watch() - self.receiverPipeline.bus.connect("message::eos", self.on_eos) - self.receiverPipeline.bus.connect("message::error", self.on_error) - - self.receiverPipeline.set_state(Gst.State.PLAYING) - - self.currentConnection = conn - return True - - def on_eos(self, bus, message): - self.log.info('Received End-of-Stream-Signal on Source-Receiver-Pipeline') - if self.currentConnection is not None: - self.disconnect() - - def on_error(self, bus, message): - self.log.info('Received Error-Signal on Source-Receiver-Pipeline') - (code, debug) = message.parse_error() - self.log.debug('Error-Details: #%u: %s', code, debug) - - if self.currentConnection is not None: - self.disconnect() - - def disconnect(self): - self.receiverPipeline.set_state(Gst.State.NULL) - self.receiverPipeline = None - self.currentConnection = None diff --git a/voctocore/lib/audiomix.py b/voctocore/lib/audiomix.py new file mode 100644 index 0000000..bd803b2 --- /dev/null +++ b/voctocore/lib/audiomix.py @@ -0,0 +1,19 @@ +#!/usr/bin/python3 +import logging +from gi.repository import Gst +from enum import Enum + +from lib.config import Config + +class AudioMix(object): + log = logging.getLogger('VideoMix') + + mixingPipeline = None + + caps = None + names = [] + + selectedSource = 0 + + def __init__(self): + pass diff --git a/voctocore/lib/avrawoutput.py b/voctocore/lib/avrawoutput.py new file mode 100644 index 0000000..70243bd --- /dev/null +++ b/voctocore/lib/avrawoutput.py @@ -0,0 +1,81 @@ +#!/usr/bin/python3 +import logging, socket +from gi.repository import GObject, Gst + +from lib.config import Config + +class AVRawOutput(object): + log = logging.getLogger('AVRawOutput') + + name = None + port = None + caps = None + + boundSocket = None + receiverPipeline = None + + currentConnections = [] + + def __init__(self, channel, port): + self.log = logging.getLogger('AVRawOutput['+channel+']') + + self.channel = channel + self.port = port + + pipeline = """ + interaudiosrc channel=audio_{channel} ! + {acaps} ! + queue ! + mux. + + intervideosrc channel=video_{channel} ! + {vcaps} ! + textoverlay halignment=left valignment=top ypad=75 text=AVRawOutput ! + timeoverlay halignment=left valignment=top ypad=75 xpad=400 ! + queue ! + mux. + + matroskamux + name=mux + streamable=true + writing-app=Voctomix-AVRawOutput ! + + multifdsink + sync-method=next-keyframe + name=fd + """.format( + channel=self.channel, + acaps=Config.get('mix', 'audiocaps'), + vcaps=Config.get('mix', 'videocaps') + ) + self.log.debug('Launching Output-Pipeline:\n%s', pipeline) + self.receiverPipeline = Gst.parse_launch(pipeline) + self.receiverPipeline.bus.add_signal_watch() + self.receiverPipeline.set_state(Gst.State.PLAYING) + + self.log.debug('Binding to Output-Socket on [::]:%u', port) + self.boundSocket = socket.socket(socket.AF_INET6) + self.boundSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + self.boundSocket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, False) + self.boundSocket.bind(('::', port)) + self.boundSocket.listen(1) + + self.log.debug('Setting GObject io-watch on Socket') + GObject.io_add_watch(self.boundSocket, GObject.IO_IN, self.on_connect) + + def on_connect(self, sock, *args): + conn, addr = sock.accept() + self.log.info("Incomming Connection from %s", addr) + + self.log.info('Adding fd %u to multifdsink', conn.fileno()) + self.receiverPipeline.get_by_name('fd').emit('add', conn.fileno()) + + self.currentConnections.append(conn) + self.log.info('Now %u Receiver connected', len(self.currentConnections)) + + return True + + # FIXME handle disconnects + def disconnect(self, receiverPipeline, currentConnection): + self.currentConnections.remove(currentConnection) + self.log.info('Disconnected Receiver, now %u Receiver connected', len(self.currentConnections)) diff --git a/voctocore/lib/avsource.py b/voctocore/lib/avsource.py new file mode 100644 index 0000000..ff36470 --- /dev/null +++ b/voctocore/lib/avsource.py @@ -0,0 +1,99 @@ +#!/usr/bin/python3 +import logging, socket +from gi.repository import GObject, Gst + +from lib.config import Config + +class AVSource(object): + log = logging.getLogger('AVSource') + + name = None + port = None + caps = None + + receiverPipeline = None + + boundSocket = None + currentConnection = None + + def __init__(self, name, port): + self.log = logging.getLogger('AVSource['+name+']') + + self.name = name + self.port = port + + self.log.debug('Binding to Source-Socket on [::]:%u', port) + self.boundSocket = socket.socket(socket.AF_INET6) + self.boundSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + self.boundSocket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, False) + self.boundSocket.bind(('::', port)) + self.boundSocket.listen(1) + + self.log.debug('Setting GObject io-watch on Socket') + GObject.io_add_watch(self.boundSocket, GObject.IO_IN, self.on_connect) + + def on_connect(self, sock, *args): + conn, addr = sock.accept() + self.log.info("Incomming Connection from %s", addr) + + if self.currentConnection is not None: + self.log.warn("Another Source is already connected") + return True + + pipeline = """ + fdsrc fd={fd} ! + matroskademux name=demux + + demux. ! + {acaps} ! + queue ! + tee name=atee + + atee. ! queue ! interaudiosink channel=audio_{name}_mixer + atee. ! queue ! interaudiosink channel=audio_{name}_mirror + + demux. ! + {vcaps} ! + textoverlay halignment=left valignment=top ypad=25 text=AVSource ! + timeoverlay halignment=left valignment=top ypad=25 xpad=400 ! + queue ! + tee name=vtee + + vtee. ! queue ! intervideosink channel=video_{name}_mixer + vtee. ! queue ! intervideosink channel=video_{name}_mirror + """.format( + fd=conn.fileno(), + name=self.name, + acaps=Config.get('mix', 'audiocaps'), + vcaps=Config.get('mix', 'videocaps') + ) + self.log.debug('Launching Source-Pipeline:\n%s', pipeline) + self.receiverPipeline = Gst.parse_launch(pipeline) + + self.log.debug('Binding End-of-Stream-Signal on Source-Pipeline') + self.receiverPipeline.bus.add_signal_watch() + self.receiverPipeline.bus.connect("message::eos", self.on_eos) + self.receiverPipeline.bus.connect("message::error", self.on_error) + + self.receiverPipeline.set_state(Gst.State.PLAYING) + + self.currentConnection = conn + return True + + def on_eos(self, bus, message): + self.log.info('Received End-of-Stream-Signal on Source-Pipeline') + if self.currentConnection is not None: + self.disconnect() + + def on_error(self, bus, message): + self.log.info('Received Error-Signal on Source-Pipeline') + (code, debug) = message.parse_error() + self.log.debug('Error-Details: #%u: %s', code, debug) + + if self.currentConnection is not None: + self.disconnect() + + def disconnect(self): + self.receiverPipeline.set_state(Gst.State.NULL) + self.receiverPipeline = None + self.currentConnection = None diff --git a/voctocore/lib/commands.py b/voctocore/lib/commands.py index 9b35bf2..9673e57 100644 --- a/voctocore/lib/commands.py +++ b/voctocore/lib/commands.py @@ -2,7 +2,7 @@ import logging from lib.config import Config -from lib.video.mix import CompositeModes +from lib.videomix import CompositeModes class ControlServerCommands(): log = logging.getLogger('ControlServerCommands') @@ -12,26 +12,26 @@ class ControlServerCommands(): def __init__(self, pipeline): self.pipeline = pipeline - self.vnames = Config.getlist('sources', 'video') + self.sources = Config.getlist('mix', 'sources') - def decodeVideoSrcName(self, src_name_or_id): + def decodeSourceName(self, src_name_or_id): if isinstance(src_name_or_id, str): try: - return self.vnames.index(src_name_or_id) + return self.sources.index(src_name_or_id) except Exception as e: - raise IndexError("video-source %s unknown" % src_name_or_id) + raise IndexError("source %s unknown" % src_name_or_id) - if src_name_or_id < 0 or src_name_or_id >= len(self.vnames): - raise IndexError("video-source %s unknown" % src_name_or_id) + if src_name_or_id < 0 or src_name_or_id >= len(self.sources): + raise IndexError("source %s unknown" % src_name_or_id) def set_video_a(self, src_name_or_id): - src_id = self.decodeVideoSrcName(src_name_or_id) + src_id = self.decodeSourceName(src_name_or_id) self.pipeline.vmixer.setVideoA(src_id) return True def set_video_b(self, src_name_or_id): - src_id = self.decodeVideoSrcName(src_name_or_id) + src_id = self.decodeSourceName(src_name_or_id) self.pipeline.vmixer.setVideoB(src_id) return True diff --git a/voctocore/lib/pipeline.py b/voctocore/lib/pipeline.py index 4e4a714..03fdd3d 100644 --- a/voctocore/lib/pipeline.py +++ b/voctocore/lib/pipeline.py @@ -4,84 +4,35 @@ from gi.repository import Gst # import library components from lib.config import Config -from lib.video.src import VideoSrc -from lib.video.rawoutput import VideoRawOutput -from lib.video.mix import VideoMix - -from lib.audio.src import AudioSrc -from lib.audio.rawoutput import AudioRawOutput -from lib.audio.mix import AudioMix +from lib.avsource import AVSource +from lib.avrawoutput import AVRawOutput class Pipeline(object): """mixing, streaming and encoding pipeline constuction and control""" log = logging.getLogger('Pipeline') - vsources = [] - vmirrors = [] - vpreviews = [] - vmixer = None - vmixerout = None - - asources = [] - amirrors = [] - apreviews = [] - amixer = None - amixerout = None + sources = [] + mirrors = [] def __init__(self): - self.log.debug('creating Video-Pipeline') - self.initVideo() - - self.log.debug('creating Audio-Pipeline') - self.initAudio() - - def initVideo(self): - caps = Config.get('mix', 'videocaps') - self.log.info('Video-Caps configured to: %s', caps) + self.log.info('Video-Caps configured to: %s', Config.get('mix', 'videocaps')) + self.log.info('Audio-Caps configured to: %s', Config.get('mix', 'audiocaps')) - names = Config.getlist('sources', 'video') + names = Config.getlist('mix', 'sources') if len(names) < 1: - raise RuntimeException("At least one Video-Source must be configured!") + raise RuntimeException("At least one AVSource must be configured!") + self.log.info('Creating %u Creating AVSources: %s', len(names), names) for idx, name in enumerate(names): port = 10000 + idx - self.log.info('Creating Video-Source %s at tcp-port %u', name, port) + self.log.info('Creating AVSource %s at tcp-port %u', name, port) - source = VideoSrc(name, port, caps) - self.vsources.append(source) + source = AVSource(name, port) + self.sources.append(source) port = 13000 + idx - self.log.info('Creating Mirror-Output for Video-Source %s at tcp-port %u', name, port) - - mirror = VideoRawOutput('video_%s_mirror' % name, port, caps) - self.vmirrors.append(mirror) - - self.log.debug('Creating Video-Mixer') - self.vmixer = VideoMix() - - port = 11000 - self.log.debug('Creating Video-Mixer-Output at tcp-port %u', port) - self.vmixerout = VideoRawOutput('video_mix', port, caps) - - def initAudio(self): - caps = Config.get('mix', 'audiocaps') - self.log.info('Audio-Caps configured to: %s', caps) - - names = Config.getlist('sources', 'audio') - if len(names) < 1: - raise RuntimeException("At least one Audio-Source must be configured!") - - for idx, name in enumerate(names): - port = 20000 + idx - self.log.info('Creating Audio-Source %s at tcp-port %u', name, port) - - source = AudioSrc(name, port, caps) - self.asources.append(source) - - - port = 23000 + idx - self.log.info('Creating Mirror-Output for Audio-Source %s at tcp-port %u', name, port) + self.log.info('Creating Mirror-Output for AVSource %s at tcp-port %u', name, port) - mirror = AudioRawOutput('audio_%s_mirror' % name, port, caps) - self.amirrors.append(mirror) + mirror = AVRawOutput('%s_mirror' % name, port) + self.mirrors.append(mirror) diff --git a/voctocore/lib/video/mix.py b/voctocore/lib/video/mix.py deleted file mode 100644 index bcac7d2..0000000 --- a/voctocore/lib/video/mix.py +++ /dev/null @@ -1,167 +0,0 @@ -#!/usr/bin/python3 -import logging -from gi.repository import Gst -from enum import Enum - -from lib.config import Config - -class CompositeModes(Enum): - fullscreen = 0 - side_by_side_equal = 1 - -class VideoMix(object): - log = logging.getLogger('VideoMix') - - mixingPipeline = None - - caps = None - names = [] - - compositeMode = CompositeModes.fullscreen - sourceA = 0 - sourceB = 1 - - def __init__(self): - self.caps = Config.get('mix', 'videocaps') - - self.names = Config.getlist('sources', 'video') - self.log.info('Configuring Mixer for %u Sources', len(self.names)) - - pipeline = """ - videomixer name=mix ! - {caps} ! - textoverlay text=mixer halignment=left valignment=top ypad=175 ! - intervideosink channel=video_mix - """.format( - caps=self.caps - ) - - for idx, name in enumerate(self.names): - pipeline += """ - intervideosrc channel=video_{name}_mixer ! - {caps} ! - videoscale ! - capsfilter name=caps_{idx} ! - mix. - """.format( - name=name, - caps=self.caps, - idx=idx - ) - - self.log.debug('Creating Mixing-Pipeline:\n%s', pipeline) - self.mixingPipeline = Gst.parse_launch(pipeline) - - self.log.debug('Initializing Mixer-State') - self.updateMixerState() - - self.log.debug('Launching Mixing-Pipeline:\n%s', pipeline) - self.mixingPipeline.set_state(Gst.State.PLAYING) - - def updateMixerState(self): - if self.compositeMode == CompositeModes.fullscreen: - self.updateMixerStateFullscreen() - - if self.compositeMode == CompositeModes.side_by_side_equal: - self.updateMixerStateSideBySideEqual() - - def updateMixerStateFullscreen(self): - self.log.info('Updating Mixer-State for Fullscreen-Composition') - - noScaleCaps = Gst.Caps.from_string('video/x-raw') - - for idx, name in enumerate(self.names): - alpha = int(idx == self.sourceA) - - self.log.debug('Setting Mixerpad %u to x/y=0 and alpha=%0.2f', idx, alpha) - mixerpad = self.mixingPipeline.get_by_name('mix').get_static_pad('sink_%u' % idx) - mixerpad.set_property('alpha', alpha ) - mixerpad.set_property('xpos', 0) - mixerpad.set_property('ypos', 0) - - self.log.debug('Resetting Scaler %u to non-scaling', idx) - capsfilter = self.mixingPipeline.get_by_name('caps_%u' % idx) - capsfilter.set_property('caps', noScaleCaps) - - def getInputVideoSize(self): - caps = Gst.Caps.from_string(self.caps) - struct = caps.get_structure(0) - _, width = struct.get_int('width') - _, height = struct.get_int('height') - - return width, height - - def updateMixerStateSideBySideEqual(self): - self.log.info('Updating Mixer-State for Side-by-side-Equal-Composition') - - width, height = self.getInputVideoSize() - gutter = int(width / 100) - - self.log.debug('Video-Size parsed as %u/%u, Gutter calculated to %upx', width, height, gutter) - - targetWidth = int((width - gutter) / 2) - targetHeight = int(targetWidth / width * height) - - ycenter = (height - targetHeight) / 2 - xa = 0 - xb = width - targetWidth - - scaleCaps = Gst.Caps.from_string('video/x-raw,width=%u,height=%u' % (targetWidth, targetHeight)) - noScaleCaps = Gst.Caps.from_string('video/x-raw') - - for idx, name in enumerate(self.names): - mixerpad = self.mixingPipeline.get_by_name('mix').get_static_pad('sink_%u' % idx) - - if idx == self.sourceA: - x = xa - y = ycenter - caps = scaleCaps - alpha = 1 - - self.log.debug('Setting Mixerpad %u to x/y=%u/%u and alpha=%0.2f', idx, x, y, alpha) - self.log.debug('Setting Scaler %u to %u/%u', idx, targetWidth, targetHeight) - - elif idx == self.sourceB: - x = xb - y = ycenter - caps = scaleCaps - alpha = 1 - - self.log.debug('Setting Mixerpad %u to x/y=%u/%u and alpha=%0.2f', idx, x, y, alpha) - self.log.debug('Setting Scaler %u to %u/%u', idx, targetWidth, targetHeight) - - else: - x = 0 - y = 0 - caps = noScaleCaps - alpha = 0 - - self.log.debug('Setting Mixerpad %u to x/y=%u/%u and alpha=%0.2f', idx, x, y, alpha) - self.log.debug('Resetting Scaler %u to non-scaling', idx) - - mixerpad.set_property('alpha', alpha) - mixerpad.set_property('xpos', x) - mixerpad.set_property('ypos', y) - - capsfilter = self.mixingPipeline.get_by_name('caps_%u' % idx) - capsfilter.set_property('caps', caps) - - def setVideoA(self, source): - # swap if required - if self.sourceB == source: - self.sourceB = self.sourceA - - self.sourceA = source - self.updateMixerState() - - def setVideoB(self, source): - # swap if required - if self.sourceA == source: - self.sourceA = self.sourceB - - self.sourceB = source - self.updateMixerState() - - def setCompositeMode(self, mode): - self.compositeMode = mode - self.updateMixerState() diff --git a/voctocore/lib/video/rawoutput.py b/voctocore/lib/video/rawoutput.py deleted file mode 100644 index bb9efc4..0000000 --- a/voctocore/lib/video/rawoutput.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/python3 -import logging, socket -from gi.repository import GObject, Gst - -from lib.config import Config - -class VideoRawOutput(object): - log = logging.getLogger('VideoRawOutput') - - name = None - port = None - caps = None - - boundSocket = None - - receiverPipelines = [] - currentConnections = [] - - def __init__(self, channel, port, caps): - self.log = logging.getLogger('VideoRawOutput['+channel+']') - - self.channel = channel - self.port = port - self.caps = caps - - self.log.debug('Binding to Mirror-Socket on [::]:%u', port) - self.boundSocket = socket.socket(socket.AF_INET6) - self.boundSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - self.boundSocket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, False) - self.boundSocket.bind(('::', port)) - self.boundSocket.listen(1) - - self.log.debug('Setting GObject io-watch on Socket') - GObject.io_add_watch(self.boundSocket, GObject.IO_IN, self.on_connect) - - def on_connect(self, sock, *args): - conn, addr = sock.accept() - self.log.info("Incomming Connection from %s", addr) - - pipeline = """ - intervideosrc channel={channel} ! - {caps} ! - textoverlay text={channel} halignment=left valignment=top ypad=225 ! - gdppay ! - fdsink fd={fd} - """.format( - fd=conn.fileno(), - channel=self.channel, - caps=self.caps - ) - self.log.debug('Launching Pipeline:\n%s', pipeline) - receiverPipeline = Gst.parse_launch(pipeline) - - def on_eos(bus, message): - self.log.info('Received End-of-Stream-Signal on Source-Receiver-Pipeline') - self.disconnect(receiverPipeline, conn) - - def on_error(bus, message): - self.log.info('Received Error-Signal on Source-Receiver-Pipeline') - - (error, debug) = message.parse_error() - self.log.debug('Error-Message %s\n%s', error.message, debug) - - self.disconnect(receiverPipeline, conn) - - self.log.debug('Binding End-of-Stream-Signal on Pipeline') - receiverPipeline.bus.add_signal_watch() - receiverPipeline.bus.connect("message::eos", on_eos) - receiverPipeline.bus.connect("message::error", on_error) - - receiverPipeline.set_state(Gst.State.PLAYING) - - self.receiverPipelines.append(receiverPipeline) - self.currentConnections.append(conn) - - self.log.info('Now %u Receiver connected', len(self.currentConnections)) - - return True - - def disconnect(self, receiverPipeline, currentConnection): - receiverPipeline.set_state(Gst.State.NULL) - self.receiverPipelines.remove(receiverPipeline) - self.currentConnections.remove(currentConnection) - self.log.info('Disconnected Receiver, now %u Receiver connected', len(self.currentConnections)) diff --git a/voctocore/lib/video/src.py b/voctocore/lib/video/src.py deleted file mode 100644 index cd36d8c..0000000 --- a/voctocore/lib/video/src.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/python3 -import logging, socket -from gi.repository import GObject, Gst - -from lib.config import Config - -class VideoSrc(object): - log = logging.getLogger('VideoSrc') - - name = None - port = None - caps = None - - receiverPipeline = None - - boundSocket = None - currentConnection = None - - def __init__(self, name, port, caps): - self.log = logging.getLogger('VideoSrc['+name+']') - - self.name = name - self.port = port - self.caps = caps - - self.log.debug('Binding to Source-Socket on [::]:%u', port) - self.boundSocket = socket.socket(socket.AF_INET6) - self.boundSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - self.boundSocket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, False) - self.boundSocket.bind(('::', port)) - self.boundSocket.listen(1) - - self.log.debug('Setting GObject io-watch on Socket') - GObject.io_add_watch(self.boundSocket, GObject.IO_IN, self.on_connect) - - def on_connect(self, sock, *args): - conn, addr = sock.accept() - self.log.info("Incomming Connection from %s", addr) - - if self.currentConnection is not None: - self.log.warn("Another Source is already connected") - return True - - pipeline = """ - fdsrc fd={fd} ! - gdpdepay ! - {caps} ! - textoverlay text=video_{name}_fd halignment=left valignment=top ypad=125 ! - queue ! - tee name=tee - - tee. ! queue ! intervideosink channel=video_{name}_mixer - tee. ! queue ! intervideosink channel=video_{name}_mirror - """.format( - fd=conn.fileno(), - name=self.name, - caps=self.caps - ) - self.log.debug('Launching Source-Receiver-Pipeline:\n%s', pipeline) - self.receiverPipeline = Gst.parse_launch(pipeline) - - self.log.debug('Binding End-of-Stream-Signal on Source-Receiver-Pipeline') - self.receiverPipeline.bus.add_signal_watch() - self.receiverPipeline.bus.connect("message::eos", self.on_eos) - self.receiverPipeline.bus.connect("message::error", self.on_error) - - self.receiverPipeline.set_state(Gst.State.PLAYING) - - self.currentConnection = conn - return True - - def on_eos(self, bus, message): - self.log.info('Received End-of-Stream-Signal on Source-Receiver-Pipeline') - if self.currentConnection is not None: - self.disconnect() - - def on_error(self, bus, message): - self.log.info('Received Error-Signal on Source-Receiver-Pipeline') - (code, debug) = message.parse_error() - self.log.debug('Error-Details: #%u: %s', code, debug) - - if self.currentConnection is not None: - self.disconnect() - - def disconnect(self): - self.receiverPipeline.set_state(Gst.State.NULL) - self.receiverPipeline = None - self.currentConnection = None diff --git a/voctocore/lib/videomix.py b/voctocore/lib/videomix.py new file mode 100644 index 0000000..bcac7d2 --- /dev/null +++ b/voctocore/lib/videomix.py @@ -0,0 +1,167 @@ +#!/usr/bin/python3 +import logging +from gi.repository import Gst +from enum import Enum + +from lib.config import Config + +class CompositeModes(Enum): + fullscreen = 0 + side_by_side_equal = 1 + +class VideoMix(object): + log = logging.getLogger('VideoMix') + + mixingPipeline = None + + caps = None + names = [] + + compositeMode = CompositeModes.fullscreen + sourceA = 0 + sourceB = 1 + + def __init__(self): + self.caps = Config.get('mix', 'videocaps') + + self.names = Config.getlist('sources', 'video') + self.log.info('Configuring Mixer for %u Sources', len(self.names)) + + pipeline = """ + videomixer name=mix ! + {caps} ! + textoverlay text=mixer halignment=left valignment=top ypad=175 ! + intervideosink channel=video_mix + """.format( + caps=self.caps + ) + + for idx, name in enumerate(self.names): + pipeline += """ + intervideosrc channel=video_{name}_mixer ! + {caps} ! + videoscale ! + capsfilter name=caps_{idx} ! + mix. + """.format( + name=name, + caps=self.caps, + idx=idx + ) + + self.log.debug('Creating Mixing-Pipeline:\n%s', pipeline) + self.mixingPipeline = Gst.parse_launch(pipeline) + + self.log.debug('Initializing Mixer-State') + self.updateMixerState() + + self.log.debug('Launching Mixing-Pipeline:\n%s', pipeline) + self.mixingPipeline.set_state(Gst.State.PLAYING) + + def updateMixerState(self): + if self.compositeMode == CompositeModes.fullscreen: + self.updateMixerStateFullscreen() + + if self.compositeMode == CompositeModes.side_by_side_equal: + self.updateMixerStateSideBySideEqual() + + def updateMixerStateFullscreen(self): + self.log.info('Updating Mixer-State for Fullscreen-Composition') + + noScaleCaps = Gst.Caps.from_string('video/x-raw') + + for idx, name in enumerate(self.names): + alpha = int(idx == self.sourceA) + + self.log.debug('Setting Mixerpad %u to x/y=0 and alpha=%0.2f', idx, alpha) + mixerpad = self.mixingPipeline.get_by_name('mix').get_static_pad('sink_%u' % idx) + mixerpad.set_property('alpha', alpha ) + mixerpad.set_property('xpos', 0) + mixerpad.set_property('ypos', 0) + + self.log.debug('Resetting Scaler %u to non-scaling', idx) + capsfilter = self.mixingPipeline.get_by_name('caps_%u' % idx) + capsfilter.set_property('caps', noScaleCaps) + + def getInputVideoSize(self): + caps = Gst.Caps.from_string(self.caps) + struct = caps.get_structure(0) + _, width = struct.get_int('width') + _, height = struct.get_int('height') + + return width, height + + def updateMixerStateSideBySideEqual(self): + self.log.info('Updating Mixer-State for Side-by-side-Equal-Composition') + + width, height = self.getInputVideoSize() + gutter = int(width / 100) + + self.log.debug('Video-Size parsed as %u/%u, Gutter calculated to %upx', width, height, gutter) + + targetWidth = int((width - gutter) / 2) + targetHeight = int(targetWidth / width * height) + + ycenter = (height - targetHeight) / 2 + xa = 0 + xb = width - targetWidth + + scaleCaps = Gst.Caps.from_string('video/x-raw,width=%u,height=%u' % (targetWidth, targetHeight)) + noScaleCaps = Gst.Caps.from_string('video/x-raw') + + for idx, name in enumerate(self.names): + mixerpad = self.mixingPipeline.get_by_name('mix').get_static_pad('sink_%u' % idx) + + if idx == self.sourceA: + x = xa + y = ycenter + caps = scaleCaps + alpha = 1 + + self.log.debug('Setting Mixerpad %u to x/y=%u/%u and alpha=%0.2f', idx, x, y, alpha) + self.log.debug('Setting Scaler %u to %u/%u', idx, targetWidth, targetHeight) + + elif idx == self.sourceB: + x = xb + y = ycenter + caps = scaleCaps + alpha = 1 + + self.log.debug('Setting Mixerpad %u to x/y=%u/%u and alpha=%0.2f', idx, x, y, alpha) + self.log.debug('Setting Scaler %u to %u/%u', idx, targetWidth, targetHeight) + + else: + x = 0 + y = 0 + caps = noScaleCaps + alpha = 0 + + self.log.debug('Setting Mixerpad %u to x/y=%u/%u and alpha=%0.2f', idx, x, y, alpha) + self.log.debug('Resetting Scaler %u to non-scaling', idx) + + mixerpad.set_property('alpha', alpha) + mixerpad.set_property('xpos', x) + mixerpad.set_property('ypos', y) + + capsfilter = self.mixingPipeline.get_by_name('caps_%u' % idx) + capsfilter.set_property('caps', caps) + + def setVideoA(self, source): + # swap if required + if self.sourceB == source: + self.sourceB = self.sourceA + + self.sourceA = source + self.updateMixerState() + + def setVideoB(self, source): + # swap if required + if self.sourceA == source: + self.sourceA = self.sourceB + + self.sourceB = source + self.updateMixerState() + + def setCompositeMode(self, mode): + self.compositeMode = mode + self.updateMixerState() diff --git a/voctocore/scripts/audio-play-cam1-mirror.sh b/voctocore/scripts/audio-play-cam1-mirror.sh index d85a390..6b60a9b 100755 --- a/voctocore/scripts/audio-play-cam1-mirror.sh +++ b/voctocore/scripts/audio-play-cam1-mirror.sh @@ -1,5 +1,5 @@ #!/bin/sh gst-launch-1.0 \ - tcpclientsrc host=localhost port=23000 !\ - gdpdepay !\ + tcpclientsrc host=localhost port=13000 !\ + matroskademux !\ alsasink diff --git a/voctocore/scripts/audio-play-cam2-mirror.sh b/voctocore/scripts/audio-play-cam2-mirror.sh index 6881e43..e9f2fb1 100755 --- a/voctocore/scripts/audio-play-cam2-mirror.sh +++ b/voctocore/scripts/audio-play-cam2-mirror.sh @@ -1,5 +1,5 @@ #!/bin/sh gst-launch-1.0 \ - tcpclientsrc host=localhost port=23001 !\ - gdpdepay !\ - alsasink sync=false + tcpclientsrc host=localhost port=13001 !\ + matroskademux !\ + alsasink diff --git a/voctocore/scripts/audio-source-cam1.sh b/voctocore/scripts/audio-source-cam1.sh deleted file mode 100755 index f42bc3f..0000000 --- a/voctocore/scripts/audio-source-cam1.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -gst-launch-1.0 \ - audiotestsrc freq=440 !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 !\ - gdppay !\ - tcpclientsink host=localhost port=20000 diff --git a/voctocore/scripts/audio-source-cam2.sh b/voctocore/scripts/audio-source-cam2.sh deleted file mode 100755 index 84de3cb..0000000 --- a/voctocore/scripts/audio-source-cam2.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -gst-launch-1.0 \ - audiotestsrc freq=330 !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 !\ - gdppay !\ - tcpclientsink host=localhost port=20001 diff --git a/voctocore/scripts/audio-visualize-cam1-mirror.sh b/voctocore/scripts/audio-visualize-cam1-mirror.sh index 3119e7e..53aabb1 100755 --- a/voctocore/scripts/audio-visualize-cam1-mirror.sh +++ b/voctocore/scripts/audio-visualize-cam1-mirror.sh @@ -1,7 +1,7 @@ #!/bin/sh gst-launch-1.0 \ - tcpclientsrc host=localhost port=23000 !\ - gdpdepay !\ + tcpclientsrc host=localhost port=13000 !\ + matroskademux !\ wavescope shader=none style=lines !\ video/x-raw,width=800,height=300 !\ videoconvert !\ diff --git a/voctocore/scripts/av-play-cam1-mirror.sh b/voctocore/scripts/av-play-cam1-mirror.sh index 9149cd7..0e0e1e9 100755 --- a/voctocore/scripts/av-play-cam1-mirror.sh +++ b/voctocore/scripts/av-play-cam1-mirror.sh @@ -1,9 +1,12 @@ #!/bin/sh gst-launch-1.0 \ tcpclientsrc host=localhost port=13000 !\ - gdpdepay !\ - xvimagesink \ + matroskademux name=demux \ \ - tcpclientsrc host=localhost port=23000 !\ - gdpdepay !\ - alsasink sync=false + demux. !\ + queue !\ + xvimagesink ts-offset=1000000000 \ + \ + demux. !\ + queue !\ + alsasink provide-clock=false ts-offset=1000000000 diff --git a/voctocore/scripts/av-record-cam1-mirror.sh b/voctocore/scripts/av-record-cam1-mirror.sh index 0a33a97..2e7899d 100755 --- a/voctocore/scripts/av-record-cam1-mirror.sh +++ b/voctocore/scripts/av-record-cam1-mirror.sh @@ -1,17 +1,18 @@ #!/bin/sh gst-launch-1.0 \ tcpclientsrc host=localhost port=13000 !\ - gdpdepay !\ + matroskademux name=demux \ + \ + demux. !\ queue !\ timeoverlay !\ - videoconvert !\ avenc_mpeg2video bitrate=5000000 max-key-interval=0 !\ queue !\ mux. \ \ - tcpclientsrc host=localhost port=23000 !\ - gdpdepay !\ + demux. !\ queue !\ + audioconvert !\ avenc_mp2 bitrate=192000 !\ queue !\ mux. \ diff --git a/voctocore/scripts/av-source-avsync.sh b/voctocore/scripts/av-source-avsync.sh index 756d83b..0276202 100755 --- a/voctocore/scripts/av-source-avsync.sh +++ b/voctocore/scripts/av-source-avsync.sh @@ -5,19 +5,20 @@ gst-launch-1.0 -vm \ name=src \ \ src. !\ - queue !\ - videoconvert !\ - videoscale !\ - video/x-raw,format=I420,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 ! \ - timeoverlay valignment=bottom ! \ - gdppay ! \ - tcpclientsink host=localhost port=10000 \ + queue !\ + videoconvert !\ + videoscale !\ + video/x-raw,format=I420,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 ! \ + timeoverlay valignment=bottom ! \ + mux. \ \ src. !\ - queue !\ - audioconvert !\ - audioresample !\ - audiorate !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 !\ - gdppay !\ - tcpclientsink host=localhost port=20000 + queue !\ + audioconvert !\ + audioresample !\ + audiorate !\ + audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 !\ + mux. \ + \ + matroskamux name=mux !\ + tcpclientsrc host=localhost port=10000 diff --git a/voctocore/scripts/av-source-cam1.sh b/voctocore/scripts/av-source-cam1.sh new file mode 100755 index 0000000..11b9663 --- /dev/null +++ b/voctocore/scripts/av-source-cam1.sh @@ -0,0 +1,13 @@ +#!/bin/sh +gst-launch-1.0 -vm \ + videotestsrc pattern=smpte !\ + video/x-raw,format=I420,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 ! \ + timeoverlay valignment=bottom ! \ + mux. \ + \ + audiotestsrc freq=440 !\ + audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 !\ + mux. \ + \ + matroskamux name=mux !\ + tcpclientsrc host=localhost port=10000 diff --git a/voctocore/scripts/av-source-cam2.sh b/voctocore/scripts/av-source-cam2.sh new file mode 100755 index 0000000..139a507 --- /dev/null +++ b/voctocore/scripts/av-source-cam2.sh @@ -0,0 +1,13 @@ +#!/bin/sh +gst-launch-1.0 -vm \ + videotestsrc pattern=ball !\ + video/x-raw,format=I420,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 ! \ + timeoverlay valignment=bottom ! \ + mux. \ + \ + audiotestsrc freq=330 !\ + audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 !\ + mux. \ + \ + matroskamux name=mux !\ + tcpclientsrc host=localhost port=10001 diff --git a/voctocore/scripts/av-source-eevblog.sh b/voctocore/scripts/av-source-eevblog.sh index 1175b88..f99e43f 100755 --- a/voctocore/scripts/av-source-eevblog.sh +++ b/voctocore/scripts/av-source-eevblog.sh @@ -4,19 +4,20 @@ gst-launch-1.0 -vm \ decodebin name=src \ \ src. !\ - queue !\ - videoconvert !\ - videoscale !\ - video/x-raw,format=I420,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 ! \ - timeoverlay valignment=bottom ! \ - gdppay ! \ - tcpclientsink host=localhost port=10000 \ + queue !\ + videoconvert !\ + videoscale !\ + video/x-raw,format=I420,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 ! \ + timeoverlay valignment=bottom ! \ + mux. \ \ src. !\ - queue !\ - audioconvert !\ - audioresample !\ - audiorate !\ - audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 !\ - gdppay !\ - tcpclientsink host=localhost port=20000 + queue !\ + audioconvert !\ + audioresample !\ + audiorate !\ + audio/x-raw,format=S16LE,channels=2,layout=interleaved,rate=48000 !\ + mux. \ + \ + matroskamux name=mux !\ + tcpclientsink host=localhost port=10000 diff --git a/voctocore/scripts/video-play-cam1-mirror.sh b/voctocore/scripts/video-play-cam1-mirror.sh index 75e65c7..ec3605b 100755 --- a/voctocore/scripts/video-play-cam1-mirror.sh +++ b/voctocore/scripts/video-play-cam1-mirror.sh @@ -1,5 +1,5 @@ #!/bin/sh gst-launch-1.0 \ tcpclientsrc host=localhost port=13000 !\ - gdpdepay !\ + matroskademux !\ xvimagesink diff --git a/voctocore/scripts/video-play-cam2-mirror.sh b/voctocore/scripts/video-play-cam2-mirror.sh index b4ff9e5..e42ca6a 100755 --- a/voctocore/scripts/video-play-cam2-mirror.sh +++ b/voctocore/scripts/video-play-cam2-mirror.sh @@ -1,5 +1,5 @@ #!/bin/sh gst-launch-1.0 \ tcpclientsrc host=localhost port=13001 !\ - gdpdepay !\ + matroskademux !\ xvimagesink diff --git a/voctocore/scripts/video-play-mixer-output.sh b/voctocore/scripts/video-play-mixer-output.sh index c33b8f3..abb3174 100755 --- a/voctocore/scripts/video-play-mixer-output.sh +++ b/voctocore/scripts/video-play-mixer-output.sh @@ -1,5 +1,5 @@ #!/bin/sh gst-launch-1.0 \ tcpclientsrc host=localhost port=11000 !\ - gdpdepay !\ + matroskademux !\ xvimagesink diff --git a/voctocore/scripts/video-source-cam1.sh b/voctocore/scripts/video-source-cam1.sh deleted file mode 100755 index e920c43..0000000 --- a/voctocore/scripts/video-source-cam1.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -gst-launch-1.0 \ - videotestsrc !\ - video/x-raw,format=I420,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 !\ - timeoverlay valignment=bottom !\ - gdppay !\ - tcpclientsink host=localhost port=10000 diff --git a/voctocore/scripts/video-source-cam2.sh b/voctocore/scripts/video-source-cam2.sh deleted file mode 100755 index 403b852..0000000 --- a/voctocore/scripts/video-source-cam2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -gst-launch-1.0 \ - videotestsrc pattern=ball !\ - video/x-raw,format=I420,width=1280,height=720,framerate=25/1,pixel-aspect-ratio=1/1 !\ - timeoverlay valignment=bottom !\ - gdppay !\ - tcpclientsink host=localhost port=10001 -- cgit v1.2.3