Home > Mobile >  Android: Remove all metadata from video
Android: Remove all metadata from video

Time:12-19

Is there any native/existing/manual way to remove all the metadata of a video file in Android/Java/Kotlin from a (content) URI?

For photos, we can still use ExifInterface and remove the metadata we want by using setAttribute and passing null to delete the given/desired values, however this doesn't work for videos because an mp4 video has it's own metadata format. If there is no native Android class that can do this, is there any algorithm or reference that can be referred in order to implement this?

CodePudding user response:

You can use mp4parser library. Typical tasks for the MP4 Parser are:

  • Muxing audio/video into an MP4 file
  • Append recordings that use the same encode settings
  • Adding/Changing metadata
  • Shorten recordings by omitting frames

The MetaDataInsert example shows how to write metadata.

  • Related