reticivis-net / mediaforge

A Discord bot for editing and creating videos, images, GIFs, and more!
GNU General Public License v3.0
81 stars 28 forks source link

Auto compress files that are large. #236

Open PortalRex opened 5 months ago

PortalRex commented 5 months ago

Describe the feature you'd like

Having a setting that allows for compress to be done to a video before reupload as to allow for larger media to be uploaded. Maybe have a threshold of if a file is larger than xxMB it is automatically compressed and uploaded.

Is your feature request related to a problem? Please describe.

No response

Describe alternatives you've considered

No response

Anything Else

No response

reticivis-net commented 5 months ago

I assume this is referring to the download size limit. The issue for me is that I don’t want to stress out my network too much and also it’s a decent way to limit the amount of input data

PortalRex commented 5 months ago

Oh, that is totally reasonable. I self host so I completely forgot that aspect haha.

reticivis-net commented 5 months ago

If you self-host, you can just manually up the maximum allowed input file size, it’s a config setting

https://github.com/reticivis-net/mediaforge/blob/f568e2c35ca2a094471758ce7a7da6677d494bbe/config.example.py#L28

PortalRex commented 5 months ago

I did up that, the problem now is the file size is larger than 50MB as the server only has level 2 boosts.

reticivis-net commented 5 months ago

There isn’t anything I can do about that, all files have to fit into discord’s upload limit

PortalRex commented 5 months ago

No no I understand but this traces back to the original idea. If the bot downloads a file that is 150MB rather than having it auto fail due to the size. Have a config/setting that allows for automatic compress through ffmpeg that brings it under the required size.

reticivis-net commented 5 months ago

That still wouldn’t fix the issue of stressing my network, the limited input size also prevents DoS type attacks

PortalRex commented 5 months ago

Completely understandable once again, I'll look to see if I can write up something for anyone who self hosts.