From 6c889f522f1014ff74881ec116a4d4dcf7b8381f Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Wed, 7 Dec 2022 20:14:27 +0100 Subject: [PATCH 01/18] [WIP] added api endpoint to fetch streamtitle and parse it --- AutoVOD.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index ced15e7..276a9f1 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -8,6 +8,17 @@ echo "" # Every minute, try to download the Twitch stream, and send it to YouTube. # Everything through the pipe, no video file is created. +function getStreamTitle() { + json=$(curl -s https://twitch-api-wrapper.vercel.app/title/$1) # https://github.com/jenslys/twitch-api-wrapper + if [ "$json" = "[]" ]; then + echo "Stream is offline" + elif [ "$json" = "Too many requests, please try again later." ]; then + echo "Too many API requests" + else + echo "$json" | jq -r '.streamTitle' + fi +} + while true; do STREAMER_NAME=$TWITCH_USER #! Dont change this. TIME_DATE=[$(date +"%m.%d.%y")] # Preview example: [08.10.21] @@ -17,7 +28,8 @@ while true; do VIDEO_DURATION="12:00:00" # XX:XX:XX (YouTube has a upload limit of 12 hours per video). VIDEO_PLAYLIST="$STREAMER_NAME VODs" # Playlist to upload to. SPLIT_INTO_PARTS="false" # If you want to split the video into parts, set this to true. (if this is enabled VIDEO_DURATION is ignored). - SPLIT_VIDEO_DURATION="06:00:00" + SPLIT_VIDEO_DURATION="06:00:00" # Duration of each part. (XX:XX:XX) + STREAM_TITLE=$(getStreamTitle "$STREAMER_NAME") #* Optional variable you can add to VIDEO_TITLE if you want to display the stream title. # Splitting the stream into parts (If enabled) if [[ "$SPLIT_INTO_PARTS" == "true" ]]; then From 3cb005c0a43df5432f782113516757b7c5e64ced Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Thu, 8 Dec 2022 12:21:05 +0100 Subject: [PATCH 02/18] add jq to installation docs and script --- README.md | 6 ++++++ install.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 890700c..434a7c4 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,12 @@ apt-get install python3-pip tar pip3 install --upgrade streamlink ``` +### JQ + +```bash +apt-get install jq +``` + #### YouTubeUploader ```bash diff --git a/install.sh b/install.sh index 448218a..6a5397f 100755 --- a/install.sh +++ b/install.sh @@ -8,7 +8,7 @@ printf "${g}[$now] Updating and upgrading packages...${c}\n" apt-get -qq update && apt-get -qq upgrade printf "${g}[$now] Installing Packages${c}\n" -sudo apt-get install npm python3-pip tar -y +sudo apt-get install npm python3-pip tar jq -y printf "${g}[$now] Installing PM2${c}\n" npm install pm2 -g && pm2 startup From c75b40ebf58da1b87cf7f73f0249ec70dce64ecc Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Thu, 8 Dec 2022 12:22:24 +0100 Subject: [PATCH 03/18] add JQ to dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c6b85ce..4fc7198 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM alpine:3.14 # Upgrade the system and install dependencies -RUN apk add --no-cache --upgrade python3 tar wget bash +RUN apk add --no-cache --upgrade python3 tar wget bash jq RUN python3 -m ensurepip RUN pip3 install --upgrade streamlink From 262048c86b3a28ec973723edbbb12a6b08df61e7 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Thu, 8 Dec 2022 12:44:33 +0100 Subject: [PATCH 04/18] add new variable to enable and disable API calls --- AutoVOD.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index 276a9f1..bf979f0 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -19,6 +19,10 @@ function getStreamTitle() { fi } +function getStreamGame() { + #! Not implemented yet. +} + while true; do STREAMER_NAME=$TWITCH_USER #! Dont change this. TIME_DATE=[$(date +"%m.%d.%y")] # Preview example: [08.10.21] @@ -29,7 +33,11 @@ while true; do VIDEO_PLAYLIST="$STREAMER_NAME VODs" # Playlist to upload to. SPLIT_INTO_PARTS="false" # If you want to split the video into parts, set this to true. (if this is enabled VIDEO_DURATION is ignored). SPLIT_VIDEO_DURATION="06:00:00" # Duration of each part. (XX:XX:XX) - STREAM_TITLE=$(getStreamTitle "$STREAMER_NAME") #* Optional variable you can add to VIDEO_TITLE if you want to display the stream title. + API_CALLS="false" # Enable this if you want to use more stream metadata like STREAM_TITLE and STREAM_GAME. (This is a boolean value, because we dont want to make unnecessary API calls. if variables are not used) + if [[API_CALLS == "true"]]; then #? If API_CALLS is enabled. + STREAM_TITLE=$(getStreamTitle "$STREAMER_NAME") #* Optional variable you can add to VIDEO_TITLE if you want to display the stream title. + STREAM_GAME="" #* Not implemented yet. + fi # Splitting the stream into parts (If enabled) if [[ "$SPLIT_INTO_PARTS" == "true" ]]; then From a06d0623461a2e61efd2136ad1f820d84cdf5c78 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Thu, 8 Dec 2022 12:58:35 +0100 Subject: [PATCH 05/18] addd STREAM_GAME variable and function --- AutoVOD.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index bf979f0..51edfe1 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -20,7 +20,14 @@ function getStreamTitle() { } function getStreamGame() { - #! Not implemented yet. + json=$(curl -s https://twitch-api-wrapper.vercel.app/game/$1) # https://github.com/jenslys/twitch-api-wrapper + if [ "$json" = "[]" ]; then + echo "Stream is offline" + elif [ "$json" = "Too many requests, please try again later." ]; then + echo "Too many API requests" + else + echo "$json" | jq -r '.streamGame' + fi } while true; do @@ -34,9 +41,9 @@ while true; do SPLIT_INTO_PARTS="false" # If you want to split the video into parts, set this to true. (if this is enabled VIDEO_DURATION is ignored). SPLIT_VIDEO_DURATION="06:00:00" # Duration of each part. (XX:XX:XX) API_CALLS="false" # Enable this if you want to use more stream metadata like STREAM_TITLE and STREAM_GAME. (This is a boolean value, because we dont want to make unnecessary API calls. if variables are not used) - if [[API_CALLS == "true"]]; then #? If API_CALLS is enabled. - STREAM_TITLE=$(getStreamTitle "$STREAMER_NAME") #* Optional variable you can add to VIDEO_TITLE if you want to display the stream title. - STREAM_GAME="" #* Not implemented yet. + if [[API_CALLS == "true"]]; then # + STREAM_TITLE=$(getStreamTitle "$STREAMER_NAME") #* Optional variable you can add to display the current stream title. + STREAM_GAME=$(getStreamGame "$STREAMER_NAME") #* Optioanl variable you can add to display the current stream game. fi # Splitting the stream into parts (If enabled) From 2c4857cd1fa0c6b0baa112c97c502144ce15b879 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Thu, 8 Dec 2022 15:44:54 +0100 Subject: [PATCH 06/18] json name change --- AutoVOD.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index 51edfe1..459286a 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -15,7 +15,7 @@ function getStreamTitle() { elif [ "$json" = "Too many requests, please try again later." ]; then echo "Too many API requests" else - echo "$json" | jq -r '.streamTitle' + echo "$json" | jq -r '.stream_title' fi } @@ -26,7 +26,7 @@ function getStreamGame() { elif [ "$json" = "Too many requests, please try again later." ]; then echo "Too many API requests" else - echo "$json" | jq -r '.streamGame' + echo "$json" | jq -r '.stream_game' fi } From 7c2507bc10a2e7d7cbe4531a18e225df9bb8d3d4 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Thu, 8 Dec 2022 15:48:43 +0100 Subject: [PATCH 07/18] comments --- AutoVOD.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index 459286a..77ddee9 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -7,9 +7,10 @@ echo "" # Every minute, try to download the Twitch stream, and send it to YouTube. # Everything through the pipe, no video file is created. +# Src for API wrapper: # https://github.com/jenslys/twitch-api-wrapper function getStreamTitle() { - json=$(curl -s https://twitch-api-wrapper.vercel.app/title/$1) # https://github.com/jenslys/twitch-api-wrapper + json=$(curl -s https://twitch-api-wrapper.vercel.app/title/$1) if [ "$json" = "[]" ]; then echo "Stream is offline" elif [ "$json" = "Too many requests, please try again later." ]; then @@ -20,7 +21,7 @@ function getStreamTitle() { } function getStreamGame() { - json=$(curl -s https://twitch-api-wrapper.vercel.app/game/$1) # https://github.com/jenslys/twitch-api-wrapper + json=$(curl -s https://twitch-api-wrapper.vercel.app/game/$1) if [ "$json" = "[]" ]; then echo "Stream is offline" elif [ "$json" = "Too many requests, please try again later." ]; then From ed00fe7ff59631f37c67b9dbea2a363ec14de132 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Sun, 11 Dec 2022 22:47:32 +0100 Subject: [PATCH 08/18] add retries to curl command It seems that the api dosent return a result on each call, so added a retry of 5 --- AutoVOD.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index 77ddee9..459ca5e 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -10,22 +10,22 @@ echo "" # Src for API wrapper: # https://github.com/jenslys/twitch-api-wrapper function getStreamTitle() { - json=$(curl -s https://twitch-api-wrapper.vercel.app/title/$1) + json=$(curl -s --retry 5 --retry-delay 2 --connect-timeout 30 https://twitch-api-wrapper.vercel.app/title/$1) if [ "$json" = "[]" ]; then echo "Stream is offline" elif [ "$json" = "Too many requests, please try again later." ]; then - echo "Too many API requests" + echo $json else echo "$json" | jq -r '.stream_title' fi } function getStreamGame() { - json=$(curl -s https://twitch-api-wrapper.vercel.app/game/$1) + json=$(curl -s --retry 5 --retry-delay 2 --connect-timeout 30 https://twitch-api-wrapper.vercel.app/game/$1) if [ "$json" = "[]" ]; then echo "Stream is offline" elif [ "$json" = "Too many requests, please try again later." ]; then - echo "Too many API requests" + $json else echo "$json" | jq -r '.stream_game' fi From 9264a799641f43fbfb85d84046ad0945c6a2c8d8 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Wed, 21 Dec 2022 01:11:01 +0100 Subject: [PATCH 09/18] Refactor everything into 1 function - refactor into 1 function - added logs --- .gitignore | 3 ++- AutoVOD.sh | 47 +++++++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 0ff4298..f89ca7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ client_secrets.json request.token -.DS_Store \ No newline at end of file +.DS_Store +/tests/ diff --git a/AutoVOD.sh b/AutoVOD.sh index 459ca5e..d8acba7 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -5,29 +5,33 @@ echo "Using Twitch user: $TWITCH_USER" echo "" echo "" -# Every minute, try to download the Twitch stream, and send it to YouTube. -# Everything through the pipe, no video file is created. -# Src for API wrapper: # https://github.com/jenslys/twitch-api-wrapper +function getStreamInfo() { + # This uses my own API wrapper for twitch that i have hosted. (https://github.com/jenslys/twitch-api-wrapper). + # i would recommend self hosting yourself with your own API credentials. but you may use the one provided below. -function getStreamTitle() { - json=$(curl -s --retry 5 --retry-delay 2 --connect-timeout 30 https://twitch-api-wrapper.vercel.app/title/$1) - if [ "$json" = "[]" ]; then - echo "Stream is offline" - elif [ "$json" = "Too many requests, please try again later." ]; then + echo "Fetching stream metadata..." + echo "" + + url="https://twitch-api-wrapper.vercel.app/info/$1" + json=$(curl -s --retry 5 --retry-delay 2 --connect-timeout 30 $url) + + if [ "$json" = "Too many requests, please try again later." ]; then echo $json - else - echo "$json" | jq -r '.stream_title' + echo "" + return fi -} -function getStreamGame() { - json=$(curl -s --retry 5 --retry-delay 2 --connect-timeout 30 https://twitch-api-wrapper.vercel.app/game/$1) + STREAMER_TITLE=$(echo "$json" | jq -r '.stream_title') + STREAMER_GAME=$(echo "$json" | jq -r '.stream_game') + if [ "$json" = "[]" ]; then - echo "Stream is offline" - elif [ "$json" = "Too many requests, please try again later." ]; then - $json + echo "Stream is offline, can't fetch metadata." + echo "" else - echo "$json" | jq -r '.stream_game' + echo "Stream is online!" + echo "Current Title: $STREAMER_TITLE" + echo "Current Game: $STREAMER_GAME" + echo "" fi } @@ -39,12 +43,11 @@ while true; do VIDEO_TITLE="$STREAMER_NAME - $TIME_DATE" # Title of the Youtube video. VIDEO_DURATION="12:00:00" # XX:XX:XX (YouTube has a upload limit of 12 hours per video). VIDEO_PLAYLIST="$STREAMER_NAME VODs" # Playlist to upload to. - SPLIT_INTO_PARTS="false" # If you want to split the video into parts, set this to true. (if this is enabled VIDEO_DURATION is ignored). + SPLIT_INTO_PARTS="false" #? If you want to split the video into parts, set this to true. (if this is enabled VIDEO_DURATION is ignored). SPLIT_VIDEO_DURATION="06:00:00" # Duration of each part. (XX:XX:XX) - API_CALLS="false" # Enable this if you want to use more stream metadata like STREAM_TITLE and STREAM_GAME. (This is a boolean value, because we dont want to make unnecessary API calls. if variables are not used) - if [[API_CALLS == "true"]]; then # - STREAM_TITLE=$(getStreamTitle "$STREAMER_NAME") #* Optional variable you can add to display the current stream title. - STREAM_GAME=$(getStreamGame "$STREAMER_NAME") #* Optioanl variable you can add to display the current stream game. + API_CALLS="false" #? Enable if you want to fetch stream metadata like the Title or Game. You can use the folowing variables with this enabled: $STREAMER_TITLE and $STREAMER_GAME. + if [[API_CALLS == "true"]]; then + getStreamInfo $STREAMER_NAME STREAMER_TITLE STREAMER_GAME fi # Splitting the stream into parts (If enabled) From d6ac9c7bb90b89afaa399fa940d63054762c4ed2 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Wed, 21 Dec 2022 23:41:51 +0100 Subject: [PATCH 10/18] readme heading change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 434a7c4..0457066 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ apt-get install python3-pip tar pip3 install --upgrade streamlink ``` -### JQ +#### JQ ```bash apt-get install jq From 428a450b98ae67f1e1d5766592a8d373795d3a57 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Thu, 22 Dec 2022 21:30:24 +0100 Subject: [PATCH 11/18] fix var --- AutoVOD.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index d8acba7..f31b432 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -46,7 +46,7 @@ while true; do SPLIT_INTO_PARTS="false" #? If you want to split the video into parts, set this to true. (if this is enabled VIDEO_DURATION is ignored). SPLIT_VIDEO_DURATION="06:00:00" # Duration of each part. (XX:XX:XX) API_CALLS="false" #? Enable if you want to fetch stream metadata like the Title or Game. You can use the folowing variables with this enabled: $STREAMER_TITLE and $STREAMER_GAME. - if [[API_CALLS == "true"]]; then + if [[$API_CALLS == "true"]]; then getStreamInfo $STREAMER_NAME STREAMER_TITLE STREAMER_GAME fi From 01e3eb7c612c4e5d45f01ecf65a413c0f2ef965c Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Thu, 22 Dec 2022 21:31:56 +0100 Subject: [PATCH 12/18] fix var 2 --- AutoVOD.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index f31b432..c530138 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -46,7 +46,7 @@ while true; do SPLIT_INTO_PARTS="false" #? If you want to split the video into parts, set this to true. (if this is enabled VIDEO_DURATION is ignored). SPLIT_VIDEO_DURATION="06:00:00" # Duration of each part. (XX:XX:XX) API_CALLS="false" #? Enable if you want to fetch stream metadata like the Title or Game. You can use the folowing variables with this enabled: $STREAMER_TITLE and $STREAMER_GAME. - if [[$API_CALLS == "true"]]; then + if [[ "$API_CALLS" == "true"]]; then getStreamInfo $STREAMER_NAME STREAMER_TITLE STREAMER_GAME fi From 06227ea8f83ad4d26aff6965facb44ec13bfdc97 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Thu, 22 Dec 2022 23:12:37 +0100 Subject: [PATCH 13/18] move api call up --- AutoVOD.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index c530138..8f467fb 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -37,6 +37,10 @@ function getStreamInfo() { while true; do STREAMER_NAME=$TWITCH_USER #! Dont change this. + API_CALLS="false" #? Enable if you want to fetch stream metadata like the Title or Game. You can use the folowing variables with this enabled: $STREAMER_TITLE and $STREAMER_GAME. + if [[ "$API_CALLS" == "true" ]]; then # + getStreamInfo $STREAMER_NAME STREAMER_TITLE STREAMER_GAME # + fi # TIME_DATE=[$(date +"%m.%d.%y")] # Preview example: [08.10.21] VIDEO_VISIBILITY="unlisted" #* Options: unlisted, private, public VIDEO_DESCRIPTION="Uploaded using https://github.com/jenslys/AutoVOD" # YouTube video description. @@ -45,10 +49,6 @@ while true; do VIDEO_PLAYLIST="$STREAMER_NAME VODs" # Playlist to upload to. SPLIT_INTO_PARTS="false" #? If you want to split the video into parts, set this to true. (if this is enabled VIDEO_DURATION is ignored). SPLIT_VIDEO_DURATION="06:00:00" # Duration of each part. (XX:XX:XX) - API_CALLS="false" #? Enable if you want to fetch stream metadata like the Title or Game. You can use the folowing variables with this enabled: $STREAMER_TITLE and $STREAMER_GAME. - if [[ "$API_CALLS" == "true"]]; then - getStreamInfo $STREAMER_NAME STREAMER_TITLE STREAMER_GAME - fi # Splitting the stream into parts (If enabled) if [[ "$SPLIT_INTO_PARTS" == "true" ]]; then From ec8376c6caa647a5049ecf1e1fd5a839fd3302b5 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Fri, 23 Dec 2022 13:14:22 +0100 Subject: [PATCH 14/18] add disable-ads flag to streamlink --- AutoVOD.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index 8f467fb..336d983 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -61,7 +61,7 @@ while true; do fi fi - STREAMLINK_OPTIONS="best --hls-duration $VIDEO_DURATION --twitch-disable-hosting --twitch-disable-reruns -O --loglevel error" # https://streamlink.github.io/cli.html#twitch + STREAMLINK_OPTIONS="best --hls-duration $VIDEO_DURATION --twitch-disable-hosting --twitch-disable-ads --twitch-disable-reruns -O --loglevel error" # https://streamlink.github.io/cli.html#twitch echo "Checking twitch.tv/$STREAMER_NAME for a stream." From 27ef43665c8935cf12324b025f96c69476e48ad1 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Fri, 23 Dec 2022 13:48:33 +0100 Subject: [PATCH 15/18] add notice to place tokens in autovod folder --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0457066..40dd940 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ apt-get install jq ```bash wget https://github.com/porjo/youtubeuploader/releases/download/22.03/youtubeuploader_22.03_Linux_x86_64.tar.gz tar -xvf youtubeuploader_22.03_Linux_x86_64.tar.gz && rm youtubeuploader_22.03_Linux_x86_64.tar.gz -mv youtubeuploader_22.03_Linux_x86_64 /usr/local/bin/youtubeuploader +mv youtubeuploader /usr/local/bin/youtubeuploader ``` #### AutoVOD @@ -92,7 +92,7 @@ Set up your credentials to allow YouTubeUploader to upload videos to YouTube. youtubeuploader -filename sample.mp4 ``` - 1. and then simply copy the token file along with `youtubeuploader` and `client_secrets.json` to the remote host. + 1. and then simply copy the token file along with `youtubeuploader` and `client_secrets.json` to the remote host. make sure these are placed inside the autovod folder **Note** To be able to upload videos as either "Unlisted or Public", you will have to request an [API audit](https://support.google.com/youtube/contact/yt_api_form) from YouTube for your project. Without an audit your videos will be locked as private. From 9c9c509496814b6948016d922ed9d96de0d22f7f Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Fri, 23 Dec 2022 14:23:50 +0100 Subject: [PATCH 16/18] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 40dd940..be22e10 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ Set up your credentials to allow YouTubeUploader to upload videos to YouTube. youtubeuploader -filename sample.mp4 ``` - 1. and then simply copy the token file along with `youtubeuploader` and `client_secrets.json` to the remote host. make sure these are placed inside the autovod folder + 1. and then simply copy the token file along with `youtubeuploader` and `client_secrets.json` to the remote host. Make sure these are placed inside the 'autovod' folder **Note** To be able to upload videos as either "Unlisted or Public", you will have to request an [API audit](https://support.google.com/youtube/contact/yt_api_form) from YouTube for your project. Without an audit your videos will be locked as private. From 463eeb6db7466315c343737ecb6eea08c73eaa33 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Sat, 24 Dec 2022 00:08:45 +0100 Subject: [PATCH 17/18] readme changes to youtube quota note --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index be22e10..fa04398 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Set up your credentials to allow YouTubeUploader to upload videos to YouTube. 1. and then simply copy the token file along with `youtubeuploader` and `client_secrets.json` to the remote host. Make sure these are placed inside the 'autovod' folder **Note** -To be able to upload videos as either "Unlisted or Public", you will have to request an [API audit](https://support.google.com/youtube/contact/yt_api_form) from YouTube for your project. Without an audit your videos will be locked as private. +To be able to upload videos as either "Unlisted or Public" and upload multiple videos a day, you will have to request an [API audit](https://support.google.com/youtube/contact/yt_api_form) from YouTube. Without an audit your videos will be locked as private and you are limited to how many videos you can upload before you reach a quota. ## Usage From 1c553bdece5934d4d3171e05e4c3d5dad518d8b7 Mon Sep 17 00:00:00 2001 From: Jens <69081683+jenslys@users.noreply.github.com> Date: Sat, 24 Dec 2022 00:15:33 +0100 Subject: [PATCH 18/18] cleanup --- AutoVOD.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/AutoVOD.sh b/AutoVOD.sh index 336d983..325a32b 100644 --- a/AutoVOD.sh +++ b/AutoVOD.sh @@ -11,10 +11,8 @@ function getStreamInfo() { echo "Fetching stream metadata..." echo "" - url="https://twitch-api-wrapper.vercel.app/info/$1" json=$(curl -s --retry 5 --retry-delay 2 --connect-timeout 30 $url) - if [ "$json" = "Too many requests, please try again later." ]; then echo $json echo ""