obsproject / obs-bot

Source code for the obsproject Discord bot
https://discord.gg/obsproject
GNU General Public License v3.0
37 stars 18 forks source link

cogs.public.log_analysis: Add filtering for broken video capture devices #15

Closed Nofew closed 2 years ago

Nofew commented 2 years ago

Description

Add a warning and link to a filtered log if a log contains spam from a broken video capture device. Depends on a minor change to logs.lua on Rodney's end. See https://discord.com/channels/348973006581923840/374636084883095554/990274591119265822 .

Motivation and Context

Some devices, especially cheap capture cards and webcams, sometimes emit messages like this:

11:05:27.466: warning: Found EOI before any SOF, ignoring 11:05:27.466: fatal: No JPEG data found in image 11:05:27.466: Error decoding video

There is code to be added to logs.lua ( see https://discord.com/channels/348973006581923840/374636084883095554/990274591119265822 ) that will remove instances of these. The changes in this PR cause OBSBot to emit a slightly different message than the usual one when this happens, so that mobile users who cannot run Grep for themselves can see that there was a broken video capture device, while still getting the benefit of a cleaner log.

How Has This Been Tested?

It has not.

Types of changes

Checklist:

RytoEX commented 2 years ago

Is this always indicative of a broken video capture device?