<div dir="ltr"><div dir="ltr"><div dir="ltr"><h1>Feature Request: Official Firefox Extension for Opening Direct Media Links in VLC</h1><h2>Summary</h2><p>I would like to request an official VLC extension for Firefox that adds a clearly labeled <strong>VLC</strong> link next to direct media links on web pages.</p><p>The purpose is to let users stream a media URL directly in VLC without changing the website’s original link behavior.</p><p>I already did this on my Debian Linux desktop by using the instructions and code in <a href="https://www.cdn.ay1.net/pub/auto-open-media-links-in-vlc-debian-ubuntu-linux.zip">this file</a>. Here is a <a href="https://www.cdn.ay1.net/pub/auto-open-media-links-in-vlc.mkv">video</a><span class="vlc-stream-link-wrapper" style="white-space:nowrap"> <a class="vlc-stream-link" href="vlc://open?url=https%3A%2F%2Fwww.cdn.ay1.net%2Fpub%2Fauto-open-media-links-in-vlc.mkv" title="Stream in VLC: https://www.cdn.ay1.net/pub/auto-open-media-links-in-vlc.mkv" style="font-weight:700;margin-left:0.25em">VLC</a></span> showing how it works.</p><p></p><p>One glaring example of why this is needed is that I don't know of any browsers that can stream .mkv files!</p><p>Video example:</p><p><a href="https://www.cdn.ay1.net/pub/auto-open-media-links-in-vlc.mkv">https://www.cdn.ay1.net/pub/auto-open-media-links-in-vlc.mkv</a></p><p>Code and instructions:</p><p><a href="https://www.cdn.ay1.net/pub/auto-open-media-links-in-vlc-debian-ubuntu-linux.zip">https://www.cdn.ay1.net/pub/auto-open-media-links-in-vlc-debian-ubuntu-linux.zip</a></p><p></p><p><br></p><p>For example, when a page contains a direct link to:</p><ul><li><p>MP4</p></li><li><p>MKV</p></li><li><p>WebM</p></li><li><p>AVI</p></li><li><p>MOV</p></li><li><p>MPEG</p></li><li><p>TS or M2TS</p></li><li><p>MP3</p></li><li><p>FLAC</p></li><li><p>OGG</p></li><li><p>M3U or M3U8</p></li><li><p>DASH/MPD</p></li><li><p>RTSP, RTMP, MMS, RTP, or another VLC-supported network stream</p></li></ul><p>the Firefox extension would add a bold <strong>VLC</strong> link immediately beside the original media link.</p><p>The user would then have two separate choices:</p><ul><li><p>Click the website’s original link to retain the website’s normal behavior.</p></li><li><p>Click the added <strong>VLC</strong> link to open and stream the media URL in VLC.</p></li></ul><p>Right-clicking the original link would continue to provide Firefox’s normal <strong>Save Link As…</strong> option.</p><h2>Why this feature is useful</h2><p>Firefox can associate media file types with VLC, but that is not the same as passing the original network URL directly to VLC.</p><p>When Firefox opens a downloaded file with an external application, it may first save the file locally or treat it as a download. That is undesirable when the user simply wants VLC to stream the original URL.</p><p>An official VLC browser extension could pass the actual URL directly to VLC, allowing VLC to:</p><ul><li><p>Begin playback while the media is still downloading.</p></li><li><p>Use its own buffering and seeking behavior.</p></li><li><p>Handle formats Firefox cannot play internally.</p></li><li><p>Play videos in a separate VLC window.</p></li><li><p>Avoid saving unnecessary temporary copies.</p></li><li><p>Support playlists and streaming manifests.</p></li><li><p>Preserve the website’s original download behavior.</p></li></ul><p>This is especially useful for large video files, uncommon media formats, direct file indexes, self-hosted media servers, archive sites, and pages containing downloadable media links.</p><h2>Requested behavior</h2><p>The extension should scan web pages for links that VLC can reasonably attempt to open.</p><p>When a supported link is detected, it should add a small but clearly visible link beside it, such as:</p><p><strong>VLC</strong></p><p>The VLC link should preferably be bold so that it is easy to identify.</p><p>Example:</p><pre><code class="gmail-language-text">example-video.mkv VLC
</code></pre><p>The original link must not be modified or replaced.</p><h3>Clicking the original link</h3><p>The website should behave exactly as it normally would.</p><p>This preserves:</p><ul><li><p>Browser playback.</p></li><li><p>Website-specific video players.</p></li><li><p>Normal navigation.</p></li><li><p>Explicit download behavior.</p></li><li><p>Authentication flows.</p></li><li><p>Right-click saving.</p></li></ul><h3>Clicking the VLC link</h3><p>The extension should send the absolute media URL to VLC.</p><p>VLC should then open the network location directly rather than receiving a temporary file downloaded by Firefox.</p><p>Conceptually, VLC would be launched with:</p><pre><code class="gmail-language-text">vlc "<a href="https://example.com/path/video.mkv">https://example.com/path/video.mkv</a>"
</code></pre><h2>Media detection</h2><p>The extension could identify media links using several methods.</p><h3>File extensions</h3><p>It could recognize common media filename extensions, including but not limited to:</p><h4>Video</h4><pre><code class="gmail-language-text">.3gp
.avi
.divx
.dv
.flv
.m1v
.m2t
.m2ts
.m2v
.m4v
.mkv
.mov
.mp4
.mpeg
.mpg
.mts
.mxf
.ogm
.ogv
.rm
.rmvb
.ts
.vob
.webm
.wmv
</code></pre><h4>Audio</h4><pre><code class="gmail-language-text">.aac
.ac3
.aiff
.alac
.amr
.ape
.au
.dts
.flac
.m4a
.m4b
.mka
.mp2
.mp3
.oga
.ogg
.opus
.ra
.wav
.wma
.wv
</code></pre><h4>Playlists and streaming manifests</h4><pre><code class="gmail-language-text">.asx
.cue
.m3u
.m3u8
.mpd
.pls
.ram
.sdp
.smil
.xspf
</code></pre><p>The final list could be generated from the media and network formats supported by VLC rather than being permanently hard-coded in the extension.</p><h3>MIME types</h3><p>The extension could also inspect the HTML <code>type</code> attribute when present.</p><p>Examples include:</p><pre><code class="gmail-language-text">video/*
audio/*
application/dash+xml
application/ogg
application/vnd.apple.mpegurl
application/x-mpegurl
application/xspf+xml
</code></pre><h3>Streaming protocols</h3><p>Links using VLC-supported protocols could also receive a VLC link.</p><p>Examples:</p><pre><code class="gmail-language-text">rtsp://
rtsps://
rtmp://
rtmps://
mms://
mmsh://
mmst://
rtp://
udp://
</code></pre><h3>URLs containing filenames in query parameters</h3><p>Some websites do not end the visible URL path with a media extension.</p><p>For example:</p><pre><code class="gmail-language-text"><a href="https://example.com/download?id=123&filename=video.mkv">https://example.com/download?id=123&filename=video.mkv</a>
</code></pre><p>The extension could examine query parameter values and the visible link text for recognizable media filenames.</p><h2>Dynamically loaded pages</h2><p>Many modern websites load or replace content after the initial page load.</p><p>The extension should monitor the document for newly added links and add VLC links when new media items appear.</p><p>This could be implemented with a <code>MutationObserver</code>.</p><p>The extension should avoid adding duplicate VLC links when the page is modified repeatedly.</p><h2>Proposed <code>vlc://</code> protocol</h2><p>The Firefox extension needs a secure and dependable way to pass the media URL to the installed VLC application.</p><p>I suggest that official VLC packages register a custom protocol when VLC is installed:</p><pre><code class="gmail-language-text">vlc://
</code></pre><p>A VLC link could contain the encoded original URL in a form such as:</p><pre><code class="gmail-language-text">vlc://open?url=https%3A%2F%2Fexample.com%2Fvideo.mkv
</code></pre><p>The URL must be encoded so that characters such as these are preserved correctly:</p><pre><code class="gmail-language-text">&
?
#
%
spaces
Unicode characters
signed URL parameters
temporary access tokens
</code></pre><p>VLC’s protocol handler would decode the <code>url</code> parameter, validate it, and open the resulting network location in VLC.</p><h2>VLC installer integration</h2><p>The official VLC installer or package should register the <code>vlc://</code> protocol handler.</p><h3>Windows</h3><p>The VLC installer could create the appropriate registry entries so that <code>vlc://</code> URLs launch VLC.</p><h3>Linux</h3><p>VLC could install a desktop entry declaring:</p><pre><code class="gmail-language-text">MimeType=x-scheme-handler/vlc;
</code></pre><p>The system could associate that handler with VLC using the standard freedesktop desktop and MIME mechanisms.</p><h3>macOS</h3><p>The VLC application bundle could declare support for the <code>vlc</code> URL scheme.</p><p>This would provide consistent behavior across Windows, Linux, and macOS.</p><h2>Security considerations</h2><p>The VLC protocol handler should not execute arbitrary commands.</p><p>It should accept only a URL value and pass it to VLC as a media location.</p><p>The handler should:</p><ul><li><p>Parse the <code>vlc://</code> URL safely.</p></li><li><p>Require an explicitly named URL parameter.</p></li><li><p>Decode the URL once using a standard URL decoder.</p></li><li><p>Reject unsupported or dangerous target schemes.</p></li><li><p>Pass the target URL as a single argument.</p></li><li><p>Avoid invoking a shell.</p></li><li><p>Avoid interpreting command-line switches embedded in the URL.</p></li><li><p>Use an argument separator such as <code>--</code> before the media URL where applicable.</p></li></ul><p>For example:</p><pre><code class="gmail-language-text">vlc -- "<a href="https://example.com/video.mp4">https://example.com/video.mp4</a>"
</code></pre><p>The handler could allow known media schemes such as:</p><pre><code class="gmail-language-text">http
https
ftp
ftps
sftp
smb
rtsp
rtsps
rtmp
rtmps
mms
mmsh
mmst
rtp
udp
</code></pre><p>Local file URLs could be disabled by default or handled under a stricter policy.</p><h2>Privacy considerations</h2><p>The extension should perform all media-link detection locally in Firefox.</p><p>It should not:</p><ul><li><p>Send browsing history to VLC servers.</p></li><li><p>Upload URLs to a third party.</p></li><li><p>Collect analytics by default.</p></li><li><p>Inspect page content beyond what is necessary to identify links.</p></li><li><p>log signed URLs or authentication tokens.</p></li></ul><p>If diagnostic logging is provided, query strings and fragments should be omitted or redacted because they may contain temporary access credentials.</p><h2>Authentication and cookies</h2><p>Some media URLs require browser cookies, authorization headers, referrer headers, or expiring tokens.</p><p>The basic implementation should pass the original URL as-is.</p><p>For sites where the URL alone is insufficient, a future advanced mode might optionally provide:</p><ul><li><p>The page referrer.</p></li><li><p>Selected request headers.</p></li><li><p>Cookies, only with explicit user permission.</p></li><li><p>A generated temporary playlist file containing VLC options.</p></li></ul><p>However, this should not be necessary for the initial version.</p><p>The first official version could focus on ordinary direct media links and public or tokenized stream URLs.</p><h2>User settings</h2><p>Useful extension settings could include:</p><ul><li><p>Enable or disable the extension globally.</p></li><li><p>Enable or disable it on selected websites.</p></li><li><p>Choose whether the VLC link is bold.</p></li><li><p>Customize the label, such as <code>VLC</code>, <code>Play in VLC</code>, or a VLC icon.</p></li><li><p>Place the VLC link before or after the original link.</p></li><li><p>Select which media types are detected.</p></li><li><p>Enable or disable audio links.</p></li><li><p>Enable or disable playlist links.</p></li><li><p>Enable or disable direct streaming protocols.</p></li><li><p>Show the full target URL in a tooltip.</p></li><li><p>Open VLC immediately or show a confirmation prompt.</p></li><li><p>Add a context-menu option named <strong>Open link in VLC</strong>.</p></li><li><p>Add a toolbar action for scanning or opening the current page’s media.</p></li></ul><h2>Context-menu support</h2><p>In addition to adding visible VLC links, the extension could provide:</p><pre><code class="gmail-language-text">Open link in VLC
</code></pre><p>in Firefox’s right-click context menu.</p><p>This would be useful when:</p><ul><li><p>A site’s design makes it difficult to insert a visible VLC link.</p></li><li><p>The URL has no recognizable filename extension.</p></li><li><p>The user knows that an unusual link is a playable media source.</p></li><li><p>The extension fails to identify a link automatically.</p></li></ul><p>The visible bold VLC link should remain the main feature because it is faster and easier for pages containing many media files.</p><h2>Expected workflow</h2><ol><li><p>The user installs VLC.</p></li><li><p>VLC registers the <code>vlc://</code> protocol handler.</p></li><li><p>The user installs the official VLC extension from Mozilla Add-ons.</p></li><li><p>A web page contains a link to a media file.</p></li><li><p>The extension adds a bold <strong>VLC</strong> link beside it.</p></li><li><p>The user clicks <strong>VLC</strong>.</p></li><li><p>Firefox asks for permission the first time it opens the external VLC handler.</p></li><li><p>VLC receives and decodes the original URL.</p></li><li><p>VLC begins streaming the media.</p></li></ol><p>The original web link remains completely unchanged.</p><h2>Existing proof of concept</h2><p>I currently use a working proof of concept built from:</p><ul><li><p>A Tampermonkey userscript.</p></li><li><p>A locally registered <code>vlc://</code> protocol handler.</p></li><li><p>A small URL-decoding launcher.</p></li></ul><p>The userscript:</p><ul><li><p>Detects common video, audio, playlist, and manifest formats.</p></li><li><p>Adds a bold <strong>VLC</strong> link beside the original link.</p></li><li><p>Converts relative links into absolute URLs.</p></li><li><p>URL-encodes the target before placing it in the <code>vlc://</code> link.</p></li><li><p>Detects links loaded dynamically after the initial page load.</p></li><li><p>Does not modify the website’s original link.</p></li><li><p>Preserves normal Firefox downloading and right-click behavior.</p></li></ul><p>The local handler:</p><ul><li><p>Receives the <code>vlc://</code> URL.</p></li><li><p>Extracts and decodes the original media URL.</p></li><li><p>Verifies that the destination uses an allowed protocol.</p></li><li><p>Launches VLC with the original URL as a single argument.</p></li><li><p>Does not use a command shell.</p></li><li><p>Avoids recording sensitive query parameters in its diagnostic log.</p></li></ul><p>The proof of concept works very well on Debian and should use the same general approach on Ubuntu and other Linux desktop distributions.</p><p>A previous version also worked on Windows using a Windows custom-protocol registration and launcher.</p><h2>Requested implementation</h2><p>Please consider creating an <strong>official VLC extension for Firefox</strong> that provides this functionality.</p><p>Ideally, the official VLC project would provide both parts:</p><ol><li><p>An official Firefox extension published under the VideoLAN or VLC developer account.</p></li><li><p>Native <code>vlc://</code> protocol handling included with VLC installation packages for Windows, Linux, and macOS.</p></li></ol><p>This would make the feature easy to install, safer, more trustworthy, and more reliable than requiring users to install third-party browser scripts and manually create operating-system protocol handlers.</p><p>The extension should add a bold <strong>VLC</strong> link beside every media link that VLC can reasonably stream, while leaving the website’s original links and download behavior untouched.</p><p>I believe this would be a very useful feature for users who prefer VLC’s playback, codec support, buffering, audio controls, subtitles, hardware acceleration, and network-streaming capabilities over browser playback.</p><br></div>
</div>
</div>