Transcode any HEVC file under 10 minutes
This commit is contained in:
parent
94b07ac7f3
commit
73d0f204dc
1 changed files with 8 additions and 0 deletions
|
@ -60,6 +60,13 @@ class AutoResponder(commands.Cog):
|
|||
info = await cog._run_ffprobe(uri, True)
|
||||
if not info:
|
||||
raise ValueError("No info found for %r" % uri)
|
||||
if float(info["format"].get("duration", 600.1)) > 600.0:
|
||||
self.log.warning(
|
||||
"Video %r is %.2f seconds long (more than 10 minutes). Refusing to process further.",
|
||||
uri,
|
||||
float(info["format"].get("duration", 600.1))
|
||||
)
|
||||
return
|
||||
streams = info.get("streams", [])
|
||||
for stream in streams:
|
||||
self.log.info("Found stream: %s", stream.get("codec_name"))
|
||||
|
@ -145,6 +152,7 @@ class AutoResponder(commands.Cog):
|
|||
1229496078726860921,
|
||||
421698654189912064
|
||||
}:
|
||||
# links = self.extract_links(message.content, "static-assets-1.truthsocial.com")
|
||||
links = self.extract_links(message.content, "static-assets-1.truthsocial.com")
|
||||
if links:
|
||||
for link in links:
|
||||
|
|
Loading…
Reference in a new issue