EdgeRouter 4 Install msd_lite / msd

msd_lite

http://www.netlab.linkpc.net/wiki/en:software:msd:lite

Deprecated, but recommended!!! You can also use Multi Stream daemon (msd)

Steps:

1 Clone code on computer, because my ER-4 reports dpkg errors, due to the outdated debian stretch. Then upload to ER-4

git clone --recursive https://github.com/rozhuk-im/msd_lite.git
tar zcvf msd_lite.tar.gz msd_lite
scp msd_lite.tar.gz ubnt@192.168.1.1:/tmp/

2 On ER-4, install build-essential, cmake

For build-essential, read EdgeRouter 4 Build & Install udpxy

# apt install cmake
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cmake : Depends: cmake-data (= 3.7.2-1) but it is not going to be installed
         Depends: libarchive13 (>= 3.0.4) but it is not going to be installed
         Depends: libjsoncpp1 (>= 1.7.4) but it is not going to be installed
         Depends: libuv1 (>= 1.4.2) but it is not going to be installed
 dpkg-dev : Depends: xz-utils but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).



# apt install cmake cmake-data  libarchive13 libjsoncpp1 libuv1 

3 build on ER-4

tar xvf /tmp/msd_lite.tar.gz
cd msd_lite
mkdir build
cd build
cmake ..
make 
make install

4 configure and run

/etc/msd_lite.conf


<?xml version="1.0" encoding="utf-8"?>

<!--
 Sizes in kb, time in seconds
-->

<!--
<skt> <rcvLoWatermark>XXXX</rcvLoWatermark> - DOES NOT WORK on Linux!
man socket(7):
...
The select(2) and poll(2) system calls currently do not respect the SO_RCVLOWAT
setting on Linux, and mark a socket readable when even a single byte of data is
available.
...
-->


<msd>
	<log>
		<file>/var/log/msd_lite.log</file>
	</log>

	<threadPool>
		<threadsCountMax>1</threadsCountMax> <!-- 0 = auto -->
		<fBindToCPU>yes</fBindToCPU> <!-- Bind threads to CPUs. -->
		<fCacheGetTimeSyscall>yes</fCacheGetTimeSyscall> <!-- Cache gettime() syscalls.. -->
		<timerGranularity>100</timerGranularity> <!-- 1/1000 sec -->
	</threadPool>


<!-- HTTP server -->
	<HTTP>
		<bindList>
			<bind><address>0.0.0.0:7088</address><fAcceptFilter>y</fAcceptFilter></bind>
			<bind><address>[::]:7088</address></bind>
		</bindList>

		<hostnameList> <!-- Host names for all bindings. -->
			<hostname>*</hostname>
		</hostnameList>
	</HTTP>


	<hubProfileList> <!-- Stream hub profiles templates. -->
		<hubProfile>
			<fDropSlowClients>no</fDropSlowClients> <!-- Disconnect slow clients. -->
			<fSocketHalfClosed>no</fSocketHalfClosed> <!-- Enable shutdown(SHUT_RD) for clients. -->
			<fSocketTCPNoDelay>yes</fSocketTCPNoDelay> <!-- Enable TCP_NODELAY for clients. -->
			<fSocketTCPNoPush>yes</fSocketTCPNoPush> <!-- Enable TCP_NOPUSH / TCP_CORK for clients. -->
			<precache>4096</precache> <!-- Pre cache size. Can be overwritten by arg from user request. -->
			<ringBufSize>1024</ringBufSize> <!-- Stream receive ring buffer size. Must be multiple of sndBlockSize. -->
			<skt>
				<sndBuf>512</sndBuf> <!-- Max send block size, apply to clients sockets only, must be > sndBlockSize. -->
				<sndLoWatermark>64</sndLoWatermark>  <!-- Send block size. Must be multiple of 4. -->
				<congestionControl>htcp</congestionControl> <!-- TCP_CONGESTION: this value replace/overwrite(!) all others cc settings: cc from http req args, http server settings, OS default -->
			</skt>
			<headersList> <!-- Custom HTTP headers (sended before stream). -->
				<header>Pragma: no-cache</header>
				<header>Content-Type: video/mpeg</header>
				<header>ContentFeatures.DLNA.ORG: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000</header>
				<header>TransferMode.DLNA.ORG: Streaming</header>
			</headersList>
		</hubProfile>
	</hubProfileList>


	<sourceProfileList> <!-- Stream source profiles templates. -->
		<sourceProfile>
			<skt>
				<rcvBuf>512</rcvBuf> <!-- Multicast recv socket buf size. -->
				<rcvLoWatermark>48</rcvLoWatermark> <!-- Actual cli_snd_block_min if polling is off. -->
				<rcvTimeout>2</rcvTimeout> <!-- STATUS, Multicast recv timeout. -->
			</skt>
			<multicast> <!-- For: multicast-udp and multicast-udp-rtp. -->
				<ifName>br0</ifName> <!-- For multicast receive. -->
			</multicast>
		</sourceProfile>
	</sourceProfileList>
</msd>

I only modified the multicast -> ifName to br0.

RUN

msd_lite -c /etc/msd_lite.conf -v

msd

http://www.netlab.linkpc.net/wiki/software:msd:index

Same as msd_lite, but powerful.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *