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

FFprobe input to extract defaults. #79

Merged
merged 6 commits into from
Oct 23, 2024
Merged

Conversation

matvp91
Copy link
Collaborator

@matvp91 matvp91 commented Oct 22, 2024

We've got an Input and a Stream type. An ffmpeg job is scheduled with a full input and stream.

What we can do is run an ffprobe child job first, and once that's finished we can schedule each ffmpeg job separately.

This way we use the ffprobe result to fill in defaults directly from the input source, without forcing the user to know everything upfront. I can imagine people don't know the channel count for every individual asset that's about to be transcoded.

{
  type: "audio";
  path: string;
  // We can make this optional and use ffprobe to potentially extract the language
  language?: LangCode; 
}

There's a few mandatory values (such as a text track MUST specify a language, or we won't be able to match it) but we can let the API handle sanity checks and stop early when a value is not provided for a required field.

Top of my head but we can probably probe for the following fields:

  • language (for audio, default to "unk")
  • framerate (for video, I don't think this can be optional)
  • resolution (for video, we can remove the "skippable job" logic and not schedule an ffmpeg job at all if we're upscaling)
  • channels (for audio, default to 2)

@matvp91 matvp91 merged commit 686a64d into main Oct 23, 2024
4 checks passed
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 this pull request may close these issues.

1 participant