Skip to content

Add basic support for gifs/video files #12

Description

@AgentScrubbles

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions