libobs & obs-ffmpeg: Surround sound fixes #10642
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes two bugs with surround sound (blame Rodney !).
(1)
Commit [1] added ALAC & PCM support.
But 7.1 ALAC encoding fails.
This fixes the issue by assigning the correct 7.1 layout supported by FFmpeg ALAC encoder (7.1(wide)).
[1] 3ae9851
(2) This commit [2] uses the av_channel_layout_default & av_get_default_channel_layout which set 5.0
as layout for 5 audio channels; but obs sets 4.1 speaker layout for 5 channels.
The second commit of this PR fixes that.
[2] 567e35a
Motivation and Context
Fix a bug.
I came upon this bug while reviewing Rodney's hybrid mp4 muxer.
#10608
The bug is due to the fact that FFmpeg ALAC encoder uses 7.1(wide) layout which changes the back speakers
to side ones.
@derrod pointed out then that probably his commit [2] above would need some fixing.
@norihiro also suggested that there might be fixes needed elsewhere.
That was a correct expectation.
How Has This Been Tested?
There's no error popup anymore, the recording works fine.
Types of changes
Checklist: