-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
174 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/sh -e | ||
|
||
ffmpeg $@ | ||
|
||
echo "all right" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM amd64/alpine:3.12 | ||
|
||
RUN apk add --no-cache \ | ||
vlc | ||
|
||
RUN adduser -D -H -s /bin/sh -u 9337 user | ||
|
||
COPY start.sh / | ||
RUN chmod +x /start.sh | ||
|
||
ENTRYPOINT [ "/start.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/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 & | ||
|
||
sleep 10 | ||
|
||
if [ $(stat -c "%s" /out/stream.ts) -gt 0 ]; then | ||
exit 0 | ||
else | ||
exit 1 | ||
fi |