Skip to content

Android: .MOV video compression fails with Failed to initialize video/dolby-vision #398

@HuuNguyen312

Description

@HuuNguyen312

Current behavior

Unable to compress .MOV video files on Android.

The file metadata is resolved correctly:

input: content://media/external/video/media/1000019700

// File Info
{
  lastModified: 1777021061424,
  size: 5024928,
  type: 'file',
  path: '/storage/emulated/0/DCIM/GeoChat/IMG_0018.MOV',
  filename: 'IMG_0018.MOV'
}

But compression fails with the following error:

Failed to initialize video/dolby-vision, error 0xfffffffe (NAME_NOT_FOUND)

  {
    "nativeStackAndroid": [
      {
        "lineNumber": 64,
        "file": "Utils.kt",
        "methodName": "onFailure",
        "class": "com.reactnativecompressor.Utils.Utils$compressVideo$1"
      },
      {
        "lineNumber": 92,
        "file": "VideoCompressorClass.kt",
        "methodName": "invokeSuspend",
        "class": "com.reactnativecompressor.Video.VideoCompressor.VideoCompressorClass$doVideoCompression$1"
      },
      {
        "lineNumber": 33,
        "file": "ContinuationImpl.kt",
        "methodName": "resumeWith",
        "class": "kotlin.coroutines.jvm.internal.BaseContinuationImpl"
      },
      {
        "lineNumber": 101,
        "file": "DispatchedTask.kt",
        "methodName": "run",
        "class": "kotlinx.coroutines.DispatchedTask"
      },
      {
        "lineNumber": 995,
        "file": "Handler.java",
        "methodName": "handleCallback",
        "class": "android.os.Handler"
      },
      {
        "lineNumber": 103,
        "file": "Handler.java",
        "methodName": "dispatchMessage",
        "class": "android.os.Handler"
      },
      {
        "lineNumber": 273,
        "file": "Looper.java",
        "methodName": "loopOnce",
        "class": "android.os.Looper"
      },
      {
        "lineNumber": 363,
        "file": "Looper.java",
        "methodName": "loop",
        "class": "android.os.Looper"
      },
      {
        "lineNumber": 10060,
        "file": "ActivityThread.java",
        "methodName": "main",
        "class": "android.app.ActivityThread"
      },
      {
        "lineNumber": -2,
        "file": "Method.java",
        "methodName": "invoke",
        "class": "java.lang.reflect.Method"
      },
      {
        "lineNumber": 632,
        "file": "RuntimeInit.java",
        "methodName": "run",
        "class": "com.android.internal.os.RuntimeInit$MethodAndArgsCaller"
      },
      {
        "lineNumber": 975,
        "file": "ZygoteInit.java",
        "methodName": "main",
        "class": "com.android.internal.os.ZygoteInit"
      }
    ],
    "name": "java.lang.Throwable",
    "userInfo": null,
    "code": "EUNSPECIFIED"
  }

.mp4 videos work correctly.


Expected behavior

.MOV videos should:

  • compress successfully
  • or fallback gracefully if Dolby Vision / codec is unsupported

The compression process should not fail completely.


Platform

  • Android

React Native Version

"react-native": "^0.85.2"

New Architecture enabled.


React Native Compressor Version

"react-native-compressor": "^1.18.2"

Reproducible Steps And Demo

  1. Select a .MOV video
  2. Call:
const result = await Video.compress(
  videoPath,
);
  1. Compression fails with:
Failed to initialize video/dolby-vision, error 0xfffffffe (NAME_NOT_FOUND)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions