This tool stitches together livestream VOD segments (in `.mkv`format) and automatically uploads them to YouTube, complete with customisable metadata such as titles, descriptions, and tags.
I built this to greatly simplify the process of getting my full-quality livestream VODs onto YouTube, and I'm open-sourcing it in the hopes that it helps someone else with their workflow. As such, personal forks are welcome and encouraged!
2. Edit configuration file as necessary (You will need to create a [YouTube Data API v3](https://developers.google.com/youtube/v3) service and provide its credentials here).
> [!IMPORTANT] `config.toml` contains very sensitive credentials. Do not share this file with anyone.
Template files can be created at `templates/title.txt`,
`template/description.txt`, and `templates/tags.txt` respectively. These
files can use Go's [text template format](https://pkg.go.dev/text/template) to
customise VOD metadata on upload.
You can use the following data in templates:
- **`.Title`:** The title of the stream.
- **`.Date`:** The date of the stream.
- **`.Part`:** The part number of the stream (Good for episodic streams!)
- **`.Category`:** Stream category details. (**NOTE:** Wrap usage in `{{if .Category}}` to ensure this field exists first!)
- **`.Category.Name`:** The stream category name (Game titles and generic categories are applicable here, i.e. "Minecraft", "Art", etc.)
- **`.Category.Type`:** At this time, should only ever be `"gaming"` or `"other"`.
- **`.Category.Url`:** A URL relevant to the category. Use this to direct viewers to what you were checking out!
Some helper functions are also provided:
- **`FormatTime <time> <format>`:** Format the provided time (`.Date`) according to a [Go time format](https://go.dev/src/time/format.go).
- **`ToLower <text>`:** Convert `text` to all-lowercase.
- **`ToUpper <text>`:** Convert `text` to all-uppercase.
For reference, you can find my personal templates [here](templates/). These should prove helpful if you aren't already familiar with Go's templating language!