Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Add srt protocol to docker #8

Open
ndujar opened this issue Jun 18, 2020 · 3 comments
Open

Add srt protocol to docker #8

ndujar opened this issue Jun 18, 2020 · 3 comments

Comments

@ndujar
Copy link

ndujar commented Jun 18, 2020

I would suggest to add SRT protocol to the docker image:

## libsrt https://github.com/Haivision/srt ARG LIBSRT_VERSION=1.4.1 ENV DEBIAN_FRONTEND noninteractive RUN apt-get install libssl-dev tclsh -y RUN DIR=/tmp/srt && \ mkdir -p ${DIR} && \ cd ${DIR} && \ wget https://github.com/Haivision/srt/archive/v${LIBSRT_VERSION}.tar.gz && \ tar -xz --strip-components=1 -f v${LIBSRT_VERSION}.tar.gz && \ cmake -DCMAKE_INSTALL_PREFIX=/usr/local && \ make && \ make install DESTDIR="/home/build" && \ make install && \ rm -rf ${DIR}

Then compile ffmpeg with this ability:

RUN cd /home/FFmpeg && \ find ${FFMPEG_MA_PATH}/patches -type f -name '*.patch' -print0 | sort -z | xargs -t -0 -n 1 patch -p1 -i && \ cp /root/patch/opencv.pc /usr/lib/pkgconfig/ && \ cp /root/patch/cvdef.h /usr/local/include/opencv4/opencv2/core/cvdef.h && \ ./configure --prefix="/usr" --extra-cflags="-I$IE_PATH/include" --extra-ldflags="-L$IE_PATH/lib/intel64" --libdir=/usr/lib/x86_64-linux-gnu --extra-libs="-lpthread -lm" --enable-shared --enable-gpl --enable-libass --enable-libfreetype --enable-openssl --enable-nonfree --enable-libdrm --enable-libmfx --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libjson_c --enable-libsrt --enable-libinference_engine_c_api --enable-libopencv --enable-python3 && \ make -j8 && \ make install DESTDIR="/home/build" && \ cp -rf python /home/build/python

Thanks! :)

@linxie47
Copy link
Contributor

Hi @ndujar, could you give a reason for this change? Thanks!

@ndujar
Copy link
Author

ndujar commented Jun 19, 2020

Hi @linxie47:
It would be just a matter of completion. Currently, the docker image supports a good amount of transport protocols:
Supported file protocols: Input: async cache concat crypto data ffrtmpcrypt ffrtmphttp file ftp gopher hls http httpproxy https mmsh mmst pipe rtmp rtmpe rtmps rtmpt rtmpte rtmpts rtp srtp subfile tcp tls udp udplite unix Output: crypto ffrtmpcrypt ffrtmphttp file ftp gopher http httpproxy https icecast md5 pipe prompeg rtmp rtmpe rtmps rtmpt rtmpte rtmpts rtp srtp tee tcp tls udp udplite unix

However, I found out thath SRT is missing, and it is gaining traction as a good alternative to other "classic" protocols that are slowly becoming outdated.

Secure Reliable Transport (SRT) is an open source video transport protocol that optimizes streaming performance across unpredictable networks, such as the Internet, by dynamically adapting to the real-time network conditions between transport endpoints. This helps minimize effects of jitter and bandwidth changes, while error-correction mechanisms help minimize packet loss. SRT supports end-to-end encryption with AES.[1] When performing retransmissions, SRT only attempts to retransmit packets for a limited amount of time based on the latency as configured by the application.
This is especially useful for organizations where the LAN is congested and packet loss is common. For example, streaming from a crowded convention (everyone is fighting over the same LAN) to a production studio is bound to decrease the quality of the video transmission. Utilizing SRT as the transport protocol (as opposed to MPEG-TS, RTP or RTSP) helps to minimize these issues and delivers the video feed to the decoder destination optimally.

It is very useful to be able to stream directly from a VCDP's docker image with low latency.

Thanks :)

@linxie47
Copy link
Contributor

Thanks for the reply. If you'd like to add this function, please submit one Pull Request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants