mp4parser icon indicating copy to clipboard operation
mp4parser copied to clipboard

Video is not playing after inserting the metadata

Open Tarni123 opened this issue 7 years ago • 1 comments

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

Tarni123 avatar Apr 12 '17 08:04 Tarni123

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

dandre-hound avatar Apr 06 '22 01:04 dandre-hound