File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,10 @@ RUN set -xe && \
161
161
apt-get clean && \
162
162
rm -rf /usr/local/ffmpeg_sources
163
163
164
+ # Stream transcoding
165
+ COPY ./scripts/bootstrap.sh /opt/container/bootstrap.sh
166
+ RUN chmod +x /opt/container/bootstrap.sh
167
+
164
168
# Backend.AI specifics
165
169
COPY ./service-defs /etc/backend.ai/service-defs
166
170
COPY ./policy.yml /etc/backend.ai/jail/policy.yml
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ USER_ID=${LOCAL_USER_ID:- 9001}
4
+ USER_NAME=work
5
+
6
+ export HOME=" /home/$USER_NAME "
7
+
8
+ su - $USER_NAME -c " touch /home/work/ffmpeglog"
9
+
10
+ if (! [ -z ${INPUT_STREAM} ] ) && ( ! [ -z ${OUTPUT_STREAM} ] ); then
11
+ echo " nohup /usr/local/bin/ffmpeg -i $INPUT_STREAM -vcodec hevc_nvenc -f rtsp $OUTPUT_STREAM >> /home/work/ffmpeglog &" >> /home/work/ffmpeglog
12
+ su - $USER_NAME -c " nohup /usr/local/bin/ffmpeg -i $INPUT_STREAM -vcodec hevc_nvenc -f rtsp $OUTPUT_STREAM >> /home/work/ffmpeglog &"
13
+ else
14
+ echo " INPUT_STREAM: $INPUT_STREAM " >> /home/work/ffmpeglog
15
+ echo " OUTPUT_STREAM: $OUTPUT_STREAM " >> /home/work/ffmpeglog
16
+ fi
You can’t perform that action at this time.
0 commit comments