Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RN][iOS] Add watermark to my video throw error while decoding stream #1:0: Generic error in an external library. #707

Closed
nguyenvanphituoc opened this issue Mar 22, 2023 · 1 comment

Comments

@nguyenvanphituoc
Copy link

Description
I am using ffmpeg-kit-react-native for video editor. In my case, I try to add watermark into my video by this command: "-i myvideo.mp4 -i watermark.png -filter_complex "overlay=x=10:y=(main_h-overlay_h)/2" -codec:a copy output.mp4"

It work fine in android, but throw error in iOS: Error while decoding stream #1:0: Generic error in an external library

Expected behavior
Should work for iOS with this command.

Current behavior
It work for android, doesnot work for iOS

To Reproduce
Save myvideo.mp4, watermark.png to file system then use the command above

Logs
log here

Environment

  • Platform: ReactNative
  • Architecture: arm64-simulator
  • Version: v4.5
  • Xcode version: 13.4.1
  • Cocoapods version: 1.11.3
  • Android Studio version: dolphin
  • Android NDK version: 24.0.8215888
  • react-native info:
    System:
    OS: macOS 12.3
    CPU: (8) arm64 Apple M1
    Memory: 230.75 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
    Binaries:
    Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
    Yarn: 1.22.17 - /opt/homebrew/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
    Watchman: 2023.02.20.00 - /opt/homebrew/bin/watchman
    Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    SDKs:
    iOS SDK:
    Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
    API Levels: 28, 29, 30, 31, 32, 33
    Build Tools: 30.0.2, 30.0.3, 31.0.0, 32.1.0, 33.0.1
    System Images: android-32 | Google APIs ARM 64 v8a
    Android NDK: Not Found
    IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9014738
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
    Languages:
    Java: 11.0.11 - /usr/bin/javac
    npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0
    react-native: 0.69.6 => 0.69.6
    react-native-macos: Not Found
    npmGlobalPackages:
    react-native: Not Found

Other
If cannot found issue, can you teach me how to debug or using another input file with restrict format.
If you need any information of the input file please mail me via [email protected]

@nguyenvanphituoc
Copy link
Author

I have found solution in old package. tks tanersener
By default, Xcode compresses PNG files during packaging. If you use .png files in your commands make sure you set the following two settings to NO. If one of them is set to YES, your operations may fail with Error while decoding stream #0:0: Generic error in an external library error.

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

No branches or pull requests

1 participant