Editing MP4 Metadata Using the MediaCodec API

The Android SDK provides the MediaMetadataRetriever class to extract metadata from MP4 files. Is there any way to edit MP4 metadata fields using MediaCodec API (without ffmpeg)? My task is reset rotation .

+4
source share
1 answer

mp4parser seems to be what you are looking for, although I'm not sure where exactly the rotation field is in MP4 (I don't know enough about the layout of the file). If you know in which field (or "atom") metadata is located, then MetaDataRead and MetaDataInsert are pretty clear examples of how to read and write data (they specifically work on the iTunes "Name" / "Title" field, but recording other metadata works the same when you know where it should be located). Hope this helps!

+1
source

Source: https://habr.com/ru/post/1612236/


All Articles