allow specifying the start resolution for transcoding
This commit is contained in:
parent
fead583ce9
commit
8e2b72c431
1 changed files with 6 additions and 1 deletions
|
@ -44,6 +44,10 @@ struct Args {
|
|||
#[clap(short, long)]
|
||||
transcode: Option<Resolution>,
|
||||
|
||||
/// Transcode starts at this resolution, or the source resolution, whichever is lower.
|
||||
#[clap(short = 'T', long, default_value = "1440p")]
|
||||
transcode_start: Resolution,
|
||||
|
||||
/// Treat the audio as stereo. By default, only one channel from the input stereo will
|
||||
/// be used, assuming either the other channel is backup or the same as the used.
|
||||
#[clap(short, long, default_value = "false")]
|
||||
|
@ -333,7 +337,8 @@ fn main() {
|
|||
// rescale the video
|
||||
if let Some(lowest_res) = args.transcode {
|
||||
for res in Resolution::values().into_iter().rev() {
|
||||
if res >= project.source.metadata.as_ref().unwrap().source_res
|
||||
if res > project.source.metadata.as_ref().unwrap().source_res
|
||||
|| res > args.transcode_start
|
||||
|| res < lowest_res
|
||||
{
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue