fix: detection of WebM container and Opus audio stream#24182
Open
chanb22 wants to merge 1 commit intoimmich-app:mainfrom
Open
fix: detection of WebM container and Opus audio stream#24182chanb22 wants to merge 1 commit intoimmich-app:mainfrom
chanb22 wants to merge 1 commit intoimmich-app:mainfrom
Conversation
Member
|
I think this is mostly superseded by #26736, which goes in the other direction of correcting libopus -> opus. The webm fix is still good, so we can get that in if you remove the opus part of the PR. I think it'd be cleaner if you made it a mapping constant to avoid the double ternary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Immich can fail to detect both WebM containers as well as Opus audio streams as the name strings don't exactly match those in the
enumfor WebM and Opus, which can cause these files to be incorrectly transcoded and/or remuxed when the transcode policy specifies that VP9, Opus, and WebM are accepted formats.I found existing similar checks for H.265/HEVC and MP4 (QuickTime / MOV) and copied their style for this code. There might be a cleaner way to do this?
How Has This Been Tested?
Before: video file is remuxed to MP4 and Opus audio stream is transcoded even though it shouldn't be.
After: video file is not remuxed or transcoded.
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services/)Please describe to which degree, if any, an LLM was used in creating this pull request.
No LLMs or other AI/ML was used in creating this pull request.