From 0e3e02b23cd5e0487fc86b9cb39f75974d82301c Mon Sep 17 00:00:00 2001 From: ScrubN <72096833+ScrubN@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:50:06 -0500 Subject: [PATCH] Link to CLI example commands at the end of the getting started guides, clarify CLI README --- README.md | 22 ++++++++----- TwitchDownloaderCLI/README.md | 58 +++++++++++++++++++++++------------ 2 files changed, 53 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 2411293b..20508061 100644 --- a/README.md +++ b/README.md @@ -95,10 +95,11 @@ cd C:\folder\containing\TwitchDownloaderCLI ``` TwitchDownloaderCLI.exe ffmpeg --download ``` -5. You can now start using the downloader, for example: +5. You can now start using TwitchDownloaderCLI, for example: ``` TwitchDownloaderCLI.exe videodownload --id -o out.mp4 ``` +You can find more example commands in the [CLI README](TwitchDownloaderCLI/README.md#example-commands). ## Linux – Getting started @@ -122,10 +123,11 @@ sudo chmod +x TwitchDownloaderCLI ``` sudo chmod +x ffmpeg ``` -8. You can now start using the downloader, for example: +8. You can now start using TwitchDownloaderCLI, for example: ``` ./TwitchDownloaderCLI videodownload --id -o out.mp4 ``` +You can find more example commands in the [CLI README](TwitchDownloaderCLI/README.md#example-commands). ## MacOS – Getting started 1. If your device has an Apple Silicon M-series processor, ensure that you download the arm64 binary, however if you would like to use the x64 binary on Apple Silicon it must be run via a terminal session running under Rosetta 2: @@ -150,16 +152,18 @@ chmod +x TwitchDownloaderCLI ``` chmod +x ffmpeg ``` -7. You can now start using the downloader, for example: +7. You can now start using TwitchDownloaderCLI, for example: ``` ./TwitchDownloaderCLI videodownload --id -o out.mp4 ``` +You can find more example commands in the [CLI README](TwitchDownloaderCLI/README.md#example-commands). # Building from source ## Requirements - [.NET 6.0.x SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) +- About 1GB of disk space ## Build Instructions @@ -194,13 +198,9 @@ cd TwitchDownloaderWPF/bin/Release/net6.0-windows/publish/win-x64 cd TwitchDownloaderCLI/bin/Release/net6.0/publish ``` -# License - -[MIT](./LICENSE.txt) - # Third Party Credits -Chat Renders are rendered with [SkiaSharp and HarfBuzzSharp](https://github.com/mono/SkiaSharp) © Microsoft Corporation. +Chat Renders are rendered with [SkiaSharp](https://github.com/mono/SkiaSharp) and [HarfBuzzSharp](https://github.com/mono/SkiaSharp) © Microsoft Corporation. Chat Renders are encoded and Video Downloads are finalized with [FFmpeg](https://ffmpeg.org/) © The FFmpeg developers. @@ -215,3 +215,9 @@ FFmpeg binaries fetched are runtime are downloaded using [Xabe.FFmpeg.Downloader Chat Html exports utilize the _Inter_ typeface hosted by the [Google Fonts API](https://fonts.google.com/) © Google. For a full list of utilized external libraries, see [THIRD-PARTY-LICENSES.txt](./TwitchDownloaderCore/Resources/THIRD-PARTY-LICENSES.txt). + +# License + +[MIT](./LICENSE.txt) + +TwitchDownloader is in no way associated with Twitch Interactive, Inc. or its affiliates. \ No newline at end of file diff --git a/TwitchDownloaderCLI/README.md b/TwitchDownloaderCLI/README.md index 74735c81..88c82396 100644 --- a/TwitchDownloaderCLI/README.md +++ b/TwitchDownloaderCLI/README.md @@ -15,7 +15,7 @@ A cross platform command line tool that can do the main functions of the GUI pro --- ## Arguments for mode videodownload -Downloads a stream VOD or highlight from Twitch +#### Downloads a stream VOD or highlight from Twitch **-u / --id (REQUIRED)** The ID or URL of the VOD to download. @@ -53,7 +53,7 @@ Path to temporary folder for cache. (Default: `true`) Displays a banner containing version and copyright information. ## Arguments for mode clipdownload -Downloads a clip from Twitch +#### Downloads a clip from Twitch **-u / --id (REQUIRED)** The ID or URL of the Clip to download. @@ -80,7 +80,7 @@ Path to temporary folder for cache. (Default: `true`) Displays a banner containing version and copyright information. ## Arguments for mode chatdownload -Downloads the chat of a VOD, highlight, or clip +#### Downloads the chat of a VOD, highlight, or clip **-u / --id (REQUIRED)** The ID or URL of the VOD or clip to download. @@ -125,7 +125,7 @@ Path to temporary folder for cache. (Default: `true`) Displays a banner containing version and copyright information. ## Arguments for mode chatupdate -Updates the embedded emotes, badges, bits, and crops of a chat download and/or converts a JSON chat to another format +#### Updates the embedded emotes, badges, bits, and crops of a chat download and/or converts a JSON chat to another format **-i / --input (REQUIRED)** Path to input file. Valid extensions are: `.json`, `.json.gz`. @@ -167,7 +167,7 @@ Path to temporary folder for cache. (Default: `true`) Displays a banner containing version and copyright information. ## Arguments for mode chatrender -Renders a chat JSON as a video +#### Renders a chat JSON as a video **-i / --input (REQUIRED)** The path to the `.json` or `.json.gz` chat file input. @@ -323,7 +323,7 @@ Other = `1`, Broadcaster = `2`, Moderator = `4`, VIP = `8`, Subscriber = `16`, P ## Arguments for mode ffmpeg -Manage standalone FFmpeg +#### Manage standalone FFmpeg **-d / --download** (Default: `false`) Downloads FFmpeg as a standalone file. @@ -332,7 +332,7 @@ Other = `1`, Broadcaster = `2`, Moderator = `4`, VIP = `8`, Subscriber = `16`, P (Default: `true`) Displays a banner containing version and copyright information. ## Arguments for mode cache -Manage the working cache. +#### Manage the working cache. **-c / --clear** (Default: `false`) Clears the default cache folder. @@ -346,51 +346,71 @@ Other = `1`, Broadcaster = `2`, Moderator = `4`, VIP = `8`, Subscriber = `16`, P --- ## Example Commands -Examples of typical use cases +#### Examples of typical TwitchDownloaderCLI use cases. + +Note: Commands are formatted for unix systems (i.e. Mac, Linux). For usage on Windows, replace `./TwitchDownloaderCLI` with `TwitchDownloaderCLI.exe` (cmd) or `./TwitchDownloaderCLI.exe` (powershell). Download a VOD with defaults - TwitchDownloaderCLI videodownload --id 612942303 -o video.mp4 + ./TwitchDownloaderCLI videodownload --id 612942303 -o video.mp4 Download a Clip with defaults - TwitchDownloaderCLI clipdownload --id NurturingCalmHamburgerVoHiYo -o clip.mp4 + ./TwitchDownloaderCLI clipdownload --id NurturingCalmHamburgerVoHiYo -o clip.mp4 Download a Chat JSON with embedded emotes/badges from Twitch and emotes from Bttv - TwitchDownloaderCLI chatdownload --id 612942303 --embed-images --bttv=true --ffz=false --stv=false -o chat.json + ./TwitchDownloaderCLI chatdownload --id 612942303 --embed-images --bttv=true --ffz=false --stv=false -o chat.json Download a Chat as plain text with timestamps - TwitchDownloaderCLI chatdownload --id 612942303 --timestamp-format Relative -o chat.txt + ./TwitchDownloaderCLI chatdownload --id 612942303 --timestamp-format Relative -o chat.txt Add embeds to a chat file that was downloaded without embeds - TwitchDownloaderCLI chatupdate -i chat.json -o chat_embedded.json --embed-missing + ./TwitchDownloaderCLI chatupdate -i chat.json -o chat_embedded.json --embed-missing Convert a JSON chat file to HTML - TwitchDownloaderCLI chatupdate -i chat.json -o chat.html + ./TwitchDownloaderCLI chatupdate -i chat.json -o chat.html Render a chat with defaults - TwitchDownloaderCLI chatrender -i chat.json -o chat.mp4 + ./TwitchDownloaderCLI chatrender -i chat.json -o chat.mp4 Render a chat with custom video settings and message outlines - TwitchDownloaderCLI chatrender -i chat.json -h 1440 -w 720 --framerate 60 --outline -o chat.mp4 + ./TwitchDownloaderCLI chatrender -i chat.json -h 1440 -w 720 --framerate 60 --outline -o chat.mp4 Render a chat with custom FFmpeg arguments - TwitchDownloaderCLI chatrender -i chat.json --output-args='-c:v libx264 -preset veryfast -crf 18 -pix_fmt yuv420p "{save_path}"' -o chat.mp4 + ./TwitchDownloaderCLI chatrender -i chat.json --output-args='-c:v libx264 -preset veryfast -crf 18 -pix_fmt yuv420p "{save_path}"' -o chat.mp4 + +Download a portable FFmpeg binary for your system + + ./TwitchDownloaderCLI ffmpeg --download + +Clear the default TwitchDownloader cache folder + + ./TwitchDownloaderCLI cache --clear + +Print the available operations + + ./TwitchDownloaderCLI help + +Print the available options for the VOD downloader + + ./TwitchDownloaderCLI videodownload --help --- ## Additional Notes -String arguments, such as output file, that contain spaces should be wrapped in either single quotes ' or double quotes " . +All `--id` inputs will accept either video/clip IDs or full video/clip URLs. i.e. `--id 612942303` or `--id https://twitch.tv/videos/612942303`. + +String arguments that contain spaces should be wrapped in either single quotes ' or double quotes ". i.e. `--output 'my output file.mp4'` or `--output "my output file.mp4"` -Default true boolean flags must be assigned: `--default-true-flag=false`. Default false boolean flags should still be raised normally: `--default-false-flag` +Default true boolean flags must be assigned: `--default-true-flag=false`. Default false boolean flags should still be raised normally: `--default-false-flag`. For Linux users, ensure both `fontconfig` and `libfontconfig1` are installed. `apt-get install fontconfig libfontconfig1` on Ubuntu.