问题
I would like to set meta data to MP4 file.
I create MP4 file via:
new MediaMuxer(mPath, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4)
and file has meta:
Title: unknown
Artist: unknown
Album: unknown
Comment:
...
similar as: Here
I found that for API21+ i could make metadata via: MediaMetadata.Builder
but how could i save metadata to created MP4 file?
Without extern library please.
Thank you.
回答1:
To edit/write metadata, Android SDK doesn´t have any method, probably by copyright issues, but you can use options like:
https://github.com/sannies/mp4parser
http://multimedia.cx/eggs/supplying-ffmpeg-with-metadata/
Probably this is what you are looking for (using FFmpeg): https://github.com/bytedeco/javacv/blob/master/src/main/java/org/bytedeco/javacv/FFmpegFrameRecorder.java
来源:https://stackoverflow.com/questions/36769579/android-how-to-set-meta-data-to-mp4-file