drewnoakes / metadata-extractor

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Apache License 2.0
2.55k stars 479 forks source link

Don't add missing (zero) dates to MP4Directory #513

Open davidekholm opened 3 years ago

davidekholm commented 3 years ago

Some mp4 videos contains zero as "video created date". This naturally means that the creation date is missing. In such cases, I think it's better to not add any date creation tags to the MP4Directory. Please modify MovieHeaderBox.java:80-81:

    directory.setDate(Mp4Directory.TAG_CREATION_TIME, DateUtil.get1Jan1904EpochDate(creationTime));
    directory.setDate(Mp4Directory.TAG_MODIFICATION_TIME, DateUtil.get1Jan1904EpochDate(modificationTime));

so it's wrapped in an if-clause: if (creationTime != 0) { directory.setDate(Mp4Directory.TAG_CREATION_TIME, DateUtil.get1Jan1904EpochDate(creationTime)); directory.setDate(Mp4Directory.TAG_MODIFICATION_TIME, DateUtil.get1Jan1904EpochDate(modificationTime)); }

Example video file: http://jalbum.net/download/missingCreationDate.mp4

jefftucker1952 commented 3 years ago

In case anyone is wondering how one ends up with a video with a zero creation time, it happens routinely with video screen capture programs. The example that @davidekholm has attached is from OBS Studio. ActivePresenter does exactly the same thing.

jefftucker1952 commented 2 years ago

I would have thought that this was a simple, non-controversial fix, yet it hasn't been addressed in over a year.

drewnoakes commented 2 years ago

@jefftucker1952 could you open a PR?

jefftucker1952 commented 2 years ago

This may puzzle you, but there are some software developers who don't know a thing about GitHub. We don't know anything about forks, clones, pull requests, or commits. The whole thing is not exactly "user friendly." FFS, it's difficult just to figure out how to download the scripts.

David has clearly explained what code change is needed. Is there something unclear about it?

drewnoakes commented 2 years ago

The required change is clear.

You cannot reasonably have any expectation that other people will do the work here for you. This is an open library, made possible by the generous donation of time and skill from many many people (including David).

Complaining and swearing at the team of people who produce a free library isn't a productive use of your time. If you want to see this fixed, take 15 minutes of your life and try learning how to open a pull request. If the process is unclear, ask politely here for help and you will receive it.

The other option is to offer to pay someone for their time. That is the only way you can reasonably expect busy people to make time for you.

jefftucker1952 commented 2 years ago

No offense intended, really. I just don't think that regular GitHub users understand that to anyone coming to it cold, it's a confusing labyrinth.

I give all of my software away. I don't make a dime from any of it. So I get it.

You can improve your script, or not. Your call.

Nadahar commented 2 years ago

It's not hard to do, you can find the process described many places. I think this one is good and straight to the point: https://gist.github.com/Chaser324/ce0505fbed06b947d962

jefftucker1952 commented 2 years ago

I get in trouble from the git-go. Grin

I don't have a "favorite git client." I have no idea what a git client is. Do you see the problem, here?

drewnoakes commented 2 years ago

You don't need a git client. You can do everything you need from the command line. The document @Nadahar offered looks good to me. Maybe today is the day you make your first PR.