I think we could add some basic video/gif support by re-using the image processing and taking frames of each gif/video that pictrs stores.
I don't know python well, but I do know ffmpeg and video processing very well. Using a library like ffmpeg-python I think we could add on support for videos/gifs. ffmpeg could then be easily bundled with the containers, and could be toggled with an environment variable
The process could go like:
For (first frame), (last frame), (every 5 seconds), (random sequence of frames):
grab the frame using something like "ffmpeg -ss 00:00:00.01 -i {input}.(mp4|gif|whatever) -frames:v 1 {framenumber}.jpg"
if that detects as nsfw, reject
I think this would be a valid way to start checking videos as well. With the sequenced every n seconds combined with random frames grabbed, it would be extremely difficult to try to hide NSFW in a video.
I think we could add some basic video/gif support by re-using the image processing and taking frames of each gif/video that pictrs stores.
I don't know python well, but I do know ffmpeg and video processing very well. Using a library like ffmpeg-python I think we could add on support for videos/gifs. ffmpeg could then be easily bundled with the containers, and could be toggled with an environment variable
The process could go like:
I think this would be a valid way to start checking videos as well. With the sequenced every n seconds combined with random frames grabbed, it would be extremely difficult to try to hide NSFW in a video.