Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There might be a new mov file signature in ios 15.5 livp #302

Closed
Cherryslover opened this issue Jul 8, 2022 · 6 comments
Closed

There might be a new mov file signature in ios 15.5 livp #302

Cherryslover opened this issue Jul 8, 2022 · 6 comments

Comments

@Cherryslover
Copy link

Attach the file for which the detection is inaccurate
Unfortunately, I don't have an iPhone to provide one. This seems come out with the ios 15.5. The mov file of live photo sometimes are detected as "application/octet-stream", sometimes are "video/quicktime".

Expected MIME type
video/quicktime

Returned MIME type
application/octet-stream

Version of the library you are using
v1.4.1

Output of go version
1.16.7

Additional context

Alternatively, you can fork the project, commit the file with a failing test and reference the commit in the issue.

@Cherryslover Cherryslover changed the title Might be a new mov file signature in ios 15.5 livp? There might be a new mov file signature in ios 15.5 livp Jul 8, 2022
@gabriel-vasile
Copy link
Owner

gabriel-vasile commented Jul 8, 2022

Just to make sure there is no misunderstanding what is happening:
case 1: the exact same file is sometimes detected as video/quicktime and other times as application/octet-stream
case 2: some .mov files are detected correctly as video/quicktime and others are not

What case are we in?

@Cherryslover
Copy link
Author

We are in case 2, they are different files.

@gabriel-vasile
Copy link
Owner

I found this forum post saying .mov from ios 15.5 stopped working, but the example file they uploaded does not reproduce the problem.

I'm not sure what I can about this issue. A sample file would help a lot. Even the first 20 bytes of the file are enough to get the signature.

@Cherryslover
Copy link
Author

I can give first 20 bytes. 00 00 00 08 77 69 64 65 00 5A 16 6A 6D 64 61 74 00 00 00 2A.

Something interesting is that I found 00 00 00 08 77 69 64 65 in a normal mov file(detected as video/quicktime) at offset 21. But when I cut a normal mov file first 20 bytes off, the mov cannot be played. So I wonder if it is a new file signature.

@gabriel-vasile
Copy link
Owner

Thanks!
You're right, there are some missing signatures for mov files.
These are quicktime signatures in Apache Tika. The signature which identifies your file is on line 7772.

I will make a commit the following days.

@Cherryslover
Copy link
Author

Glad that helped :)

gabriel-vasile added a commit that referenced this issue Jul 9, 2022
Include other atom types, besides ftyp, inside mov detection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants