Support for MP4 Downloader has been discontinued.

I don't have the time anymore to keep up with all the breaking changes that Mozilla is making in add-on development for Firefox, in addition to reacting to changes in YouTube, Dailymotion, and Vimeo that affect video downloading. Since Mozilla dropped support for traditional add-ons in November 2017, MP4 Downloader has stopped working entirely in new versions of Firefox.

The codebase has been left in the middle of a complete rewrite (see the Source Code section of the Development page), although this rewrite is not anywhere close to what is required to support new versions of Firefox. That codebase, and this website, are left here for archival purposes.

To all MP4 Downloader fans, thanks for many years of support.

--Jake Hartz

Selective Content Replacement

MP4 Downloader’s Selective Content Replacement allows MP4 Downloader file name and location preferences to be written in a special syntax in which certain values are substituted in for generic variable names. It also allows the use of “if statements” to control content.

If you are looking for a method of parsing strings using Selective Content Replacement, see the parseString function in:


List of Variables

Variables related to the video being downloaded:

Variables related to the current time and date:

If statements

An if statement can be used to only show text if a certain variable has a certain value or matches a certain regular expression.

Syntax: [[if %%VAR OPERAND VALUE]]stuff[[else]]other stuff[[endif]]

All if statements should match this regular expression: \[\[if %%[A-Z]+ (is|isnot|i?matches) .+\]\].*(\[\[else\]\].*)?\[\[endif\]\]

If statements compare a variable (%%VAR) to a value (VALUE) using the specified operand (OPERAND). The if statement ends when it reaches [[endif]]. An optional [[else]] statement can be used to display something in the event that the if statement is evaluated to false.

Basic rules:


NOTE: Be sure to escape any backslashes in if statements! Example: [[if %%VAR matches .*\.js]] should be [[if %%VAR matches .*\\.js]]


Default filename examples: