Git Product home page Git Product logo

Comments (5)

RangelReale avatar RangelReale commented on May 22, 2024

These are the first bytes of the file, if it helps.

00000000 00 00 00 1C 66 74 79 70 69 73 6F 6D 00 00 02 00
00000010 69 73 6F 6D 69 73 6F 32 6D 70 34 31 00 00 00 08
00000020 66 72 65 65 01 48 24 D3 6D 64 61 74 00 00 01 B6
00000030 10 61 91 8F DB 62 E7 46 DB 6B 63 DD BF 35 44 19
00000040 1F 41 80 71 60 3C 6C 01 21 62 CC 26 DB 13 46 DF
00000050 75 23 6D BF 82 D2 44 C8 EE DE 29 1A 21 70 46 48
00000060 1E 16 01 30 1C 0D D0 60 1C 20 04 9D F6 A0 2A 94
00000070 8E 6F 98 07 85 FF CC 18 13 6C 6C A4 07 83 82 B7
00000080 CA 27 7D 82 B5 36 0E A1 2B 1A 04 CC 56 44 DB 65
00000090 8D EC E7 1B 6D DD 9F 92 81 DF 11 C5 37 06 30 5F
000000A0 D3 54 89 C3 53 AB A2 B9 FD 02 68 81 82 85 73 3E

from filetype.

h2non avatar h2non commented on May 22, 2024

There should be missing a MP4 encoding subset here.

As far as I know, at least the following subsets should supported and recognized as MP4 compatible formats:

MP41 - `0x6D, 0x70, 0x34, 0x31`
MP42 - `0x6D, 0x70, 0x34, 0x32`
ISOM - `0x69, 0x73, 0x6F, 0x6D`
ISO2 - `0x69, 0x73, 0x6F, 0x32`
MMP4 - `0x6D, 0x6D, 0x70, 0x34`
M4V - `0x4D, 0x34, 0x56`
DASH - `0x64, 0x61, 0x73, 0x68`

@RangelReale are you interested in sending a PR with the enhancements?

Bytes check can be implemented here:
https://github.com/h2non/filetype/blob/master/matchers/video.go#L98-L110

from filetype.

RangelReale avatar RangelReale commented on May 22, 2024

from filetype.

h2non avatar h2non commented on May 22, 2024

Cool, you basically need to check if the given byte sequences (in definition order) per video subtype exists in the first 256 bytes file header signature.

from filetype.

h2non avatar h2non commented on May 22, 2024

I think we can close this.

from filetype.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.