-
Notifications
You must be signed in to change notification settings - Fork 0
transcoding_policy option #11
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
Changes from 5 commits
2ff2591
b2cc3b1
784e2f3
b897667
11b60c4
b8e23d3
3115694
407d663
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -69,16 +69,31 @@ defmodule Membrane.Transcoder do | |||||
| and is supposed to return the desired output stream format or its module. | ||||||
| """ | ||||||
| ], | ||||||
| force_transcoding?: [ | ||||||
| spec: boolean() | (stream_format() -> boolean()), | ||||||
| default: false, | ||||||
| transcoding_policy: [ | ||||||
| spec: | ||||||
| :always | ||||||
| | :if_needed | ||||||
| | :never | ||||||
| | (stream_format() -> :always | :if_needed | :never), | ||||||
| default: :if_needed, | ||||||
| description: """ | ||||||
| If set to `true`, the input media stream will be decoded and encoded, even | ||||||
| if the input stream format and the output stream format are the same type. | ||||||
| Specifies, when transcoding should be appliead. | ||||||
FelonEkonom marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| Can be either: | ||||||
| * a boolean, | ||||||
| * a function that receives the input stream format and returns a boolean. | ||||||
| * an atom: `:always`, `:if_needed` (default) or `:never`, | ||||||
| * a function that receives the input stream format and returns an atom. | ||||||
|
||||||
| * a function that receives the input stream format and returns an atom. | |
| * a function that receives the input stream format and returns the atom. |
or perhaps it would be even better if you listed all the atoms once again
Outdated
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.
It won't be encoded either, for instance in scenario with input: RawVideo and output: H264
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 mention that transcoder will fail if the output format doesn't match input.
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.
It looks a bit off to me, having a transcoder with
transcoding_policy: :never:D Let's try thinking aboutother option name, perhaps emphasising somehow that there are "heavy" operations and "light operations" would be helpful here?
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.
Hmm, my first idea was to add
forbid_transcoding?flag next to theforce_transcoding?, then I thought thattranscoding_policywill sound much better that these 2 combined. Do you propose any specific option name and values?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.
Option could be called something like
:heavy_operations_policy, or perhaps we should rename the bin since it not only does transcoding