-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 support for inputOptions and videoFilters in transcode plugin #3917
Conversation
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.
Please could you add tests in https://github.com/Chocobozzz/PeerTube/blob/develop/server/tests/plugins/plugin-transcoding.ts using https://github.com/Chocobozzz/PeerTube/blob/develop/server/tests/fixtures/peertube-plugin-test-transcoding-one/main.js?
See https://docs.joinpeertube.org/contribute-getting-started?id=unit-tests for the documentation
I'm wondering if this PR should also include a mechanism to mitigate #3919 . With this info we could use the correct filter name here PeerTube/server/helpers/ffmpeg-utils.ts Line 239 in b70025b
And we could replace the call to PeerTube/server/helpers/ffmpeg-utils.ts Line 400 in b70025b
by a manually written scale filter that would use the filter name provided by the transcode-plugin. |
Okay thanks, so to summarize if we do the following things, does it fix all the issues?
|
That looks good for me, it enough for my use case (adding hardware transcode).
I did a quick search in ffmpeg documentation and it looks like all So I think it is not strictly necessary for plugins to provide the arguments to the filter since they are always the same in our use case.
👍 |
Okay thanks for the feedback. I'll update this PR. |
Ok, thanks. |
I updated the PR accordingly. @TheoLeCalvar Could you review & test please? |
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.
Except these small problems it looks good to me.
Tests look good.
I also ported my plugin to this version and it works great.
- add example of videoFilters - add warning about videoFilters and inputOptions in live profile
Thanks! |
Description
This PR adds support for inputOptions and videoFilters in transcode plugins.
Transcode plugins can be used to add support for new encoders.
However, some require inputOptions and thus cannot be used with current transcode plugin API.
For instance, vaapi hardware accelerated encoders require these input options
-hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128
Related issues
Closes #3846
Has this been tested?