-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
refactor(server): modularize getFfmpegOptions
#3138
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
refactor transcoding, make separate service
fd9eab4
to
03e8b3b
Compare
getFfmpegOptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! getFfmpegOptions
was a real pain!
web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte
Show resolved
Hide resolved
web/src/lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte
Show resolved
Hide resolved
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you could add some more tests that would be good, otherwise LGTM. I think the fact the existing tests still pass gives high confidence that the code is working the same way as before.
Description
Modularizes
getFfmpegOptions
into separate handlers for each codec and adds enums for several transcoding settings.getFfmpegOptions
has become too complex and monolithic to make major changes to it without either increasing its complexity further or introducing bugs. This change makes the intended behavior for each codec much more explicit, and makes adding a new codec as simple as adding a new handler without affecting existing logic.Notably, the only major change is to the code structure. Existing behavior should be the same.
Testing
Tests are unchanged (except for the addition of an
inputOptions
property inTranscodeOptions
) and all pass. I tried different transcoding settings and all were applied and transcoded correctly.