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)
|
info = await cog._run_ffprobe(uri, True)
|
||||||
if not info:
|
if not info:
|
||||||
raise ValueError("No info found for %r" % uri)
|
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", [])
|
streams = info.get("streams", [])
|
||||||
for stream in streams:
|
for stream in streams:
|
||||||
self.log.info("Found stream: %s", stream.get("codec_name"))
|
self.log.info("Found stream: %s", stream.get("codec_name"))
|
||||||
|
@ -145,6 +152,7 @@ class AutoResponder(commands.Cog):
|
||||||
1229496078726860921,
|
1229496078726860921,
|
||||||
421698654189912064
|
421698654189912064
|
||||||
}:
|
}:
|
||||||
|
# links = self.extract_links(message.content, "static-assets-1.truthsocial.com")
|
||||||
links = self.extract_links(message.content, "static-assets-1.truthsocial.com")
|
links = self.extract_links(message.content, "static-assets-1.truthsocial.com")
|
||||||
if links:
|
if links:
|
||||||
for link in links:
|
for link in links:
|
||||||
|
|
Loading…
Reference in a new issue