Last active
March 3, 2024 05:34
-
-
Save koduki/7ebec066b490748795cf96c1a7683c18 to your computer and use it in GitHub Desktop.
Docker + VNCでOBSを使ってYoutubeライブ配信をするためのDockerfile
This file contains hidden or 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
FROM debian:12-slim | |
RUN apt-get -y update && apt install -y \ | |
websockify novnc tightvncserver \ | |
obs-studio | |
RUN apt install -y fluxbox | |
ENV USER=root | |
ADD ./resources/config /root/.config | |
ADD ./resources/vnc /root/.vnc | |
ADD ./resources/startup.sh /root/startup.sh | |
ADD ./resources/youtube-setup.py /root/youtube-setup.py | |
RUN chmod a+x /root/startup.sh | |
RUN echo foobar | vncpasswd -f > /root/.vnc/passwd | |
RUN chmod 600 /root/.vnc/passwd | |
CMD ["/root/startup.sh"] |
This file contains hidden or 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
import obsws_python as obs | |
client = obs.ReqClient(host='172.17.0.2', port=4455, password='j85l4lc0yoAlh7Ou', timeout=3) | |
res = client.get_version() | |
print(f"OBS Version: {res.obs_version}") | |
client.start_stream() | |
#cl.stop_stream() |
This file contains hidden or 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
#!/bin/sh | |
## Setup Config | |
python3 /root/youtube-setup.py | |
## Run VNC & OBS | |
vncserver -localhost :1 | |
DISPLAY=:1 obs & | |
websockify --web=/usr/share/novnc 6080 localhost:5901 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment