[Linux] Video MimeType Association Oddity

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
distantpluto
Moon lover
Moon lover
Posts: 91
Joined: 2015-12-17, 18:28
Location: UK

[Linux] Video MimeType Association Oddity

Unread post by distantpluto » 2022-12-06, 13:33

Operating system: Linux
Browser version: 31.4.1

I'm having a frustrating time trying to play mpeg video directly in the browser via the VLC Web Plugin. VLC (desktop) reports the file as MPEG-1/2 (mpgv). From what I can gather online the spec is "MPEG-2 transport stream".

The file is being served from the LAN web interface of my Humax PVR (example: http://192.168.66.8:9000/web/media/6206.TS). I've recently started using it again after a few years and it always worked in the past. I made some progress by removing 'mimeTypes.rdf' so it's starting at default and tried adding various mime types to '$HOME/.mime.types' such as

Code: Select all

video/mp2t ts tsv tsa mts m2t m2ts mpgv
video/mpeg mpg mpeg mpe mpgv ts
video/mpgv mpg mpeg mpe mpgv ts
Now the odd thing is, if I enter the saved-to-disk file:/// URL it plays but when served from the Humax it will only download.

When served >> "You have chosen to open..." ... "which is: TS file" ... "What should Pale Moon do with this file?"... I get "Open With >> Browse" and no option for the plugin, even though it's listed as associated in "Preferences >> Applications >> TS file >> Use VLC Web Plugin (in Pale Moon)"

I've fiddled with the mimeTypes.rdf a fair bit but I don't know what I'm doing, so any help would be greatly appreciated!
Pale Moon and Epyrus on Arch Linux.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 33329
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: [Linux] Video MimeType Association Oddity

Unread post by Moonchild » 2022-12-06, 14:08

Is your PVR software sending the correct MIME type header for .TS files?
"The best revenge is to not be like the person who wronged you." -- Marcus Aurelius
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb

User avatar
distantpluto
Moon lover
Moon lover
Posts: 91
Joined: 2015-12-17, 18:28
Location: UK

Re: [Linux] Video MimeType Association Oddity

Unread post by distantpluto » 2022-12-06, 14:21

Moonchild wrote:
2022-12-06, 14:08
Is your PVR software sending the correct MIME type header for .TS files?
I did wonder that, how can I check?

Edit: and is there any way to override/force it?
Pale Moon and Epyrus on Arch Linux.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 33329
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: [Linux] Video MimeType Association Oddity

Unread post by Moonchild » 2022-12-06, 15:54

distantpluto wrote:
2022-12-06, 14:21
I did wonder that, how can I check?
F12 (devtools), Network tab. Make a request for a video, select the network entry and inspect the headers on the right.
distantpluto wrote:
2022-12-06, 14:21
Edit: and is there any way to override/force it?
That depends on your PVR software? I don't know.
"The best revenge is to not be like the person who wronged you." -- Marcus Aurelius
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb

User avatar
therube
Board Warrior
Board Warrior
Posts: 1490
Joined: 2018-06-08, 17:02

Re: [Linux] Video MimeType Association Oddity

Unread post by therube » 2022-12-06, 20:59

Perhaps this is a valid test page, https://developer.apple.com/streaming/e ... am-ts.html ?

User avatar
distantpluto
Moon lover
Moon lover
Posts: 91
Joined: 2015-12-17, 18:28
Location: UK

Re: [Linux] Video MimeType Association Oddity

Unread post by distantpluto » 2022-12-07, 13:41

Moonchild wrote:
2022-12-06, 15:54
distantpluto wrote:
2022-12-06, 14:21
I did wonder that, how can I check?
F12 (devtools), Network tab. Make a request for a video, select the network entry and inspect the headers on the right.
Ok, I've now found time to try this....

Code: Select all

GET 5840.TS

Response Headers
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Server: HUMAX / MicroMediaServer
Accept-Range: bytes
Content-Type: video/ts
Content-Length: 825339648
Pragma: no-cache
Cache-control: no-cache

Request Headers
GET /web/media/5840.TS HTTP/1.1
Host: 192.168.66.8:9000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.2) Goanna/20221201 PaleMoon/31.4.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-GB,en-US;q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Does this mean I need a mimetype entry for 'video/ts'? And if so, what should it be?
Moonchild wrote:
2022-12-06, 15:54
distantpluto wrote:
2022-12-06, 14:21
Edit: and is there any way to override/force it?
That depends on your PVR software? I don't know.
I meant is there any way for PM to override it, say, with a config setting? Thanks.
Pale Moon and Epyrus on Arch Linux.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 33329
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: [Linux] Video MimeType Association Oddity

Unread post by Moonchild » 2022-12-07, 13:49

distantpluto wrote:
2022-12-07, 13:41
Does this mean I need a mimetype entry for 'video/ts'?
Yup. linked to your VLC plugin?
Or for the PVR software to use a MIME type you already know, like video/mp2t
distantpluto wrote:
2022-12-07, 13:41
I meant is there any way for PM to override it, say, with a config setting? Thanks.
Not without an extension that injects headers.
"The best revenge is to not be like the person who wronged you." -- Marcus Aurelius
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb

User avatar
distantpluto
Moon lover
Moon lover
Posts: 91
Joined: 2015-12-17, 18:28
Location: UK

Re: [Linux] Video MimeType Association Oddity

Unread post by distantpluto » 2022-12-07, 15:46

Moonchild wrote:
2022-12-07, 13:49
distantpluto wrote:
2022-12-07, 13:41
Does this mean I need a mimetype entry for 'video/ts'?
Yup. linked to your VLC plugin?
Or for the PVR software to use a MIME type you already know, like video/mp2t
I've tried various entries for 'video/ts' but I'm getting nowhere. I don't understand, if PM associates .TS files as open with the plugin, why it doesn't?

I'll post back if I get any further. Thanks.
Pale Moon and Epyrus on Arch Linux.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 33329
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: [Linux] Video MimeType Association Oddity

Unread post by Moonchild » 2022-12-07, 17:24

Unfortunately I can't help any further here. I neither use Linux as a driver, and that traffic cone pushware will not be installed on my system.
"The best revenge is to not be like the person who wronged you." -- Marcus Aurelius
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb

User avatar
distantpluto
Moon lover
Moon lover
Posts: 91
Joined: 2015-12-17, 18:28
Location: UK

Re: [Linux] Video MimeType Association Oddity

Unread post by distantpluto » 2022-12-08, 14:35

Just to wind this up...

'video/mp2t' and 'video/ts' are registered with the OS as 'MPEG Transport Stream' and working accordingly.

PM offers "Preferences >> Applications >> TS file >> Use VLC Web Plugin (in Pale Moon)" but the file will only download. A random tested .ts file on the internet plays with the plugin.

I've had a browse through the Humax custom firmware web front end and it suggests the files should be being served as 'video/mp2t' but are actually being received as 'video/ts'. I will try and chase this up on the custom firmware forum.
Pale Moon and Epyrus on Arch Linux.

Post Reply