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

Put ffmpeg custom args after ab-av1 internal args #266

Open
stderr-to-devnull opened this issue Jan 5, 2025 · 3 comments
Open

Put ffmpeg custom args after ab-av1 internal args #266

stderr-to-devnull opened this issue Jan 5, 2025 · 3 comments

Comments

@stderr-to-devnull
Copy link

Currently there is no way of overriding audio encoding because ab-av1 passes its own audio mapping at the end, after the custom args supplied with --enc.

Attempting to encode the audio streams with specific encoders and settings will not work, instead the streams are copied because ab-av1 passed -c:a copy to ffmpeg at the very end of the command syntax, making it impossible to override any audio processing.

Using the following:

--enc c:a:0=libopus --enc b:a:0=256k --enc channel_layout:a:0=5.1 --enc c:a:1=libopus --enc b:a:1=128k

...or the following (attempting to disable audio processing then re-mapping audio streams):

--video-only --enc map=0:a --enc c:a:0=libopus --enc b:a:0=256k --enc channel_layout:a:0=5.1 --enc c:a:1=libopus --enc b:a:1=128k

...will still result in audio streams being copied.

Enabling RUST_LOG='ab_av1=debug', shows that ab-av1 passes -c:a copy AFTER the custom --enc params, nullifying them.

@alexheretic
Copy link
Owner

The way I use it is with the --acodec arg. It should work as expected using that. However, I think we can probably improve the enc arg logic to handle this style of usage too.

@stderr-to-devnull
Copy link
Author

That looks like a global option and only concerning the CODEC. So I can't specify different CODECs for different audio tracks. And I will still have to set bitrate via --enc anyway. All is needed is for ab-av1 to not interfere in this process.

@mr44er
Copy link

mr44er commented Feb 2, 2025

All is needed is for ab-av1 to not interfere in this process.

--video-only does what it says.
The rest (audio, subs, chapter) I do manually with ffmpeg and mkvmerge.

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

No branches or pull requests

3 participants