bakape / thumbnailer

Go media thumbnailer
MIT License
152 stars 36 forks source link

iphone mov/mp4 signature in mime detection #71

Open vavrecan opened 3 years ago

vavrecan commented 3 years ago

in mimes detection: &exactSig{"mov", "video/quicktime", []byte("\x00\x00\x00\x14ftyp")}, might be not enough for some videos recorded on iphones.

first 4 bytes are only header length

bakape commented 3 years ago

Can I get a sample?

bakape commented 3 years ago

Note to self: https://github.com/bakape/thumbnailer/commit/9dc1050fa3ed07270c70b41b55129fcd3a332ab3#r47375962

vavrecan commented 3 years ago

here you go https://drive.google.com/file/d/1ZLDIjY43IujRfQd8_fjxjr98l1nw5k6G/view?usp=sharing

vavrecan commented 3 years ago

here is output from ffprobe Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'new_recording.mp4': Metadata: major_brand : iso5 minor_version : 1 compatible_brands: isomiso5hlsf creation_time : 2021-02-22T15:33:24.000000Z Duration: 00:00:00.66, start: 0.000000, bitrate: 23437 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1280x720, 26092 kb/s, 30.50 fps, 600 tbr, 600 tbn, 1200 tbc (default) Metadata: rotate : 90 creation_time : 2021-02-22T15:33:24.000000Z handler_name : Core Media Video Side data: displaymatrix: rotation of -90.00 degrees Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 843 kb/s (default) Metadata: creation_time : 2021-02-22T15:33:24.000000Z handler_name : Core Media Audio

vavrecan commented 3 years ago

I think it could be fixed also in mp4Sig and add "iso" / "iso5" there