golanggohlsrtmpwebrtcmedia-serverobs-studiortcprtmp-proxyrtmp-serverrtprtsprtsp-proxyrtsp-relayrtsp-serversrtstreamingwebrtc-proxy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
368 B
22 lines
368 B
#!/bin/sh -e |
|
|
|
mkdir /out |
|
chown user:user /out |
|
|
|
CMD="cvlc --play-and-exit --no-audio --no-video --sout file/ts:/out/stream.ts -vvv $@" |
|
su - user -c "$CMD" 2>&1 & |
|
|
|
COUNTER=0 |
|
while true; do |
|
sleep 1 |
|
|
|
if [ $(stat -c "%s" /out/stream.ts) -gt 0 ]; then |
|
exit 0 |
|
fi |
|
|
|
COUNTER=$(($COUNTER + 1)) |
|
|
|
if [ $COUNTER -ge 15 ]; then |
|
exit 1 |
|
fi |
|
done
|
|
|