mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Add hardsubs manually to download videos (#81)
This commit is contained in:
parent
17233f2fd2
commit
6d1f8d49f6
7 changed files with 233 additions and 212 deletions
|
|
@ -290,38 +290,32 @@ impl FFmpegPreset {
|
|||
FFmpegPreset::Av1 => bail!("'nvidia' hardware acceleration preset is not available in combination with the 'av1' codec preset"),
|
||||
FFmpegPreset::H265 => {
|
||||
input.extend(["-hwaccel", "cuvid", "-c:v", "h264_cuvid"]);
|
||||
output.extend(["-c:v", "hevc_nvenc"]);
|
||||
output.extend(["-c:v", "hevc_nvenc", "-c:a", "copy"]);
|
||||
}
|
||||
FFmpegPreset::H264 => {
|
||||
input.extend(["-hwaccel", "cuvid", "-c:v", "h264_cuvid"]);
|
||||
output.extend(["-c:v", "h264_nvenc"]);
|
||||
output.extend(["-c:v", "h264_nvenc", "-c:a", "copy"]);
|
||||
}
|
||||
_ => ()
|
||||
}
|
||||
} else {
|
||||
match preset {
|
||||
FFmpegPreset::Av1 => {
|
||||
output.extend(["-c:v", "libaom-av1"]);
|
||||
output.extend(["-c:v", "libaom-av1", "-c:a", "copy"]);
|
||||
}
|
||||
FFmpegPreset::H265 => {
|
||||
output.extend(["-c:v", "libx265"]);
|
||||
output.extend(["-c:v", "libx265", "-c:a", "copy"]);
|
||||
}
|
||||
FFmpegPreset::H264 => {
|
||||
output.extend(["-c:v", "libx264"]);
|
||||
output.extend(["-c:v", "libx264", "-c:a", "copy"]);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if input.is_empty() && output.is_empty() {
|
||||
output.extend(["-c", "copy"])
|
||||
} else {
|
||||
if output.is_empty() {
|
||||
output.extend(["-c", "copy"])
|
||||
} else {
|
||||
output.extend(["-c:a", "copy", "-c:s", "copy"])
|
||||
}
|
||||
if output.is_empty() {
|
||||
output.extend(["-c:v", "copy", "-c:a", "copy"])
|
||||
}
|
||||
|
||||
Ok((
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue