How do I make Firefox run vlc with URL?
I have a server that delivers media via HTTP (or FTP). If I click on a link, it downloads to /tmp and then plays in vlc, but what I want is for it to run vlc and give it the URL so that it will play it as a stream. I am generating the HTML and I'm using thttpd for the server. If I do it manually (Copy Link Location, paste into vlc) it works fine, but I'd like click-and-play. I've Googled for hours and can't even see the topic addressed. This is possible, right?
(Lucid-64, XFCE, Firefox 4.0b11, thttpd, vlc 1.0.6) |
Hi,
If it's your (private) server, consider setting up IceCast...full details on install and setting up are on the site! Dunnow what distro you got, but have a peek in the repo, it's bound to be in there... Happy listening :) Thor |
Quote:
But even with Icecast, what program would be reading it in the browser? That's the problem I have is making it stream on the client side. |
Quote:
Also, you could install mozilla-vlc package. It's a plug-in, and might let you do play your videos while they download instead of waiting for the end of the download. Another way of achieving what you want could be to download a playlist file that holds the URL for your media, instead of the media file itself. But you'll need to research what exact format vlc supports for this. m3u would work if your media is mp3. XSPF format could be what you want, not sure. http://en.wikipedia.org/wiki/XSPF mentions vlc |
I checked http://en.wikipedia.org/wiki/XSPF that i mentioned above, and it works on first try on vlc 1.1.9
|
Quote:
The problem is in getting Firefox to do the correct thing. Quote:
Quote:
Would that not expect that the media to play was on the local machine? I will investigate that though. Thanks. |
Quote:
I tried it (my post above), and could start viewing my video immediately which is what I think you're looking for. if your version 1.0.6 of vlc does not work with that xspf standard, then upgrade to 1.1.9 |
[SOLVED] How do I make Firefox run vlc with URL?
Quote:
Thanks much 16pide for the idea. |
Firefox needs to have VLC registered as a protocol handler.
http://kb.mozillazine.org/Register_protocol |
Quote:
Do I have to be running Gnome? I'm running XFCE but it runs Gnome compatibility libraries. I did: gconftool-2 -s /desktop/gnome/url-handlers/vlc/command '/usr/bin/vlc %s' --type Stringthen restarted Firefox and tried vlc://192.168.0.45:8080/path-to-my-fileand it replied: Firefox doesn't know how to open this address, because the protocol (vlc) isn't associated with any program.I also tried Opera which did the same thing. I wonder what it takes to make it work, but thanks for the tip. |
In Opera go to "Preferences (Alt+p) > Advanced > Programs" and add vlc as a protocol.
|
Quote:
|
Quote:
Both of these work now. The Opera setting works, and after I typed the gconftool correctly, that worked too for Firefox. It now invokes vlc with the URL. The only problem is, vlc doesn't know how to deal with a URL that starts with "vlc://..." so not sure what to do. It won't let me invoke a bash script, which I can use to change the vlc to http, so I may have to write a little program. But that's a whole different problem. This mission is accomplished. |
In that case U suspect the fix that dugan gave you would actually have been enough for Opera as well, since it passes off unknown protocols to the desktop environment but it doesn't hurt actually setting it within Opera. Also this would be the best way to do it for someone who ran Opera and a simple window manager, rather than a full desktop environment.
|
Quote:
Ultimately I also want this to work with Macbook, so probably the XSPF will be the way to go there. It think it will be easier to set up for a given browser to tell it handle .xspf rather than a protocol. I'm glad I learned both ways to do it. |
All times are GMT -5. The time now is 04:24 AM. |