MrBrax / LiveStreamDVR

An automatic livestream recorder
MIT License
330 stars 25 forks source link

Rendering chat and burn not working #481

Open JoaoZanetti opened 10 months ago

JoaoZanetti commented 10 months ago

The latest version does not render chat and burn to video (Frontend build: production - Frontend verbose: 2.4.1 (2023-11-19T23:24:21.447Z / )).

Error

image As shown in this image, the process has three problems.

  1. the previous screenshot shows that the raw command returns "missing --output parameter". For some reason, placing this parameter as the last parameter returns this error, but the command will work (in parts) when placed after the --input parameter.
  2. after fixing the --output parameter location, twitch downloader cli will return a new exception "Unhandled exception. System.AggregateException: One or more errors occurred. (toguromaquiavel_2023-11-20T22_46_29Z_42047739465.chatdump is not a valid chat format)", the command needs another fix: replace XYZ.chatdump with XYZ_chat.json (I have both files; I don't know why)
  3. after manually issuing the fixed command, the twitch downloader cli did not generate the mask file (I don't know what a mask file is).

Configuration

image

Files

image

Output after using the fixed command

image

MrBrax commented 10 months ago

seems like the chat format for twitchdownloader changed again and it's a nightmare to debug since there are no hints at all. maybe i have the patience to debug it again

MrBrax commented 10 months ago

quite odd too that the downloaded chat works fine without any changes to render it for me

JoaoZanetti commented 10 months ago

quite odd too that the downloaded chat works fine without any changes to render it for me

Maybe something related to the twitchdownloader version running in docker? I'm using the docker :master image

MrBrax commented 10 months ago

possibly, i don't think it's that old though

Nincodedo commented 10 months ago

I did some debugging and I think it has to do with how the background color value is being added. When I try to run the same rendering command the app generates... /usr/local/bin/TwitchDownloaderCLI chatrender --temp-path /usr/local/share/twitchautomator/data/cache --ffmpeg-path /usr/bin/ffmpeg --input /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.json --chat-height 720 --chat-width 300 --framerate 60 --update-rate 0 --font Inter --font-size 12 --outline --background-color #00000000 --generate-mask --output /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.mp4

It fails. However, if I remove the # from the background-color, it works fine.

/usr/local/bin/TwitchDownloaderCLI chatrender --temp-path /usr/local/share/twitchautomator/data/cache --ffmpeg-path /usr/bin/ffmpeg --input /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.json --chat-height 720 --chat-width 300 --framerate 60 --update-rate 0 --font Inter --font-size 12 --outline --background-color 00000000 --generate-mask --output /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.mp4

I think it's "commenting out" part of the command.

JoaoZanetti commented 10 months ago

I did some debugging and I think it has to do with how the background color value is being added. When I try to run the same rendering command the app generates... /usr/local/bin/TwitchDownloaderCLI chatrender --temp-path /usr/local/share/twitchautomator/data/cache --ffmpeg-path /usr/bin/ffmpeg --input /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.json --chat-height 720 --chat-width 300 --framerate 60 --update-rate 0 --font Inter --font-size 12 --outline --background-color #00000000 --generate-mask --output /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.mp4

It fails. However, if I remove the # from the background-color, it works fine.

/usr/local/bin/TwitchDownloaderCLI chatrender --temp-path /usr/local/share/twitchautomator/data/cache --ffmpeg-path /usr/bin/ffmpeg --input /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.json --chat-height 720 --chat-width 300 --framerate 60 --update-rate 0 --font Inter --font-size 12 --outline --background-color 00000000 --generate-mask --output /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.mp4

I think it's "commenting out" part of the command.

Same result here. Using double quotes in the background color fixes the problem.

MrBrax commented 10 months ago

The hash part is really odd, considering the official help says to use them:

1701766614471

Nincodedo commented 10 months ago

Right, but to use them with quotes around them.

MrBrax commented 10 months ago

node's spawn automatically escapes sequences i'm pretty sure

Nincodedo commented 10 months ago

I don't think it's working in this case. I copied the command that is sent to the logs. When running it as is with no changes...

/usr/local/bin/TwitchDownloaderCLI chatrender --temp-path /usr/local/share/twitchautomator/data/cache --ffmpeg-path /usr/bin/ffmpeg --input /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.json --chat-height 720 --chat-width 300 --framerate 60 --update-rate 0 --font Inter --font-size 12 --outline --background-color #00000000 --generate-mask --output /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.mp4

It fails with the error message "ERROR(S): Required option 'o, output' is missing.". But when I rerun it with added quotes around the background color...

/usr/local/bin/TwitchDownloaderCLI chatrender --temp-path /usr/local/share/twitchautomator/data/cache --ffmpeg-path /usr/bin/ffmpeg --input /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.json --chat-height 720 --chat-width 300 --framerate 60 --update-rate 0 --font Inter --font-size 12 --outline --background-color "#00000000" --generate-mask --output /usr/local/share/twitchautomator/data/storage/vods/undead_zeratul/2023-11-26/undead_zeratul_08_chat.mp4

It runs fine.

MrBrax commented 10 months ago

but does the same issue appear when the server just runs the command?

Nincodedo commented 9 months ago

I don't know the exact output since it doesn't display it in the logs, but it doesn't run.