Currently the codec (any many other options) are determined by a few factors:
- Specified in the render dialog in the Remotion Studio?
- Specified as a CLI flag?
- Passed explicitly to renderMedia()?
- Specified in the config file?
- Fallback: Default codec
The idea is to add another way that allows per-default configuration, starting with codec
<Composition calculateMetadata={() => {
return {defaultCodec: "vp8"}
}}/>
This will have a higher priority than the config file, but less priority than explicitly passing the option to renderMedia().
The VideoConfig type should be expanded with a defaultConfig field:
|
export type VideoConfig = { |
|
width: number; |
|
height: number; |
|
fps: number; |
|
durationInFrames: number; |
This is a good first step and TypeScript should reveal the places where you need to implement additional functionality
Acceptance criteria
- Make the composition get rendered with this codec if nothing with higher priority was specified.
- In the Remotion Studio, when rendering, the codec should be preselected in the modal but overridden.
- Logs should also tell when this was used for resolution (extend this here)
- Add it to the
calculateMetadata() docs
Bounty
💎 This issue is part of Hacktoberfest and has a bounty on it!
🎃 Hacktoberfest rules
- You can only work on 1 issue at a time.
- Only 1 person can work on the same issue.
- We explicitly assign a developer. Don’t work on an issue if we do not assign you.
- First-time contributors will get preferential treatment.
- You must set up the Remotion repository locally and test your changes. Contributing to Remotion | Remotion | Make videos programmatically in React
- Your PR must fulfill the acceptance criteria.
- If you use AI, you must verify that the output is correct.
- All tests (functionality and formatting) must pass.
Issue already taken? Find more issues under https://remotion.dev/bounties
/bounty 200
Currently the codec (any many other options) are determined by a few factors:
The idea is to add another way that allows per-default configuration, starting with
codecThis will have a higher priority than the config file, but less priority than explicitly passing the option to renderMedia().
The
VideoConfigtype should be expanded with adefaultConfigfield:remotion/packages/core/src/video-config.ts
Lines 1 to 5 in b2f80dc
This is a good first step and TypeScript should reveal the places where you need to implement additional functionality
Acceptance criteria
calculateMetadata()docsBounty
💎 This issue is part of Hacktoberfest and has a bounty on it!
🎃 Hacktoberfest rules
Issue already taken? Find more issues under https://remotion.dev/bounties
/bounty 200