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

Add support for the proprietary stereotool operator. #2953

Merged
merged 1 commit into from
Mar 14, 2023
Merged

Conversation

toots
Copy link
Member

@toots toots commented Mar 14, 2023

This PR adds support for the proprietary stereotool processing shared library as disclosed in #1782 (reply in thread)

The operator provides a low level track.audio.stereotool track operator that processes the audio data and a higher level stereotool operator that processes the audio of a source with a audio track.

The stereotool operator also takes care of delaying metadata and track marks to match the delay introduced by the audio processing. Nevermind This part of the PR was too involved and was removed. Track marks are still too tricky to allow this. Typical delay I'm seeing is 90ms so that's not too bad either for now. Will reconsider once we're moved to immutable content.

Other tracks are dropped as they would be getting out of sync after applying the processing. It is still possible to add them back but this should be reserved for advanced users that can also potentially use a ffmpeg filter to delay the video accordingly and etc.

Doc:

track.audio.stereotool:


Type: (?id : string?, library_file : string, ?license_key : string?,
 ?presets : string?, ?load_type : string, pcm('a)) -> pcm('a)

Category: Track / Audio processing

Arguments:

 * id : string? (default: null)
     Force the value of the track ID.

 * library_file : string
     Path to the shared library file.

 * license_key : string? (default: null)


 * presets : string? (default: null)
     Path to a preset file to load when initializing the operator.

 * load_type : string (default: "totalinit")
     Load type for preset. One of: "totalinit", "all_settings", "audiofm", "audio",
     "processing", "repair", "repair_no_pnr" or "sublevel_pnr".

 * (unlabeled) : pcm('a)


Methods:

 * api_version : () -> int
     API version.

 * latency : () -> float
     Get the operator's latency.

 * software_version : () -> int
     Software version.

 * unlincensed_used_features : () -> string?
     Check if the license is valid for the current settings.

 * valid_license : () -> bool
     Check if the license is valid for the current settings.

stereotool:

Process an audio source using stereotool

Type: (?id : string?, library_file : string, ?license_key : string?,
 ?presets : string?, ?load_type : string, source(audio=pcm('a), 'b)) ->
source(audio=pcm('a))

Category: Source / Audio processing

Arguments:

 * id : string? (default: "stereotool")
     Force the value of the track ID.

 * library_file : string
     Path to the shared library file.

 * license_key : string? (default: null)


 * presets : string? (default: null)
     Path to a preset file to load when initializing the operator.

 * load_type : string (default: "totalinit")
     Load type for preset. One of: "totalinit", "all_settings", "audiofm", "audio",
     "processing", "repair", "repair_no_pnr" or "sublevel_pnr".

 * (unlabeled) : source(audio=pcm('a), 'b)


Methods:
... same as track.audio.stereotool + regular source methods.

@toots toots requested a review from smimram March 14, 2023 00:14
@toots toots force-pushed the stereo-tool-api branch 7 times, most recently from ca4ac59 to 2720727 Compare March 14, 2023 04:40
@smimram
Copy link
Member

smimram commented Mar 14, 2023

Very cool, thanks!

@toots toots merged commit a14dfe3 into main Mar 14, 2023
@toots toots deleted the stereo-tool-api branch March 14, 2023 12:52
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.

2 participants