mp4parser
mp4parser copied to clipboard
Video is not playing after inserting the metadata
Hello @sannies ,
I am trying to insert metadata into video file . I am using following code : AppleGPSCoordinatesBox loc; if ((loc = Path.getPath(ilst, "©xyz")) == null) { loc = new AppleGPSCoordinatesBox(); } loc.setValue(locationVideo); ilst.addBox(loc);
in place of below code: AppleNameBox nam; if ((nam = Path.getPath(ilst, "©nam")) == null) { nam = new AppleNameBox(); } nam.setDataCountry(0); nam.setDataLanguage(0); nam.setValue(title); ilst.addBox(nam);
After inserting the metadata video is not playing in mobile's default player but it is playable in VLC player. Can you please tell me how to fix this issue.
Thanks
For anyone that runs into this in the future, you need to add the box to the user data box -- not the the item list box:
AppleGPSCoordinatesBox xyz;
if ((xyz = Path.getPath(ilst, "©xyz")) == null) {
xyz = new AppleGPSCoordinatesBox();
}
xyz.setValue(location);
userDataBox.addBox(xyz);
Disclaimer, I have no idea how any of this works lol