Schakel gif functie uit

Voor "onderhoud", maar dat zal wel een paar jaartjes op de backlog
blijven staan.
This commit is contained in:
2022-03-10 11:10:07 +01:00
parent d4555e5ebb
commit 7f6991b480
+9 -30
View File
@@ -106,41 +106,20 @@ class General(commands.Cog):
@commands.command(pass_context=True)
@asyncio.coroutine
def gif(self, ctx, yt: str, start: str="0", duration: str="5", res: str="320", fps: int=10):
""" Giffify.
Syntax: !gif [YT] [START] [DUUR] [RESOLUTIE] [FPS]
Bv: !gif RPxvTd_jCPQ 10 5 320 10
Alleen de Youtube ID is nodig.
Start en duur zijn in seconden.
Resolutie is de breedte
""" Giffify. Tijdelijk uitgeschakeld.
"""
try:
yield from ctx.message.delete()
except:
print("No permission to delete message")
try:
os.remove('temp')
except:
pass
ydl_opts = {
'outtmpl': 'temp',
'format': 'bestvideo[ext=mp4]/mp4'
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([yt])
split = ffmpeg.input('temp').trim(start=start, duration=duration).filter_('fps',fps=fps).filter_('scale', w=res, h=-1).filter_multi_output('split')
pal = split.stream(0).filter_('palettegen')
inputs = {
'v1':split.stream(1),
'v2':pal
}
gif = (
ffmpeg
.filter(stream_spec=[split.stream(1), pal], filter_name='paletteuse')
.output('out.gif')
.overwrite_output()
.run()
)
yield from ctx.channel.send(ctx.author.mention + ' hoi ', file=discord.File('out.gif'))
yield from ctx.channel.send(
ctx.author.mention +
"""
Welkom bij de stroopwafel GIF hotline!
Deze functionaliteit is momenteel helaas offline voor onderhoud. Gelukkig is vergelijkbare functionaliteit ook elders beschikbaar:
Op <https://gifrun.com/> kunt u bijvoorbeeld via een web-interface gifjes maken van youtube-filmpjes. Geavanceerde gebruikers kunnen u ook <https://youtube-dl.org/> proberen, waarna u gifjes kan genereren via bijvoorbeeld <https://ezgif.com/>.
Namens de directie van Stroopwafel B.V. onze excuses voor dit ongemak.""")
@commands.command(pass_context=True)
@asyncio.coroutine