mpeg-2 detected as tga (Targa image)

Bug #1809014 reported by Finn Kempers on 2018-12-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
file (Ubuntu)
Undecided
Unassigned

Bug Description

It appears that currently using either the file command or through the File::LibMagic interface that 1:5.34-2 on Cosmic (18.10) makes a MPEG-2 file be detected as Targa at a higher priority, thus taking precedence over being what it actually is. See the below lines as examples using clips from http://hubblesource.stsci.edu/sources/video/clips/ as examples:

$ file -k /home/piratefinn/Downloads/hst_2.mpg
/home/piratefinn/Downloads/hst_2.mpg: Targa image data - Map 63635 x 65536 x 1 +268 +60928 - 11-bit alpha - top - right - four way interleave MPEG sequence, v2, program multiplex (Lepton 3.x), scale 0-0, spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: offset 0.000000, slope 0.000000\012- data

Note that this appears to only affect MPEG-2 (and possibly higher) as MPEG-1 is detected corretly.

$ file -k /home/piratefinn/Downloads/hst_1.mpg
/home/piratefinn/Downloads/hst_1.mpg: MPEG sequence, v1, progressive Y'CbCr 4:2:0 video, 320x240, 4:3, 29.97 fps (Lepton 2.x), scale 1-2, spot sensor temperature 0.000000, unit celsius, color scheme 0, show spot sensor, show scale bar, maximum point enabled, calibration: offset 586.228088, slope -411899156202779801569722368.000000\012- data
file -k /home/piratefinn/Downloads/hst_1.mpg

This appears to not be an issue in 1:5.25 used in 16.04, however looking through the github it appears since then in possible 5.26 (or above) changes as seen in https://github.com/file/file/commit/aee048a020badb5f36008f6d11e7d5b32834bcb2 affected this.

Juhani Numminen (jsonic) on 2018-12-18
tags: added: cosmic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers