Skip to content

Configuration

Logan H-D edited this page Oct 22, 2021 · 23 revisions

By default, VodBot loads a JSON formatted configuration file located in a folder dedicated to VodBot in the user's home directory. VodBot handles a lot of functions with default values taken from this config file. A config file and all the necessary directories are created after running vodbot init, which you can read about here. An example is provided at the bottom of the page.

Fields

These are all the fields that can be used in the config file, and what they are. If you need an example of a full configuration file, there is one provided below.

General

  • twitch_channels: a list of string names of channels on twitch to pull VODs and Clips from, specifically the names at the end of their page URLs.
  • pull_chat_logs: a boolean, determines whether chat logs will be pulled alongside VODs. Default is true, can be true or false.
  • ffmpeg_loglevel: string of logging output level of ffmpeg. Default is "warning" for potential issues of outputted file, but can also be "error" for major problems and "fatal" and problems that cause crashes.

Directories

Places where VodBot will write important info to. It's recommended the Clip and VOD directories be on a multidisk array for safe keeping, as these files are massive. VodBot will make the directories if they are not present.

  • vod_dir: Full path to where VOD files are stored. This should be a safe place!
  • clip_dir: Full path to where Clip files are stored. This should be a safe place!
  • temp_dir: Full path to where VodBot will store sections of video to either download or upload. It is recommended this path is on a fast-to-write-to storage device.
  • stage_dir: Full path to where VodBot will store text files of StageData, for use in uploading videos.

Chat Logs

When possible, VodBot will add chat logs from the stream to the video as subtitles in a separate file (or uploaded to YouTube with the video)

  • chat_msg_time: an integer, determines how long in seconds chat messages stay on screen as subtitles.
  • chat_upload: string, the format that the subtitles will be exported as when uploading to YouTube. Can be "RealText" or "SAMI".
  • chat_export: string, the format that the subtitles will be exported as when exporting videos. Can be "raw", "RealText", or "SAMI".

Info on the various formats VodBot supports:

  • RealText is a markup language style of subtitles, and can be read about here. It generally has the smallest filesize and preserves chat name colors.
  • SAMI (or Synchronized Accessible Media Interchange) is another markup language for subtitles, you can read about it here. It is a useful alternative if RealText is not supported for whatever reason.
  • The "raw" format is the most basic export VodBot can do of chat logs, it is how VodBot saves chat logs internally. It is not intended to be human readable, you can read more here.

Staging

  • stage_timezone: string, timezone of the VODs/Clips, used for description formatting. Must be a UTC string like '+0000' or '-0530'.
  • stage_format: A dictionary of strings that can be formatted with special predefined strings, or other strings from the dictionary. The predefined strings are described below.
    • date: The date the stream started, formatted as year/month/day.
    • streamer: The streamer who the video is of.
    • streamers: A list of all the streamers in the video, created when staged.
    • link: The link to the twitch of the streamer.
    • links: A space delimited string of all the links of the streamers, created when staged.
  • stage_upload_delete: A boolean switch for if staged data should be deleted on a successful upload. By default, this value is true, and will cause stages to be deleted when operation completes successfully.
  • stage_export_delete: A boolean switch for if staged data should be deleted on a successful export. By default, this value is true.

Uploading

Below are files specific to the vodbot upload use case. These are specific to a Google Cloud App, you must register your own with Google with the "YouTube Data v3" API, these should be stored in a secure place and never shared. See Tips & Tricks for more info on setting up YouTube uploading.

  • youtube_client_path: Full path to the Client OAuth 2.0 JSON.
  • youtube_pickle_path: Full path to where VodBot should store it's session data.

Example config file

This is the one I use to manage my own VODs/Clips!

{
  "twitch_channels": [ "vivicaster",
    "alkana", "hylianswordsman1",
    "juicibit", "notquiteapex",
    "pissyellowcrocs", "percy_creates"
  ],

  "ffmpeg_loglevel": "warning",

  "pull_chat_logs": true,

  "chat_msg_time": 10,
  "chat_upload": "RealText",
  "chat_export": "RealText",

  "stage_timezone": "-0400",
  "stage_format": {
	"captions": "Want to replay chat with video streams? Click the gear, select Subtitles, and select 'English - Chat'.",
    "watch": "Watch streams live at {links}",
    "discord": "Join the Friend Team Inc. Discord: https://discord.gg/v2t6uag",
	"vodbot": "Stream archived by VodBot: https://github.com/NotQuiteApex/VodBot",
    "credits": "\n{captions}\n{watch}\n{discord}\n{vodbot}",
	"e": "on {date}\n{credits}"
  },

  "youtube_client_path": "/root/.vodbot/yt-client.json",
  "youtube_pickle_path": "/root/.vodbot/yt-api-keys.pkl",

  "vod_dir": "/mnt/md0/vods",
  "clip_dir": "/mnt/md0/clips",
  "temp_dir": "/root/.vodbot/temp",
  "stage_dir": "/root/.vodbot/stage"
}

I use VodBot on Linux, so these paths are POSIX based, but Windows paths must have all backslashes replaced with double backslashes. (i.e. the path C:\Users\Apex\Desktop\ should be written as "C:\\Users\\Apex\\Desktop\\" in the JSON)

Clone this wiki locally