Comments (4)
The dockerfile was created by @BrainyXS, as I currently don't have much knowledge on docker. So I will leave that up to him.
cc: @BrainyXS
from autovod.
Long comment coming up; Apologies in advance.
With some trial and error, by changing few lines from AutoVOD.sh
and DockerFile
I was able to get AutoVOD.sh
check the channel properly inside the container. I have no clue if those few changes could break the script however.
# DockerFile
FROM alpine
# Command above will pull 'alpine:latest' image
# Define an ARG variable & set an ENV variable for AutoVOD.sh later
ARG TWITCH_USER # ARG is used only when building; No effect on container itself. (--build-arg)
ENV NAME=${TWITCH_USER} # This Environment variable will be set for built container.
# Upgrade the system and install dependencies
RUN apk add --no-cache --upgrade python3 tar wget bash jq rclone curl # Added curl for curl command in the shell script
RUN python3 -m ensurepip
RUN pip3 install --upgrade streamlink
RUN wget wget https://github.com/porjo/youtubeuploader/releases/download/23.02/youtubeuploader_23.02_Linux_arm64.tar.gz
RUN tar -xvf youtubeuploader_23.02_Linux_arm64.tar.gz && rm youtubeuploader_23.02_Linux_arm64.tar.gz &&\
mv youtubeuploader /usr/local/bin/youtubeuploader
# Maybe steps above could be written better with architecture check routine?
# Copy the required files
COPY ${TWITCH_USER}.config /autoVOD/${TWITCH_USER}.config # Changed to fit $NAME variable for later
COPY AutoVOD.sh /autoVOD/AutoVOD.sh
COPY client_secrets.json /autoVOD/client_secrets.json
COPY request.token /autoVOD/request.token
# Start AutoVod
WORKDIR /autoVOD
CMD ["bash", "AutoVOD.sh"]
--build-arg
for docker build
wouldn't work for AutoVOD Docker container as --build-arg
is only used when building an image for container. And then there's this problem:
Line 27 in 3bbac74
Looking at this line, it seems the issue @Slopz mentioned is caused from this. Since script tries to fetch arguments from shell command you would enter manually, it will utilize '-ndockeruser' from command and it will try to check 'twitch.tv/dockeruser'. In order to fix this I added an environment variable
NAME
which is also used in AutoVOD.sh
.
ARG TWITCH_USER
ENV NAME=${TWITCH_USER}
Line 18 in 3bbac74
This line was also changed in order to utilize
NAME
for AutoVOD.sh
later:
COPY ${TWITCH_USER}.config /autoVOD/${TWITCH_USER}.config
With that, I will change the shell command from AutoVOD.sh
like so:
CMD ["bash", "AutoVOD.sh"]
Since -n
isn't necessary, we don't need to use fetchArgs
function either:
Lines 7 to 19 in 3bbac74
From
AutoVOD.sh
, we could just comment fetchArgs
function execution part out so that NAME
would remain unchanged since configured from DockerFile
:
#fetchArgs "$@"
Maybe just clearing out the function for later would work, but then manual installation method would get little bit complicated since using Environment Variable means something like export NAME=targetchannel
is necessary. (Maybe make a separate script only for Docker?)
Line 52 in 3bbac74
Line 8 in 3bbac74
Since
AutoVOD.sh
utilizes curl
, I also changed this line from DockerFile
so that curl
command works inside the container:
RUN apk add --no-cache --upgrade python3 tar wget bash jq rclone curl
This was the result after change, checked from container logs: (Running on Docker installed on Raspberry Pi 3B; NAME
was set to 'targetto' as an example)
17:04:23| Selected streamer: targetto
17:04:24| Found config file
17:04:24| Starting AutoVOD
17:04:24| Loading targetto.config
17:04:24| Trying to fetch stream metadata
17:04:26| Stream is online!
17:04:26| Current Title: null
17:04:26| Current Game: null
17:04:26| Checking twitch.tv/targetto for a stream
17:04:26| All required files found
error: No playable streams found on this URL: twitch.tv/targetto
17:04:34| Trying again in 1 minute
There could be a better way than what I did, but that's all from me.
from autovod.
Hi,
I appreciate the debugging, do you mind compiling this into a PR? so it's easier for me to see the suggested changes and test it out.
At a glance, I would highly prefer to only have 1 file for both docker and "manual" for ease of further development on the project.
i was trying to look back on previous commits to see where this broke.
Config file support and the current iteration of the dockerfile was introduced in #28
Thanks 😄
from autovod.
Update: I have made a hacky fix on #61
Feel free to review @totallyparity
from autovod.
Related Issues (20)
- [question] - Downloading the Twitch VOD HOT 6
- Local upload provider HOT 1
- [feat] - replace aws with rclone
- [Bug] [Docker] - Youtube required files HOT 1
- [DOCKER] Volumes HOT 1
- Stream variables not working HOT 3
- [Feature] - Failure to upload file/tempfile
- [Feature] - Improve dockerfile
- [Feature request] automatic video scheduling for the "youtube" provider HOT 3
- [Bug] autovod doesn't support Streamlink's twitch-api-header argument HOT 9
- [feat] - Support Kick.com
- [bug] shellcheck action not working
- Problem with STREAMER_TITLE and STREAMER_GAME variables HOT 3
- Issue to prevent ADS to appear in VODs HOT 1
- Hardcoded streamlink plugin path inside DOCKEFILE
- Youtube live support HOT 4
- Kick.com seems broke HOT 2
- $($TIME_DATE) is never changing. $($TIME_CLOCK) totally wrong, HOT 5
- twitch category with special chars wont get tagged properly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autovod.