[vlc] serve content via http to vlc
Jude DaShiell
jdashiel at shellworld.net
Wed Feb 4 15:49:28 CET 2015
I have a problem with what I'm about to share since I probably don't
have all of the file types in it vlc can play. If I can get a list of
all file extensions vlc can handle I will improve the file I'm about to
share.
To answer the original question you'll need to find out if the browser
you use uses entries in your .mailcap file. The lynx broswer I use does
use entries in my .mailcap and once I added the vlc lines to that file,
one time I got on a sound file on the web and hit enter one more time
and vlc started up and played that file for me. Understand I'm totally
blind so have many g.u.i. components of vlc disabled since those
interfere with the screen reader speakup I use in one way or another so
you will probably find a .mailcap line with far fewer options on it
desireable for your purposes. So let's cut to the chase:
cut here.
application/x-bittorrent; transmission-cli -er -v '%s'; needsterminal
application/pdf; pdftotext '%s'; copiousoutput
application/ogg; rvlc --quiet --novideo --key-vol-up 123 --no-skinned-playlist -I ncurses '%s'; test=test -n "$DISPLAY"
application/postscript;ps2ascii %s 2>/dev/null; copiousoutput
application/x-tar; tar -tf - ; copiousoutput;
application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
audio/basic;play %s
audio/midi;playmidi %s
audio/mp3;rvlc --quiet --novideo --key-vol-up 123 --no-skinned-playlist %s
audio/mpeg;rvlc --quiet --novideo --key-vol-up 123 --no-skinned-playlist %s
audio/wav;play %s
audio/x-wav; play %s
audio/x-basic;play %s
audio/x-midi;playmidi %s
audio/x-mp3;rvlc --quiet --novideo --key-vol-up 123 --no-skinned-playlist %s
audio/x-mpeg;rvlc --quiet --novideo --key-vol-up 123 --no-skinned-playlist %s
audio/x-mpegurl;rvlc --quiet --novideo --key-vol-up 123 --no-skinned-playlist %s
audio/x-pn-realaudio;mplayer %s
video/vnd.rn-realvideo;mplayer %s
audio/vnd.rn-realaudio;mplayer %s
application/vnd.rn-realmedia;mplayer %s
audio/mpeg;/usr/X11R6/bin/rvlc --quiet --novideo --key-vol-up 123 --no-skinned-playlist %s
audio/x-mpegurl;/usr/X11R6/bin/rvlc --quiet --novideo --key-vol-up 123 --no-skinned-playlist %s
audio/x-scpls; rvlc --quiet --novideo --key-vol-up 123 --no-skinned-playlist '%s';
MPEG/VOB;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
AVI;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
ASF/WMA/WMV;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
RM;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
QT/MOV/MP4;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
Ogg/OGM;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
MKV;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
VIVO;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
FLI;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
NuppelVideo;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
yuv4mpeg;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
FILM;"mplayer -vo=nul -nolirc -nojoystick -nomouseinput %s"
application/msword; antiword %s; copiousoutput
cut here.
that file needs be in the home directory saved as .mailcap in order for
it to work. You may also need to install mime support if not already
installed. I noticed this message had had answers for a while and since
this has been something I've been wanting to get working on my system
and I got some ideas from the lynx-dev email list I figured to share
here.
On Wed, 29 Oct 2014, Manuel wrote:
> Hi,
>
> I tried to serve content via http to vlc but failed.
>
> bellow the first headers vlc send. The Line with content-range is the
> header I set.
> I send vlc 64KiByte blocks of data.
>
> What I dont understand is:
> why vlc queries for the last few bytes of the file (1:)
>
> And then (2:) ask for 8096-
> I send the Range 8096-73631
> but then (3:) vlc then asks for 107524-
>
> What I am doing wrong?
>
> I also tried with Chrome (Version 40.0.2199.0 canary (64-bit)) this
> actually works. Requests are attached.
>
> Thanks for your help.
>
> 0:
> { host: '127.0.0.1:12202',
> 'user-agent': 'VLC/3.0.0-git LibVLC/3.0.0-git',
> range: 'bytes=0-',
> connection: 'close',
> 'icy-metadata': '1' }
> Content-Range bytes 0-65535/337974513
>
> 1:
> { host: '127.0.0.1:12202',
> 'user-agent': 'VLC/3.0.0-git LibVLC/3.0.0-git',
> range: 'bytes=337968724-',
> connection: 'close',
> 'icy-metadata': '1' }
> Content-Range bytes 337968724-337974512/337974513
>
> 2:
> { host: '127.0.0.1:12202',
> 'user-agent': 'VLC/3.0.0-git LibVLC/3.0.0-git',
> range: 'bytes=8096-',
> connection: 'close',
> 'icy-metadata': '1' }
> Content-Range bytes 8096-73631/337974513
>
> 3:
> { host: '127.0.0.1:12202',
> 'user-agent': 'VLC/3.0.0-git LibVLC/3.0.0-git',
> range: 'bytes=107524-',
> connection: 'close',
> 'icy-metadata': '1' }
> Content-Range bytes 107524-173059/337974513
>
>
>
>
> // http request with chrome
>
> { host: '127.0.0.1:12202',
> connection: 'keep-alive',
> pragma: 'no-cache',
> 'cache-control': 'no-cache',
> accept:
> 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
> dnt: '1',
> 'accept-encoding': 'gzip, deflate, sdch',
> 'accept-language': 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4' }
> Content-Range bytes 0-65535/337974513
>
>
> { host: '127.0.0.1:12202',
> connection: 'keep-alive',
> pragma: 'no-cache',
> 'cache-control': 'no-cache',
> 'accept-encoding': 'identity;q=1, *;q=0',
> accept: '*/*',
> dnt: '1',
> referer: 'http://127.0.0.1:12202/',
> 'accept-language': 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4',
> range: 'bytes=0-' }
> Content-Range bytes 0-65535/337974513
>
>
> { host: '127.0.0.1:12202',
> connection: 'keep-alive',
> accept: '*/*',
> dnt: '1',
> 'accept-encoding': 'gzip, deflate, sdch',
> 'accept-language': 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4' }
> Content-Range bytes 0-65535/337974513
>
>
> { host: '127.0.0.1:12202',
> connection: 'keep-alive',
> pragma: 'no-cache',
> 'cache-control': 'no-cache',
> 'accept-encoding': 'identity;q=1, *;q=0',
> accept: '*/*',
> dnt: '1',
> referer: 'http://127.0.0.1:12202/',
> 'accept-language': 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4',
> range: 'bytes=65535-' }
> Content-Range bytes 65535-131070/337974513
>
>
> { host: '127.0.0.1:12202',
> connection: 'keep-alive',
> pragma: 'no-cache',
> 'cache-control': 'no-cache',
> 'accept-encoding': 'identity;q=1, *;q=0',
> accept: '*/*',
> dnt: '1',
> referer: 'http://127.0.0.1:12202/',
> 'accept-language': 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4',
> range: 'bytes=131070-' }
> Content-Range bytes 131070-196605/337974513
>
>
> { host: '127.0.0.1:12202',
> connection: 'keep-alive',
> pragma: 'no-cache',
> 'cache-control': 'no-cache',
> 'accept-encoding': 'identity;q=1, *;q=0',
> accept: '*/*',
> dnt: '1',
> referer: 'http://127.0.0.1:12202/',
> 'accept-language': 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4',
> range: 'bytes=196605-' }
> Content-Range bytes 196605-262140/337974513
>
jude <jdashiel at shellworld.net>
Twitter: @JudeDaShiell
More information about the vlc
mailing list