mirror of https://github.com/OpenVidu/openvidu.git
openvidu-recording docker container: headless chrome mode
parent
d02fd1a989
commit
ca588de620
|
@ -7,6 +7,9 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
|
|||
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | tee /etc/apt/sources.list.d/google-chrome.list && \
|
||||
apt-get update && apt-get install -y google-chrome-stable
|
||||
|
||||
# Download selenium-server
|
||||
RUN wget --no-verbose https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar -O /selenium-server-standalone.jar
|
||||
|
||||
# Install media packages
|
||||
RUN apt-get install -y software-properties-common
|
||||
RUN add-apt-repository ppa:jonathonf/ffmpeg-4
|
||||
|
@ -16,6 +19,9 @@ RUN apt-get install -y ffmpeg pulseaudio xvfb
|
|||
# Install jq for managing JSON
|
||||
RUN apt-get install -y jq
|
||||
|
||||
# Install Java 8
|
||||
RUN apt-get install -y openjdk-8-jdk-headless
|
||||
|
||||
# Clean
|
||||
RUN apt-get autoclean
|
||||
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
### Use container as a single headless chrome ###
|
||||
|
||||
if [ "$HEADLESS_CHROME_ONLY" == true ]; then
|
||||
java -jar -Dwebdriver.chrome.driver="$CHROME_DRIVER_PATH" /selenium-server-standalone.jar &> /selenium-server.log &
|
||||
sleep 100000000
|
||||
else
|
||||
|
||||
### Use container as OpenVidu recording module ###
|
||||
|
||||
### Variables ###
|
||||
|
||||
URL=${URL:-https://www.youtube.com/watch?v=JMuzlEQz3uo}
|
||||
|
@ -107,3 +116,5 @@ ffmpeg -ss $MIDDLE_TIME -i /recordings/$VIDEO_ID/$VIDEO_NAME.$VIDEO_FORMAT -vfra
|
|||
### Change permissions to all generated files ###
|
||||
|
||||
sudo chmod -R 777 /recordings/$VIDEO_ID
|
||||
|
||||
fi
|
Loading…
Reference in New Issue