Skip to content

Commit dd07d9f

Browse files
committed
Change default ytdlp format to 1080
1 parent 3166e34 commit dd07d9f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2023 aNNiMON
3+
Copyright (c) 2023-2025 aNNiMON
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

src/main/java/com/annimon/ffmpegbot/commands/HelpCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void accept(@NotNull MessageContext ctx) {
5555
<b>yt-dlp</b>
5656
/dl link [format] — download a media using yt-dlp
5757
<code>link</code> — a link to download (it must be supported by yt-dlp)
58-
<code>format</code> — (optional) a download format. Can be: best, audio, 240, 360, 480, 720 or 1080. Default: best
58+
<code>format</code> — (optional) a download format. Can be: best, audio, 240, 360, 480, 720 or 1080. Default: 1080
5959
/clip link [duration] [format] — make a clip using yt-dlp (intended for streams)
6060
<code>link</code> — yt-dlp supported link, livestreams intended such as twitch
6161
<code>duration</code> — (optional) duration in seconds. Max: 199, min: 10, default: 20

src/main/java/com/annimon/ffmpegbot/commands/ytdlp/YtDlpCommandBundle.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
public class YtDlpCommandBundle implements CommandBundle<For> {
2828

29+
private static final String DEFAULT_FORMAT = "1080";
30+
2931
private final Sessions sessions;
3032

3133
public YtDlpCommandBundle(Sessions sessions) {
@@ -64,7 +66,7 @@ private void clip(@NotNull RegexMessageContext ctx) {
6466
.orElse(20);
6567
final String downloadOption = Optional.ofNullable(ctx.group(3))
6668
.filter(Predicate.not(String::isBlank))
67-
.orElse("best");
69+
.orElse(DEFAULT_FORMAT);
6870

6971
final var session = createYtDlpSession(ctx.chatId(), url, downloadOption, duration);
7072
session.setMessageId(ctx.messageId());
@@ -80,7 +82,7 @@ private void download(@NotNull RegexMessageContext ctx) {
8082
final String url = ctx.group(1);
8183
final String downloadOption = Optional.ofNullable(ctx.group(2))
8284
.filter(Predicate.not(String::isBlank))
83-
.orElse("best");
85+
.orElse(DEFAULT_FORMAT);
8486
final int maxDuration = 10 * 60 * 60;
8587

8688
final var session = createYtDlpSession(ctx.chatId(), url, downloadOption, maxDuration);

0 commit comments

Comments
 (0)