What Content-Type needs to be served so that VLC will use an HTTP URL as a playlist?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
timvisher
New Cone
New Cone
Posts: 2
Joined: 07 May 2024 23:39

What Content-Type needs to be served so that VLC will use an HTTP URL as a playlist?

Postby timvisher » 08 May 2024 13:33

Subject says it all: What Content-Type needs to be served so that VLC will use an HTTP URL as a playlist?

I have a collection of videos that I'd like to serve via nginx and I have a pre-computed .m3u8 utf-8 text playlist. I can play any individual video if I first download the playlist and then open it with VLC. If I try to play the playlist directly, though, VLC seems to think it's not a playlist and tries to play it instead as a video stream of some kind:

Code: Select all

$ /Applications/VLC.app/Contents/MacOS/VLC -v 'http://example.com/playlist.m3u8' VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126) [0000000130e06930] main libvlc warning: cannot read /Applications/VLC.app/Contents/MacOS/plugins/plugins.dat: No such file or directory [0000000130e06930] main libvlc warning: Key "Command+0" bound to multiple actions [0000000130e06930] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. [0000000130ea1710] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000130ea1710] ps demux warning: garbage at input from 509, trying to resync... [0000000130ea1710] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000130ea1710] ps demux warning: garbage at input from 509, trying to resync... [0000000130f65620] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000130f65620] ps demux warning: garbage at input from 509, trying to resync... [0000000130f65460] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000130f65460] ps demux warning: garbage at input from 509, trying to resync... [0000000130f65460] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000130f65460] ps demux warning: garbage at input from 509, trying to resync... [0000000132820d10] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000132820d10] ps demux warning: garbage at input from 509, trying to resync... [0000000130e66910] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000130e66910] ps demux warning: garbage at input from 509, trying to resync... [0000000132822820] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000132822820] ps demux warning: garbage at input from 509, trying to resync... [000000013297bfe0] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [000000013297bfe0] ps demux warning: garbage at input from 509, trying to resync... [0000000130f63010] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000130f63010] ps demux warning: garbage at input from 509, trying to resync... [0000000132821cf0] ps demux warning: this does not look like an MPEG PS stream, continuing anyway [0000000132821cf0] ps demux warning: garbage at input from 509, trying to resync... … etc.
The current Content-Type is application/vnd.apple.mpegurl:

Code: Select all

HTTP/1.1 200 OK Server: nginx/1.26.0 Date: Wed, 08 May 2024 11:31:03 GMT Content-Type: application/vnd.apple.mpegurl Content-Length: 2099678 Last-Modified: Tue, 07 May 2024 13:07:44 GMT Connection: keep-alive ETag: "663a27a0-2009de" Accept-Ranges: bytes
So what can I do to get this to be played like a plain text .m3u8 playlist rather than a video stream?

Thanks in advance!

Rémi Denis-Courmont
Developer
Developer
Posts: 15272
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: What Content-Type needs to be served so that VLC will use an HTTP URL as a playlist?

Postby Rémi Denis-Courmont » 08 May 2024 16:36

HLS is started by sensing the manifest format, not checking the Content-Type header field.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

timvisher
New Cone
New Cone
Posts: 2
Joined: 07 May 2024 23:39

Re: What Content-Type needs to be served so that VLC will use an HTTP URL as a playlist?

Postby timvisher » 09 May 2024 01:23

That sounds promising! What would I likely have to change then? Like I said, the playlist file works as intended when opened as a local file. Where it fails opening it over the network.

My goal is to have the playlist file loaded over the network and then shuffled through. On macOS I accomplish that like

Code: Select all

open -a VLC -n '<playlist file>.m3u8' --args --loop --random --no-audio --video-wallpaper


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 29 guests