Skip to content

loomkoom/get-vods-clips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-vods-clips

CodeFactor codecov Tests Stargazers Issues

Table of Contents

Built With

Prerequisites

  • installer as of now only supported on Windows (otherwise download programs separately)
  • python
  • MPV is used to check if links with a valid url are playable or not
  • ffmpeg if you wish to download the vods

Installation

  1. Clone or download the repo
  2. run installer.cmd to install needed programs and required packages, also updates files if needed.

Usage

Disclaimer this uses undocumented twitch end points and may break at any point in time

info:

  • Vods are usually only retrievable for the last 60 days with some exceptions
  • If a vod goes down or is restarted resulting in multiple vods for the same stream in twitchtracker use streamcharts to get vod.
  • for clips most are retrievable for an unlimited amount of time but not 100% are found (a bit unpredictable).

all script executables are located in the scripts folder

main scripts

  • get_all_vods_and_clips.cmd writes a text file with all vods or urls found in a certain time period from channel name and date range and allows you to download everything it finds (only thing you need to run if you want to bulk search clips/vods for a channel)

  • download_all_files.cmd downloads all links in the text file generated from get_all_vods_and_clips.cmd if you provide the name of the file in output/files/data (use if you chose not to download at first in get_all_vods_and_clips but want to do it afterwards)

  • get_vods_date.cmd retrieves all vods from a specific day on a channel (if the vod is muted a muted version will be saved under /output/files/streamername/playlists)

  • get_clips_date.cmd retrieves all clips from a specific day on a channel

You need to have some data from the stream if you want to run scripts under the extra scripts section
all data can be found on twitchtracker if you inspect element on the stream link in the streams page https://twitchtracker.com/twitch/streams Using twitches glitchcon eve stream as an example: https://twitchtracker.com/twitch/streams/40468501598
(dates/times are always in UTC format!)
tracker image
source image
Broadcast-id = 40468501598
timestamp = 2020-11-13 19:14:07
channel name = twitch
length = 30 (minutes)

extra scripts

  • get_clips.cmd returns a list with all clips from a specific broadcast-id

  • get_vod.cmd gets the vod from the channel name,timestamp and vod-id if it's still available. If the vod is muted it also writes a muted version in output/files/playlists

  • get_muted_vod.cmd writes a muted vod file in output/files/playlists if you input a url and filename

  • get_stream_data.cmd returns a list with all stream data in certain time period from channel name and date range with each stream as (timestamp, broadcast-id, minutes, title)

  • test_vods.cmd test all the vod links (with mpv) in the specified input file in /output/data and writes all successful links to output file

Roadmap

  • get vods by the timestamp and ID
  • get clips by ID and length
  • get vods/clips by date
  • get all vods/clips in date range
  • download them from generated txt file
  • implement GUI
  • make .exe for easier install

Acknowledgements