Skip to content

Commit ffab15f

Browse files
alb3ricdiemol
andauthored
Environment variable to specify the folder where the video is recorded (#1869)
* Environment variable to specify the folder where the video is recorded #1868 * Environment variable to specify the folder where the video is recorded Fix env name Fixes #1868 [deploy] --------- Co-authored-by: Diego Molina <[email protected]>
1 parent 8b3652d commit ffab15f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Video/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ ENV SE_FRAME_RATE 15
4040
ENV SE_CODEC libx264
4141
ENV SE_PRESET "-preset ultrafast"
4242
ENV FILE_NAME video.mp4
43+
ENV SE_VIDEO_FOLDER /videos
4344

44-
EXPOSE 9000
45+
EXPOSE 9000

Video/video.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ FILE_NAME=${FILE_NAME}
77
FRAME_RATE=${FRAME_RATE:-$SE_FRAME_RATE}
88
CODEC=${CODEC:-$SE_CODEC}
99
PRESET=${PRESET:-$SE_PRESET}
10+
VIDEO_FOLDER=${SE_VIDEO_FOLDER}
1011

1112
return_code=1
1213
max_attempts=50
@@ -23,5 +24,5 @@ until [ $return_code -eq 0 -o $attempts -eq $max_attempts ]; do
2324
done
2425

2526
# exec replaces the video.sh process with ffmpeg, this makes easier to pass the process termination signal
26-
exec ffmpeg -y -f x11grab -video_size ${VIDEO_SIZE} -r ${FRAME_RATE} -i ${DISPLAY_CONTAINER_NAME}:${DISPLAY_NUM}.0 -codec:v ${CODEC} ${PRESET} -pix_fmt yuv420p "/videos/$FILE_NAME"
27+
exec ffmpeg -y -f x11grab -video_size ${VIDEO_SIZE} -r ${FRAME_RATE} -i ${DISPLAY_CONTAINER_NAME}:${DISPLAY_NUM}.0 -codec:v ${CODEC} ${PRESET} -pix_fmt yuv420p "$VIDEO_FOLDER/$FILE_NAME"
2728

0 commit comments

Comments
 (0)