Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

MTS video files are not correctly identified and analyzed #230

Open
kristofkeppens opened this issue Apr 28, 2016 · 1 comment
Open

MTS video files are not correctly identified and analyzed #230

kristofkeppens opened this issue Apr 28, 2016 · 1 comment

Comments

@kristofkeppens
Copy link
Contributor

MTS video files ( mpegts ) are not identified as videofiles in mediamosa ( mimetype returned by debian and ubuntu is application/octet-stream ) so vpx-analyse is not performed, resulting in a videofile without duration, etc. information in the metadata.

@gregapodobnik
Copy link
Contributor

gregapodobnik commented Jun 2, 2016

I did some research on this topic.

The issue is with file command that is used by mediamosa for getting information about mimetype. This is standard linux command, which uses magic (/etc/magic) instead of more standard mime.types (/etc/mime.types) to determine correct file type. The issue with file and "ts" files is dating back to 2010 and looks like the patch still did not make it to newer versions of linux distributions.

Try this on test server first, and try also upload other previously working file type to be sure they are still working!

The manual way to patch this is to add to /etc/magic (at least to job server) the following lines so that it looks like this (the ">" should be there!):

# Magic local data for file(1) command.
# Insert here your local magic data. Format is described in magic(5).
4 byte 0x47
>5 beshort 0x4000
>>7 byte ^0xF
>>>196 byte 0x47
>>>>388 byte 0x47
>>>>>580 byte 0x47 M2TS MPEG transport stream, v2
!:mime video/MP2T

To test if the solution works use file --mime-type /path/to/tsfile and you should see " video/MP2T" in the output.

Let me know if this works for you @flyapen.

@rblanker While this is not a Mediamosa issue, this might be an indicator, to find some other way/command to determine mime-type.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants