Skip to content

Rework audio pipelines assembly to match the reworked video pipelines assembly - #27

Merged
varsill merged 36 commits into
masterfrom
rework-audio-pipelines
Sep 22, 2026
Merged

varsill merged 36 commits into
masterfrom
rework-audio-pipelines

Conversation

@Noarkhh

@Noarkhh Noarkhh commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Noarkhh
Noarkhh marked this pull request as draft July 23, 2026 14:06
@Noarkhh Noarkhh self-assigned this Jul 23, 2026
@Noarkhh Noarkhh added this to Smackore Jul 23, 2026
@Noarkhh Noarkhh moved this to In Progress in Smackore Jul 23, 2026
@Noarkhh
Noarkhh force-pushed the rework-audio-pipelines branch from be3857a to 203b189 Compare August 6, 2026 09:05
Base automatically changed from transcoder-api-rework to master September 1, 2026 09:59
@Noarkhh
Noarkhh force-pushed the rework-audio-pipelines branch from 2273ee4 to a5bedd6 Compare September 8, 2026 12:05
@varsill
varsill self-requested a review September 8, 2026 12:06
@varsill
varsill marked this pull request as ready for review September 8, 2026 12:06
Comment thread lib/transcoder/audio.ex Outdated

case {input_format, output_format} do
{input_format, %OutputFormat.AAC{}} when is_aac(input_format) ->
builder |> child({:aac_input_parser, suffix}, Membrane.AAC.Parser)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't we silently ignoring options like output_config from the output_spec here?

Comment thread lib/transcoder/audio.ex Outdated
delimitation: if(output_format.self_delimiting?, do: :delimit, else: :undelimit)
})

_other ->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't it "pass" %RemoteStream{content: MPEGAudio} without changing anything?

Comment thread lib/transcoder/audio.ex Outdated
Comment on lines +122 to +123
(input_format.__struct__ == Membrane.RawAudio and
output_format.__struct__ == OutputFormat.RawAudio)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would be always transcode raw_audio -> raw_audio?

Comment thread lib/transcoder/audio.ex Outdated
Transcoder.transcoding_policy(),
Transcoder.State.OutputSpec.t()
) :: ChildrenSpec.builder()
def plug_audio_transcoding(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, I don't like that name - I would call it sth like "convert" since we decide whether or not to transcode :D
(I think it also applies to the video branch and plug_video_transcoding)

Comment thread lib/transcoder/audio.ex Outdated

channels =
@spec are_same_formats(input_format(), output_format()) :: boolean()
defp are_same_formats(input_format, output_format) do

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could move it to a common place (OutputFormat perhaps?) since it's exactly the same thing as Video.are_same_formats/2

…Stream{content: MPEGAudio} -> MPEGAudio since there is no parser, don't transcode raw audio if fields do not change, make sure AAC Parser options are not ignored, move is_same_format to common OutputFormat module, rename plug_transcoding into plug_conversion as it does not always perform transcoding
@varsill
varsill requested a review from FelonEkonom September 22, 2026 10:48
@varsill

varsill commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

I've added my suggested changes and bumped version to v0.5.0 in a9a7e93

@varsill varsill moved this from In Progress to In Review in Smackore Sep 22, 2026

@FelonEkonom FelonEkonom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should update examples

@varsill
varsill requested a review from FelonEkonom September 22, 2026 12:42
@varsill
varsill merged commit b518e0c into master Sep 22, 2026
4 checks passed
@varsill
varsill deleted the rework-audio-pipelines branch September 22, 2026 12:51
@github-project-automation github-project-automation Bot moved this from In Review to Done in Smackore Sep 22, 2026
@varsill varsill self-assigned this Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants