lay295 / TwitchDownloader

Twitch VOD/Clip Downloader - Chat Download/Render/Replay
MIT License
2.71k stars 260 forks source link

Option to download merged chat+video #56

Closed Zeryther closed 4 years ago

Zeryther commented 4 years ago

Add an option to download VOD/clip video and chat at once and also merge it into one. This could be achieved by rendering the chat video with a greenscreen and then overlapping the VOD video with it.

lay295 commented 4 years ago

I feel as though merging them is beyond the scope of this project, and people are free to script their own solution with the command line version. The problem is, people overlay their chats in many different ways, so accommodating them all in the program would be a hassle. Some people have their chat on the side completely off of the VOD, some people overlay it with transparency, some not, always different positions. I'd have to code in a way to select where in the VOD you'd want chat overlayed etc.

For example there is a YouTube channel called poopbutt that archives moonmoon vods, and I made a script for him to have chat to the right side of the VOD

@echo off
set /p vodid="Enter VOD ID: "

TwitchDownloaderCLI -m VideoDownload --id %vodid% --ffmpeg-path "ffmpeg.exe" -o %vodid%.mp4

TwitchDownloaderCLI -m ChatDownload --id %vodid% -o %vodid%_chat.json

TwitchDownloaderCLI -m ChatRender -i %vodid%_chat.json -h 1080 -w 422 --framerate 30 --update-rate 0 --font-size 18 -o %vodid%_chat.mp4

ffmpeg -i %vodid%.mp4 -i %vodid%_chat.mp4 -filter_complex "[0:v]scale=1498:-1,pad=1498:1080:0:120:black[first];[first][1:v]hstack[stack]" -r 60 -map "[stack]" -map 0:a %vodid%_combine.mp4

I'm not too familiar with ffmpeg, but I'm sure it's possible. to overlay it on the video too by chromakey.