Skip to content

Allow Media3 decoder fallback for Dolby Vision input - #135

Open
PixPMusic wants to merge 1 commit into
JoshAtticus:mainfrom
PixPMusic:fix/dolby-vision-decoder-fallback
Open

PixPMusic wants to merge 1 commit into
JoshAtticus:mainfrom
PixPMusic:fix/dolby-vision-decoder-fallback

Conversation

@PixPMusic

Copy link
Copy Markdown

Compressor rejects some iPhone Dolby Vision videos before Media3 can attempt decoding. The source preflight requires a decoder advertising the exact video/dolby-vision MIME type, overlooking compatible HEVC base-layer decoding.

Let Media3 inspect Dolby Vision profiles and select a compatible decoder instead of blocking these inputs upfront. Preserve the original input metadata and retain the existing preflight for other source codecs. Unsupported Dolby Vision profiles can still fail through Media3's normal error handling.

Adds regression tests for Dolby Vision reaching output planning without an advertised decoder and unsupported HEVC retaining its decoder error. Enables Android resources in unit tests so the planner's localized errors can be checked.

Validation:

  • bash gradlew assembleDebug testDebugUnitTest with JDK 21: passed, 38 tests.
  • The equivalent Compressor Edge patch was tested on a Pixel 10 Pro Fold, Android 17 / SDK 37: the same 3840×2160 / 60 fps iPhone Dolby Vision clip failed before the change and compressed successfully afterward, confirmed by the device owner. The Compressor build has been verified locally but has not been separately installed on that phone.

Equivalent fix for Compressor Edge: JoshAtticus/CompressorEdge#5. These PRs target independent apps and have no merge-order dependency.

Model: GPT-6.1 Sol | Harness: Codex in T3 Code

@github-actions

Copy link
Copy Markdown

✅ Build Successful

Debug APK Ready

Download from Artifacts

Note: You may need to uninstall existing versions first.

Build Logs
Fetching distribution.
Downloading https://services.gradle.org/distributions/gradle-9.7.1-bin.zip
..............10%..............20%...............30%..............40%...............50%..............60%...............70%..............80%..............90%...............100%

Welcome to Gradle 9.7.1!

Here are the highlights of this release:
 - Isolated Projects graduates to incubating
 - Broader Configuration Cache compatibility
 - Resilient Sync helps you fix broken builds
 - More source locations in problem reports

For more details see https://docs.gradle.org/9.7.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
Calculating task graph as no cached configuration is available for tasks: assembleDebug

> Configure project :app
WARNING: The option setting 'android.usesSdkInManifest.disallowed=false' is deprecated.
The current default is 'true'.
It will be removed in version 10.0 of the Android Gradle plugin.
Add android.sync.suppressAgpWarnings=UNSUPPORTED_PROJECT_OPTION_USE to the gradle.properties file to suppress this warning.
WARNING: The option setting 'android.sdk.defaultTargetSdkToCompileSdkIfUnset=false' is deprecated.
The current default is 'true'.
It will be removed in version 10.0 of the Android Gradle plugin.
Add android.sync.suppressAgpWarnings=UNSUPPORTED_PROJECT_OPTION_USE to the gradle.properties file to suppress this warning.
WARNING: The option setting 'android.enableAppCompileTimeRClass=false' is deprecated.
The current default is 'true'.
It will be removed in version 10.0 of the Android Gradle plugin.
Add android.sync.suppressAgpWarnings=UNSUPPORTED_PROJECT_OPTION_USE to the gradle.properties file to suppress this warning.
WARNING: The option setting 'android.defaults.buildfeatures.resvalues=true' is deprecated.
The current default is 'false'.
It will be removed in version 10.0 of the Android Gradle plugin.
Add android.sync.suppressAgpWarnings=UNSUPPORTED_PROJECT_OPTION_USE to the gradle.properties file to suppress this warning.
WARNING: The property android.dependency.excludeLibraryComponentsFromConstraints improves project import performance for very large projects. It should be enabled to improve performance.
To suppress this warning, add android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false to gradle.properties
Add android.sync.suppressAgpWarnings=LIBRARY_CONSTRAINTS_SHOULD_BE_DISABLED to the gradle.properties file to suppress this warning.
WARNING: The property android.dependency.excludeLibraryComponentsFromConstraints improves project import performance for very large projects. It should be enabled to improve performance.
To suppress this warning, add android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false to gradle.properties
Add android.sync.suppressAgpWarnings=LIBRARY_CONSTRAINTS_SHOULD_BE_DISABLED to the gradle.properties file to suppress this warning.
WARNING: The property android.dependency.excludeLibraryComponentsFromConstraints improves project import performance for very large projects. It should be enabled to improve performance.
To suppress this warning, add android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false to gradle.properties
Add android.sync.suppressAgpWarnings=LIBRARY_CONSTRAINTS_SHOULD_BE_DISABLED to the gradle.properties file to suppress this warning.
WARNING: The property android.dependency.excludeLibraryComponentsFromConstraints improves project import performance for very large projects. It should be enabled to improve performance.
To suppress this warning, add android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false to gradle.properties
Add android.sync.suppressAgpWarnings=LIBRARY_CONSTRAINTS_SHOULD_BE_DISABLED to the gradle.properties file to suppress this warning.
Configuration 'debugCompileClasspath' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
Configuration 'debugRuntimeClasspath' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.

> Task :app:preBuild UP-TO-DATE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:generateDebugResValues
> Task :app:generateDebugBuildConfig
> Task :app:generateDebugResources
> Task :app:createDebugCompatibleScreenManifests
> Task :app:javaPreCompileDebug

> Task :app:prepareLibraryDefinitionsDebug
GitHub `rate_limit` exhausted. Won't be able to use the GitHub API. Please check if the token is provided, or enable `offlineMode`.

> Task :app:mapDebugSourceSetPaths
> Task :app:processDebugNavigationResources
> Task :app:checkDebugAarMetadata
> Task :app:mergeDebugAssets
> Task :app:extractDeepLinksDebug
> Task :app:compileDebugNavigationResources
> Task :app:compressDebugAssets
> Task :app:packageDebugResources
> Task :app:mergeDebugResources
> Task :app:processDebugMainManifest
> Task :app:parseDebugLocalResources
> Task :app:desugarDebugFileDependencies
> Task :app:mergeDebugJniLibFolders
> Task :app:processDebugManifest
> Task :app:processDebugManifestForPackage
> Task :app:mergeDebugNativeLibs

> Task :app:stripDebugDebugSymbols
Unable to strip the following libraries, packaging them as they are: libandroidx.graphics.path.so. Run with --info option to learn more.

> Task :app:processDebugResources
> Task :app:validateSigningDebug
> Task :app:writeDebugAppMetadata
> Task :app:writeDebugSigningConfigVersions
> Task :app:generateDebugGlobalSynthetics
> Task :app:checkDebugDuplicateClasses
> Task :app:mergeLibDexDebug
> Task :app:compileDebugKotlin
> Task :app:mergeExtDexDebug

> Task :app:compileDebugKotlin
w: file:///home/runner/work/Compressor/Compressor/app/src/main/java/compress/joshattic/us/ui/components/TargetSizeWarning.kt:135:31 'val Icons.Filled.ArrowForward: ImageVector' is deprecated. Use the AutoMirrored version at Icons.AutoMirrored.Filled.ArrowForward.
w: file:///home/runner/work/Compressor/Compressor/app/src/main/java/compress/joshattic/us/ui/screens/CompressionFailedScreen.kt:55:28 'val LocalClipboardManager: ProvidableCompositionLocal<ClipboardManager>' is deprecated. Use LocalClipboard instead which supports suspend functions.
w: file:///home/runner/work/Compressor/Compressor/app/src/main/java/compress/joshattic/us/ui/screens/settings/AboutScreen.kt:81:28 'val LocalClipboardManager: ProvidableCompositionLocal<ClipboardManager>' is deprecated. Use LocalClipboard instead which supports suspend functions.
w: file:///home/runner/work/Compressor/Compressor/app/src/main/java/compress/joshattic/us/ui/tabs/VideoOptionsTab.kt:101:116 Redundant call of conversion method.
w: file:///home/runner/work/Compressor/Compressor/app/src/main/java/compress/joshattic/us/ui/tabs/VideoOptionsTab.kt:110:114 Redundant call of conversion method.
w: file:///home/runner/work/Compressor/Compressor/app/src/main/java/compress/joshattic/us/utils/HardwareUtils.kt:101:37 Unnecessary safe call on a non-null receiver of type 'ActivityManager.MemoryInfo'.
w: file:///home/runner/work/Compressor/Compressor/app/src/main/java/compress/joshattic/us/viewmodel/CompressorViewModel.kt:491:13 'when' is exhaustive so 'else' is redundant here.

> Task :app:processDebugJavaRes
> Task :app:mergeDebugJavaResource
> Task :app:compileDebugJavaWithJavac
> Task :app:dexBuilderDebug
> Task :app:mergeProjectDexDebug
> Task :app:packageDebug
> Task :app:assembleDebug
> Task :app:createDebugApkListingFileRedirect

[Incubating] Problems report is available at: file:///home/runner/work/Compressor/Compressor/build/reports/problems/problems-report.html

BUILD SUCCESSFUL in 3m 40s
39 actionable tasks: 39 executed
Configuration cache entry stored.

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