Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Audio Only & Worst options to task queue preferred quality #994

Closed
2 tasks done
ScrubN opened this issue Mar 19, 2024 · 4 comments · Fixed by #1159
Closed
2 tasks done

Add Audio Only & Worst options to task queue preferred quality #994

ScrubN opened this issue Mar 19, 2024 · 4 comments · Fixed by #1159

Comments

@ScrubN
Copy link
Collaborator

ScrubN commented Mar 19, 2024

          Please add "Audio Only" option to the task queue.

Originally posted by @ZeusLT in #955 (comment)

Prerequisites:

  • Do not hard code enqueuer file extension
  • Figure out keywords for the clip downloader (preferred), or hide certain options when enqueuing clips
@ScrubN
Copy link
Collaborator Author

ScrubN commented Mar 19, 2024

In order to achieve this, we should probably move the current file extension guessing from CLI to Core so we aren't hard coding in the enqueuer:

if (!Path.HasExtension(inputOptions.OutputFile) && inputOptions.Quality is { Length: > 0 })
{
if (inputOptions.Quality.Contains("audio", StringComparison.OrdinalIgnoreCase))
inputOptions.OutputFile += ".m4a";
else if (char.IsDigit(inputOptions.Quality[0])
|| inputOptions.Quality.Contains("source", StringComparison.OrdinalIgnoreCase)
|| inputOptions.Quality.Contains("chunked", StringComparison.OrdinalIgnoreCase))
inputOptions.OutputFile += ".mp4";
}

downloadOptions.Filename = Path.Combine(folderPath, FilenameService.GetFilename(Settings.Default.TemplateVod, taskData.Title, taskData.Id, taskData.Time, taskData.Streamer,
downloadOptions.CropBeginning ? TimeSpan.FromSeconds(downloadOptions.CropBeginningTime) : TimeSpan.Zero,
downloadOptions.CropEnding ? TimeSpan.FromSeconds(downloadOptions.CropEndingTime) : TimeSpan.FromSeconds(taskData.Length),
taskData.Views.ToString(), taskData.Game) + ".mp4");

@superbonaci
Copy link
Contributor

I think the whole file extension guessing is something done only on Windows, and generally speaking it shouldn't matter. quality should be the only way to set what has to be downloaded, any file extension or none at all.

@ScrubN
Copy link
Collaborator Author

ScrubN commented Mar 20, 2024

FFmpeg uses the file extension to automatically determine several things.

@ScrubN ScrubN changed the title Add Audio Only preferred quality option Add Audio Only & Worst options to task queue preferred quality Mar 21, 2024
@ScrubN

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants