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 ability to upmix channels with a filter #700

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Sipnol
Copy link

@Sipnol Sipnol commented Oct 13, 2024

No description provided.


if (enableBitrate) {
const ffType = getFfType(streamCopy.codec_type);
streamCopy.outputArgs.push(`-b:${ffType}:{outputTypeIndex}`, `${bitrate}`);
streamCopy.outputArgs.push('-b:a:{outputTypeIndex}', `${bitrate}`);
Copy link
Author

Choose a reason for hiding this comment

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

so i removed the getType here because we filter the streams to only include audio anyway.

if (targetChannels > highestChannelCount && upmixingFilter !== '') {
streamCopy.outputArgs.push('-filter_complex', `[${streamCopy.mapArgs[1]}]${upmixingFilter}[a_{outputIndex}]`);
streamCopy.outputArgs.push('-map', '[a_{outputIndex}]');
streamCopy.mapArgs = [];
Copy link
Author

Choose a reason for hiding this comment

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

need to remove the mapArgs here because otherwise the source will be copied twice

@Sipnol
Copy link
Author

Sipnol commented Oct 17, 2024

Also noticed that if you have multiple blocks of this in one ffmpeg command it will override some settings so i fixed that.

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.

1 participant