This repository was archived by the owner on Dec 23, 2022. It is now read-only.
Make debug actually print the error when ffmpeg crashes, also fix some channel mapping stuff #134
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.
ffmpeg has this open issue about mapping channels correctly with libopus.
I suspect the correct fix for this is to have our own mappings for these but for now this PR at least let the encode continue and I figured I would open the discussion so I can fix this PR to do whatever is decided on a weekend.
ffmpeg channel maps (from
ffmpeg -layouts
):mono:
FC
stereo:
FL+FR
2.1:
FL+FR+LFE
3.0:
FL+FR+FC
3.0(back):
FL+FR+BC
4.0:
FL+FR+FC+BC
quad:
FL+FR+BL+BR
quad(side):
FL+FR+SL+SR
3.1:
FL+FR+FC+LFE
5.0:
FL+FR+FC+BL+BR
5.0(side):
FL+FR+FC+SL+SR
5.1:
FL+FR+FC+LFE+BL+BR
5.1(side):
FL+FR+FC+LFE+SL+SR
6.0:
FL+FR+FC+BC+SL+SR
6.0(front):
FL+FR+FLC+FRC+SL+SR
hexagonal:
FL+FR+FC+BL+BR+BC
6.1:
FL+FR+FC+LFE+BC+SL+SR
6.1(back):
FL+FR+FC+LFE+BL+BR+BC
6.1(front):
FL+FR+LFE+FLC+FRC+SL+SR
7.0:
FL+FR+FC+BL+BR+SL+SR
7.0(front):
FL+FR+FC+FLC+FRC+SL+SR
7.1:
FL+FR+FC+LFE+BL+BR+SL+SR
7.1(wide):
FL+FR+FC+LFE+BL+BR+FLC+FRC
7.1(wide-side):
FL+FR+FC+LFE+FLC+FRC+SL+SR
opus follows vorbis channel ordering
stereo:
L+R
3ch:
L+C+R
4ch:
FL+FR+RL+RR
5ch:
FL+C+FR+RL+RR
5.1:
FL+C+FR+RL+RR+LFE
6.1:
FL+C+FR+SL+SR+RC+LFE
7.1:
FL+C+FR+SL+SR+RL+RR+LFE
It looks like just overriding 5.1(side) to 5.1 is fine but I'm not so sure about most of the other cases