Don't reencode HEVC as discord now supports it
This commit is contained in:
parent
c0507dc981
commit
9855987cbc
1 changed files with 4 additions and 1 deletions
|
@ -193,6 +193,7 @@ async function download(url, interaction, originalInteraction, format = undefine
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the video format is not one compatible with Discord, reencode it unless autocrop is choosen in which case it gets reencoded anyway.
|
// If the video format is not one compatible with Discord, reencode it unless autocrop is choosen in which case it gets reencoded anyway.
|
||||||
|
/* Update: Discord now support hevc
|
||||||
if (!interaction.doAutocrop) {
|
if (!interaction.doAutocrop) {
|
||||||
const bannedFormats = ['hevc'];
|
const bannedFormats = ['hevc'];
|
||||||
const codec = await utils.getVideoCodec(output);
|
const codec = await utils.getVideoCodec(output);
|
||||||
|
@ -203,7 +204,9 @@ async function download(url, interaction, originalInteraction, format = undefine
|
||||||
await utils.ffmpeg(['-i', oldOutput, '-vcodec', 'libx264', '-acodec', 'aac', output]);
|
await utils.ffmpeg(['-i', oldOutput, '-vcodec', 'libx264', '-acodec', 'aac', output]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (interaction.doAutocrop && !compressInteraction.doCompress) {
|
else
|
||||||
|
*/
|
||||||
|
if (interaction.doAutocrop && !compressInteraction.doCompress) {
|
||||||
const oldOutput = output;
|
const oldOutput = output;
|
||||||
output = `${os.tmpdir()}/autocrop${file}`;
|
output = `${os.tmpdir()}/autocrop${file}`;
|
||||||
await utils.autoCrop(oldOutput, output);
|
await utils.autoCrop(oldOutput, output);
|
||||||
|
|
Loading…
Reference in a new issue