diff --git a/rsc/osc/vimix_connect.sh b/rsc/osc/vimix_connect.sh new file mode 100644 index 0000000..b2ca8d2 --- /dev/null +++ b/rsc/osc/vimix_connect.sh @@ -0,0 +1,29 @@ +#!/bin/sh +if [ -z "$1" ] + then + echo "Usage: " + echo $0 " [PORT]" + exit 0 +fi + +if [ -z "$2" ] +then + PORT=9000 +else + PORT=$2 +fi + +## 1. request to vimix +## Requires liblo-tools to be installed (Linux: apt install liblo-tools, OSX: brew install liblo) +oscsend $1 7000 /vimix/peertopeer/request i "$PORT" + +## 2. start gstreamer client +## Requires gstreamer to be installed (Linux: apt install gstreamer1.0-tools, OSX: brew install gstreamer) +gst-launch-1.0 udpsrc port="$PORT" caps="application/x-rtp,media=(string)video,encoding-name=(string)JPEG" ! rtpjpegdepay ! queue ! decodebin ! videoconvert ! autovideosink sync=false + +## if vimix is configured for H246 peer to peer, use this command instead: +## gst-launch-1.0 udpsrc port=9000 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" ! queue ! rtph264depay ! h264parse ! decodebin ! videoconvert ! autovideosink sync=false + +## 3. disconnect from vimix +oscsend $1 7000 /vimix/peertopeer/disconnect i "$PORT" + diff --git a/src/ControlManager.cpp b/src/ControlManager.cpp index 0c22cf0..918cde5 100644 --- a/src/ControlManager.cpp +++ b/src/ControlManager.cpp @@ -1025,7 +1025,9 @@ void Control::receiveStreamAttribute(const std::string &attribute, // remove prevous identical stream Streaming::manager().removeStream(sender, port); // add the requested stream to manager - Streaming::manager().addStream(sender, port, label == nullptr ? sender : label); + std::string clientname = label == nullptr ? sender.substr(0, sender.find_last_of(":")) : label; + clientname += " [" + std::to_string(port) + "]"; + Streaming::manager().addStream(sender, port, clientname); } // Stream disconnection request /vimix/stream/disconnect else if ( attribute.compare(OSC_STREAM_DISCONNECT) == 0 ) {