Skip to content
NotSoBot’s quarantine has been lifted, and tags are back!

On October 14th, Discord lifted NotSoBot’s quarantine, so it can be added to servers and used in DMs again. The tag system is back on too, with one big change: tags can no longer show media from outside links. To show an image or video in a tag, upload it with {attach} first, then use $FILE_1 as the URL in your embed or component. Discord’s own images, like avatars, emojis, and server icons, can still be used directly. Check out the tag documentation for examples, and the new tag directory for official verified tags. For questions, join our support server.

What happened

  1. August: Discord’s Developer Compliance team contacted us about content moderation in NotSoBot, including the tag system, .edit, and our AI image features. We replied on August 13th with the fixes we had made.
  2. August 18th: Discord asked us to formally certify those fixes by August 21st. We replied with our changes, but the reply was missing the formal certification they needed.
  3. Early September: Discord sent a follow-up with a September 4th deadline. We mistook it for a copy of the first notice and missed the deadline, and NotSoBot was quarantined.
  4. September 16th: We sent the full certification and asked Discord to review the quarantine.
  5. September 28th: Discord told us to remove the tag system by October 9th.
  6. October 1st: We responded with our new safety filters and asked to keep the tag system.
  7. October 9th: We disabled the tag system on the deadline to stay compliant.
  8. October 13th: Discord asked us to also certify that NotSoBot is protected against child safety and gore content, and that it contains no adult content. We made the changes below and sent the new certification.
  9. October 14th: Discord reviewed our certification and lifted the quarantine. We brought the tag system back with stricter media rules.

What we’ve changed

  • All NSFW-specific commands have been removed for good, along with commands featuring adult branding.
  • Every command now runs in safe mode everywhere, including age-restricted channels and DMs.
  • AI image commands like .imagine, .edit, .reimagine, and .mashup can’t produce sexual content in any channel.
  • Every media command scans its output before posting, and all media is checked for NSFW content, gore, and child safety in every channel. If a scan fails, the output is blocked.
  • NSFW detection uses two models we run locally on our own servers, ShieldStral and NudeNet. Content flagged by either one is blocked.
  • Prompts, search queries, and text output are checked against Discord’s Community Guidelines, and are blocked if the check fails.
  • Files produced by the code runner are scanned for NSFW content, gore, and child safety in every channel.
  • Search commands like .image now download, scan, and upload results instead of posting a link.
  • Results from sources with user-written content, like Reddit, 4chan, and Urban Dictionary, are filtered or scanned before they’re shown. Flagged results are hidden.
  • Tags can no longer show media from outside links. Embeds and components can only show files the tag uploaded through NotSoBot, or Discord’s own images like avatars and emojis.
  • All tag text is checked against Discord’s Community Guidelines, including text inside embeds, buttons, menus, and other components.
  • Flagged content is logged to a review queue, and repeat offenders are flagged and dealt with.
  • There is now a report system: use /bot report to report a user or server abusing NotSoBot to the developers.
Documentation

Tag Scripting

MediaScript edits images, audio, and video from inside a tag, one command per line. These 333 commands run through {mediascript}.

On this page

What is MediaScript?

MediaScript is a small scripting language for editing images, GIFs, audio and video inside a tag. You write it inside one of three TagScript functions, and NotSoBot runs it on its media servers and gives you back the finished file.

{mediascript:CODE} (also {mscript}, {imagescript}, {iscript}) attaches the result to the tag's reply. It counts toward the reply's 10 attachments and only works where the tag is allowed to attach files.

{mediascripturl:CODE} (also {mscripturl}, {imagescripturl}, {iscripturl}) uploads the result instead and puts its link in the tag's text. The link expires after 7 days. Use it when you want to pass the result into something else, like {attach:} or an embed image.

{mediascriptmaybeurl:CODE} (also {mscriptmaybeurl}, {imagescriptmaybeurl}, {iscriptmaybeurl}) attaches the result when it can, and gives you a link instead when it has to be uploaded (for example when it is too big to attach).

Each MediaScript call counts as one network request toward the tag's limit of 15. A script can have at most 300 non-empty lines, and all the media it holds at once must stay under 300 MB.

The rules in one breath: one command per line; the first word is the command and the rest are its arguments, separated by spaces; lines starting with # are comments; any text that might contain spaces, new lines or special characters should be wrapped in {jsonify:...}.

{mediascript:
# grab the last image or video in chat
load {iv} img
invert img
render img}
→Attaches an inverted copy of the most recent image or video.
{set:url|{mediascripturl:load {avatar} pfp
deepfry pfp
render pfp}}{embedjson:{"image": {"url": "{get:url}"}}}
→Uploads a deepfried avatar and shows it inside an embed.

Media keys, loading and rendering

Every piece of media in a script lives under a name you pick, called a media key, like img, pfp or background. load URL KEY downloads an image, GIF, audio file or video into that key. Most commands then take the key as their first argument and change that media in place. Commands that make new media (create, tti, tts, imagine, qrcode, clone and friends) store it under the key you give them.

Stick to plain letters (and digits) for keys. Every key automatically gets size variables named after it (see Variables), so a key called img gives you imgw, imgh, imgd and imgfc.

The URL in load is usually a TagScript function such as {iv}, {image}, {video}, {audio} or {avatar}, but any direct media link works. Add true as a third argument (AUDIO_PRIORITY) to prefer audio when the link has both.

You can also load files the tag has already attached, like the result of an earlier {mediascript}, a {python} run or {attach:}. FILE_1 is the tag's first attachment so far, FILE_2 the second, and so on. FILE_X takes the file and removes it from the reply's attachments; FILE_X_COPY uses it and keeps it attached too. TagScript replaces every FILE_X in your code before it runs, so avoid writing that word in captions.

render KEY MIMETYPE ends the script and sends KEY as the result. Anything after render is ignored. The mimetype is optional: leave it out (or write default) to keep the media's current format, or pick one from the table to convert it. You may also add a file name after the mimetype. If a script never calls render, the first media key it created is rendered automatically in its own format.

KindMimetypes you can render to
Audioaudio/aac, audio/flac, audio/mp3, audio/mp4, audio/mpeg, audio/ogg, audio/wav, audio/x-matroska, audio/x-wav
Imageimage/bmp, image/gif, image/jpeg, image/png, image/tiff, image/webp, image/x-apng
Videovideo/mp4, video/mpeg, video/quicktime, video/webm, video/x-m4v, video/x-matroska, video/x-msvideo, video/x-ms-wmv
{attach:{avatar}}{mediascript:load FILE_1 pfp
flip pfp
render pfp image/png}
→Takes the attached avatar (removing it from the reply) and sends a flipped PNG instead.
{mediascript:load {video} clip
render clip image/gif}
→Turns the last video in chat into a GIF.

Arguments and equations

Arguments are read in the order the command lists them, separated by spaces. In this reference NAME=value means the argument is optional and value is used when you leave it out, NAME? means optional with no fixed default, and ...NAME means "the rest of the line".

You can also set an argument by name with NAME=value, using the names from this reference. Names ignore case and underscores, so SAMPLE_RATE=, sample_rate= and samplerate= are the same. Arguments without a name fill in the ones you didn't name, in order. For example, to turn off the circle crop of spin you can write spin img circle=false instead of spin img true false. A named argument the command doesn't have is an error, and NAME= on its own keeps the default.

Text that is the rest of the line keeps any word=value in it as plain text, unless the word is the name of one of the command's earlier arguments. Wrap text in {jsonify:} (or text="...") to be safe. A quoted JSON string like "two words" is always read as one argument.

User input like {args} is pasted in before the script runs, so magik img {args} lets the user set any of the command's arguments (2 scale=10 sets both ITERATIONS and SCALE), though each one still has to be in range. To limit them to one argument, wrap it in {jsonify:} and name it: magik img iterations={jsonify:{args}}. The input then always stays a single value for that argument and can never set another one.

Yes/no arguments accept true, yes, y, +, 1 or the argument's own name (like join a b vertical) for yes. Anything else counts as no.

Any number can also be an equation, and equations can use variables and functions. Equations must not contain spaces, since a space starts the next argument: write (imgw/2)-(textw/2), not (imgw / 2) - (textw / 2).

Equations support +, -, *, /, parentheses and decimal numbers. The engine also understands % (remainder) and ^ (power).

OperatorMeaning
+ -Add, subtract
* /Multiply, divide
( )Group parts of an equation
%Remainder, e.g. idx%7
^Power, e.g. 2^3 is 8
{mediascript:load {iv} img
crop img imgw/2 imgh/2 imgw/4 imgh/4
render img}
→Crops out the middle half of the image.
{mediascript:load {avatar} pfp
spin pfp circle=false
render pfp image/gif}
→Spins the avatar without cropping it to a circle, without having to fill in CLOCKWISE first.
{mediascript:load {iv} img
magik img iterations={jsonify:{args}}
render img}
→Magiks the image as many times as the user says. The input can only ever set ITERATIONS.

Variables

Every media key gets four automatic variables, named by putting a letter after the key (no underscore): KEYw, KEYh, KEYd and KEYfc. They update whenever the media changes.

set NAME VALUE stores a number (VALUE can be an equation) and get KEY PROPERTY NAME copies a property of a media key into a variable. Both can then be used in any later equation. Variable names may only use letters, digits and underscores.

To send numbers back to TagScript, use export NAME (or export NAME ALIAS to rename it) and exportmultiple NAME1 NAME2 .... When the script finishes, each exported variable is saved with TagScript's {set:}, so you read it afterwards with {get:NAME}. Exported values are always numbers. Exports only come back when the script finishes successfully.

elapsed and timeleft are the script's clock in milliseconds: how long it has been running and how long until it hits its time limit (which depends on premium, see {limits} in TagScript). They update before every line, so if timeleft < 15000 ... can skip or lower the quality of slow commands near the end. A single slow command can still run past what timeleft said before it. If your script sets a variable with one of these names, that one keeps your value.

Inside a foreachframe or dobetween block, the variable idx holds the current frame number and time when that frame starts, in seconds (foreachframe only), and any variables you set inside the block are thrown away when it ends.

To show a variable in text, fittext or drawtext, put an equation in $(...) in the text: drawtext vidx {jsonify:{args}} $(idx) writes the tag's arguments followed by the export or frame number. Anything inside {jsonify:} is kept as it is, so wrap user input in it.

VariableMeaningExample for key `img`
KEYwWidth in pixelsimgw
KEYhHeight in pixelsimgh
KEYdDuration in secondsimgd
KEYfcNumber of framesimgfc
idxCurrent frame number inside foreachframeidx
timeWhen the current frame starts, in seconds, inside foreachframetime
elapsedMilliseconds the script has been runningelapsed
timeleftMilliseconds until the script's time limittimeleft
{mediascript:load {iv} img
set area imgw*imgh
export imgw width
exportmultiple area imgfc
render img}
Width: {get:width}px, area: {get:area}, frames: {get:imgfc}
→Attaches the image and prints its width, area and frame count.

Math functions

Functions can be used anywhere an equation is allowed. Like the rest of an equation, they cannot contain spaces.

Prefer rand() over TagScript's {range:} inside MediaScript: rand() is picked fresh every time the line runs, so inside a foreachframe each frame gets its own random number, while {range:} is filled in once before the script even starts.

FunctionWhat it returnsExample
abs(n), cos(n), sin(n), tan(n)Absolute value, cosine, sine, tangent (radians)abs(imgw-512)
max(a,b,...)The biggest numbermax(10,imgfc)
min(a,b,...)The smallest numbermin(imgw,imgh)
rand(a,b)A random number between a and b (with one number, between 0 and it)rand(0,360)
round(n,digits?)n rounded, optionally to a number of decimal placesround(imgw/3)
if(condition,if_true,if_false)if_true when the condition holds, otherwise if_false. Operators: ==, !=, <=, >=, <, >if(imgw>imgh,imgw,imgh)
is(TYPE,KEY)1 if the media is of that type, 0 if not. TYPE is audio, image, video, or a combination: av (audio or video), iv (image or video), aiv (any of them)is(video,clip)
color(mostused,KEY)The most used color in the media, as a decimal RGB numbercolor(mostused,img)

Colors

Commands that take a color accept an FFmpeg color name (like white, red or skyblue), an RGBA value like rgba(255,0,0,128) or 255,0,0, or a hex code like #ff0000. Never put spaces inside a color.

Most effect commands (such as chromakey, overlay, fadein or rotate) also accept mostused, which means the most used color in the media itself. Drawing commands like tti and createpolygonfill fall back to black for mostused.

The numbers inside rgba(...) can be equations too, e.g. rgba(255,rand(0,255),0,255).

{mediascript:load {iv} img
chromakey img mostused 0.2
render img image/png}
→Removes the image's most common color (often its background).

Loops and conditions

Four commands run other MediaScript code: foreachframe runs code once per frame, dobetween runs code on a slice of time, if runs code only when a comparison is true, and reexport runs code over and over on its own result (see Logo effects). The code goes at the end of the line.

Because each line is one command, code with more than one line has to be JSON-encoded so it fits on a single line. The easy way is {jsonify:...}: put the inner commands on their own lines inside it. A single short command can be written directly, like if rand(0,1) <= 0.5 flip img.

Inside foreachframe KEY START END CODE, the current frame is available as its own media key called KEYx (so for pfp it is pfpx), idx is the frame number and time is when the frame starts in seconds (a GIF's own frame delays count, so uneven GIFs work too). START is inclusive and END is exclusive, so 0 pfpfc covers every frame. Commands inside must keep the frame a single still image, so avoid commands that turn images into GIFs (like spin or shake) inside the loop.

dobetween KEY START END CODE works the same way but on a time range in seconds: the slice is available as KEYx, and after the code runs it is stitched back between the untouched parts.

if LEFT OPERATOR RIGHT CODE compares two equations. Unlike the if() function, the two sides and the operator must be separated by spaces: if imgw > 500 ....

Media keys and variables created inside a loop disappear when it ends; changes to keys that already existed are kept. You cannot render from inside a loop.

Inside foreachframe, dobetween and reexport, the parent key itself is off limits: using pfp inside foreachframe pfp ... is an error, only pfpx works. Its size variables (pfpw, pfpd...) can still be read.

To reuse code, function NAME CODE saves it and call NAME ARGUMENTS runs it, with $1, $2... in the code replaced by the arguments: function glow huecurvergba $1 all 0 1 0 then call glow img. Unlike loops, media a function makes or changes stays afterwards; only its variables go away.

{mediascript:load {avatar} pfp
setframecount pfp max(10,pfpfc)
foreachframe pfp 0 pfpfc {jsonify:
hueshifthsv pfpx hue=idx*36 saturation=100
}
render pfp image/gif}
→Makes an avatar GIF with at least 10 frames that cycles through colors.
{mediascript:load {avatar} pfp
setframecount pfp max(10,pfpfc)
foreachframe pfp 0 pfpfc {jsonify:
if rand(0,1) <= 0.5 flip pfpx
if rand(0,1) <= 0.5 invert pfpx
}
render pfp image/gif}
→Randomly flips and inverts each frame.

Text-to-speech voices

tts KEY VOICE TEXT turns text into an audio clip stored in KEY. The voice is optional; without it you get TIKTOK_EN_US_FEMALE_01. Wrap the text in {jsonify:}. Text longer than 4096 characters is cut off.

Combine it with audioputreplace, audioputmix or audioputconcat to put the speech on a video, or render it on its own as audio.

VoiceDescription
`TIKTOK_EN_US_FEMALE_01`English (US), female. The default voice.
`TIKTOK_EN_US_FEMALE_02`English (US), female
`TIKTOK_EN_US_MALE_01`English (US), male
`TIKTOK_EN_US_MALE_02`English (US), male
`TIKTOK_EN_US_MALE_03`English (US), male
`TIKTOK_EN_US_MALE_04`English (US), male
`TIKTOK_EN_UK_MALE_01`English (UK), male
`TIKTOK_EN_UK_MALE_02`English (UK), male
`TIKTOK_EN_AU_FEMALE`English (Australia), female
`TIKTOK_EN_AU_MALE`English (Australia), male
`TIKTOK_EN_UK_MALE_BUTLER`English (UK), male, butler
`TIKTOK_EN_UK_MALE_NEIGHBOR`English (UK), male, neighbor
`TIKTOK_EN_FEMALE_EMOTIONAL`English, female, emotional
`TIKTOK_EN_FEMALE_MAKEUP`English, female, beauty guru
`TIKTOK_EN_FEMALE_RICHGIRL`English, female, rich girl
`TIKTOK_EN_FEMALE_SAMC`English, female, empathetic
`TIKTOK_EN_MALE_CODY`English, male, serious
`TIKTOK_EN_MALE_FUNNY`English, male, funny
`TIKTOK_EN_MALE_GRINCH`English, male, the Grinch
`TIKTOK_EN_MALE_NARRATION`English, male, story narrator
`TIKTOK_EN_CELEBRITY_MALE_ASHMAGIC`English, male, creator: ashmagic
`TIKTOK_EN_CELEBRITY_MALE_JOMBOY`English, male, creator: Jomboy
`TIKTOK_EN_CELEBRITY_MALE_OLANTEKKERS`English, male, creator: olantekkers
`TIKTOK_EN_SING_FEMALE_ALTO`English, female, singing (alto)
`TIKTOK_EN_SING_FEMALE_GLORIOUS`English, female, singing (glorious)
`TIKTOK_EN_SING_FEMALE_WARMY_BREEZE`English, female, singing
`TIKTOK_EN_SING_FEMALE_WONDERFUL_WORLD`English, female, singing (wonderful world)
`TIKTOK_EN_SING_MALE_CHIPMUNK`English, male, singing (chipmunk)
`TIKTOK_EN_SING_MALE_IT_GOES_UP`English, male, singing (it goes up)
`TIKTOK_EN_SING_MALE_SUNSHINE_SOON`English, male, singing
`TIKTOK_EN_SING_MALE_TENOR`English, male, singing (tenor)
`TIKTOK_EN_SING_MALE_THANKSGIVING`English, male, singing (thanksgiving)
`TIKTOK_EN_US_DISNEY_C3PO`Character: C-3PO
`TIKTOK_EN_US_DISNEY_CHEWBACCA`Character: Chewbacca
`TIKTOK_EN_US_DISNEY_DEADPOOL`Character: Deadpool
`TIKTOK_EN_US_DISNEY_GHOSTFACE`Character: Ghostface
`TIKTOK_EN_US_DISNEY_GHOSTHOST`Character: Ghost Host (Haunted Mansion)
`TIKTOK_EN_US_DISNEY_JARVIS`Character: Jarvis
`TIKTOK_EN_US_DISNEY_MADAME_LEOTA`Character: Madame Leota (Haunted Mansion)
`TIKTOK_EN_US_DISNEY_PIRATE`Character: Pirate
`TIKTOK_EN_US_DISNEY_ROCKET`Character: Rocket
`TIKTOK_EN_US_DISNEY_STITCH`Character: Stitch
`TIKTOK_EN_US_DISNEY_STORMTROOPER`Character: Stormtrooper
`TIKTOK_BR_FEMALE_01`Portuguese (Brazil), female
`TIKTOK_BR_FEMALE_02`Portuguese (Brazil), female
`TIKTOK_BR_FEMALE_03`Portuguese (Brazil), female
`TIKTOK_BR_MALE_01`Portuguese (Brazil), male
`TIKTOK_DE_FEMALE_01`German, female
`TIKTOK_DE_MALE_01`German, male
`TIKTOK_ES_MALE_01`Spanish, male
`TIKTOK_ES_MX_MALE_01`Spanish (Mexico), male
`TIKTOK_FR_MALE_01`French, male
`TIKTOK_FR_MALE_02`French, male
`TIKTOK_ID_FEMALE_01`Indonesian, female
`TIKTOK_JP_FEMALE_01`Japanese, female
`TIKTOK_JP_FEMALE_02`Japanese, female
`TIKTOK_JP_FEMALE_03`Japanese, female
`TIKTOK_JP_MALE_01`Japanese, male
`TIKTOK_KR_FEMALE_01`Korean, female
`TIKTOK_KR_MALE_01`Korean, male
`TIKTOK_KR_MALE_02`Korean, male
`PHONEME_MORSHU`Morshu (Zelda CD-i)
`FLITE_US_FEMALE_STEPHANIE`Flite, English (US), female
`FLITE_US_MALE_ALAN`Flite, English (US), male
`FLITE_US_MALE_KAL`Flite, English (US), male
`FLITE_US_MALE_RICH`Flite, English (US), male
`SAPI_ATT_EN_MALE_MOONMAN`Classic SAPI: AT&T "Moonman"
`SAPI_DECTALK_DE_FEMALE_BETTY`Classic SAPI: DECtalk Beautiful Betty, German
`SAPI_DECTALK_DE_FEMALE_RITA`Classic SAPI: DECtalk Rough Rita, German
`SAPI_DECTALK_DE_FEMALE_URSULA`Classic SAPI: DECtalk Uppity Ursula, German
`SAPI_DECTALK_DE_FEMALE_WENDY`Classic SAPI: DECtalk Whispering Wendy, German
`SAPI_DECTALK_DE_MALE_DENNIS`Classic SAPI: DECtalk Doctor Dennis, German
`SAPI_DECTALK_DE_MALE_FRANK`Classic SAPI: DECtalk Frail Frank, German
`SAPI_DECTALK_DE_MALE_HARRY`Classic SAPI: DECtalk Huge Harry, German
`SAPI_DECTALK_DE_MALE_KIT`Classic SAPI: DECtalk Kit the Kid, German
`SAPI_DECTALK_DE_MALE_PAUL`Classic SAPI: DECtalk Perfect Paul, German
`SAPI_DECTALK_EN_FEMALE_BETTY`Classic SAPI: DECtalk Beautiful Betty
`SAPI_DECTALK_EN_FEMALE_RITA`Classic SAPI: DECtalk Rough Rita
`SAPI_DECTALK_EN_FEMALE_URSULA`Classic SAPI: DECtalk Uppity Ursula
`SAPI_DECTALK_EN_FEMALE_WENDY`Classic SAPI: DECtalk Whispering Wendy
`SAPI_DECTALK_EN_MALE_DENNIS`Classic SAPI: DECtalk Doctor Dennis
`SAPI_DECTALK_EN_MALE_FRANK`Classic SAPI: DECtalk Frail Frank
`SAPI_DECTALK_EN_MALE_HARRY`Classic SAPI: DECtalk Huge Harry
`SAPI_DECTALK_EN_MALE_KIT`Classic SAPI: DECtalk Kit the Kid
`SAPI_DECTALK_EN_MALE_MOONBASE_ALPHA`Classic SAPI: DECtalk (Moonbase Alpha)
`SAPI_DECTALK_EN_UK_FEMALE_BETTY`Classic SAPI: DECtalk Beautiful Betty, English (UK)
`SAPI_DECTALK_EN_UK_FEMALE_RITA`Classic SAPI: DECtalk Rough Rita, English (UK)
`SAPI_DECTALK_EN_UK_FEMALE_URSULA`Classic SAPI: DECtalk Uppity Ursula, English (UK)
`SAPI_DECTALK_EN_UK_FEMALE_WENDY`Classic SAPI: DECtalk Whispering Wendy, English (UK)
`SAPI_DECTALK_EN_UK_MALE_DENNIS`Classic SAPI: DECtalk Doctor Dennis, English (UK)
`SAPI_DECTALK_EN_UK_MALE_FRANK`Classic SAPI: DECtalk Frail Frank, English (UK)
`SAPI_DECTALK_EN_UK_MALE_HARRY`Classic SAPI: DECtalk Huge Harry, English (UK)
`SAPI_DECTALK_EN_UK_MALE_KIT`Classic SAPI: DECtalk Kit the Kid, English (UK)
`SAPI_DECTALK_EN_UK_MALE_PAUL`Classic SAPI: DECtalk Perfect Paul, English (UK)
`SAPI_DECTALK_ES_FEMALE_BETTY`Classic SAPI: DECtalk Beautiful Betty, Spanish
`SAPI_DECTALK_ES_FEMALE_RITA`Classic SAPI: DECtalk Rough Rita, Spanish
`SAPI_DECTALK_ES_FEMALE_URSULA`Classic SAPI: DECtalk Uppity Ursula, Spanish
`SAPI_DECTALK_ES_FEMALE_WENDY`Classic SAPI: DECtalk Whispering Wendy, Spanish
`SAPI_DECTALK_ES_LA_FEMALE_BETTY`Classic SAPI: DECtalk Beautiful Betty, Spanish (Latin America)
`SAPI_DECTALK_ES_LA_FEMALE_RITA`Classic SAPI: DECtalk Rough Rita, Spanish (Latin America)
`SAPI_DECTALK_ES_LA_FEMALE_URSULA`Classic SAPI: DECtalk Uppity Ursula, Spanish (Latin America)
`SAPI_DECTALK_ES_LA_FEMALE_WENDY`Classic SAPI: DECtalk Whispering Wendy, Spanish (Latin America)
`SAPI_DECTALK_ES_LA_MALE_DENNIS`Classic SAPI: DECtalk Doctor Dennis, Spanish (Latin America)
`SAPI_DECTALK_ES_LA_MALE_FRANK`Classic SAPI: DECtalk Frail Frank, Spanish (Latin America)
`SAPI_DECTALK_ES_LA_MALE_HARRY`Classic SAPI: DECtalk Huge Harry, Spanish (Latin America)
`SAPI_DECTALK_ES_LA_MALE_KIT`Classic SAPI: DECtalk Kit the Kid, Spanish (Latin America)
`SAPI_DECTALK_ES_LA_MALE_PAUL`Classic SAPI: DECtalk Perfect Paul, Spanish (Latin America)
`SAPI_DECTALK_ES_MALE_DENNIS`Classic SAPI: DECtalk Doctor Dennis, Spanish
`SAPI_DECTALK_ES_MALE_FRANK`Classic SAPI: DECtalk Frail Frank, Spanish
`SAPI_DECTALK_ES_MALE_HARRY`Classic SAPI: DECtalk Huge Harry, Spanish
`SAPI_DECTALK_ES_MALE_KIT`Classic SAPI: DECtalk Kit the Kid, Spanish
`SAPI_DECTALK_ES_MALE_PAUL`Classic SAPI: DECtalk Perfect Paul, Spanish
`SAPI_MICROSOFT_EN_FEMALE_MARY`Classic SAPI: Microsoft Mary
`SAPI_MICROSOFT_EN_MALE_MIKE`Classic SAPI: Microsoft Mike
`SAPI_MICROSOFT_EN_MALE_SAM`Classic SAPI: Microsoft Sam
`SAPI_SCANSOFT_EN_MALE_MLG_DANIEL`Classic SAPI: ScanSoft Daniel (MLG)
`KLATTSCH`Formant synthesizer you can steer with ARPABET phonemes, pitch and voice controls. See the Klattsch section.
`SAM_C64`SAM (Commodore 64, 1982)
`SAM_ELF`SAM (Commodore 64, 1982): Elf
`SAM_EXTRA_TERRESTRIAL`SAM (Commodore 64, 1982): Extra-Terrestrial
`SAM_LITTLE_OLD_LADY`SAM (Commodore 64, 1982): Little Old Lady
`SAM_LITTLE_ROBOT`SAM (Commodore 64, 1982): Little Robot
`SAM_STUFFY_GUY`SAM (Commodore 64, 1982): Stuffy Guy
{mediascript:tts voice SAPI_MICROSOFT_EN_MALE_SAM {jsonify:{args}}
render voice audio/mp3}
→Reads the tag's arguments out loud as Microsoft Sam.

Klattsch phoneme syntax

The KLATTSCH voice is a speech synthesizer you can steer by hand. Its text can be plain English words, ARPABET phonemes (like HH AH L OW), Japanese kana, or any mix of them, like AY+8 M really S AO+10 R IY. Words and kana are converted to phonemes for you (with intonation for English); phonemes and controls you write are kept as they are. Kanji can't be read, so write Japanese in kana.

Suffixes on a phoneme change its pitch or stress: PH! stresses it (a short lift and a longer sound), PH+N / PH-N glides the pitch up or down by N Hz and keeps the new pitch for what follows, and PH(+N) / PH(-N) is a one-off ornament where the pitch returns afterwards. Wrap phonemes in ( P P P ) (with spaces around the parentheses) to squeeze them into one syllable, which is handy for diphthongs and quick unstressed syllables.

Pauses: , is 100 ms, ; is 200 ms, . is 300 ms and pN is exactly N ms. Pauses and parentheses need spaces around them (D , not D,).

State tokens change the voice from that point on. Each is a letter: xN or x=N sets it, x+N / x-N nudges it, and a bare x resets it to the default. The defaults are a male voice at 120 Hz, speaking 110 ms per phoneme.

[voice=N] starts another voice that plays at the same time as the ones before it, starting over from the defaults. Use it for chords, harmonies and rounds, like r600 bC3 AA [voice=1] r600 bE3 AA [voice=2] r600 bG3 AA for a C major chord.

Pitch rules: ! and (+N) only affect one phoneme, +N / -N stick, bN jumps to an absolute pitch, and a bare b returns to the pitch the line started on. For example AY+20 D IH+10 D puts the last D at +30, while AY(+20) D IH(+10) D leaves every D at the base pitch.

Style tips: statements end with the last stressed vowel falling 5 to 15 Hz; yes/no questions end rising 15 to 30 Hz; excitement uses a wider range with g+0.2 r-20; sadness uses r+30 h+0.2 t-0.2 v2; a whisper is h0.7 g0.2 t-0.3; a female voice is s1.17 b220 and a child is s1.3 b260; for singing use note names (bC4), vibrato (vN, wN) and a slower rate. Use ! at most once or twice per phrase, prefer (+N) ornaments for small accents, and don't restate defaults (the baseline voice is male).

TokenControlsExample
bBase pitch in Hz (default 120), or a note name. Bare b returns to the starting pitchb140, bC4, bA#3, bDb5
rRate in ms per phoneme (default 110, bigger is slower)r+30
sFormant scale: 1.0 male, 1.17 female, 1.3 childs1.17, s+0.1
vVibrato depth in Hz (0 is off)v2
wVibrato rate in Hz (default 5)w6
mTremolo depth, 0..1m0.3
nTremolo rate in Hz (default 5)n4
hBreathiness, 0..1h0.7
tSpectral tilt, -0.9 (dark) to +0.9 (bright)t-0.2
gVocal effort, 0 (lax) to 1 (tense), default 0.5g+0.2
pPause of exactly N msp250
[voice=N]Another voice playing at the same time, from the defaultsbC3 AA [voice=1] bE3 AA
{mediascript:tts voice KLATTSCH {jsonify:HH AH L OW b+15 W ER L D}
render voice audio/wav}
→"Hello world" with a little lift on "world".
{mediascript:tts voice KLATTSCH {jsonify:s1.17 b220 hello world}
render voice audio/wav}
→"Hello world" in a female voice, written as plain English.
{mediascript:tts voice KLATTSCH {jsonify:AY+8 M S AO+10 R IY-30 D EY+10 V}
render voice audio/wav}
→"I'm sorry Dave" with hand-tuned pitch.
{mediascript:tts voice KLATTSCH {jsonify:r300 v3 bC4 ( HH AE ) bC4 ( P IY ) bD4 ( B ER TH ) bC4 ( D EY )}
render voice audio/wav}
→The start of "Happy Birthday", one note per syllable.
{mediascript:tts voice KLATTSCH {jsonify:こんにちは、せかい}
render voice audio/wav}
→"Konnichiwa, sekai" with the Japanese vowels.

Logo effects (Preview 2, Preview 1280, G Major, IHTX)

If you make logo effects, three commands are built for you: ffmpeg runs FFmpeg filters and codecs on a media key, reexport (also ihtx) re-exports a clip over and over and joins the exports, and loadcube loads .cube color LUTs for applylut (or FFmpeg's lut3d). They replace most of what {sh:} effect tags do, without the shell and without .t sync+ afterwards.

ffmpeg KEY ...OPTIONS takes FFmpeg's own output options: -vf, -af, -filter_complex, -map, -c:v, -c:a, -crf, -qp, -preset and more. KEY is input 0, and -i OTHERKEY adds another media key as input 1, 2... (up to 4). The result keeps KEY's format and goes back into KEY. Most FFmpeg filters work, including geq, displace, haldclut, curves, rubberband and frei0r (with its built-in plugins like mirr0r and gateweave). Filters that read or write files on their own, like movie, amovie and sendcmd, are blocked, so load files with load or loadcube and pass them in.

reexport KEY AMOUNT LENGTH CODE takes the first LENGTH seconds, runs CODE on it as KEYx, then runs CODE again on that result, AMOUNT times, and joins every export in order (backwards if AMOUNT is negative). Exports that come out longer than LENGTH are cut back unless you add NO_TRIM=true. Every export's audio is matched to its video before joining, so the result stays in sync. idx is the export number, for commands that take equations.

Pitch shifting is multipitch KEY SEMITONES: multipitch clip 7 is up a fifth, and multipitch clip 0,7,12 mixes a chord the same way the multipitch program does (with --no-normalize). When the pitch has to be part of one ffmpeg filter graph, for example chained with other audio filters, use rubberband=pitch=2^(SEMITONES/12) there instead, and for a chord split the audio with asplit, shift each copy and mix them back with amix=N:normalize=0 (see the examples). A hue shift is hue=h=DEGREES. ImageMagick's -modulate 100,100,X turns the hue by about (X-100)*1.8 degrees; if the colors come out mirrored, flip the sign.

Downloaded programs (4orm) and shell commands can't run in MediaScript; .veg projects play back with loadveg and vegrender, Movie Maker .wlmp projects with loadwlmp and wlmprender, AVS Video Editor .vep projects with loadvep and veprender, KineMaster .kine projects with loadkine and kinerender. The table shows what to use instead. Limits: up to 100 ffmpeg runs per script, each output at most 10 minutes and 2048x2048, and every ffmpeg inside reexport counts once per export.

In a {sh:} tagIn MediaScript
`magick hald:4 -modulate ...` + `movie=x.ppm,[in]haldclut`hue=h=DEGREES, or build the CLUT in the graph: haldclutsrc=4,hue=h=54[h];[0:v][h]haldclut
`multipitch in.wav out.wav 0,7,12 --no-normalize`multipitch KEY 0,7,12
`multipitch in.wav out.wav 7 --backend signalsmith`multipitch KEY 7 engine=signalsmith (or engine=rubberband)
`wine autotune.exe -b 75 voice.wav music.wav out.wav` (the "autotune" vocoder)load URL song, then vocoder KEY song 75
The TV simulator (`movie=$(curl .../Project%20Name%209.mp4)` + `displace`)tvsimulator KEY LINE_SYNC DETAIL_ZOOM VERTICAL
`movie=$(curl ...)` or a second downloaded videoload URL other, then ffmpeg KEY -i other -filter_complex "[0:v][1:v]..."
`lut3d=./input/x.cube`loadcube URL x, then applylut KEY x (or lut3d=x.cube inside ffmpeg)
a loop of exports + concat + `.t sync+`reexport KEY AMOUNT LENGTH CODE
`ffmpeg -i "concat:a.avi|b.avi|..."`concatmultiple
a `.veg` renderer (`tvdoubled`/tved) with `--all-media`loadveg URL p, then vegrender MEDIA_KEY p
4orm and other downloaded programsNot supported
{mediascript:load {video} clip
ffmpeg clip -vf "hue=h=45" -af "rubberband=pitch=2^(1/12)"
render clip}
→One hue + pitch step: the colors turn 45 degrees and the audio goes up a semitone.
{mediascript:load {video} clip
reexport clip 20 0.46 {jsonify:ffmpeg clipx -vf "negate,huesaturation=hue=72" -af "rubberband=pitch=1.06" -c:v libx264}
render clip}
→IHTX-style: 20 exports of the first 0.46 seconds, each one inverted, hue shifted and pitched up from the last one.
{mediascript:load {video} clip
multipitch clip -13.48,-6.48,0.52,7.52,14.52
render clip}
→The 5-pitch chord from Preview 1280 tags, made natively with multipitch.
{mediascript:load {video} clip
ffmpeg clip -filter_complex "[0:a]asplit=3[a][b][c];[b]rubberband=pitch=2^(7/12)[b2];[c]rubberband=pitch=2^(12/12)[c2];[a][b2][c2]amix=3:normalize=0,aecho=0.8:0.5:60:0.4[out]" -map 0:v? -map [out]
render clip}
→The same kind of chord inside one ffmpeg filter graph, here with an echo chained after it. Use this when the chord has to sit between other filters; otherwise multipitch is faster and closer to effect tags.
{mediascript:load {video} clip
ffmpeg clip -vf "hue=h=180,scroll=0:0:0.5,frei0r=mirr0r:-.5" -af "rubberband=pitch=2^(-2/12)"
render clip}
→The scrolling mirror look from Preview 1280 effects, with the audio down 2 semitones.
{mediascript:load {video} clip
loadcube https://cdn.nsb.gg/assets/samples/grade.cube grade
ffmpeg clip -vf "lut3d=grade.cube" -af "rubberband=pitch=2^(-2/12)"
render clip}
→Color grades the clip with a teal and orange .cube LUT, with the audio down 2 semitones.
{mediascript:load {video} clip
load https://cdn.nsb.gg/assets/samples/displacement.mp4 tv
ffmpeg clip -i tv -filter_complex "[0:v]scale=640:360,split[v][g0];[g0]drawbox=c=gray:t=fill[g];[1:v]scale=640:360,format=gray[d];[v][d][g]displace=edge=wrap"
render clip}
→A TV wobble from a displacement video, loaded as its own media key instead of movie=$(curl ...). For the usual TV simulator look, tvsimulator clip does this with a built-in map. The result is as long as the clip; a shorter displacement video holds its last frame.
{mediascript:load {video} clip
reexport clip -10 1 {jsonify:
hueshifthsvffmpeg clipx 36
jpeg clipx
}
render clip}
→10 exports that each shift the hue and add JPEG crunch, joined from the last one back to the first.

Vegas projects (.veg)

loadveg URL VEG_KEY reads a Vegas Pro project, and vegrender MEDIA_KEY VEG_KEY plays it back with every video and sound in it replaced by your media, the way the .veg renderers in effect tags do (tved with --all-media). Add more media keys after it (vegrender clip p song intro) and the project's files are shared out between them in the order they first play, instead of all becoming the one media. The project is rebuilt from what Vegas saved in the .veg: its timeline, fades, Pan/Crop and track motion, its generated media, and the video and audio effects in the table (on events, on whole tracks and on the project's video output). Vegas itself never runs: the effects are redrawn with ffmpeg, so they come out close to Vegas but not exactly the same, and effects not in the table are skipped without a word. Check the table before you build a tag around a project. Projects from older Vegas versions (like the 2012-2013 YTP collabs) are read too.

Which clips get your media: a video event whose source file was a video (mp4, mov, mkv, avi, wmv, m4v, mpg, mpeg, mts, m2ts, webm, 3gp, ts or flv), and an audio event whose source was a video or a sound (wav, mp3, m4a, aac, flac, ogg, wma or opus). The file names come from the paths saved in the project, in any language. Events on still images (png, jpg, bmp, gif) show your media held on its first frame. With an image as your media, every video event shows it and there is no sound; with an audio file, only the audio events play (generated media like solid colors, text and noise still shows).

Every event plays from the same spot of your media it played from in its own source, and your media loops when the project reaches past its end. With CUTOFF=true (the default) an event that starts on a track ends the one before it on that track, like Vegas does (except under a crossfade, where both play); CUTOFF=false lets them overlap.

Limits: projects up to 32mb (and within the script's download limit, which is usually smaller), 4 per script, 20000 events and 512 tracks. The render is at most 10 minutes long (long projects usually hit the script's time limit first) and scaled to fit 1280x720, shows at most 32 clips at once (and plays 32 sounds at once), and has at most 1024 clips in any half second. It counts as one ffmpeg run, shares its time limit, and stops as soon as the file is sure to be too big to send.

Vegas featurePlayed backHow
EventsYesPosition, length, and where in its source each one starts
SpeedYesFrom 0.01x to 100x
PitchYesPitch changes on audio events, keeping their length: the event's own pitch and its Pitch Shift plugin (any language or brand of it) add up. Shifted like Vegas does it (matched to a Vegas render of -24 to +24 semitones, including a pitched event starting a little early going up and late going down)
Pan/CropYesZoom, move, rotation and flips, through every keyframe with its curve (linear, fast, slow, smooth, sharp or hold)
Track motionYesPosition, size, flips and turns, 2D and 3D, through every keyframe (3D tilts and depth seen in perspective, matched to a Vegas render), and its 2D Shadow and 2D Glow (offset, size, color and blur; not matched to a Vegas render)
Mute and soloYesMuted tracks are left out, and a soloed track leaves out the others of its kind (audio or video)
Solid ColorYesIts color and transparency
TextPartly(Legacy) Text with its size, font (bold and italic too; fonts the bot doesn't have get the closest one, slanted when it has no italic), alignment, color, background, outline, shadow (offset, color and blur), position, scaling, line spacing and the arch, wave, slant and shear deformations (animated ones play too). Keyframed text moves and changes between its keyframes, and keyframes that change its words change them, matched to a Vegas render; its tracking, animated deformations and other deformations are not done. Any language works; emoji show only if the font has them
DefocusPartlyVEGAS Defocus (both the older plugin and the OFX one): its lens blur with the iris shape (circle or polygon), size and outer ring matched to a Vegas render of its presets. Its bloom is not done yet
Titles & TextPartlyVEGAS Titles & Text with its text, font, size, color, scale, location, background and line spacing, matched to a Vegas render of its default style. Its animations, outline, shadow, tracking and alignments other than the middle are not done yet
Noise TexturePartlyGray static
CheckerboardYesSquares of its color and transparency at its square size, see-through between them
Test PatternYesAll 9 patterns (SMPTE and color bars, NTSC and PAL, porches, PLUGE, ramp and gradient), matched to a Vegas render
Color GradientYesLinear, elliptical and rectangular gradients with their colors, points and angle, and their keyframes, matched to a Vegas render
CompositingPartlyA track's compositing mode (Add, Subtract, Multiply, Screen, Overlay, Hard Light, Dodge, Burn, Darken, Lighten, Difference) blends its videos and generated media with what is under them, and a custom compositor set to Difference too. The modes are matched by their place in Vegas' list, only Difference is checked against a render. Generated media on a track with another custom compositor is left out, videos there draw normally
Event fadesYesFade in and out on video (opacity, showing what is under it) and sound (volume), with their curve (linear, fast, slow, smooth or sharp; a sound fades in fast and out slow unless changed)
TransitionsPartlyA crossfade plays as the next event fading in over the one before, which plays on under it (with either CUTOFF). Transition effects like wipes are not
Track FXYesEffects on a whole track are put on every clip on it, after the clip's own
Video output FXYesThe project's own video effects (the ones in this table) are put on the whole picture, after everything else
Black and WhiteYesIncluding partial amounts, the older plugin and the OFX one. Gray is the average of red, green and blue, like Vegas (matched to a Vegas render)
InvertYesIncluding partial amounts, and keyframes (flashing inverts play frame by frame). On Vegas's studio levels, so white turns a little brighter than black, matched to a Vegas render
HSL AdjustYesHue, saturation and luminance, matched to a Vegas render of its presets
Color Corrector (Secondary)YesHue rotation, saturation, gamma, gain and offset on the colors its luminance, saturation and hue limits pick (smoothed, or inverted), matched to a Vegas render of its presets. Showing the mask and its alpha are not
Color CurvesYesRed, green and blue curves, the older plugin and the OFX one, on Vegas's studio levels. Every OFX preset matched to a Vegas render within 2 levels
Channel BlendYesEach color channel mixed from the others (RGB to BGR, red only...), with Normalize, the older plugin and the OFX one (matched to a Vegas render of its presets)
TV SimulatorPartlyAll 8 controls: line sync, vertical sync, interlacing, scan phasing, phosphorescence, aperture grill, static and detail zoom. Line sync is a new random wobble each frame like in Vegas, so it matches in strength, not frame for frame
Convolution KernelYesThe 3x3 kernel with its scale and bias (emboss, edges, sharpen...) at the project's scale, the older plugin and the OFX one (not rotated; matched to a Vegas render of its presets)
Linear BlurYesBlur along its angle and amount, matched to a Vegas render of its presets
MirrorYesAt any angle, through any point, with its background where nothing reflects, the older plugin and the OFX one (matched to a Vegas render of its presets)
SwirlYesClockwise or counter clockwise, with its size and around its center
Pinch/Punch and SpherizeYesBulging out or pinching in around their center, matched to Vegas renders of their presets: Pinch/Punch with its size and center on 4:3 and 3:2 pictures, Spherize with its horizontal and vertical scaling
DeformYesShear, squeeze, curve, bend and compress, matching a Vegas render of every preset
Gaussian BlurYesAcross and down, on the channels it is set to (matched to a Vegas render of its presets)
PixelateYesAcross, down or both, in blocks of 2, 4, 8 or 16 output pixels like Vegas
ThresholdYesEach of red, green and blue turned full or off at its level (matched to a Vegas render of its presets)
Gradient MapPartlyThe brightness mapped along its colour stops and laid over by their alpha. Close to Vegas, not exact
GlowYesIts color over the brights, as wide and strong as its percent, intensity and suppression (matched to a Vegas render of its presets)
Radial BlurPartlyFixed radius and proportional, around its center, the OFX one and the older plugin. Close to Vegas; the strongest proportional streaks are shorter
Light RaysPartlyRays from the brights, the spotlight (size, feather), its color and ambient light. Close to Vegas; sensitivity is not used
NewBlue WigglePartlyRate, Strength, Drift, Crop, Edges and Orientation, matched to a Vegas render of its presets. Stretched edges are only close
NewBlue DuochromePartlyThe brightness mapped through its ink and paper colors, mixed in by its blend. Close to Vegas
NewBlue MetallicPartlyIts color as metal bands over the brightness, with shine, highlights, calibrate and the picture mixed back in. Close to Vegas
NewBlue GhostPartlyThe fog (width, color, level), shine color and banding, mixed in by its blend. Close to Vegas; strong bands are only like it and motion is not done
NewBlue EarthquakePartlyZoomed in and shaken as far and as fast as its magnitude and velocity. The shake is made up, like Vegas’ own random one
Wave (classic)YesThe older wave with the Small, Medium, Large, Horizontal Only and Vertical Only presets: rows and columns bent along a sine
Cookie CutterPartlyEvery shape, repeated, cut in or out, with its feather and border color. Shapes and sizes are close to Vegas, not exact
Chroma KeyerPartlyThe key color with its threshold and blur, the OFX one and the older plugin, close to Vegas
LAB AdjustYesLightness, the a and b channels, Invert Luminance and Desaturate
Levels, Brightness and Contrast, Color CorrectorPartlyLevels on all channels (input, output and gamma), brightness and contrast around its center (both matched to a Vegas render of their presets), and Color Corrector's saturation, gamma and gain. The older Color Corrector also has its offset and low, mid and high color wheels, matched to a Vegas render of its presets. Levels on one channel and the OFX Color Corrector's color wheels are not
SepiaPartlyThe brightness through black, its color and white, mixed in by its strength
Unsharp Mask and SharpenYesAmount and radius (Negative, Outline Edges...), within a few levels of a Vegas render of its presets
Bump MapPartlyIts spotlight or glow (location, aim, intensity, focus, ambience) and the relief from the picture's brightness, fitted to a Vegas render of three presets. Shininess is not done
Add NoisePartlyColor or gray noise at its level, moving or still
Median, Min and MaxPartlyEach pixel the median, darkest or brightest around it, done on a smaller picture when the range is large. Min and Max's range matched to a Vegas render of its presets; Median's is not checked yet, and Circular Area Processing is not done
VignettePartlyIts color past the inner and outer radius, its aspect, center and feather, or inside with Invert
Radial PixelatePartlyWedges or rings around its center, bigger with strength
NewBlue Dream Glow and Line DrawingPartlyDream Glow's color, blur and glow; Line Drawing's paper and ink colors, density and contrast (edges only, no shading). Not matched to a Vegas render
NewBlue CharcoalPartlyDetails, width, the charcoal and surface colors and color, fitted to a Vegas render of its presets but noticeably off (the green and scratched blue presets the most). Its contrast isn't drawn
NewBlue Old TVPartlyNoise, chroma, tint, saturation, brightness, contrast, scan lines, the vertical roll with its blank bar, scan phasing, curvature, soft edge and border opacity, matched to a Vegas render of its presets, plus ghosting (its offset copy) and horizontal sync (rows torn sideways in bursts, as far and as often as Vegas tears them), with keyframed settings played. The noise and each tear's shape are random like the plugin's own, so they match in kind, not pixel for pixel
NewBlue Motion, Spin and Zoom BlurPartlyMotion Blur along its angle (one way or both), Spin Blur around its center, Zoom Blur toward its center. Their sizes are guesses, not matched to a Vegas render
NewBlue RipplePartlyIts rings with amplitude, frequency, speed, fade, shading and warp, fitted to a Vegas render of its presets. Strong warps are only close
TimecodeYesThe event's time in any of its formats (SMPTE drop and non-drop, film, seconds, frames, time and frames) in its box, at its alignment and size, matched to a Vegas render of its presets
NewBlue TilePartlyIts grid, overlap, origin, scale and stretch, and each tile's tint, saturation, brightness, opacity and blur, matched to a Vegas render. The random spread between tiles is random like Vegas' own, so it matches in kind, not tile for tile
NewBlue ColorizeYesIts three colors, ranges, shift and saturation, matched to a Vegas render of its presets
NewBlue Video Tune-upYesContrast, brightness, saturation and hue, matched to a Vegas render of each slider and of its presets
NewBlue Pastel SketchPartlyIts paper color mixed in by its blend, and the picture's edges in its ink color, as much of them as its density gives, matched to a Vegas render of its presets. The lines don't land on exactly the same pixels as Vegas'
NewBlue Film DamagePartlyWear washing the picture out (by its pattern), matched to a Vegas render of its presets, with grain, spots and scratches like it (random, so alike in kind only). The pattern's own texture and the scratch colors are not
NewBlue CharcoalPartlyThe picture's edges in its charcoal color on its surface color, its details, width and color, fitted to a Vegas render of its presets. Only roughly like it
NewBlue Shear EnergyYesIts horizontal and vertical shear, angle, direction, center, blend and edges, matched to a Vegas render of each control and of its presets
Soft Contrast and RaysPartlySoft Contrast's stretch, trims, diffused contrast, tint and vignette (black, white, blur or see-through); Rays' streaks from the brights past its threshold, colored by its hue and sweep. Rays' mask and key alpha are not done
BorderPartlyBlurred, beveled (lit from its angle) and solid borders in its color and size
Film EffectsPartlyGrain, tint, greyscale, dust, hair, scratches, flicker and jitter, random like Vegas' own (so not frame for frame)
NewsprintYesHalftone dots by dot size: color, monochrome or offset color, the older plugin and the OFX one (matched to a Vegas render of its presets)
Lens FlarePartlyAll 5 lens types' elements and rays at its light, matched to a Vegas render of its presets. Tint, size, perspective and other intensities are guesses
Effect keyframesPartlyThe older plugins follow their keyframes (Swirl, Wave, Pinch/Punch, Mirror, Deform, TV Simulator's line sync, Earthquake's magnitude, Gaussian Blur, HSL Adjust, Linear Blur and Invert), straight from one to the next. OFX effects follow only HSL Adjust's hue and Linear Blur's amount
Other video FXNoOther NewBlue effects, OFX plugins from other companies...
EnvelopesPartlyAudio track volume and pan envelopes, and a video event's velocity as its average speed over the event (0 holds a frame). Opacity envelopes are not
Audio FXPartlyPitch Shift, Distortion (its levels, graph and low-pass; slew rate only like it), Volume, Resonant Filter and Reverb (a made up room of its decay, pre-delay and levels), on events and on audio tracks (a track's on its mix). Also Graphic EQ (its 10 band, 20 band and envelope modes), Smooth/Enhance, Vibrato (its whole pitch graph, Blend graph edges and output gain, like audiovibrato with a curve), Chorus, Flange/Wah-Wah, Amplitude Modulation and the ExpressFX Delay, Distortion, Chorus, Flange, Amplitude Modulation, Equalization and Reverb, rebuilt from their settings so only close to Vegas. Others (Simple Delay, Multi-Tap Delay, Noise Gate, compressors...) are skipped
ReverseYesReversed events play backwards, their sound too
SubclipsYesA part of a file cut in Vegas plays from its own spot
TakesPartlyAn event with several takes uses the one it was set to play (the last one, unless it was switched back), also when the take was renamed in the project
MasksNoParent/child tracks and nested projects too
{mediascript:load {iv} logo
loadveg https://cdn.nsb.gg/assets/samples/preview1280.veg p
vegrender logo p
render logo}
→The project rebuilt with the last image or video in every clip.
{mediascript:load {video} clip
loadveg FILE_1 p
vegrender clip p false
render clip}
→Uses a .veg attached earlier in the tag, with clips on a track allowed to overlap.

Movie Maker projects (.wlmp)

loadwlmp URL WLMP_KEY reads a Windows Live Movie Maker project, and wlmprender MEDIA_KEY WLMP_KEY plays it back with every video, picture and sound in it replaced by your media. A .wlmp is the project file Movie Maker saves (not a finished video): its clips are played one after another the way Movie Maker lays them out, each from the same spot of your media it played from in its own file. Movie Maker itself never runs: the effects in the table are redrawn with ffmpeg, matched to a Movie Maker render of each one, and effects not in the table are skipped.

Every media item in the project becomes your media: video clips play from it, pictures show it held on its first frame, and the music and narration play its sound. With an image as your media, every clip shows it and there is no sound; with an audio file, only the sound plays. A 4:3 project comes out 640x480 and a 16:9 one 1280x720, like Movie Maker's own export sizes.

Limits: projects up to 8mb (and within the script's download limit), 4 per script, 20000 clips. The render is at most 10 minutes long and counts as one ffmpeg run, sharing its time limit.

Movie Maker featurePlayed backHow
ClipsYesIn order, with their start and end points and the gaps before them
SpeedYesFrom 0.01x to 100x, the sound too
Rotate left/rightYesQuarter turns, with bars on the sides when the picture turns on its side
Volume and muteYesEach clip's own
Music and narrationPartlyPlayed under the clips, without Movie Maker's audio ducking and mix
Black and White (and its Orange, Red and Yellow filters), Cyan, SepiaYesMatched to a Movie Maker render
Threshold, Posterize, BlurYesMatched to a Movie Maker render
Brightness, HuePartlyHue cycles every color through one hue like Movie Maker; both were matched to a single render and may be off at other settings
Spin 360YesTurns once and back to full size over the clip, from Movie Maker's own effect template
WarpYesEach row sways sideways along a wave that tightens and loosens over the clip, within a pixel of Movie Maker
Edge Detection, 3D Ripple, CinematicNoSkipped
Transitions, captions and titlesNoSkipped
{mediascript:load {iv} logo
loadwlmp FILE_1 m
wlmprender logo m
render logo}
→The attached Movie Maker project rebuilt with the last image or video in every clip.

AVS Video Editor projects (.vep)

loadvep URL VEP_KEY reads an AVS Video Editor project, and veprender MEDIA_KEY VEP_KEY plays it back with every video, picture and sound in it replaced by your media. A .vep is the project file AVS Video Editor saves (not a finished video): its clips play at their places on the timeline, each from the same spot of your media it played from in its own file. AVS Video Editor itself never runs: the effects in the table are redrawn with ffmpeg, matched frame by frame to an AVS export, and effects not in the table are skipped.

Every source in the project becomes your media: video clips play from it, pictures show it held on its first frame, and the audio lines play its sound. With an image as your media, every clip shows it and there is no sound; with an audio file, only the sound plays. The render keeps the project's own size, scaled down to fit 1280x720.

Limits: projects up to 8mb (and within the script's download limit), 4 per script, 20000 clips. The render is at most 10 minutes long and counts as one ffmpeg run, sharing its time limit.

AVS Video Editor featurePlayed backHow
Clips on the main video lineYesAt their times on the timeline, from their start points, with speed (0.01x to 100x) and mute
Audio linesYesPlayed under the video, with each line's volume
Volume envelopePartlyIts points play as volume changes, how loud each level is is a guess
HueYesEvery color turned round the color wheel, matched to an AVS export
TwirlYesMatched to an AVS export, black where it pulls the picture in from past the edge
WaveYesRows or columns bent along a wave, moving ones at their speed, matched to an AVS export
RipplePartlyRings around the middle at its omega, speed and offset. Not matched to an AVS export yet, how strong it is is a guess
Saturation (guessed: effect 110)PartlyColors made stronger or weaker by its level. Guessed from a project, not matched to an AVS export yet
Flip (guessed: effect 300)PartlyLeft and right swapped, or upside down. Guessed from a project, not matched to an AVS export yet
MirrorPartlyOne half reflected onto the other. Keeping the right half matches an AVS export; the left, top and bottom ones are guessed
Audio RateYesThe pitch moved (75 is about 5 semitones up) keeping the clip's length, like AVS
Overlays (PiP), text and transitionsNoSkipped
Other effects, and effects on part of a clipNoOther effects are skipped, ones on part of a clip play on all of it
{mediascript:load {iv} logo
loadvep FILE_1 a
veprender logo a
render logo}
→The attached AVS Video Editor project rebuilt with the last image or video in every clip.

KineMaster projects (.kine)

loadkine URL KINE_KEY reads a KineMaster project, and kinerender MEDIA_KEY KINE_KEY plays it back with every video, picture and sound in it replaced by your media. KineMaster is a video editor for Android and iOS, and a .kine is the project it shares: a zip of the project and its media. Only the project is read, the media in it are replaced by yours. KineMaster itself never runs: the features in the table are rebuilt with ffmpeg, and everything not in the table is skipped.

Limits: projects up to 64mb (and within the script's download limit), 4 per script. The render is at most 10 minutes long, scaled down to fit 1280x720, and counts as one ffmpeg run, sharing its time limit.

KineMaster featurePlayed backHow
Main track clipsYesIn order, with their trim, speed and speed ramps, reverse, flip, rotation at any angle, crop/zoom, vignette and clip graphics (KineMaster's built-in titles with your text)
TransitionsYesCrossfade, all of KineMaster's built-in transitions (wipes, slides, splits, 3D flips, tiles and the rest) and its free store ones (Lumafade, Speed Blur, Glitches, Zoom), timed like the app, and the project's fade in and out
SoundYesEach clip's pitch, volume and volume envelope, the voice changer, equalizer, reverb, compressor and pan settings, noise reduction, Auto Master, audio clips (looped ones too) and the project's audio fades
Video and image layersYesWith their position, size, turn, opacity, every blend mode, keyframe animation, motion tracking, crop and shape masks, masks between layers, split screen, chroma key, and every in, out and overall animation (Jitter, Fountain, Rain, Ring 3D and the wipes too)
Text layersYesIn the project's font (KineMaster's built-in ones and its free store fonts, with a fallback for letters a font lacks, emoji too), with outline, glow, shadow, background, bold, italic, underline and spacing, letter by letter and word swap, moved like any layer
Stickers and handwritingYesKineMaster's built-in stickers and about 240 of its free store sticker packs (still, animated, Lottie, 3D and title stickers) with their outline, glow and shadow, and handwriting with its draw-in animation
AdjustmentsYesEvery slider (brightness, contrast, saturation, vibrance, hue, highlights, shadows, gain, lift, gamma, temperature) done with KineMaster's own math, animated on layers
Color filtersYesKineMaster's 90 built-in color filters and 160 from its store packs, from their LUTs; animated on video and image layers (a clip keeps its first, like in KineMaster)
Asset store effectsYesAll of the free ones, with their settings, keyframes and moving boxes: blurs and lights (Gaussian Blur, Motion Blur, Focus Blur 2.0, Light Flare, Glitter...), glitches (VHS Rewind, Digital Crash, Pixel Slip, Prismatic...), styles (Cartoon, Sketch 2.0, Ascii Art, Halftone Pop, Contours...), masks and warps (Shaped Mask, Swirl 2.0, Mirror, Transform, Spiral, VR 360...), 3D scenes (Mobile Phone Screen, Shattered Glass), Chrono Trail, Long Shadows 2 and the animation packs (In, Out and Overall Animation, Swing, Shake, Slide, 3D Flip, Layout, Good Vibes...)
Not rebuiltNoPremium store items (Circle Dimension is played as a look-alike), free store packs we don't carry, and the oldest kind of sticker layer, which KineMaster itself no longer loads. They're skipped
{mediascript:load {iv} logo
loadkine https://cdn.nsb.gg/assets/samples/preview2.kine p2
kinerender logo p2
render logo}
→The KineMaster project rebuilt with the last image or video in every clip.

Worked examples

A few complete tags that combine several commands. Copy one into .tag create and tweak it.

{mediascript:load {iv} img
caption img {jsonify:{args}}
render img}
→Captions the last image, GIF or video with whatever the user typed after the tag name.
{mediascript:load {avatar} pfp
spin pfp
render pfp image/gif}
→Makes a spinning GIF of the user's avatar (a still image becomes a 20-frame GIF).
{mediascript:load {video} clip
tts voice TIKTOK_EN_MALE_NARRATION {jsonify:{args}}
audioputreplace clip voice
render clip video/mp4}
→Replaces the audio of the last video with a narrator reading the tag's arguments.
{mediascript:load {iv} img
tti text 40 imgw white {jsonify:{args}}
overlay img text (imgw/2)-(textw/2) (imgh/2)-(texth/2)
render img}
→Writes white text in the middle of the image.
{mediascript:load {search.google.images:cake} img
create sun min(imgw,imgh)/3 min(imgw,imgh)/3 red=255 green=255
cropcircle sun
overlay img sun imgw-sunw 0
render img}
→Draws a yellow "sun" in the top right corner of a cake picture.
{mediascript:load {avatar} pfp
fit pfp 512 512
setframecount pfp max(36,pfpfc)
foreachframe pfp 0 pfpfc/2 {jsonify:
rotate3d pfpx pan=(10*idx)+5 tilt=45 zoom=1.5 order=tpr
}
foreachframe pfp pfpfc/2 pfpfc {jsonify:
rotate3d pfpx pan=(10*idx)+5-360 tilt=45 zoom=1.5 order=tpr
}
render pfp image/gif}
→Spins the avatar around in 3D, like the dancing cockroach meme.

Load & Render

Bring media in, copy it, convert it and send it back out.

bitrate

Sets the video and audio bitrate, mostly to make files smaller (or crunchier).

bitrate MEDIA_KEY VIDEO=0 AUDIO=0
MEDIA_KEY
the media to change
VIDEO= 0
video bitrate in bits per second0..10485760
AUDIO= 0
audio bitrate in bits per second0..10485760

clone

copy

Copies a media key into a new key, so you can edit one and keep the original.

clone MEDIA_KEY MEDIA_KEY_2
MEDIA_KEY
the media to copy
MEDIA_KEY_2
the name for the copy

convert

Converts media to another format without ending the script.

convert MEDIA_KEY MIMETYPE
MEDIA_KEY
the media to change
MIMETYPE
the format to convert tosame as render``
  • An image converted to an audio type (like audio/mp3): a raw picture (one made from audio, below) becomes that audio again, an animation's frames are played as raw bytes, and any other still image becomes a 36 second Robot 36 SSTV signal. This counts toward the ffmpeg limit.
  • Audio converted to a video type (like video/mp4) keeps its audio, with its cover art as the picture, or an animated waveform when it has none.
  • A video converted to a still image type (like image/png) is a frame a bit in, past any black intro, not the very first one. A video without sound converted to an audio type plays its frames' bytes, like an animated image.
  • Audio converted to an image type decodes an SSTV signal in it back into its picture (Martin, Scottie, Robot 36 or PD 120, found by its header in the first minute, recordings off the radio too). Otherwise it gives its cover art, or the audio's own bytes as a raw picture: noise-like, three 8-bit samples a pixel, row by row. Saved as a png, a raw picture converts back into the same audio. Use waveform for a waveform.

load

Downloads an image, GIF, audio file or video from a URL into a media key.

load URL_HERE MEDIA_KEY AUDIO_PRIORITY=False
URL_HERE
a direct media link, a TagScript function like {iv} or {avatar}, or FILE_X / FILE_X_COPY
MEDIA_KEY
the name to store the media under
AUDIO_PRIORITY= False
prefer audio when the link has both audio and video
{mediascript:load {iv} img
render img}
→Sends back the last image or video in chat.
  • FILE_X loads the tag's Xth attachment so far and removes it from the reply; FILE_X_COPY keeps it attached.

loadcube

Loads a .cube 3D color LUT for applylut or the ffmpeg action's lut3d filter.

loadcube URL CUBE_KEY
URL
link to the .cube file, or FILE_1, FILE_2... for attached files
CUBE_KEY
name to use it by, letters, numbers and _ only
{mediascript:load {video} clip
loadcube https://cdn.nsb.gg/assets/samples/grade.cube grade
applylut clip grade
render clip}
→Color grades the video with the LUT.
  • Apply it with applylut MEDIA_KEY CUBE_KEY, or as lut3d=CUBE_KEY.cube (or lut3d=file=CUBE_KEY.cube:interp=tetrahedral) in ffmpeg.
  • Only 3D LUTs, with LUT_3D_SIZE up to 65 and files up to 16mb. At most 10 per script.
  • Cube keys are separate from media keys, a cube can't be used as media.

loadfont

Loads a font for text, fittext and drawtext.

loadfont URL FONT_KEY
URL
link to the .ttf, .otf, .woff or .woff2 file, FILE_1, FILE_2... for attached files, or the name of a saved font
FONT_KEY
name to use it by, letters, numbers and _ only. Optional for a saved font, which goes by its own name
{mediascript:loadfont FILE_1 myfont
text title Hello World FONT=myfont SIZE=72 COLOR=white STROKE=black
render title}
→Writes "Hello World" in the attached font, white with a black outline.
{mediascript:loadfont comic
text title Hello World FONT=comic SIZE=72
render title}
→Writes "Hello World" in the saved font comic, the user's own or the server's.
  • Use it as FONT=FONT_KEY, as <span font="FONT_KEY"> in text with MARKUP=true, or as fontfile=FONT_KEY in the ffmpeg command's drawtext filter.
  • Files up to 24mb, at most 4 per script. Font collections (.ttc) aren't supported, use a single .ttf or .otf.
  • Every font is checked before it's used, a broken one fails to load with the reason.
  • The key can't be a bundled font's name (like impact), and font keys are separate from media keys.
  • Saved fonts are added with the bot's fonts add and server fonts add (or on the dashboard) and need NotSoPremium: the user's own come first, then the server's (which needs a premium server slot). In a tag, they're the fonts of whoever runs it.

loadkine

Loads a KineMaster project (.kine) for kinerender.

loadkine URL KINE_KEY
URL
link to the .kine file, or FILE_1, FILE_2... for files attached to the tag
KINE_KEY
name to use it by, any name like a media key
{mediascript:loadkine https://cdn.nsb.gg/assets/samples/preview2.kine p2
load {iv} logo
kinerender logo p2
render logo}
→Plays back the project with the last image or video.
  • Files up to 64mb (or the script's download limit, if that's smaller), at most 4 per script, and they count toward the script's download limit.
  • Kine keys are separate from media keys. Loading the same link into the same key again (like inside reexport) is skipped.
  • Only the project is read, not the media zipped in with it. See the KineMaster projects section for what is rebuilt.

loadveg

Loads a Vegas Pro project (.veg) for vegrender.

loadveg URL VEG_KEY
URL
link to the .veg file, or FILE_1, FILE_2... for files attached to the tag
VEG_KEY
name to use it by, any name like a media key
{mediascript:loadveg FILE_1 p
load {iv} logo
vegrender logo p
render logo}
→Plays back the attached project with the last image or video.
  • Files up to 32mb (or the script's download limit, if that's smaller), at most 4 per script, and they count toward the script's download limit. Projects with more than 20000 events or 512 tracks are refused.
  • Veg keys are separate from media keys. Loading the same link into the same key again (like inside reexport) is skipped.
  • Only the project is read, not the media it used. See the Vegas projects section for what is rebuilt.

loadvep

Loads an AVS Video Editor project (.vep) for veprender.

loadvep URL VEP_KEY
URL
link to the .vep file, or FILE_1, FILE_2... for files attached to the tag
VEP_KEY
name to use it by, any name like a media key
{mediascript:loadvep FILE_1 a
load {iv} logo
veprender logo a
render logo}
→Plays back the attached project with the last image or video.
  • Files up to 8mb (or the script's download limit, if that's smaller), at most 4 per script, and they count toward the script's download limit. Projects with more than 20000 clips are refused.
  • Vep keys are separate from media keys. Loading the same link into the same key again (like inside reexport) is skipped.
  • Only the project is read, not the media it used. See the AVS Video Editor projects section for what is rebuilt.

loadwlmp

Loads a Windows Live Movie Maker project (.wlmp) for wlmprender.

loadwlmp URL WLMP_KEY
URL
link to the .wlmp file, or FILE_1, FILE_2... for files attached to the tag
WLMP_KEY
name to use it by, any name like a media key
{mediascript:loadwlmp FILE_1 m
load {iv} logo
wlmprender logo m
render logo}
→Plays back the attached project with the last image or video.
  • Files up to 8mb (or the script's download limit, if that's smaller), at most 4 per script, and they count toward the script's download limit. Projects with more than 20000 clips are refused.
  • Wlmp keys are separate from media keys. Loading the same link into the same key again (like inside reexport) is skipped.
  • Only the project is read, not the media it used. See the Movie Maker projects section for what is rebuilt. A .veg goes through loadveg instead.

loadxyt

Loads a VivaVideo filter, fx, frame, sticker or text template (.xyt) for xytrender.

loadxyt URL XYT_KEY
URL
link to the .xyt file, or FILE_1, FILE_2... for files attached to the tag
XYT_KEY
name to use it by, any name like a media key
{mediascript:loadxyt FILE_1 t
load {iv} img
xytrender img t
render img}
→Applies the attached template to the last image or video.
  • Files up to 16mb (or the script's download limit, if that's smaller), at most 10 per script, and they count toward the script's download limit.
  • Xyt keys are separate from media keys. Loading the same link into the same key again (like inside reexport) is skipped.
  • Filter, fx, frame, sticker, text bubble and animated text templates work, text templates with their own words. Theme templates, placeholder (_dummy) templates, shader effects with their own images and alpha frame effects aren't supported yet and fail to load.

render

Ends the script and sends the media as the result, optionally converted to another format.

render MEDIA_KEY MIMETYPE? ...FILENAME?
MEDIA_KEY
the media to send
MIMETYPE
the format to save as; leave out (or default) to keep the current oneaudio/aac, audio/flac, audio/mp3, audio/mp4, audio/mpeg, audio/ogg, audio/wav, audio/x-matroska, audio/x-wav, image/bmp, image/gif, image/jpeg, image/png, image/tiff, image/webp, image/x-apng, video/mp4, video/mpeg, video/quicktime, video/webm, video/x-m4v, video/x-matroska, video/x-msvideo, video/x-ms-wmv
...FILENAME
optional name for the output file; write default as the mimetype to keep the format and still name it
{mediascript:load {iv} img
render img default cake}
→Sends the media in its own format, named "cake".
  • Anything after render is ignored.
  • If a script has no render, the first media key created is rendered automatically.

togif

Converts the media to a GIF, shrinking it and lowering the frame rate as needed.

togif MEDIA_KEY
MEDIA_KEY
the media to change

Logic, Loops & Variables

Per-frame loops, conditions, and numbers you can share with TagScript.

call

Runs a function made with function, filling $1, $2... with the arguments.

call NAME ...ARGUMENTS
NAME
the function to run
...ARGUMENTS
one per $N the function uses, separated by spaces (a "quoted string" counts as one)
{mediascript:load {iv} a
load {avatar} b
function shrink {jsonify:
scale $1 $2
flip $1
}
call shrink a 0.5
call shrink b 2
render a}
→Runs the same two lines on two media keys with different amounts.
  • It needs exactly as many arguments as the highest $N in the function.
  • Media keys it makes or changes stay afterwards. Variables it sets are its own and go away when it ends.
  • Functions can call other functions (and themselves), up to 8 deep. Every line they run counts toward the action limit.

dobetween

Runs MediaScript code on just one stretch of time, then stitches it back in.

dobetween MEDIA_KEY START END ...MEDIASCRIPTCODE
MEDIA_KEY
the media to change
START= 0
start time in seconds
END= MEDIA_KEYd
end time in seconds
...MEDIASCRIPTCODE
the code to run, JSON-encoded with {jsonify:}
{mediascript:load {video} clip
dobetween clip 2 4 {jsonify:
invert clipx
deepfry clipx
}
render clip}
→Inverts and deepfries only seconds 2 to 4 of the video.
  • The slice is available as MEDIA_KEYx. Using MEDIA_KEY itself inside is an error.
  • Variables and new media keys made inside are discarded when it ends. render is not allowed inside.

export

Sends a MediaScript variable back to TagScript, readable afterwards with {get:}.

export VARIABLE_NAME VARIABLE_NAME_ALIAS?
VARIABLE_NAME
the MediaScript variable to export
VARIABLE_NAME_ALIAS
the TagScript variable name to use instead
{mediascript:load {iv} img
export imgfc frames
render img}This has {get:frames} frames.
→Prints how many frames the media has.

exportmultiple

Sends several MediaScript variables back to TagScript at once.

exportmultiple ...VARIABLE_NAMES
...VARIABLE_NAMES
variable names separated by spaces

foreachframe

Runs MediaScript code once for every frame in a range.

foreachframe MEDIA_KEY START END ...MEDIASCRIPTCODE
MEDIA_KEY
the media whose frames to loop over
START= 0
first frame (inclusive)
END= MEDIA_KEYfc
stops before this frame (exclusive)
...MEDIASCRIPTCODE
the code to run, JSON-encoded with {jsonify:} if it has more than one line
{mediascript:load {avatar} pfp
setframecount pfp max(10,pfpfc)
foreachframe pfp 0 pfpfc {jsonify:
hueshifthsv pfpx hue=rand(0,360) saturation=100
}
render pfp image/gif}
→Gives every frame of the avatar a random hue.
  • The current frame is the media key MEDIA_KEYx (e.g. pfpx), idx is the frame number and time is when it starts in seconds. Using MEDIA_KEY itself inside is an error.
  • Don't use commands that turn a still image into a GIF inside the loop; each frame must stay a single image.
  • Variables and new media keys made inside the loop are discarded when it ends. render is not allowed inside.

function

Saves MediaScript code under a name so call can run it later, with arguments.

function NAME ...MEDIASCRIPTCODE
NAME
the function's name (a-z, 0-9 and _, up to 32 characters)
...MEDIASCRIPTCODE
the code to save, JSON-encoded with {jsonify:} if it has more than one line. $1, $2... are filled in with call's arguments
{mediascript:load {iv} m
function gm4 {jsonify:
huecurvergba $1 all 0 1 0
copy $1 a
convert a audio/flac
multipitch a 0,5
audioputreplace $1 a
}
call gm4 m
render m}
→Defines gm4 once and runs it on m.
  • The code is only checked when it is called, since $1 can stand for anything, even the command.
  • Using a name again replaces that function. A script can have up to 50 functions.
  • Write $$ for a literal $. $(EQUATION) and $$( work as usual.

get

Copies a property of a media key into a variable.

get MEDIA_KEY PROPERTY VARIABLE_NAME
MEDIA_KEY
the media to read from
PROPERTY
what to readwidth, height, duration, framecount
VARIABLE_NAME
the variable to store it in
  • You usually don't need this: KEYw, KEYh, KEYd and KEYfc are always available.

if

Runs MediaScript code only when a comparison is true.

if LEFT OPERATOR RIGHT ...MEDIASCRIPTCODE
LEFT
a number or equation (no spaces)
OPERATOR
how to compare==, !=, <=, >=, <, >
RIGHT
a number or equation (no spaces)
...MEDIASCRIPTCODE
the code to run, JSON-encoded with {jsonify:} if it has more than one line
{mediascript:load {iv} media
if is(video,media) == 1 reverse media
if mediaw > 1000 scale media 0.5
render media}
→Reverses the media only if it is a video, and halves it if it is wider than 1000px.
  • The two expressions and the operator must be separated by spaces, e.g. if 2 == 2.
  • Both sides are compared as decimal numbers.

reexport

ihtx

Runs code on a clip over and over, each time on the last result, then joins every result (IHTX-style exports).

reexport MEDIA_KEY AMOUNT LENGTH NO_TRIM=false ...MEDIASCRIPTCODE
MEDIA_KEY
the media to change
AMOUNT= 2
how many exports, negative joins them backwards-100..100, not 0
LENGTH= MEDIA_KEYd
seconds from the start to use, also the length of each export
NO_TRIM= false
keep exports that got longer than LENGTH, only works as NO_TRIM=true
...MEDIASCRIPTCODE
the code to run on each export, JSON-encoded with {jsonify:}
{mediascript:load {video} clip
reexport clip 20 0.46 {jsonify:ffmpeg clipx -vf "negate,huesaturation=hue=72" -af "rubberband=pitch=1.06" -c:v libx264}
render clip}
→20 exports of the first 0.46 seconds, each one inverted, hue shifted and pitched up from the last.
{mediascript:load {video} clip
reexport clip -10 1 {jsonify:
jpeg clipx
hueshifthsvffmpeg clipx 36
}
render clip}
→10 exports joined last to first.
{mediascript:load {video} clip
reexport clip 5 1 {jsonify:
speed clipx speed=1.25
drawtext clipx {jsonify:{args}} #$(idx) X=10 Y=10+(idx-1)*th
}
render clip}
→5 exports, each faster than the last and numbered on its own line: "hello #1", "hello #2"... for hello as the arguments.
  • The export being made is MEDIA_KEYx, and idx is its number (1, 2, 3...). Using MEDIA_KEY itself inside is an error.
  • Each export's audio is cut or padded to its video's length before joining, so it stays in sync (no sync+ needed).
  • The code's lines count once per export toward the 300 line limit, and every ffmpeg in it counts toward the ffmpeg limit.
  • Variables and new media keys made inside are discarded when it ends. render is not allowed inside.

set

Stores a number in a variable you can use in later equations.

set VARIABLE_NAME VALUE=0
VARIABLE_NAME
letters, digits and underscores only
VALUE= 0
a number or equation
{mediascript:load {iv} img
set size min(imgw,imgh)
crop img size size
render img}
→Crops the image to a square.

template

Runs a media editor template's effects on the media, the same way the editor renders them.

template MEDIA_KEY CODE PASSWORD=none ...INPUT=value
MEDIA_KEY
the media to change
CODE
the template's code, the letters at the end of its link (notsobot.com/editor/template/CODE). The whole link works too
PASSWORD= none
a locked template's password
INPUT= the template's own
what the template asks for, by name (its page lists them, like YOUR_CAPTION): text, numbers, colors, choices and true/false as they are, a file as a link
{mediascript:load {iv} a
template a AbCd
render a}
→The image or video with every effect of the template AbCd, in order.
{mediascript:load {iv} a
load {avatar} b
template a AbCd
template b AbCd
render a}
→The same template on two media keys.
{mediascript:load {iv} a
template a AbCd YOUR_CAPTION="{args}" FACE={avatar}
render a}
→A template that asks for a caption and a picture, filled with the tag's text and the user's avatar.
  • Toward the 300 line limit it counts as every line its effects make, not as one line. A template line inside a loop counts once.
  • Hidden steps are skipped. An effect whose settings changed since the template was saved uses its current ones.
  • Variables it sets go away when it ends, like a function's. The media key keeps the changes.
  • Input names ignore case and underscores (your_caption= works). An input it doesn't ask for is an error that lists the ones it does.
  • A password written in a tag can be read by anyone who sees the tag's code.

Create Media

Make new images and audio from scratch, text, AI or the web.

create

Creates a blank image: fully transparent, or a solid color if you give one.

create MEDIA_KEY WIDTH HEIGHT RED=0 GREEN=0 BLUE=0 ALPHA?
MEDIA_KEY
the name for the new image
WIDTH
width in pixels
HEIGHT
height in pixels
RED= 0
0..255
GREEN= 0
0..255
BLUE= 0
0..255
ALPHA
opacity, 0 is invisible and 255 is solid; leave out for fully opaque when a color is given, or fully transparent when none is0..255
{mediascript:create canvas 500 500 135 206 235
render canvas image/png}
→A 500x500 sky-blue square.
{mediascript:create canvas 500 500
render canvas image/png}
→A fully transparent 500x500 image.
  • With no RED, GREEN or BLUE the image is fully transparent (alpha 0). Giving any one of them makes a solid color, with the missing ones at 0 and ALPHA at 255 unless you set it.

createaudionoise

Creates an MP3 clip of pure noise, like static or rain.

createaudionoise MEDIA_KEY DURATION COLOR=white AMPLITUDE=1.0 SAMPLE_RATE=44100
MEDIA_KEY
the name for the new audio
DURATION
length in seconds1..600
COLOR= white
the kind of noise; brown and pink are deeper, blue and violet are hissierblue, brown, pink, velvet, violet, white
AMPLITUDE= 1.0
loudness0..1
SAMPLE_RATE= 44100
samples per second8000..48000
{mediascript:createaudionoise rain 30 brown 0.5
render rain audio/mp3}
→30 seconds of soft brown noise.

createpolygonfill

createpolygon

Draws a filled polygon from a list of points.

createpolygonfill MEDIA_KEY COLOR ...POINTS
MEDIA_KEY
the name for the new image
COLOR
RGBA or #HEX, no spaces
...POINTS
x,y points separated by spaces
{mediascript:createpolygonfill tri rgba(255,0,0,255) 150,0 0,300 300,300
render tri image/png}
→A red triangle on a transparent 300x300 image.
  • The image size is set by the largest X and largest Y among the points.

createpolygonstroke

Draws just the outline of a polygon from a list of points.

createpolygonstroke MEDIA_KEY COLOR ...POINTS
MEDIA_KEY
the name for the new image
COLOR
RGBA or #HEX, no spaces
...POINTS
x,y points separated by spaces
  • Same as createpolygonfill, but outlined instead of filled.

einstein

Makes Einstein write text on a chalkboard.

einstein MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
up to 15 characters

foggywindow

Writes text on a foggy window.

foggywindow MEDIA_KEY ...TEXT BACKGROUND=2
MEDIA_KEY
the name for the new image
...TEXT
up to 20 characters
BACKGROUND= 2
which window; only by name, since the text takes the rest of the line1..3

hacker

Puts text on a hacker's screen.

hacker MEDIA_KEY ...TEXT TEMPLATE=0
MEDIA_KEY
the name for the new image
...TEXT
up to 1000 characters
TEMPLATE= 0
which hacker; only by name0..1

imagine

Generates an image from a text prompt with AI.

imagine MEDIA_KEY PROMPT?
MEDIA_KEY
the name for the new image
...PROMPT
what to draw; a random prompt is used if empty
{mediascript:imagine car {jsonify:a red sports car}
vaporwave car
render car}
→An AI car, vaporwaved.

loadsvg

Turns SVG markup into an image.

loadsvg MEDIA_KEY SVG_TEXT
MEDIA_KEY
the name for the new image
...SVG_TEXT
the SVG code, wrapped in {jsonify:}
{mediascript:loadsvg dot {jsonify:<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="40" fill="red"/></svg>}
render dot image/png}
→A red circle.

lucia

Makes a "Play with Lucia" prompt from GTA 6 with the text under it, and your own title, name and portrait.

lucia MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
TITLE= PLAY WITH LUCIA
only by name: the headline, drawn in caps (up to 50 characters, in quotes when it has spaces)
NAME= Lucia
only by name: who "will appreciate this" (up to 32 characters)
PORTRAIT
only by name: an image or video media for the portrait instead of Lucia (see-through parts show the square's pink), an animated image or a video makes the whole card move
...TEXT
up to 200 characters, drawn as written

neon

Writes text as a neon sign.

neon MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
one or two lines (line 1 | line 2), up to 20 characters each
{mediascript:neon sign {jsonify:open|24/7}
render sign}
→A neon sign reading "open" over "24/7".

presidential

Makes an iPhone Presidential Alert with the text.

presidential MEDIA_KEY ...TEXT TIME=none DATE=none
MEDIA_KEY
the name for the new image
...TEXT
up to 250 characters
TIME= none
the time shown, like 12:00; only by name. none is the current UTC time
DATE= none
the date shown; only by name. none is today (UTC)

qrcode

Creates a QR code image.

qrcode MEDIA_KEY WIDTH HEIGHT MARGIN ...TEXT
MEDIA_KEY
the name for the QR code
WIDTH
width in pixels, 512 is a good choice
HEIGHT
height in pixels, 512 is a good choice
MARGIN
quiet border around the code, usually 1
...TEXT
the text or link to encode
{mediascript:qrcode qr 512 512 1 {jsonify:https://notsobot.com}
render qr image/png}
→A scannable QR code for the site.

realfact

Puts text on a Snapple "Real Fact" cap.

realfact MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
up to 200 characters

reimagine

Replaces media with a new AI image of what it shows, like .reimagine.

reimagine MEDIA_KEY ADD?
MEDIA_KEY
the media to change
...ADD
extra words put on the end of the image's description
{mediascript:load {avatar} pfp
reimagine pfp as a pixel art sprite
render pfp}
→A new image of what the avatar shows, as pixel art.
  • The image is described by AI first, and that description (plus ADD) is what gets drawn, so the result is a new picture, not an edit.
  • Videos use their first frame, and the result is always a still image.

retrowave

Makes an 80s retrowave title image.

retrowave MEDIA_KEY ...TEXT BACKGROUND=5 TEXT_STYLE=4
MEDIA_KEY
the name for the new image
...TEXT
up to three lines, top | middle | bottom
BACKGROUND= 5
only by name1..5
TEXT_STYLE= 4
how the middle line is drawn; only by name1..4

screenshot

Takes a screenshot of a web page.

screenshot URL MEDIA_KEY TIMEOUT=7.0 WIDTH=1920 HEIGHT=1080 WAIT=1.0 DARKMODE=true BROWSER=chrome
URL
the page to capture
MEDIA_KEY
the name for the screenshot
TIMEOUT= 7.0
seconds to wait for the page to load1.0..15.0
WIDTH= 1920
browser width in pixels, Chrome only
HEIGHT= 1080
browser height in pixels, Chrome only
WAIT= 1.0
extra seconds to wait after loading0.0..5.0
DARKMODE= true
ask the page for its dark theme
BROWSER= chrome
chrome or firefox, Firefox gets past more bot checks but has no WebGL
{mediascript:screenshot https://notsobot.com page timeout=10 width=1280 height=720
render page image/png}
→A 1280x720 screenshot of the site.
{mediascript:screenshot https://notsobot.com page browser=firefox
render page image/png}
→A 1920x1080 screenshot taken with Firefox.
  • Firefox screenshots are always 1920x1080, giving WIDTH or HEIGHT with browser=firefox is an error.

snowwriting

Writes text in the snow.

snowwriting MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
one or two lines (line 1 | line 2), up to 15 characters each

song

Makes a song out of chords, with a bass and drums.

song MEDIA_KEY BPM=120 BARS=none SOUND=PLUCK DRUMS=true ...CHORDS
MEDIA_KEY
the name to store the song under
BPM= 120
beats per minute40..240
BARS= none
how many bars, one chord a bar. none plays the chords twice1..160
SOUND= PLUCK
what the chords are played onPLUCK, PAD, PIANO, CHIPTUNE
DRUMS= true
play the drums
...CHORDS= C Am F G
chord names like C Am F G7 F#m7 Bbsus4, or notes like C4,E4,G4
{mediascript:song music BPM=90 SOUND=pad Am F C G
render music}
→Four chords on a pad at 90 bpm, twice.
  • The options only by name, the chords take everything else. Songs can be at most 60 seconds.

sonic

Makes Sonic say the text.

sonic MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
up to 200 characters

soup

Spells the text in alphabet soup.

soup MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
up to 14 characters

thonkify

Writes the text in the thinking emoji font.

thonkify MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
up to 70 characters

tombstone

Writes text on a tombstone.

tombstone MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
up to five lines, separated by |

treecarving

Carves text into a tree.

treecarving MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
one or two lines (line 1 | line 2), up to 15 and 12 characters

tts

Generates a text-to-speech audio clip.

tts MEDIA_KEY VOICE=TIKTOK_EN_US_FEMALE_01 ...TEXT
MEDIA_KEY
the name for the audio
VOICE= your Default TTS Voice
one of the voices in the Text-to-speech voices table, or the name or ID of one of your cloned voices
...TEXT
what to say, wrapped in {jsonify:}
{mediascript:tts voice TIKTOK_EN_US_DISNEY_GHOSTFACE {jsonify:what's your favorite scary movie}
render voice audio/mp3}
→An MP3 of Ghostface asking the question.
{mediascript:load {video} clip
tts voice {jsonify:{args}}
audioputmix clip voice
render clip}
→Mixes your default voice reading the arguments over the last video.
  • Text longer than 4096 characters is cut off. See the Klattsch section for the KLATTSCH phoneme voice.
  • You can use your own cloned voices (from tts voice create or /tts voice create): VOICE="my voice" by name (any case) or ID, or VOICE=CLONED for your newest one. They are always the voices of whoever runs the script, and a built-in voice wins over a cloned voice with the same name.
  • Without VOICE, it uses the Default TTS Voice of whoever runs the script (/settings set tts-voice, or the Text-to-speech section of your dashboard settings), or TIKTOK_EN_US_FEMALE_01 when they haven't set one. A cloned default that was deleted falls back the same way. Voices cloned on our own servers are free, fish.audio and ElevenLabs ones spend NotSoCredits.

woodensign

Carves text into a wooden sign.

woodensign MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
up to 25 characters

wordcloud

Creates a word cloud from a list of words or messages.

wordcloud MEDIA_KEY WIDTH=1024 HEIGHT=768 ...WORDS
MEDIA_KEY
the name for the word cloud
WIDTH= 1024
width in pixels; 0 uses the default
HEIGHT= 768
height in pixels; 0 uses the default
THEME= RAINBOW
colors, only by name: FIRE, FOREST, IMAGE (the mask's colors, the default with one), MONO, NEON, OCEAN, PASTEL, RAINBOW or SUNSET
SHAPE= RECTANGLE
only by name: CIRCLE, CLOUD, HEART, RECTANGLE or STAR
BACKGROUND= black
only by name: a hex code, r,g,b(,a), a color name or transparent
MASK
only by name: an image media the words fill (its white or transparent parts stay empty) and take the colors of
SEED
only by name: the same seed and words give the same cloud
...WORDS
the words or messages, each line on its own (wrap in {jsonify:})
{mediascript:wordcloud cloud words={jsonify:cake
cake
cake
pie
cookies}
render cloud image/png}
→A word cloud where "cake" is the biggest word.
{mediascript:wordcloud cloud 0 0 shape=heart theme=sunset background=white words={jsonify:{args}}
render cloud image/png}
→The words you give, in a heart with sunset colors on white.
{mediascript:load {avatar} pfp
wordcloud cloud mask=pfp words={jsonify:{args}}
render cloud image/png}
→The words filling your avatar, in its colors.
  • The size is kept between 512 and 2048 pixels, with a shape it defaults to 1024x1024 and with a mask it fits the mask in it.
  • Common words (like "the", "lol") are left out, and two words that keep showing up together become one.

yacht

Writes text on the side of a yacht.

yacht MEDIA_KEY ...TEXT
MEDIA_KEY
the name for the new image
...TEXT
up to 25 characters

Text & Captions

Put words on media.

asciitext

asciit

Creates an image of big ASCII-art letters from text.

asciitext MEDIA_KEY TEXT
MEDIA_KEY
the name for the new image
...TEXT
the text, wrapped in {jsonify:} (new lines allowed)
{mediascript:asciitext art {jsonify:hello
world}
render art}

caption

Adds a white caption bar with text above the media, like the classic caption meme.

caption MEDIA_KEY ...TEXT FONT=futura
MEDIA_KEY
the media to change
...TEXT
the caption; separate top and bottom text with |
FONT= futura
a bundled font (like impact), a command font name (like FUTURA_CONDENSED_EXTRA_BOLD) or a key from loadfont; left out, your Default Font setting (then the server's) comes before futura
{mediascript:load {iv} img
caption img {jsonify:me when the tag works}
render img}

drawtext

Writes styled text straight onto an image, GIF or video, optionally moving over time.

drawtext MEDIA_KEY ...TEXT X=(w-tw)/2 Y=(h-th)/2 START=0 END=0 FONT=sans COLOR=white STROKE=black ...
MEDIA_KEY
the media to change
...TEXT
the text
X= (w-tw)/2
left edge of the text, an expression that can change every frame (see notes)
Y= (h-th)/2
top edge of the text, same as X
START= 0
second the text appears at
END= 0
second the text goes away at, 0 for the end
FONT= sans
one of the bundled fonts, or a key from loadfontsans, serif, monospace, archivoblack, arial, calibri, daysone, dejavumono, domine, dosis, freemono, futura, impact, kalam, montserrat, montserratbold, montserratsemibold, mplus1c, mplus2p, mrdafoe, msgothic, opensans, pricedown, roboto, rubik, saira, sfpro, sfprothin, sfprotext, tahoma, titillium, titilliumblack
SIZE= 48
font size in pixels1..500
COLOR= white
text color, none for hollow text (with STROKE)
WIDTH= 0
wrap lines at this many pixels, 0 to only wrap at the max image width0..2048
ALIGN= center
how lines line upleft, center, right, justify
LINE_SPACING= 1
line height, as a multiple of the normal one0.5..5
LETTER_SPACING= 0
extra space between letters, in ems (0.1 is a tenth of the size)-0.5..2
MARKUP= false
read <b>, <i>, <u>, <s>, <sub>, <sup>, <big>, <small>, <tt> and <span> tags in the text
STROKE= black
outline color
STROKE_WIDTH= SIZE/16
outline thickness in pixels0..100
SHADOW= none
drop shadow color (RGBA works for a see-through one)
SHADOW_X= SIZE/16
shadow offset to the right-500..500
SHADOW_Y= SIZE/16
shadow offset down-500..500
SHADOW_BLUR= SIZE/12
shadow softness in pixels0..100
BACKGROUND= none
color of a box behind the text (also BG)
PADDING= SIZE/4 with a background, else 0
space between the text and the box edge0..500
RADIUS= 0
rounded corners for the box0..1000
FILL= none
a media key to fill the letters with (its first frame), instead of COLOR
{mediascript:load {iv} vid
drawtext vid {jsonify:subscribe} X=w-tw-20 Y=h-th-20 FONT=impact SIZE=40
render vid}
→Puts "subscribe" in the bottom-right corner.
{mediascript:load {iv} vid
drawtext vid {jsonify:breaking news} X=w-t*200 Y=h-th-10 START=1 BACKGROUND=red COLOR=white STROKE=none
render vid}
→A red ticker scrolls in from the right after one second.
{mediascript:load {iv} gif
drawtext gif wobble Y=(h-th)/2+sin(n/3)*20
render gif}
→Text that bobs up and down on every frame of a GIF.
{mediascript:load {iv} img
drawtext img {jsonify:{args}} - $(imgw)x$(imgh) Y=10
render img}
→Writes the tag's arguments and the media's size along the top, like "hello - 512x512".
  • X and Y are normal expressions with a few extra names: w/h (the media's size), tw/th (the text's size), t (the frame's time in seconds) and n (the frame number). On top of the usual functions they take floor, ceil, sqrt and clip(x,min,max), and rand() gives a new number every frame.
  • Lines wrap at the media's width unless WIDTH is given.
  • Videos count towards the script's ffmpeg uses. Audio is kept as it is.
  • Everything after the media key that isn't NAME=value is the text. Wrap it in {jsonify:} when it has new lines or quotes, and always when MARKUP=true: an unwrapped <span color="red"> gets read as a COLOR= option.
  • Markup <span> takes color, background, alpha/bgalpha (percent), font (one of the font names), size (10%..300% or xx-small..xx-large, smaller, larger), weight, style, variant, stretch, underline, overline, strikethrough, their _colors, letter_spacing and text_transform. Markup can make text at most 4x bigger, and tags nest at most 10 deep.
  • Emoji are drawn in color.
  • $(EQUATION) in the text becomes the equation's number, like $(idx) or $(round(imgd*10)/10). It's worked out once when the command runs (once per frame or export inside foreachframe, dobetween and reexport), not every frame like drawtext's X/Y. Text inside {jsonify:} is never read for $(, so user input stays as it was typed: {jsonify:{args}} #$(idx). Write $$( for a literal $(.

fittext

Writes text as big as it can go inside a box, for meme templates and speech bubbles.

fittext MEDIA_KEY WIDTH HEIGHT ...TEXT MIN_SIZE=4 MAX_SIZE=200 VALIGN=middle WRAP=true FONT=sans ...
MEDIA_KEY
the name for the text image
WIDTH
box width in pixels1..2048
HEIGHT
box height in pixels1..2048
...TEXT
the text
MIN_SIZE= 4
smallest font size to try1..500
MAX_SIZE= 200
biggest font size to try1..500
VALIGN= middle
where the text sits in the box verticallytop, middle, bottom
WRAP= true
wrap lines to fit the box (false keeps it on the lines you wrote)
FONT= sans
one of the bundled fonts, or a key from loadfontsans, serif, monospace, archivoblack, arial, calibri, daysone, dejavumono, domine, dosis, freemono, futura, impact, kalam, montserrat, montserratbold, montserratsemibold, mplus1c, mplus2p, mrdafoe, msgothic, opensans, pricedown, roboto, rubik, saira, sfpro, sfprothin, sfprotext, tahoma, titillium, titilliumblack
SIZE= 48
font size in pixels1..500
COLOR= black
text color, none for hollow text (with STROKE)
ALIGN= center
how lines line upleft, center, right, justify
LINE_SPACING= 1
line height, as a multiple of the normal one0.5..5
LETTER_SPACING= 0
extra space between letters, in ems (0.1 is a tenth of the size)-0.5..2
MARKUP= false
read <b>, <i>, <u>, <s>, <sub>, <sup>, <big>, <small>, <tt> and <span> tags in the text
STROKE= none
outline color
STROKE_WIDTH= SIZE/16
outline thickness in pixels0..100
SHADOW= none
drop shadow color (RGBA works for a see-through one)
SHADOW_X= SIZE/16
shadow offset to the right-500..500
SHADOW_Y= SIZE/16
shadow offset down-500..500
SHADOW_BLUR= SIZE/12
shadow softness in pixels0..100
BACKGROUND= none
color of a box behind the text (also BG)
PADDING= SIZE/4 with a background, else 0
space between the text and the box edge0..500
RADIUS= 0
rounded corners for the box0..1000
FILL= none
a media key to fill the letters with (its first frame), instead of COLOR
{mediascript:load {iv} img
fittext top imgw-20 imgh/4 {jsonify:{args}} FONT=impact COLOR=white STROKE=black VALIGN=top
overlay img top 10 10
render img}
→Fits the tag's arguments into the top quarter of the image, meme style.
{mediascript:create bg 600 400 30 30 30
fittext a 560 150 {jsonify:first line} FONT=impact COLOR=white
fittext b 560 150 {jsonify:the second, longer line} FONT=impact COLOR=white MAX_SIZE=afs
overlay bg a 20 20
overlay bg b 20 230
render bg}
→Two boxes with the same font size, the second capped at the size the first one picked.
  • The image is exactly WIDTHxHEIGHT with the text placed in it by ALIGN and VALIGN, so overlay it at the box's top-left corner.
  • The size it picked is saved as the variable KEYfs (e.g. afs), handy for making several boxes match.
  • Text that doesn't fit even at MIN_SIZE is cut off at the box edge.
  • Everything after the media key that isn't NAME=value is the text. Wrap it in {jsonify:} when it has new lines or quotes, and always when MARKUP=true: an unwrapped <span color="red"> gets read as a COLOR= option.
  • Markup <span> takes color, background, alpha/bgalpha (percent), font (one of the font names), size (10%..300% or xx-small..xx-large, smaller, larger), weight, style, variant, stretch, underline, overline, strikethrough, their _colors, letter_spacing and text_transform. Markup can make text at most 4x bigger, and tags nest at most 10 deep.
  • Emoji are drawn in color.
  • $(EQUATION) in the text becomes the equation's number, like $(idx) or $(round(imgd*10)/10). It's worked out once when the command runs (once per frame or export inside foreachframe, dobetween and reexport), not every frame like drawtext's X/Y. Text inside {jsonify:} is never read for $(, so user input stays as it was typed: {jsonify:{args}} #$(idx). Write $$( for a literal $(.

labelanalysis

Adds a "Kowalski, analysis" panel under the media.

labelanalysis MEDIA_KEY
MEDIA_KEY
the media to change

labelexcuse

Adds an "excuse me, what?" panel under the media.

labelexcuse MEDIA_KEY
MEDIA_KEY
the media to change

labelifunny

ifunny

Adds the iFunny watermark bar.

labelifunny MEDIA_KEY
MEDIA_KEY
the media to change

labelkirby

Adds a "Kirby's Calling the Police" panel under the media.

labelkirby MEDIA_KEY
MEDIA_KEY
the media to change

labelperfection

Adds a "perfection" dictionary definition above the media.

labelperfection MEDIA_KEY
MEDIA_KEY
the media to change

labeltriggered2

triggered2

Resizes the media to 256 pixels wide and adds a "triggered" label underneath.

labeltriggered2 MEDIA_KEY
MEDIA_KEY
the media to change

labeltriggered3

triggered3

Same as labeltriggered2, with a different "triggered" label.

labeltriggered3 MEDIA_KEY
MEDIA_KEY
the media to change

meme

Adds Impact-style meme text on top of the media.

meme MEDIA_KEY ...TEXT FONT=impact
MEDIA_KEY
the media to change
...TEXT
the text; separate top and bottom text with |
FONT= impact
a bundled font (like rubik), a command font name (like IMPACT) or a key from loadfont; left out, your Default Font setting (then the server's) comes before impact
{mediascript:load {iv} img
meme img {jsonify:top text|bottom text}
render img}

text

Creates a transparent image of styled text: any bundled font, outline, drop shadow, background box, markup and emoji.

text MEDIA_KEY ...TEXT FONT=sans SIZE=48 COLOR=black STROKE=none SHADOW=none BACKGROUND=none ...
MEDIA_KEY
the name for the text image
...TEXT
the text
FONT= sans
one of the bundled fonts, or a key from loadfontsans, serif, monospace, archivoblack, arial, calibri, daysone, dejavumono, domine, dosis, freemono, futura, impact, kalam, montserrat, montserratbold, montserratsemibold, mplus1c, mplus2p, mrdafoe, msgothic, opensans, pricedown, roboto, rubik, saira, sfpro, sfprothin, sfprotext, tahoma, titillium, titilliumblack
SIZE= 48
font size in pixels1..500
COLOR= black
text color, none for hollow text (with STROKE)
WIDTH= 0
wrap lines at this many pixels, 0 to only wrap at the max image width0..2048
ALIGN= center
how lines line upleft, center, right, justify
LINE_SPACING= 1
line height, as a multiple of the normal one0.5..5
LETTER_SPACING= 0
extra space between letters, in ems (0.1 is a tenth of the size)-0.5..2
MARKUP= false
read <b>, <i>, <u>, <s>, <sub>, <sup>, <big>, <small>, <tt> and <span> tags in the text
STROKE= none
outline color
STROKE_WIDTH= SIZE/16
outline thickness in pixels0..100
SHADOW= none
drop shadow color (RGBA works for a see-through one)
SHADOW_X= SIZE/16
shadow offset to the right-500..500
SHADOW_Y= SIZE/16
shadow offset down-500..500
SHADOW_BLUR= SIZE/12
shadow softness in pixels0..100
BACKGROUND= none
color of a box behind the text (also BG)
PADDING= SIZE/4 with a background, else 0
space between the text and the box edge0..500
RADIUS= 0
rounded corners for the box0..1000
FILL= none
a media key to fill the letters with (its first frame), instead of COLOR
{mediascript:load {iv} img
text caption {jsonify:WHEN THE CODE WORKS} FONT=impact SIZE=72 COLOR=white STROKE=black WIDTH=imgw-40
overlay img caption (imgw-captionw)/2 20
render img}
→Puts white Impact text with a black outline along the top of the image.
{mediascript:text label {jsonify:<b>NEW</b> feature} FONT=montserrat SIZE=32 COLOR=#222 BACKGROUND=gold RADIUS=12 MARKUP=true
render label}
→A rounded yellow label with "NEW" in bold.
  • The image is only as big as the text (plus its outline, shadow and box), so use KEYw / KEYh to place it with overlay, or use drawtext to write straight onto media.
  • The old way of writing it, text MEDIA_KEY FONT_SIZE WRAP_WIDTH COLOR ...TEXT (two numbers and a color before the text), still works and does the same as tti.
  • Everything after the media key that isn't NAME=value is the text. Wrap it in {jsonify:} when it has new lines or quotes, and always when MARKUP=true: an unwrapped <span color="red"> gets read as a COLOR= option.
  • Markup <span> takes color, background, alpha/bgalpha (percent), font (one of the font names), size (10%..300% or xx-small..xx-large, smaller, larger), weight, style, variant, stretch, underline, overline, strikethrough, their _colors, letter_spacing and text_transform. Markup can make text at most 4x bigger, and tags nest at most 10 deep.
  • Emoji are drawn in color.
  • $(EQUATION) in the text becomes the equation's number, like $(idx) or $(round(imgd*10)/10). It's worked out once when the command runs (once per frame or export inside foreachframe, dobetween and reexport), not every frame like drawtext's X/Y. Text inside {jsonify:} is never read for $(, so user input stays as it was typed: {jsonify:{args}} #$(idx). Write $$( for a literal $(.

tti

Creates a transparent image with centered text on it.

tti MEDIA_KEY FONT_SIZE WRAP_WIDTH COLOR ...TEXT
MEDIA_KEY
the name for the text image
FONT_SIZE
text size
WRAP_WIDTH
width in pixels to wrap lines at
COLOR
color name, RGBA or #HEX, no spaces
...TEXT
the text, wrapped in {jsonify:}
{mediascript:load {iv} img
tti text 40 imgw white {jsonify:hello}
overlay img text (imgw/2)-(textw/2) (imgh/2)-(texth/2)
render img}
→Writes "hello" in the middle of the image.
  • The image is only as big as the text, so use textw / texth to position it with overlay.

ttil

Same as tti, but the text is left-aligned.

ttil MEDIA_KEY FONT_SIZE WRAP_WIDTH COLOR ...TEXT
MEDIA_KEY
the name for the text image
FONT_SIZE
text size
WRAP_WIDTH
width in pixels to wrap lines at
COLOR
color name, RGBA or #HEX, no spaces
...TEXT
the text, wrapped in {jsonify:}

ttir

Same as tti, but the text is right-aligned.

ttir MEDIA_KEY FONT_SIZE WRAP_WIDTH COLOR ...TEXT
MEDIA_KEY
the name for the text image
FONT_SIZE
text size
WRAP_WIDTH
width in pixels to wrap lines at
COLOR
color name, RGBA or #HEX, no spaces
...TEXT
the text, wrapped in {jsonify:}

vegastimecode

timecode

Burns the media's running time onto it in a black box, like VEGAS' (Sony) Timecode effect.

vegastimecode MEDIA_KEY X=right Y=bottom TYPE=drop
MEDIA_KEY
the media to change
X= right
where it sits across, inside a 10% safe marginleft, center, right (or 0, 1, 2)
Y= bottom
where it sits down, inside a 10% safe margintop, center, bottom (or 0, 1, 2)
TYPE= drop
how the time is written: time 00:00:01,335, seconds 1,335, timeframes 00:00:01,10, frames 40,000, feet16/feet35 1+00, SMPTE ivtc (23.976), film (24), ebu (25), nondrop (29.97), drop 00:00:01;10 and smpte30time, seconds, timeframes, frames, feet16, feet35, ivtc, film, ebu, nondrop, drop, smpte30 (or 0..11)
{mediascript:load {video} clip
vegastimecode clip
render clip}
→Drop frame timecode in the bottom right corner, like Vegas' default.
{mediascript:load {video} clip
timecode clip left top film
render clip}
→24 fps film timecode in the top left corner.
  • The time starts at 0 on the first frame, so a still image always shows 0. The SMPTE types count frames at their own rate, not the media's. Its size follows the media's height, and the audio is kept as it is.

Size, Crop & Rotate

Resize, crop, flip and reposition.

contain

Fits the media inside a box and pads the empty space with transparency.

contain MEDIA_KEY WIDTH HEIGHT KERNEL=none
MEDIA_KEY
the media to change
WIDTH
box width in pixels
HEIGHT
box height in pixels
KERNEL= none
NEAREST, BILINEAR, BICUBIC, MITCHELL, CATMULL_ROM, LANCZOS_2, LANCZOS_3, SPLINE_16, SPLINE_36, SPLINE_64

cover

Fills a box completely, cropping off whatever sticks out.

cover MEDIA_KEY WIDTH HEIGHT KERNEL=none
MEDIA_KEY
the media to change
WIDTH
box width in pixels
HEIGHT
box height in pixels
KERNEL= none
NEAREST, BILINEAR, BICUBIC, MITCHELL, CATMULL_ROM, LANCZOS_2, LANCZOS_3, SPLINE_16, SPLINE_36, SPLINE_64

crop

Cuts out a rectangle of the media.

crop MEDIA_KEY WIDTH HEIGHT X=0 Y=0
MEDIA_KEY
the media to change
WIDTH
width of the area to keep
HEIGHT
height of the area to keep
X= 0
left edge of the area
Y= 0
top edge of the area

cropauto

cropsmart

Automatically crops to the objects in the media and follows them from frame to frame.

cropauto MEDIA_KEY ZOOM=false
MEDIA_KEY
the media to change
ZOOM= false
crop every frame to its own objects and scale it up to the biggest crop's size, so they fill it the whole way
{mediascript:load {image} img
cropauto img
render img}
→Crops to the objects in the image.
{mediascript:load {video} clip
cropauto clip zoom
render clip}
→Follows the objects in the video and zooms with them, so they always fill it.
  • The objects are the ones drawobjects boxes, looked for every few frames. Every frame is cropped to the same size, the biggest the box around them gets (with some room), and centered on them, so it moves with them but never zooms. With no objects it trims a plain white or black border instead.
  • With ZOOM every frame is cropped to the box around its own objects and scaled up to that biggest size instead, so the background zooms around them.

cropcircle

Crops the media into a circle with a transparent outside.

cropcircle MEDIA_KEY
MEDIA_KEY
the media to change

cropface

Crops the media to one face and follows it from frame to frame.

cropface MEDIA_KEY FACE=0 ZOOM=false
MEDIA_KEY
the media to change
FACE= 0
the number drawfaces puts on the face, it keeps that number on every frame0..99
ZOOM= false
crop every frame to its own face and scale it up to the biggest face's size, so the face stays the same size
{mediascript:load {video} clip
cropface clip
render clip}
→Follows the first face found in the video.
{mediascript:load {image} img
cropface img 1
render img}
→Crops to the second face (the one drawfaces numbers 1).
{mediascript:load {video} clip
cropface clip 0 zoom
render clip}
→Follows the first face and zooms with it, so it stays the same size.
  • Every frame is cropped to the same size, the biggest the face gets (with some room around it), and centered on the face, so it moves with the face but never zooms. Frames it isn't found on take its place from the frames around them.
  • With ZOOM every frame is cropped to its own face (with the same room) and scaled up to that biggest size instead, so the face stays the same size and the background zooms around it.

cropnft

croptwitterhex

Crops the media into a hexagon, like Twitter NFT avatars.

cropnft MEDIA_KEY
MEDIA_KEY
the media to change

croptriangle

Crops the media into a triangle with a transparent outside.

croptriangle MEDIA_KEY
MEDIA_KEY
the media to change

fit

Shrinks or grows the media to fit inside a box, keeping its shape.

fit MEDIA_KEY WIDTH HEIGHT KERNEL=none
MEDIA_KEY
the media to change
WIDTH
box width in pixels
HEIGHT
box height in pixels
KERNEL= none
NEAREST, BILINEAR, BICUBIC, MITCHELL, CATMULL_ROM, LANCZOS_2, LANCZOS_3, SPLINE_16, SPLINE_36, SPLINE_64

flip

Flips the media upside down (vertical flip).

flip MEDIA_KEY
MEDIA_KEY
the media to change

flop

Mirrors the media left to right (horizontal flip).

flop MEDIA_KEY
MEDIA_KEY
the media to change

offset

Shifts the picture inside its canvas by X and/or Y pixels, wrapping around the edges or onto a background.

offset MEDIA_KEY X=0 Y=0 BACKGROUND=none
MEDIA_KEY
the media to change
X= 0
horizontal shift, positive moves right
Y= 0
vertical shift, positive moves down
BACKGROUND= none
a color, mostused or transparent to move without wrapping around
{mediascript:load {iv} img
offset img 100 -50 transparent
render img}
→Moves the image 100 pixels right and 50 up, leaving a transparent gap.
  • Without a background, what leaves one edge comes back in on the other. Videos can't be transparent, so a transparent background is black on them.

pad

Pads the media out to an exact size with transparency, shrinking it only when it's bigger than the box.

pad MEDIA_KEY WIDTH HEIGHT KERNEL=none
MEDIA_KEY
the media to change
WIDTH
box width in pixels
HEIGHT
box height in pixels
KERNEL= none
NEAREST, BILINEAR, BICUBIC, MITCHELL, CATMULL_ROM, LANCZOS_2, LANCZOS_3, SPLINE_16, SPLINE_36, SPLINE_64

resize

Resizes to an exact width and height (stretching if needed).

resize MEDIA_KEY WIDTH HEIGHT KERNEL=none
MEDIA_KEY
the media to change
WIDTH
new width in pixels
HEIGHT
new height in pixels
KERNEL= none
resampling method, e.g. NEAREST for crisp pixel artNEAREST, BILINEAR, BICUBIC, MITCHELL, CATMULL_ROM, LANCZOS_2, LANCZOS_3, SPLINE_16, SPLINE_36, SPLINE_64

rotate

Rotates the media by a number of degrees.

rotate MEDIA_KEY DEGREES=90 FILLCOLOR=none|black CROP=false
MEDIA_KEY
the media to change
DEGREES= 90
how far to rotate-360..360
FILLCOLOR= none|black
color for the uncovered corners, as image_color|video_color or one color for both
CROP= false
crop back to the original size
{mediascript:load {iv} img
rotate img 45 white
render img}
→Tilts the image 45 degrees on a white background.
  • Images get transparent corners by default and videos get black ones, since video can't be transparent.

scale

Resizes by a multiplier, e.g. 0.5 for half size or 2 for double.

scale MEDIA_KEY SCALE=2 KERNEL=none
MEDIA_KEY
the media to change
SCALE= 2
the multiplier; the result stops at the max sizemore than 0
KERNEL= none
NEAREST, BILINEAR, BICUBIC, MITCHELL, CATMULL_ROM, LANCZOS_2, LANCZOS_3, SPLINE_16, SPLINE_36, SPLINE_64

stretch

Stretches the width and/or height by a multiplier.

stretch MEDIA_KEY WIDTH=1.0 HEIGHT=1.0 CROP=FALSE
MEDIA_KEY
the media to change
WIDTH= 1.0
width multiplier0.01..3
HEIGHT= 1.0
height multiplier0.01..3
CROP= FALSE
crop back to the original size

trim

Trims away black borders around the media.

trim MEDIA_KEY THRESHOLD=10
MEDIA_KEY
the media to change
THRESHOLD= 10
how dark a border must be to count as black0..100000

uncaption

Crops off a caption bar that sits above the media.

uncaption MEDIA_KEY TOLERANCE=35
MEDIA_KEY
the media to change
TOLERANCE= 35
how far from white the caption background may be0..255

Time & Frames

Trim, loop, speed up, reverse and control frames.

clonesnip

copysnip

Copies a section of the media into a new key, leaving the original alone.

clonesnip MEDIA_KEY MEDIA_KEY_2 START=0 END?
MEDIA_KEY
the media to copy from
MEDIA_KEY_2
the name for the snipped copy
START= 0
start time in seconds
END
end time in seconds; leave out for the end

fadein

Fades the media in from a color at the start.

fadein MEDIA_KEY DURATION=0.5 COLOR=black
MEDIA_KEY
the media to change
DURATION= 0.5
fade length in seconds0..120
COLOR= black
color to fade from

fadeout

Fades the media out to a color at the end.

fadeout MEDIA_KEY DURATION=0.5 COLOR=black
MEDIA_KEY
the media to change
DURATION= 0.5
fade length in seconds0..120
COLOR= black
color to fade to

repeat

Plays the media several times in a row.

repeat MEDIA_KEY AMOUNT=2
MEDIA_KEY
the media to change
AMOUNT= 2
how many times to repeat

repeatduration

Loops the media until it is a certain length.

repeatduration MEDIA_KEY DURATION
MEDIA_KEY
the media to change
DURATION
total length in seconds

reverse

Plays the media backwards.

reverse MEDIA_KEY AUDIO=true
MEDIA_KEY
the media to change
AUDIO= true
reverse the audio too

seesaw

Plays the media forwards, then in reverse.

seesaw MEDIA_KEY
MEDIA_KEY
the media to change
  • Works on audio, GIFs and videos.

setfps

Sets the frames per second.

setfps MEDIA_KEY AMOUNT
MEDIA_KEY
the media to change
AMOUNT
frames per second1..90

setframecount

Duplicates or drops frames to reach an exact frame count. Great for turning stills into GIFs.

setframecount MEDIA_KEY AMOUNT
MEDIA_KEY
the media to change
AMOUNT
the number of frames you want1..10000
  • setframecount img max(10,imgfc) makes sure there are at least 10 frames.

setframedelay

Sets how long each frame is shown.

setframedelay MEDIA_KEY AMOUNT
MEDIA_KEY
the media to change
AMOUNT
delay per frame in milliseconds0 and up

setloop

Sets how many times an animated image loops.

setloop MEDIA_KEY AMOUNT=0
MEDIA_KEY
the media to change
AMOUNT= 0
number of loops; 0 loops forever0..65535
{mediascript:load {avatar} pfp
spin pfp
setloop pfp 1
render pfp image/gif}
→A spinning avatar GIF that only plays once.
  • Only does something for images (GIF, WebP, APNG); audio and video are left alone.

shuffle

Chops the media into segments and shuffles their order.

shuffle MEDIA_KEY SEGMENT=0.5
MEDIA_KEY
the media to change
SEGMENT= 0.5
segment length in seconds0.1..120

snip

Keeps only part of the media's duration.

snip MEDIA_KEY START END? LOOP=false AUDIO_ONLY=false
MEDIA_KEY
the media to change
START
start time in seconds; negative counts back from the end
END
end time in seconds; negative counts back from the end; leave out for the end
LOOP= false
loop the media instead of stopping at its end, so times past the end go back around
AUDIO_ONLY= false
cut only the audio, the video keeps its length
{mediascript:load {video} clip
snip clip -5
render clip}
→Keeps the last 5 seconds.
{mediascript:load {video} v
snip v 39 159 loop
render v}
→On a 30 second video, 120 seconds starting 9 seconds in, looping back to the start each time it ends.
  • With LOOP, END is still a time and not a length: 39 159 is always 120 seconds long, only START wraps around. The clip can be at most 600 seconds.
  • Unlike repeatduration, which always starts from the beginning, LOOP keeps any start time safe to use, even one past the end.

snipframes

Keeps only a range of frames.

snipframes MEDIA_KEY START_FRAME END_FRAME=MEDIA_KEYfc
MEDIA_KEY
the media to change
START_FRAME
first frame to keep
END_FRAME= MEDIA_KEYfc
frame to stop at

speed

Speeds up or slows down playback.

speed MEDIA_KEY SPEED=2 PITCH=false
MEDIA_KEY
the media to change
SPEED= 2
the speed multiplier, e.g. 2 for double speed or 0.5 for half; 0 leaves it as is. Audio and video stay between 0.5 and 100more than 0
PITCH= false
let the audio's pitch follow the speed like a sped up tape, higher when faster and lower when slower; otherwise the pitch stays the same

stammer

Rebuilds the media from its own frames so it "plays" another clip's audio.

stammer MEDIA_KEY MODULATOR_MEDIA_KEY MATCHER_MODE=basic COLOR_MODE=full
MEDIA_KEY
the carrier media whose audio and video frames get cut up
MODULATOR_MEDIA_KEY
the media whose audio is matched
MATCHER_MODE= basic
basic uses the most similar frame, combination blends several, unique uses each carrier frame once, weighted uses A-weighted audio matchingbasic, combination, unique, weighted
COLOR_MODE= full
fast_8 is fast 8-bit with a default palette, full_8 is slow 8-bit with a custom palette, full is fast 16-bitfast_8, full_8, full
{mediascript:load {video} carrier
load {audio} song
stammer carrier song
render carrier video/mp4}
→The video's own sounds rearranged to mimic the song.
  • Both media must have audio.

Combine & Mask

Overlay, join and cut out media.

abovehead

faceabove

Puts an image above people's heads, every head or the ones you pick.

abovehead MEDIA_KEY IMAGE_MEDIA_KEY FACES=none SIZE=1
MEDIA_KEY
the media to change
IMAGE_MEDIA_KEY
what floats above the heads (its first frame)
FACES= none
the numbers drawfaces puts on the faces whose heads get it, split by commas, like 1,0 (every head when left out)
SIZE= 1
how big the image is, in heads0.25..3
{mediascript:load {iv} img
load {avatar} me
abovehead img me
render img}
→Your avatar above everyone's head.
{mediascript:load {iv} img
load {avatar} me
abovehead img me 1 1.5
render img}
→Only face 1 (from drawfaces) gets your avatar, a bit bigger.
  • Run it again with another image and other faces to give different people different images.
  • When a head is too close to the top the media grows upwards to fit the image, and on GIFs and videos it follows each head.

achievement

Puts an Xbox style "Achievement unlocked" popup on the media.

achievement MEDIA_KEY GAMERSCORE=100 ...TEXT
MEDIA_KEY
the media to change
GAMERSCORE= 100
the score shown on the popup0..9999
...TEXT
the achievement, up to 100 characters
{mediascript:load {iv} img
achievement img GAMERSCORE=50 touched grass
render img}
→The last image or video with a 50G "touched grass" achievement popup.

adhd

Stacks random gameplay footage under the media.

adhd MEDIA_KEY HORIZONTAL=false
MEDIA_KEY
the media to change
HORIZONTAL= false
put the footage next to the media instead
  • Works on audio too. The result is always a video.

autosubtitle

autosubtitlesautosub

Subtitles what's said in the media, found with speech recognition and burned in like subtitle.

autosubtitle MEDIA_KEY HIGHLIGHT=false YELLOW=false FONT=arial TRANSLATE=es
MEDIA_KEY
an audio or video with speech
HIGHLIGHT= false
show a few words at a time with the one being said in the other color
YELLOW= false
DVD style yellow subtitles instead of white
FONT= arial
a bundled font's name, a command font name (like IMPACT) or a loadfont key; left out, your Default Font setting (then the server's) comes before arial
TRANSLATE= none
a language code (like es, ja or zh-CN) to translate the subtitles into; HIGHLIGHT is ignored then, since a translation has no word timings. Speech already in that language is left as heard
{mediascript:load {video} clip
autosubtitle clip
render clip}
→The clip with subtitles of what's said in it.
{mediascript:load {audio} voice
autosubtitle voice HIGHLIGHT=true FONT=impact
render voice}
→A black video with the audio, its words highlighted in Impact as they're said.
{mediascript:load {video} clip
autosubtitle clip TRANSLATE=es
render clip}
→The clip with Spanish subtitles of what's said in it, whatever language it's in.
  • An audio gets a black 1280x720 video. Only the first 15 minutes are listened to. The result is an mp4. Counts toward the ffmpeg limit.
  • The same effect is the .autosubtitle command (/media-av-tools auto-subtitle), which also takes your saved fonts. .autosubtitletranslate (/media-av-tools auto-subtitle-translate) is the TRANSLATE version, in your language unless you pick another.

backgroundremove

bgrm

Removes the background with AI, leaving the subject on transparency.

backgroundremove MEDIA_KEY MODEL=ISNET_GENERAL_USE TRIM=false
MEDIA_KEY
the media to change
MODEL= ISNET_GENERAL_USE
which model to use, e.g. ISNET_ANIME for drawings or BIREFNET_PORTRAIT for peopleBIREFNET_GENERAL, BIREFNET_GENERAL_LITE, BIREFNET_PORTRAIT, ISNET_ANIME, ISNET_GENERAL_USE, U2NET, U2NET_CLOTH_SEG, U2NET_HUMAN_SEG
TRIM= false
cut away the transparent edges left around the subject
  • On GIFs and videos repeated frames only count once. The BIREFNET_ models take one frame (still images), ISNET_ANIME, ISNET_GENERAL_USE and U2NET_CLOTH_SEG up to 128 different frames, the rest any amount within the usual frame limit.

bill

Engraves the media onto a 100 dollar bill.

bill MEDIA_KEY
MEDIA_KEY
the media to change

blend

Places one media on top of another using a blend mode, like layer blend modes in image editors.

blend MEDIA_KEY MEDIA_KEY_2 MODE X=0 Y=0 LOOP=TRUE OPACITY=100
MEDIA_KEY
the bottom media (gets changed)
MEDIA_KEY_2
the media to put on top
MODE
how the top media mixes with the bottom one (normal is the same as overlay)normal, add, burn, darken, difference, dodge, exclusion, hardlight, lighten, multiply, overlay, screen, softlight
X= 0
left position of the top media
Y= 0
top position of the top media
LOOP= TRUE
loop the shorter media to match the longer one
OPACITY= 100
opacity of the top media0..100
{mediascript:load {iv} img
load https://cdn.nsb.gg/assets/samples/gradient.png grad
resize grad imgw imgh
blend img grad multiply
render img}
→Darkens and tints the image with a sunset gradient stretched over it.
{mediascript:load {video} clip
load {avatar} pfp
blend clip pfp screen 10 10 opacity=60
render clip}
→Screens the avatar onto the top left of a video at 60% opacity.
  • The top media isn't resized, use resize first to cover the whole bottom media. Transparent parts of the top media are left out of the blend.

burn

Draws the media on a burning photo.

burn MEDIA_KEY ANIMATED=true
MEDIA_KEY
the media to change
ANIMATED= true
false gives a still

chromakey

Removes a color, like a green screen.

chromakey MEDIA_KEY COLOR=black SIMILARITY=0.01 BLEND=0 CONVERT=None
MEDIA_KEY
the media to change
COLOR= black
the color to remove (mostused works)
SIMILARITY= 0.01
how close a color must be to be removed0.01..1.0
BLEND= 0
how softly the edges blend0.0..1.0
CONVERT= None
an image or video mimetype to convert to
  • Video can't be transparent, so removed areas in a video turn black.

colorremove

Removes the most used color (usually the background), like the color remove command.

colorremove MEDIA_KEY COLOR=mostused SIMILARITY=0.1 BLEND=0 CONVERT=None
MEDIA_KEY
the media to change
COLOR= mostused
the color to remove
SIMILARITY= 0.1
how close a color must be to be removed0.01..1.0
BLEND= 0
how softly the edges blend0.0..1.0
CONVERT= None
an image or video mimetype to convert to
  • chromakey with different defaults. Video can't be transparent, so removed areas in a video turn black.

concat

Plays one media after another.

concat MEDIA_KEY MEDIA_KEY_2
MEDIA_KEY
the first media (gets changed)
MEDIA_KEY_2
the media to add to the end

concatmultiple

Plays several media one after another. Much faster than chaining concat.

concatmultiple MEDIA_KEY MEDIA_KEY_2 MEDIA_KEY_3 ...
MEDIA_KEY
the first media (gets changed)
MEDIA_KEY_2
the next media
...MEDIA_KEY_3
any number of further media keys

croptransparency

Uses one media as a transparency mask for another.

croptransparency MEDIA_KEY MEDIA_KEY_2
MEDIA_KEY
the media to change
MEDIA_KEY_2
the mask

demotivate

demotivational

Turns the media into a demotivational poster: framed on black with a big serif title and a line under it.

demotivate MEDIA_KEY ...TEXT
MEDIA_KEY
the media to change
...TEXT
title | line, the line after | is optional
{mediascript:load {iv} img
demotivate img teamwork | none of us is as dumb as all of us
render img}
→The last image or video as a TEAMWORK demotivational poster.

drawfaces

Puts a translucent numbered oval over every face found.

drawfaces MEDIA_KEY
MEDIA_KEY
the media to change
  • Handy to see which faces the face effects will find.
  • A face keeps its number on every frame, even after it goes missing for a while. The first frame's faces are numbered biggest first, faces that show up later get the next numbers. It's the FACE that cropface and the face effects take.

drawobjects

Draws a labeled box around every object found.

drawobjects MEDIA_KEY
MEDIA_KEY
the media to change
  • Each label is the object's name and how sure the detector is, the same objects cropauto crops to. The same kind of object always gets the same color.
  • Animations get looked at every few frames, the frames between keep the boxes of the last one.

eyes

Puts new eyes over every detected eye.

eyes MEDIA_KEY TYPE=EYE FLIPPED=false
MEDIA_KEY
the media to change
TYPE= EYE
BIG, BLOODSHOT, CENTER, EYE, FLARE_BLACK, FLARE_BLUE, FLARE_GREEN, FLARE_PINK, FLARE_RED, FLARE_WHITE, FLARE_YELLOW, GOOGLY, ILLUMINATI, LASER_BLUE, LASER_GREEN, LASER_RED, LASER_YELLOW, LIGHTNING_BLUE, LIGHTNING_GREEN, LIGHTNING_PINK, LIGHTNING_RED, MONEY, RED, SMALL, SPINNER, SPONGEBOB
FLIPPED= false
mirror the eye image
  • LASER_ types fire beams out of the eyes along where the head faces, LIGHTNING_ types make the eyes glow with lightning crackling off them (FLIPPED does nothing for either).

facecutout

Cuts the eyes and mouth out of the biggest face and pastes them back bigger, like a talking object.

facecutout MEDIA_KEY COVER_MEDIA_KEY=none COLOR=none SIZE=1.8 FACE=none
MEDIA_KEY
the media to change
COVER_MEDIA_KEY= none
a media (its first frame) put over the face, under the eyes and mouth
COLOR= none
without a cover media, a blob of this color covers the face instead
SIZE= 1.8
how much bigger the eyes and mouth get1..3
FACE= none
the number drawfaces puts on a face, to use that face and follow it through the frames instead of the biggest one on every frame0..99
{mediascript:load {video} clip
load {avatar} logo
facecutout clip logo
render clip}
→Your avatar covers the face in the video, with the face's own eyes and mouth talking on top of it.
{mediascript:load {iv} img
facecutout img none #3399ff 2.4
render img}
→A blue blob with big eyes and a big mouth.
  • With neither a cover nor a color, the bigger eyes and mouth go over the face itself.
  • The eyes and mouth follow the face through a video's frames, so it still talks and blinks.

facefeaturesswap

Keeps the face but poses it like another media's face.

facefeaturesswap MEDIA_KEY DRIVING_MEDIA_KEY REGIONS=ALL MODE=RELATIVE MULTIPLIER=1
MEDIA_KEY
the media whose face gets posed (its first frame)
DRIVING_MEDIA_KEY
the media with the pose and expression to copy (its first frame)
REGIONS= ALL
which parts to copyALL, EXPRESSION, POSE, LIPS, EYES
MODE= RELATIVE
RELATIVE adds the driving face's expression to the face's own, ABSOLUTE copies it as it isRELATIVE, ABSOLUTE
MULTIPLIER= 1
how strongly0..2
  • The result is a still image: a gif or video gives its first frame.
  • Uses AI, and counts towards the 20 AI requests a script can make (shared with edit and imagine).

facefilter

Puts a Snapchat style face filter on every face.

facefilter MEDIA_KEY FILTER=DOG
MEDIA_KEY
the media to change
FILTER= DOG
dog, dalmatian or pig ears and nose (the dogs stick their tongue out), heart ears, a flower crown or a rainbow wigDOG, DALMATIAN, HEARTS, PIG, FLOWERS, WIG
  • The ears, crown and wig sit on top of the head and turn with it, the nose and tongue go on the face. Heads without a face found, like anime, drawings or the back of a head, get the parts that go on the head, and on GIFs and videos the filter follows each face.

facehalloweenhat

Puts a Halloween hat on top of every head.

facehalloweenhat MEDIA_KEY HAT=WITCH
MEDIA_KEY
the media to change
HAT= WITCH
WITCH, WITCH_BUCKLE, TOP_HAT
  • Sits on top of the head (big hair raises it) and turns with it. Heads without a face found, like anime, drawings or the back of a head, get one too, and on GIFs and videos it follows each face.

facejoy

Puts a 😂 emoji over every face.

facejoy MEDIA_KEY
MEDIA_KEY
the media to change

faceknight

Puts the biggest face on a knight with a sword.

faceknight MEDIA_KEY FACE=none
MEDIA_KEY
the media to change
FACE= none
the number drawfaces puts on a face, to use that face and follow it through the frames instead of the biggest one on every frame0..99

facelenin

Puts the faces into an old sepia photo with Lenin.

facelenin MEDIA_KEY
MEDIA_KEY
the media to change

facemonalisa

Puts the biggest face onto the Mona Lisa.

facemonalisa MEDIA_KEY FACE=none
MEDIA_KEY
the media to change
FACE= none
the number drawfaces puts on a face, to use that face and follow it through the frames instead of the biggest one on every frame0..99

facemood

Gives the faces in the media a mood.

facemood MEDIA_KEY MOOD MAX_FACES=8
MEDIA_KEY
the media to change
MOOD
ANGRY, GRUMPY, SAD, SMUG, SURPRISED
MAX_FACES= 8
how many of the biggest faces to change1..8
  • Uses AI, and counts towards the 20 AI requests a script can make (shared with edit and imagine).

facemountrushmore

Carves the biggest face into Mount Rushmore.

facemountrushmore MEDIA_KEY FACE=none
MEDIA_KEY
the media to change
FACE= none
the number drawfaces puts on a face, to use that face and follow it through the frames instead of the biggest one on every frame0..99

faceswap

Swaps another media's face onto the faces in the media.

faceswap MEDIA_KEY FACE_MEDIA_KEY MAX_FACES=1
MEDIA_KEY
the media whose faces get replaced (its first frame)
FACE_MEDIA_KEY
the media with the face to use (its first frame)
MAX_FACES= 1
how many of the biggest faces to replace1..8
  • The result is a still image: a gif or video gives its first frame.
  • Uses AI, and counts towards the 20 AI requests a script can make (shared with edit and imagine).

faceswappreset

Swaps one of the bot's faces onto the faces in the media.

faceswappreset MEDIA_KEY NAME MAX_FACES=8
MEDIA_KEY
the media to change
NAME
whose faceBUSCEMI, CHAD, KIRK
MAX_FACES= 8
how many of the biggest faces to replace1..8
  • Uses AI, and counts towards the 20 AI requests a script can make (shared with edit and imagine).

facexmascap

Puts a Santa hat on top of every head.

facexmascap MEDIA_KEY COLOR=RED
MEDIA_KEY
the media to change
COLOR= RED
RED, BLUE
  • Sits on top of the head (big hair raises it) and turns with it. Heads without a face found, like anime, drawings or the back of a head, get one too, and on GIFs and videos it follows each face.

flies

overlayflies

Adds flies buzzing around the media.

flies MEDIA_KEY AMOUNT=1 DEGREES=none SPEED=none FLY_MEDIA=none
MEDIA_KEY
the media to change
AMOUNT= 1
1..100
DEGREES= none
turn the fly image; none is the fly's own angle-360..360
SPEED= none
0.01..1000
FLY_MEDIA= none
media key to use as the fly instead of the default one
  • A still image becomes an animated GIF.

giggles

Every face gets its biggest smile, a propeller cap and a lollipop, over a dreamy rainbow sky.

giggles MEDIA_KEY
MEDIA_KEY
the media to change
  • Always a still: GIFs give their first frame and videos a frame a bit in. The background is removed and swapped for the sky (a dolphin, hot air balloons and flowers around the edges). The lollipop is added even without a face, next to whatever is left. Counts as an ML request.

instantcamera

Turns the media into an instant camera photo with a handwritten caption.

instantcamera MEDIA_KEY ...TEXT?
MEDIA_KEY
the media to change
...TEXT
optional caption, up to 40 characters

interpolate

Cuts between two videos every few moments, alternating slices of each.

interpolate MEDIA_KEY MEDIA_KEY_2 SEGMENT=0.125 LOOP=true
MEDIA_KEY
the first video (gets changed)
MEDIA_KEY_2
the video to cut in
SEGMENT= 0.125
length of each slice in seconds0.1..10
LOOP= true
repeat the shorter one so both last the whole time
{mediascript:load {video} a
clone a b
reverse b
interpolate a b 0.5
render a video/mp4}
→Cuts between the video and a reversed copy of it every half second.
  • MEDIA_KEY_2 is resized to fit MEDIA_KEY.
  • Meant for two videos; images and audio-only clips aren't supported.

join

Puts two media side by side, or one above the other.

join MEDIA_KEY MEDIA_KEY_2 VERTICAL=false LOOP=true NORESIZE=false
MEDIA_KEY
the first media (gets changed)
MEDIA_KEY_2
the media to add
VERTICAL= false
stack top to bottom instead of left to right
LOOP= true
loop the shorter media to match the longer one
NORESIZE= false
don't resize them to match

kinerender

Plays back a KineMaster project with every one of its videos, pictures and sounds replaced by your media.

kinerender MEDIA_KEY KINE_KEY
MEDIA_KEY
the media to change
KINE_KEY
a project from loadkine
{mediascript:load {iv} logo
loadkine https://cdn.nsb.gg/assets/samples/preview2.kine p2
kinerender logo p2
render logo}
→The project rebuilt with the last image or video in every clip.
  • Rebuilt: the main track's clips (trim, speed and speed ramps, reverse, flip, rotation, crop/zoom, vignette) and transitions, the sound (pitch, volume, envelopes, voice changer, equalizer, reverb, audio clips and fades), video and image layers (position, size, turn, opacity, blend modes, keyframes, motion tracking, masks, chroma key and animations), text layers, stickers and handwriting, every adjustment slider, KineMaster's 90 built-in color filters and the 100 from its free store packs, and nearly all of the free asset store effects. Clip graphics, Premium store effects and a few others are skipped. The full list is in the KineMaster projects section.
  • Scaled down to fit 1280x720, at most 10 minutes. Counts toward the ffmpeg limit and has to finish within the script's time limit.
  • Outside of tags, the bot has the same thing as the .kine command (the .kine attached or its url first, then the media) and /media-aiv kine.

latte

Draws the media on a latte.

latte MEDIA_KEY
MEDIA_KEY
the media to change

museum

Hangs the media in a museum frame.

museum MEDIA_KEY
MEDIA_KEY
the media to change

news

Puts a TV news lower third on the media: a red label tab over a white headline bar, with an optional ticker under it.

news MEDIA_KEY LABEL="BREAKING NEWS" ...TEXT
MEDIA_KEY
the media to change
LABEL= BREAKING NEWS
the red tab, up to 30 characters
...TEXT
headline | ticker, headline up to 150 characters, the ticker after | is optional
{mediascript:load {iv} img
news img LABEL=LIVE local man finds bug in prod | more at 11
render img}
→The last image or video with a LIVE news headline and a ticker.

notification

Puts an iPhone Messages notification banner along the top of the media.

notification MEDIA_KEY ...TEXT
MEDIA_KEY
the media to change
...TEXT
title | message, or just the message under the title "Messages"

oldtv

Shows the media on an old TV.

oldtv MEDIA_KEY ANIMATED=true GRAYSCALE=false
MEDIA_KEY
the media to change
ANIMATED= true
false gives a bigger still
GRAYSCALE= false

overlay

Places one media on top of another at a position.

overlay MEDIA_KEY MEDIA_KEY_2 X=0 Y=0 COLOR=none SIMILARITY=0.1 BLEND=0 LOOP=TRUE OPACITY=100 RESIZE=none FADE=false FADE_START=0 FADE_DURATION=0 POSITION=none
MEDIA_KEY
the background media (gets changed)
MEDIA_KEY_2
the media to put on top
X= 0
left position of the top media; can use mw/mh (the media's size) and ow/oh (the top media's, after RESIZE)
Y= 0
top position of the top media
COLOR= none
a color to key out of the top media (like a green screen)
SIMILARITY= 0.1
how close a color must be to be keyed out0.01..1
BLEND= 0
how softly keyed edges blend0.0..1.0
LOOP= TRUE
loop the shorter media to match the longer one
OPACITY= 100
opacity of the top media0..100
RESIZE= none
fit, contain, cover or force with a size, like fit(mw,mh) (fits inside the media) or cover(256,256); none keeps its own size
FADE= false
fade the top media in, from invisible up to its opacity
FADE_START= 0
seconds in when the fade starts0..120
FADE_DURATION= 0
seconds the fade takes; 0 is until the end0..120
POSITION= none
a grid spot: topleft, top, topright, left, center, right, bottomleft, bottom, bottomright, or a cell like 3x3:2 (COLUMNSxROWS:CELL, counted from 1 left to right then down). Shrinks the top media to fit that cell (never enlarges it) and centers it there; an X, Y or RESIZE you give still wins
{mediascript:load {iv} img
load {avatar} pfp
overlay img pfp (imgw/2)-(pfpw/2) (imgh/2)-(pfph/2)
render img}
→Puts the avatar in the middle of the image.
{mediascript:load {iv} img
load {avatar} pfp
overlay img pfp x="(mw-ow)/2" y="(mh-oh)/2" resize="fit(mw,mh)" fade=true
render img}
→Fits the avatar inside the image, centers it and fades it in (what the overlay command does).
{mediascript:load {video} clip
load https://cdn.nsb.gg/assets/samples/greenscreen.mp4 gs
overlay clip gs color=lime similarity=0.3 blend=0.2
render clip}
→Overlays a green-screen video with the green removed.
{mediascript:load {iv} img
load {avatar} pfp
overlay img pfp position=bottomright
render img}
→Puts the avatar in the bottom right ninth of the image, shrunk to fit if it is bigger.

overlayface

Detects faces and pastes media over the face, eyes or mouth.

overlayface MEDIA_KEY FACE_MEDIA=none LEFT_EYE_MEDIA=none RIGHT_EYE_MEDIA=none MOUTH_MEDIA=none FACE_SCALE=1.35 EYE_SCALE=0.5
MEDIA_KEY
the media with faces in it
FACE_MEDIA= none
media key to cover each face with
LEFT_EYE_MEDIA= none
media key for left eyes
RIGHT_EYE_MEDIA= none
media key for right eyes
MOUTH_MEDIA= none
media key for mouths
FACE_SCALE= 1.35
size of the face overlay compared to the face0.01..1000
EYE_SCALE= 0.5
size of the eye overlays

overlaypreset

preset

Applies one of the bot's overlay templates, like wasted or a flag.

overlaypreset MEDIA_KEY NAME
MEDIA_KEY
the media to change
NAME
the template; dashes, underscores and case don't matter (flagusa works)9gag, adidas, bandicam, binoculars, black-panther, brazzers, cool-guy, dork, flag-afghanistan, flag-albania, flag-algeria, flag-andorra, flag-angola, flag-antigua, flag-argentina, flag-armenia, flag-asexual, flag-australia, flag-austria, flag-azerbaijan, flag-bahamas, flag-bahrain, flag-bangladesh, flag-barbados, flag-belarus, flag-belgium, flag-belize, flag-benin, flag-bhutan, flag-bisexual, flag-bolivia, flag-bosnia, flag-botswana, flag-brazil, flag-brunei, flag-bulgaria, flag-burkina-faso, flag-burundi, flag-cambodia, flag-cameroon, flag-canada, flag-cape-verde, flag-central-african-republic, flag-chad, flag-chile, flag-china, flag-colombia, flag-comoros, flag-congo, flag-costa-rica, flag-croatia, flag-cuba, flag-cyprus, flag-czechia, flag-denmark, flag-djibouti, flag-dominica, flag-dominican-republic, flag-dr-congo, flag-east-timor, flag-ecuador, flag-egypt, flag-el-salvador, flag-england, flag-equatorial-guinea, flag-eritrea, flag-estonia, flag-eswatini, flag-ethiopia, flag-eu, flag-fiji, flag-finland, flag-france, flag-gabon, flag-gambia, flag-georgia, flag-germany, flag-ghana, flag-greece, flag-grenada, flag-guatemala, flag-guinea, flag-guinea-bissau, flag-guyana, flag-haiti, flag-honduras, flag-hong-kong, flag-hungary, flag-iceland, flag-india, flag-indonesia, flag-iran, flag-iraq, flag-ireland, flag-isis, flag-israel, flag-italy, flag-ivory-coast, flag-jamaica, flag-japan, flag-jordan, flag-kazakhstan, flag-kenya, flag-kiribati, flag-kosovo, flag-kuwait, flag-kyrgyzstan, flag-laos, flag-latvia, flag-lebanon, flag-lesbian, flag-lesotho, flag-lgbt, flag-liberia, flag-libya, flag-liechtenstein, flag-lithuania, flag-luxembourg, flag-macau, flag-madagascar, flag-malawi, flag-malaysia, flag-maldives, flag-mali, flag-malta, flag-marshall-islands, flag-mauritania, flag-mauritius, flag-mexico, flag-micronesia, flag-mlm, flag-moldova, flag-monaco, flag-mongolia, flag-montenegro, flag-morocco, flag-mozambique, flag-myanmar, flag-namibia, flag-nauru, flag-nepal, flag-netherlands, flag-new-zealand, flag-nicaragua, flag-niger, flag-nigeria, flag-nonbinary, flag-north-korea, flag-north-macedonia, flag-norway, flag-oman, flag-pakistan, flag-palau, flag-palestine, flag-panama, flag-pansexual, flag-papua-new-guinea, flag-paraguay, flag-peru, flag-philippines, flag-poland, flag-portugal, flag-qatar, flag-romania, flag-russia, flag-rwanda, flag-saint-kitts, flag-saint-lucia, flag-saint-vincent, flag-samoa, flag-san-marino, flag-sao-tome, flag-saudi-arabia, flag-scotland, flag-senegal, flag-serbia, flag-seychelles, flag-sierra-leone, flag-singapore, flag-slovakia, flag-slovenia, flag-solomon-islands, flag-somalia, flag-south-africa, flag-south-korea, flag-south-sudan, flag-spain, flag-sri-lanka, flag-sudan, flag-suriname, flag-sweden, flag-switzerland, flag-syria, flag-taiwan, flag-tajikistan, flag-taliban, flag-tanzania, flag-thailand, flag-togo, flag-tonga, flag-trans, flag-trinidad, flag-tunisia, flag-turkey, flag-turkmenistan, flag-tuvalu, flag-uae, flag-uganda, flag-uk, flag-ukraine, flag-uruguay, flag-usa, flag-ussr, flag-uzbekistan, flag-vanuatu, flag-vatican, flag-venezuela, flag-vietnam, flag-wales, flag-yemen, flag-zambia, flag-zimbabwe, god, gold-star, half-life-pistol, half-life-shotgun, half-life-smg, hypercam, keep-item, mistake, not-responding, old-guy, owo, pat, ajit-pai-1, austin-evans-1, bernie-1, bob-ross, gaben-1, idubbbz-1, jacksfilms-1, jesus-1, keemstar-1, keemstar-2, ltt-linus-1, miranda-cosgrove-1, stephen-hawking-1, trump-1, zuckerberg-1, respects, shutterstock, starman, supreme, thinking, vhs, wasted, wheeze, who-did-this, yusuke
{mediascript:load {iv} img
overlaypreset img wasted
render img}
→The GTA "wasted" screen over the image.

rtx

Puts two medias side by side with RTX OFF and RTX ON badges.

rtx MEDIA_KEY MEDIA_KEY_2
MEDIA_KEY
the "off" side, the result goes here
MEDIA_KEY_2
the "on" side

snapchat

Puts a Snapchat style caption on the media, white text on a see-through black bar across the width.

snapchat MEDIA_KEY POSITION=50 ...TEXT
MEDIA_KEY
the media to change
POSITION= 50
where the bar's center goes, 0 is the top and 100 the bottom0..100
...TEXT
the caption, up to 200 characters
{mediascript:load {iv} img
snapchat img POSITION=75 me at 3am
render img}
→The last image or video with a "me at 3am" Snapchat caption in its lower part.

speechbubble

overlayspeechbubble

The speech bubble reaction meme: a bubble at the top with its tail pointing down beside the biggest face.

speechbubble MEDIA_KEY DIRECTION=AUTO TRANSPARENT=true
MEDIA_KEY
the media to change
DIRECTION= AUTO
where the tail points: AUTO beside the face on the side with more room, LEFT or RIGHT of the face, CENTER straight down onto the head (without a face they point down at that side)AUTO, LEFT, CENTER, RIGHT
TRANSPARENT= true
cut the bubble out of the media, false draws it whitetrue, false
{mediascript:load {iv} img
speechbubble img right
render img}
→The last image or video with a speech bubble cut out of its top, the tail pointing at the right side of the face.
  • Videos always get a white bubble, mp4s can't be see-through. A cut out bubble on a JPEG comes back as a PNG.

spheres

Paints the media as Dalí's Galatea of the Spheres.

spheres MEDIA_KEY
MEDIA_KEY
the media to change

subtitle

subtitles

Puts movie subtitles along the bottom of the media, white with a black outline.

subtitle MEDIA_KEY YELLOW=false ...TEXT
MEDIA_KEY
the media to change
YELLOW= false
DVD style yellow subtitles instead of white
...TEXT
the subtitles, up to 200 characters

tiktok

Puts TikTok style text on the media, every line in its own rounded box.

tiktok MEDIA_KEY POSITION=50 DARK=false ...TEXT
MEDIA_KEY
the media to change
POSITION= 50
where the text's center goes, 0 is the top and 100 the bottom0..100
DARK= false
black boxes with white text instead of white boxes with black text
...TEXT
the text, up to 200 characters
{mediascript:load {iv} img
tiktok img POSITION=30 pov: you forgot your charger
render img}
→The last image or video with TikTok text in its upper part.

timesquare

Puts the media on a Times Square billboard.

timesquare MEDIA_KEY
MEDIA_KEY
the media to change

universe

Blends the media into outer space.

universe MEDIA_KEY SPACE=1
MEDIA_KEY
the media to change
SPACE= 1
which space background1..4

vegrender

Plays back a Vegas project with every one of its videos and sounds replaced by your media, like the .veg renderer in effect tags.

vegrender MEDIA_KEY VEG_KEY CUTOFF=true ...MEDIA_KEYS?
MEDIA_KEY
the media to change
VEG_KEY
a project from loadveg
CUTOFF= true
a clip that starts on a track cuts off the one before it (false lets them overlap)
MEDIA_KEYS
up to 3 more media keys to share the project's files with, in the order the files first play: the first file becomes MEDIA_KEY, the second the next key, and round again when the project has more files than you gave medias. A file's picture and its sound stay with the same media, and the result still goes in MEDIA_KEY
{mediascript:load {iv} logo
loadveg https://cdn.nsb.gg/assets/samples/preview1280.veg p
vegrender logo p
render logo}
→The project rebuilt with the last image or video in every clip.
{mediascript:load {video} clip
load https://cdn.nsb.gg/assets/samples/music.mp3 song
loadveg FILE_1 p
vegrender clip p song
render clip}
→The attached project with its first file played by the last video and its second by the song.
  • Rebuilt: the timeline (cuts, tracks, mute and solo, speed, reversed events and subclips), pitch changes (including the Pitch Shift plugin), the Distortion audio plugin, event fades, Pan/Crop zooms, moves, turns and flips with their keyframe curves, track motion with its 2D Shadow and Glow, solid colors, checkerboards, test patterns, color gradients, noise, text (with its font, colors, outline, shadow, position, Pan/Crop and keyframes, and VEGAS Titles & Text without its animations), and these effects on events, tracks and the project's video output: Black and White, Invert, HSL Adjust, Color Corrector (Secondary), Color Curves, Convolution Kernel, Linear Blur, Mirror, Swirl, Pinch/Punch, Spherize, Deform, the classic Wave, Channel Blend, Gaussian Blur, Pixelate, Threshold, Gradient Map, Glow, Radial Blur, Light Rays, NewBlue Wiggle, Duochrome, Metallic, Ghost and Earthquake, TV Simulator, Cookie Cutter, Chroma Keyer, LAB Adjust, Levels, Brightness and Contrast, Sepia, Unsharp Mask, Sharpen, Bump Map, Add Noise, Median, Min and Max, Vignette, Radial Pixelate, Soft Contrast, Rays, Border, Film Effects, Newsprint, Lens Flare and the NewBlue Dream Glow, Line Drawing, Charcoal, Old TV, Motion/Spin/Zoom Blur, Ripple, Colorize, Video Tune-up, Pastel Sketch, Film Damage, Charcoal, Shear Energy and Tile, Timecode, Defocus, with the older plugins' keyframes. Compositing modes, fade curves, velocity, audio track volume and pan envelopes and most of the Vegas and ExpressFX audio plugins play too. Other effects (other NewBlue effects, OFX plugins from other companies...), transition effects and opacity envelopes are not, so a project that uses them will look different. The full list is in the Vegas projects section.
  • Video events on video files and audio events on video or sound files get your media; events on still images show your media held on its first frame. A still image is shown for the whole project.
  • Like Vegas, an effect chain stops at a plugin Vegas can't load: it and the effects after it are skipped.
  • At most 10 minutes, scaled down to fit 1280x720, with at most 32 clips on screen (and 32 heard) at once. Counts toward the ffmpeg limit and has to finish within the script's time limit, which long or effect-heavy projects can run out of.
  • Outside of tags, the bot has the same thing as the .veg command (the .veg attached or its url first, then the media, -nocutoff for CUTOFF=false) and /media-aiv veg.

veprender

Plays back an AVS Video Editor project with every one of its videos, pictures and sounds replaced by your media.

veprender MEDIA_KEY VEP_KEY
MEDIA_KEY
the media to change
VEP_KEY
a project from loadvep
{mediascript:load {iv} logo
loadvep FILE_1 a
veprender logo a
render logo}
→The project rebuilt with the last image or video in every clip.
  • Rebuilt: the main video line's clips at their times (start points, speed, mute), the audio lines, volume envelopes, the Hue, Twirl, Wave, Ripple and Mirror effects, guessed Saturation and Flip effects, and the audio Rate. Overlays (PiP), text, transitions and other effects are skipped. The full list is in the AVS Video Editor projects section.
  • Keeps the project's own size, scaled down to fit 1280x720, at most 10 minutes. Counts toward the ffmpeg limit and has to finish within the script's time limit.
  • Outside of tags, the bot has the same thing as the .vep command (the .vep attached or its url first, then the media) and /media-aiv vep.

watchmojo

Turns the media into a WatchMojo video thumbnail.

watchmojo MEDIA_KEY ...TEXT
MEDIA_KEY
the media to change
...TEXT
the video title, up to 100 characters

watermark

Places a small, semi-transparent copy of one media in the bottom right corner of another.

watermark MEDIA_KEY MEDIA_KEY_2 SIZE=20 OPACITY=50 MARGIN=2
MEDIA_KEY
the media to watermark
MEDIA_KEY_2
the watermark
SIZE= 20
watermark size as a percentage of MEDIA_KEY1..100
OPACITY= 50
watermark opacity0..100
MARGIN= 2
gap from the corner as a percentage of MEDIA_KEY0..50

wlmprender

Plays back a Movie Maker project with every one of its videos, pictures and sounds replaced by your media.

wlmprender MEDIA_KEY WLMP_KEY
MEDIA_KEY
the media to change
WLMP_KEY
a project from loadwlmp
{mediascript:load {iv} logo
loadwlmp FILE_1 m
wlmprender logo m
render logo}
→The project rebuilt with the last image or video in every clip.
  • Rebuilt: the clips in order (start and end points, gaps, speed), the rotate buttons, volume and mute, the music and narration, and the Black and White (with its Orange, Red and Yellow filters), Cyan, Sepia, Threshold, Posterize, Blur, Brightness, Hue and Spin 360 effects. Edge Detection, Warp, Ripple, Cinematic, transitions and captions are skipped. The full list is in the Movie Maker projects section.
  • A 4:3 project comes out 640x480 and a 16:9 one 1280x720, at most 10 minutes. Counts toward the ffmpeg limit and has to finish within the script's time limit.
  • Outside of tags, the bot has the same thing as the .wlmp command (the .wlmp attached or its url first, then the media) and /media-aiv wlmp.

wrap

Puts a second media onto the media's surface, bent over its shape and lit like it's printed there.

wrap MEDIA_KEY OVERLAY_MEDIA_KEY X=0.5 Y=0.5 SIZE=0.4 ROTATE=0 RELIEF=0.6 LIGHT=1 OPACITY=1 CLIP=true
MEDIA_KEY
the media to change
OVERLAY_MEDIA_KEY
what goes onto the surface, text or a transparent PNG works best, a GIF or video plays on it
X= 0.5
where its center goes across, 0 is the left edge0..1
Y= 0.5
where its center goes down, 0 is the top edge0..1
SIZE= 0.4
its width facing the camera, of the shorter side0.05..2
ROTATE= 0
degrees clockwise, on the surface-360..360
RELIEF= 0.6
how much it follows the surface's shape, 0 is a flat sticker0..3
LIGHT= 1
how much of the surface's shadows and highlights it takes0..2
OPACITY= 1
how see-through it is0..1
CLIP= true
stop at the surface's outline and sharp edges, false lets it go over everything
{mediascript:load {iv} img
text logo NotSoBot SIZE=96 COLOR=#d01818 FONT=impact
wrap img logo
render img}
→NotSoBot in red printed onto whatever is in the middle of the image, following its shape and shadows.
{mediascript:load {iv} shirt
load {avatar} logo
wrap shirt logo 0.5 0.6 0.3 -10 1.2
render shirt}
→Your avatar on the shirt (or whatever is there), turned 10 degrees the other way and bending more with the folds.
  • The shape comes from the media's estimated depth: it bends over fabric folds, wraps around curved things and goes on in perspective on a wall at an angle. A surface leaning away gets it bigger, so it covers about the same area.
  • It stops where the surface ends: an object's outline, a box's edge, the floor under something.
  • The surface is always a still: a GIF's first frame, or a frame from a video.
  • An animated overlay (a GIF or video) plays on the surface, the result is a GIF of its frames.

youtube

Turns the media into a YouTube watch page with a title, channel and made up views.

youtube MEDIA_KEY CHANNEL=NotSoBot ...TEXT
MEDIA_KEY
the media to change
CHANNEL= NotSoBot
the channel name, up to 50 characters
...TEXT
the video title, up to 100 characters

Color

Brightness, hue, tints and channel tricks.

acid

Scrambles the color palette, like a corrupted GIF color table.

acid MEDIA_KEY AMOUNT=100 LEVELS=6 SEED=none
MEDIA_KEY
the media to change
AMOUNT= 100
percent of the palette colors swapped for random ones0..100
LEVELS= 6
color steps per channel, the palette has LEVELS³ colors2..16
SEED= none
the same seed gives the same result; none is random0..2147483647

applylut

Color grades the media with a .cube LUT loaded by loadcube, optionally blended with the original.

applylut MEDIA_KEY CUBE_KEY STRENGTH=1 INTERP=tetrahedral
MEDIA_KEY
the media to change
CUBE_KEY
the LUT's name from loadcube
STRENGTH= 1
how much of the graded look to use, 0.5 is half graded and half original0..1
INTERP= tetrahedral
how colors between the LUT's points are worked outnearest, trilinear, tetrahedral, pyramid, prism
{mediascript:load {or:{iv}|{arg:0}} a
loadcube FILE_1 b
applylut a b
render a}
→Grades the image or video with the attached .cube file.
{mediascript:load {video} clip
loadcube https://cdn.nsb.gg/assets/samples/grade.cube grade
applylut clip grade 0.6
render clip}
→Grades the clip at 60% strength.
  • The same as ffmpeg MEDIA_KEY -vf lut3d=CUBE_KEY.cube, and it counts towards the same limit of ffmpeg runs. The same effect is the .lut command (/media-iv-color lut).
  • Images and video only, audio is left as it is. Transparency is kept.

blurple

Tints the media in Discord's blurple.

blurple MEDIA_KEY
MEDIA_KEY
the media to change

brightness

lighten

Makes the media brighter (or darker with negative numbers).

brightness MEDIA_KEY PERCENTAGE=25
MEDIA_KEY
the media to change
PERCENTAGE= 25
-100..100

contrast

Raises or lowers contrast.

contrast MEDIA_KEY PERCENTAGE=30
MEDIA_KEY
the media to change
PERCENTAGE= 30
-100..100

contrastmultiply

Multiplies the brightness contrast, keeping the colors. 1 is unchanged, 0 is flat gray, negatives invert the brightness.

contrastmultiply MEDIA_KEY MULTIPLIER=1.5
MEDIA_KEY
the media to change
MULTIPLIER= 1.5
-100..100

darken

Makes the media darker (or brighter with negative numbers).

darken MEDIA_KEY PERCENTAGE=25
MEDIA_KEY
the media to change
PERCENTAGE= 25
-100..100

derain

Applies the opposite of the rain tint.

derain MEDIA_KEY
MEDIA_KEY
the media to change

gold

Gives the media a gold tint.

gold MEDIA_KEY
MEDIA_KEY
the media to change

gradientmap

Recolors the media by brightness along a gradient, like VEGAS' Gradient Map: the darkest parts get the first color and the brightest the last.

gradientmap MEDIA_KEY ...STOPS
MEDIA_KEY
the media to change
...STOPS
the gradient's colors separated by spaces, each COLOR or COLOR,POSITION (position 0 to 1); stops without a position are spread evenly between the ones around them
{mediascript:load {iv} img
gradientmap img #000080 #ff8000,0.7 white
render img}
→Navy shadows, orange from 70% brightness and white highlights.
{mediascript:load {iv} img
gradientmap img black rgba(255,0,0,128)
render img}
→Darks stay dark and the brights get a half-strength red tint.
  • Colors are hex codes, color names or rgb(R,G,B)/rgba(R,G,B,A). A color's alpha is how much of it covers the media, so a see-through stop lets the original show through. At most 32 stops.
  • A stop is never placed before the one ahead of it, like CSS gradients.

grayscale

graygreyscalegrey

Removes all color.

grayscale MEDIA_KEY
MEDIA_KEY
the media to change

huecurvergba

Remaps a color channel with a curve, like the Curves tool in photo editors.

huecurvergba MEDIA_KEY CHANNEL ...TEXT
MEDIA_KEY
the media to change
CHANNEL
which channel to changered, green, blue, alpha, all
...TEXT
curve points separated by spaces, as x,y or just y, all between 0 and 1; x must increase
{mediascript:load {iv} img
huecurvergba img all 0,1 0.5,0 1,1
render img}
→A V-shaped curve: darks and lights go bright, midtones go dark.
{mediascript:load {iv} img
huecurvergba img red 0,0 0.5,rand(0,1) 1,1
render img}
→Randomly boosts or cuts the red midtones.

hueshiftccs

Rotates the hue and adjusts saturation, gamma, gain and offset in one go.

hueshiftccs MEDIA_KEY HUE=0 SATURATION=1 GAMMA=1 GAIN=1 OFFSET=0
MEDIA_KEY
the media to change
HUE= 0
degrees to rotate the hue-360..360
SATURATION= 1
0..10
GAMMA= 1
0.1..10
GAIN= 1
0..10
OFFSET= 0
-255..255

hueshifthsl

Shifts hue, saturation and lightness in HSL.

hueshifthsl MEDIA_KEY HUE=90 SATURATION=0 LIGHTNESS=0
MEDIA_KEY
the media to change
HUE= 90
degrees to rotate the hue
SATURATION= 0
saturation change in percent
LIGHTNESS= 0
lightness change in percent
  • Lowering the saturation fades colors to gray, raising the lightness mixes them toward white. With only the hue changed it looks the same as hueshifthsv.

hueshifthsv

Shifts hue, saturation and brightness in HSV.

hueshifthsv MEDIA_KEY HUE=90 SATURATION=0 BRIGHTNESS=0
MEDIA_KEY
the media to change
HUE= 90
degrees to rotate the hue
SATURATION= 0
saturation change in percent
BRIGHTNESS= 0
brightness change in percent
  • Lowering the saturation fades colors toward white (the gray of their brightest channel), raising the brightness keeps them colored. See hueshifthsl for the HSL version.

hueshifthsvffmpeg

FFmpeg's hue filter. Despite the name it isn't HSV: the hue turns around the brightness, so colors keep how light they are (with hueshifthsv, yellow turned blue gets much darker).

hueshifthsvffmpeg MEDIA_KEY HUE=90 SATURATION=1 BRIGHTNESS=0
MEDIA_KEY
the media to change
HUE= 90
degrees to rotate the hue-360..360
SATURATION= 1
saturation multiplier (1 is unchanged)-10..10
BRIGHTNESS= 0
brightness added (10 is about white, -10 black)-10..10
  • Saturation here is a multiplier, so leaving it out keeps the original saturation. Past about 2 the colors clip into neon, 0 is grayscale and below 0 the colors flip to their opposites.
  • The colors come out close to Vegas's hue turn, which hueshiftccs copies exactly.

hueshiftrgb

Shifts the red, green and blue channels.

hueshiftrgb MEDIA_KEY RED=0 GREEN=0 BLUE=0
MEDIA_KEY
the media to change
RED= 0
usually -255..255-100000..100000
GREEN= 0
-100000..100000
BLUE= 0
-100000..100000

hueshiftyiq

Rotates the hue in YIQ (NTSC) color space, keeping the brightness.

hueshiftyiq MEDIA_KEY HUE=0
MEDIA_KEY
the media to change
HUE= 0
degrees to rotate the hue-360..360

invert

inverse

Inverts all colors, like a photo negative.

invert MEDIA_KEY
MEDIA_KEY
the media to change

invertlab

inverselab

Inverts CIELAB channels: flip light and dark while keeping colors, or swap green/red and blue/yellow.

invertlab MEDIA_KEY LIGHTNESS=1 A=1 B=1
MEDIA_KEY
the media to change
LIGHTNESS= 1
1 flips light and dark, keeping the colors0, 1
A= 1
1 swaps green and red0, 1
B= 1
1 swaps blue and yellow0, 1

invertrgba

inversergba

Inverts only the color channels you choose.

invertrgba MEDIA_KEY RED=1 GREEN=1 BLUE=1 ALPHA=0
MEDIA_KEY
the media to change
RED= 1
1 inverts, 0 leaves alone0, 1
GREEN= 1
0, 1
BLUE= 1
0, 1
ALPHA= 0
0, 1

opacity

alphafadetransparency

Makes the media see-through.

opacity MEDIA_KEY PERCENTAGE=50
MEDIA_KEY
the media to change
PERCENTAGE= 50
100 is fully visible, 0 is invisible0..100

rain

Applies a rainbow-style tint.

rain MEDIA_KEY
MEDIA_KEY
the media to change

rainbow

Cycles the media through rainbow color tints.

rainbow MEDIA_KEY
MEDIA_KEY
the media to change
  • A still image becomes an animated GIF.

raingold

Combines the rainbow and gold tints.

raingold MEDIA_KEY
MEDIA_KEY
the media to change

recolor

Recolors the media with bright vaporwave colors.

recolor MEDIA_KEY
MEDIA_KEY
the media to change

rgbsplit

Splits the red, green and blue channels apart.

rgbsplit MEDIA_KEY OFFSET=5
MEDIA_KEY
the media to change
OFFSET= 5
how far apart the channels move1..100

sepia

Gives the media an old-photo brown tint.

sepia MEDIA_KEY
MEDIA_KEY
the media to change

solarize

Inverts everything brighter than a threshold, for a solarized photo look.

solarize MEDIA_KEY THRESHOLD=128
MEDIA_KEY
the media to change
THRESHOLD= 128
0..256

swapcolors

Shuffles the RGBA channels of every pixel.

swapcolors MEDIA_KEY
MEDIA_KEY
the media to change

swaprgba

Reorders the red, green, blue and alpha channels.

swaprgba MEDIA_KEY CHANNELS=rgba
MEDIA_KEY
the media to change
CHANNELS= rgba
3 or 4 letters from r, g, b, a, 0 (empty channel) and 1 (full channel), e.g. bgra

Filters

Blurs, fries, art styles and glitches.

android

Makes media look like it was sent from an old Android: compressed audio, pixelated picture and 2 fps.

android MEDIA_KEY SCALE=10
MEDIA_KEY
the media to change
SCALE= 10
1..100

artistic

Turns the media into an embossed painting.

artistic MEDIA_KEY
MEDIA_KEY
the media to change

ascii

Redraws an image or video as ASCII art.

ascii MEDIA_KEY INVERT=false ZOOM=false
MEDIA_KEY
the media to change
INVERT= false
invert the brightness
ZOOM= false
draw it from a smaller copy, so the characters are bigger

blur

Blurs the media.

blur MEDIA_KEY SCALE=2
MEDIA_KEY
the media to change
SCALE= 2
blur strength1..100

cartoon

Makes the media look like a cartoon with flat colors and inked edges.

cartoon MEDIA_KEY PATTERN=70 LEVELS=6 METHOD=COLOR_DODGE_BLUR AMOUNT=4.0 BRIGHTNESS=100 SATURATION=150
MEDIA_KEY
the media to change
PATTERN= 70
0..100
LEVELS= 6
number of color levels2..10
METHOD= COLOR_DODGE_BLUR
how edges are foundCOLOR_DODGE_BLUR, HIGH_PASS_FILTER, MORPHOLOGY_EDGES, SOBEL_EDGES
AMOUNT= 4.0
0.0..10.0
BRIGHTNESS= 100
0..100
SATURATION= 150
0..300

charcoal

Makes the media look like a charcoal drawing.

charcoal MEDIA_KEY RADIUS=2
MEDIA_KEY
the media to change
RADIUS= 2
1..10

charcoalanimated

A charcoal drawing effect that gradually gets stronger.

charcoalanimated MEDIA_KEY RADIUS=6
MEDIA_KEY
the media to change
RADIUS= 6
the strongest radius it builds up to2..10
  • A still image becomes an animated GIF.

circle

Applies a radial (spinning) blur.

circle MEDIA_KEY SCALE=8
MEDIA_KEY
the media to change
SCALE= 8
blur strength1..20

datamosh

Duplicates video P-frames for a smeary datamosh glitch.

datamosh MEDIA_KEY CHANCE=8 REPEAT=20
MEDIA_KEY
the media to change
CHANCE= 8
0..100
REPEAT= 20
0..100

deepfry

Deepfries the media: crushed colors, oversaturated and crunchy.

deepfry MEDIA_KEY SCALE=10 KEEP_TRANSPARENCY=true
MEDIA_KEY
the media to change
SCALE= 10
how fried0..100
KEEP_TRANSPARENCY= true
false fries the transparent parts too

depthblur

Portrait mode: blurs what's in front of and behind the focus by the media's estimated depth.

depthblur MEDIA_KEY AMOUNT=2.5 RANGE=0.15 X=none Y=none MINIATURE=false
MEDIA_KEY
the media to change
AMOUNT= 2.5
the most blur, a percent of the shorter side0.1..10
RANGE= 0.15
how much depth around the focus stays sharp0..1
X= none
a point to focus on across, the subject in the middle when left out0..1
Y= none
a point to focus on down0..1
MINIATURE= false
tilt-shift: focus in the middle, a thinner sharp band, more blur and stronger colors
{mediascript:load {iv} img
depthblur img
render img}
→The subject stays sharp and the background melts away, bright spots blooming.
{mediascript:load {iv} img
depthblur img MINIATURE=true
render img}
→The scene looks like a tiny model.
  • The blur is done in linear light, so bright spots bloom like real out of focus highlights, and the sharp subject doesn't smear into the background behind it.
  • In a video the focus follows the frames smoothly.

depthmap

Replaces the media with its estimated depth as a picture: near is bright, far is dark.

depthmap MEDIA_KEY COLORMAP=gray INVERT=false
MEDIA_KEY
the media to change
COLORMAP= gray
GRAY, INFERNO, MAGMA, PLASMA, TURBO or VIRIDIS, near is the hot end
INVERT= false
far bright instead of near
{mediascript:load {iv} img
depthmap img turbo
render img}
→The image as a rainbow depth map, red up close and blue far away.
  • GIFs and videos get every frame's depth, kept consistent across the frames.

edgedetect

Finds edges and blends them back onto the media, with lots of blend modes.

edgedetect MEDIA_KEY STRENGTH=5.0 METHOD=OVER MIX=100 INVERT=false
MEDIA_KEY
the media to change
STRENGTH= 5.0
0.0..50.0
METHOD= OVER
how the edges are composed onto the mediacolor_burn, color_dodge, colorize, darken, darken_intensity, difference, exclusion, hard_light, hue, lighten, lighten_intensity, linear_burn, linear_dodge, linear_light, luminize, multiply, over, overlay, pegtop_light, pin_light, saturate, screen, soft_light, vivid_light
MIX= 100
how much of the effect to apply0..100
INVERT= false
  • Uses 8-directional Sobel edge detection.

edit

Edits an image with AI according to a prompt, optionally using other media as reference images.

edit MEDIA_KEY ...MEDIA_KEYS? PROMPT?
MEDIA_KEY
the media to change
MEDIA_KEYS
up to 5 other image or video keys, written before the prompt, to use as reference images
...PROMPT
what to change; a random prompt is used if empty
{mediascript:load {avatar} pfp
edit pfp {jsonify:give them a wizard hat}
render pfp}
{mediascript:load {avatar} img
load {image} hat
edit img hat make them wear this hat
render img}
→Puts the hat from the last image in chat on the avatar.
  • Works best for simple edits.
  • Words at the start of the prompt that match a media key are used as reference images, so wrap the prompt in {jsonify:} if it might start with one of your key names.
  • Videos use their first frame, and the result is always a still PNG.

emboss

Makes the media look raised or stamped.

emboss MEDIA_KEY METHOD=GIMP AZIMUTH=135 ELEVATION=45 DEPTH=1 INTENSITY=0 COMPOSE=none GRAY=none
MEDIA_KEY
the media to change
METHOD= GIMP
GIMP, PHOTOSHOP
AZIMUTH= 135
light direction0..360
ELEVATION= 45
light height0..90
DEPTH= 1
0..100
INTENSITY= 0
-50..50
COMPOSE= none
blend the emboss back onto the originalnone, bumpmap, color_burn, color_dodge, hard_light, linear_burn, linear_dodge, linear_light, multiply, overlay, pegtop_light, pin_light, soft_light, vivid_light
GRAY= none
none, or a number that sets the gray level of flat areas (GIMP method only)none, 0..1

emojimosaic

Rebuilds the media out of emojis.

emojimosaic MEDIA_KEY SIZE=none
MEDIA_KEY
the media to change
SIZE= none
how many emojis along the longest side; none is one per 16 pixels2..100

exo

Applies an alien-looking filter.

exo MEDIA_KEY SWIRL=false RAIN=false
MEDIA_KEY
the media to change
SWIRL= false
add a swirl
RAIN= false
add the rainbow tint
  • The bot's kek effect is exo MEDIA_KEY true.
  • The bot's kek2 effect is exo MEDIA_KEY true true.

ffmpeg

Runs FFmpeg filters and codecs on the media, using FFmpeg's own options.

ffmpeg MEDIA_KEY ...FFMPEG_OPTIONS
MEDIA_KEY
the media to change
...FFMPEG_OPTIONS
FFmpeg output options, like -vf, -af, -filter_complex, -c:v, -c:a, -crf, -map
{mediascript:load {video} clip
ffmpeg clip -vf "negate,huesaturation=hue=72" -af "rubberband=pitch=1.06" -c:v libx264
render clip}
→Inverts the colors, shifts the hue and raises the pitch by about a semitone.
{mediascript:load {video} clip
load {image} lut
ffmpeg clip -i lut -filter_complex "[0:v][1:v]haldclut"
render clip}
→Uses another media key as a second input, here as a Hald CLUT.
  • The media is input 0, each -i MEDIA_KEY adds another media as input 1, 2, ... (at most 4).
  • The output keeps the media's format, so -c:v/-c:a have to fit it (flac in a video/mp4 works, pcm_s16le doesn't).
  • Only allowed filters, codecs and options work. Filters that read or write files (movie, amovie, sendcmd, zmq, ladspa, metadata...) are blocked, and frei0r only takes known plugin names.
  • The drawtext filter always draws its text as written (expansion=none, no %{...}), and its fontsize (1-500), borderw (0-100), shadowx/shadowy (-500 to 500) and boxborderw (0-500) have to be plain numbers. The drawtext command is the easier way to put text on media.
  • Output is capped at 10 minutes, 2048x2048 and 2 minutes of FFmpeg run time.
  • lut3d works with LUTs from loadcube, as lut3d=CUBE_KEY.cube (applylut does the same in one line).
  • drawtext and showcqt take a font from loadfont (or a bundled one, like impact) as fontfile=FONT_KEY: drawtext=fontfile=myfont:text=hi. Other font paths aren't allowed.

glass

Puts the media behind shattered glass.

glass MEDIA_KEY
MEDIA_KEY
the media to change

glitch

Applies a heavy glitch effect.

glitch MEDIA_KEY AMOUNT=0 ITERATIONS=0 SEED=0 KEEP_TRANSPARENCY=true
MEDIA_KEY
the media to change
AMOUNT= 0
0 picks automatically0..99
ITERATIONS= 0
0 picks automatically0..115
SEED= 0
use the same seed to get the same glitch; 0 is random0..99
KEEP_TRANSPARENCY= true
false glitches the transparent parts too

glitchanimated

Applies the glitch effect, changing on every frame.

glitchanimated MEDIA_KEY AMOUNT=0 ITERATIONS=0 SEED=0 KEEP_TRANSPARENCY=true
MEDIA_KEY
the media to change
AMOUNT= 0
0 picks automatically0..99
ITERATIONS= 0
0 picks automatically0..115
SEED= 0
0 is random0..99
KEEP_TRANSPARENCY= true
  • A still image becomes an animated GIF.

glow

Adds a glow by laying a blurred, color-inverted copy over the media at 50% opacity.

glow MEDIA_KEY AMOUNT=12
MEDIA_KEY
the media to change
AMOUNT= 12
1..20

grain

Adds film grain.

grain MEDIA_KEY STRENGTH=20 FLAGS=at
MEDIA_KEY
the media to change
STRENGTH= 20
0..100
FLAGS= at
1 to 4 letters from a, p, t, u (FFmpeg noise flags: averaged, pattern, temporal, uniform)

hidden

Hides the media in a checkerboard, it only shows from far away or zoomed out.

hidden MEDIA_KEY SHARE=10 SIZE=none
MEDIA_KEY
the media to change
SHARE= 10
how much of the media is mixed in1..50
SIZE= none
the checker size in pixels, none picks one from the media's size1..32

jpeg

jpg

Adds JPEG compression artifacts ("needs more jpeg").

jpeg MEDIA_KEY QUALITY=1 KEEP_TRANSPARENCY=true
MEDIA_KEY
the media to change
QUALITY= 1
image quality; lower is crunchier1..100
KEEP_TRANSPARENCY= true
keeps transparent parts transparent; false flattens them like a real jpeg

legofy

Rebuilds the media out of LEGO bricks.

legofy MEDIA_KEY SIZE=none PALETTE=none DITHER=false
MEDIA_KEY
the media to change
SIZE= none
bricks along the longest side; none picks automatically1..50
PALETTE= none
limit the colors to real LEGO colorsALL, EFFECTS, MONO, SOLID, TRANSPARENT
DITHER= false
dither the colors (uses the ALL palette if none is picked)

lightrays

Streaks the bright parts of the media out from the middle into glowing rays, like VEGAS' Light Rays.

lightrays MEDIA_KEY SENSITIVITY=0.5 STRENGTH=1
MEDIA_KEY
the media to change
SENSITIVITY= 0.5
how much of the brightness makes rays: 1 is every pixel (as Vegas), 0.5 only the brighter half0..1
STRENGTH= 1
how long and bright the rays are; 1 is the strongest Vegas goes0..2
{mediascript:load {iv} img
lightrays img
render img}
→Rays from the brightest parts.
{mediascript:load {iv} img
lightrays img 1 2
render img}
→The whole picture glowing out in long rays.
  • Like a zoomblur of only the highlights: the rays are the same length all over, and on transparent media they spill past its edges.

magik

magickmagic

Applies the classic liquid-rescale "magik" warp.

magik MEDIA_KEY ITERATIONS=1 RESCALE=true SCALE=2
MEDIA_KEY
the media to change
ITERATIONS= 1
how many times to apply it1..10
RESCALE= true
stretch the result back to the original size, false leaves it smaller after each pass
SCALE= 2
how strongly each pass squishes the image1..10

magikanimated

Applies magik (liquid rescale) more and more over the frames.

magikanimated MEDIA_KEY ITERATIONS=1 SCALE=2 BOOMERANG=false
MEDIA_KEY
the media to change
ITERATIONS= 1
SCALE= 2
BOOMERANG= false
play it back in reverse after
  • A still image becomes an animated GIF.

mashup

Edits the first media with AI to look like both medias mixed together, like .mashup.

mashup MEDIA_KEY MEDIA_KEY_2
MEDIA_KEY
the media to change
MEDIA_KEY_2
the media to mix in
{mediascript:load {avatar} pfp
load {image} other
mashup pfp other
render pfp}
→The avatar mixed with the last image in chat.
  • Both are described by AI first, and the first one is edited to look like both descriptions.
  • Videos use their first frame, and the result is always a still PNG.

motionblur

Blurs in one direction, as if the camera moved.

motionblur MEDIA_KEY STRENGTH=20 VERTICAL=false
MEDIA_KEY
the media to change
STRENGTH= 20
1..50
VERTICAL= false
blur up/down instead of left/right

paint

Makes the media look like an oil painting.

paint MEDIA_KEY RADIUS=3
MEDIA_KEY
the media to change
RADIUS= 3
brush size0..10

paintanimated

An oil paint effect that gradually gets stronger.

paintanimated MEDIA_KEY RADIUS=3
MEDIA_KEY
the media to change
RADIUS= 3
0..10
  • A still image becomes an animated GIF.

paper

Turns the media into a tilted polaroid and bends it like a sheet of paper.

paper MEDIA_KEY ANGLE=none
MEDIA_KEY
the media to change
ANGLE= none
how far to tilt it, none picks a random angle-15..15

phosimp

Applies PhoSimp filters, one after another.

phosimp MEDIA_KEY ...FILTERS GRID_X=none GRID_Y=none
MEDIA_KEY
the media to change
...FILTERS
filter numbers separated by spaces, applied in order0..1256
GRID_X= none
only by name: with either grid option the filters only change a quarter-size box, starting at this column of a 16x16 grid1..16
GRID_Y= none
only by name: the box's starting row of the 16x16 grid1..16
{mediascript:load {iv} img
phosimp img 2 9 8
render img}
→Brightens the colors, mirror-blends the image and rotates it clockwise.
  • At most 300 filters. Works on images and video.
  • A few to start with: 1 negative (invert), 2 RGB multiply by 2, 3 RGB divide by 2, 7 / 8 rotate anticlockwise / clockwise, 9 mirror blend, 10 foursquare duplication. There are over a thousand, so try random numbers.

pix2pix

Redraws the media with a pix2pix model.

pix2pix MEDIA_KEY MODEL=EDGES RESIZE=false
MEDIA_KEY
the media to change
MODEL= EDGES
EDGES turns the media into line art, EMOJI and FLESH redraw it from that line artEDGES, EMOJI, FLESH
RESIZE= false
scale the result back up to the media's size (slower); stills always are

pixelate

pixel

Pixelates the media.

pixelate MEDIA_KEY PIXEL_WIDTH=9 NO_LINES=false
MEDIA_KEY
the media to change
PIXEL_WIDTH= 9
size of each block (PIXEL_SIZE= also works)2..100
NO_LINES= false
hide the grid lines between blocks

pixelsort

Sorts runs of pixels for a streaky glitch-art look.

pixelsort MEDIA_KEY ANGLE=0 INTERVAL=THRESHOLD SORT_BY=LIGHTNESS LOWER=0.25 UPPER=0.8 LENGTH=50 RANDOMNESS=0 REVERSE=false SEED=none
MEDIA_KEY
the media to change
ANGLE= 0
direction of the sorting0..359
INTERVAL= THRESHOLD
how the runs are picked, IMAGE sorts every pixel as one runEDGES, IMAGE, NONE, RANDOM, THRESHOLD, WAVES
SORT_BY= LIGHTNESS
COLOR groups by dominant color, then brightnessCOLOR, HUE, INTENSITY, LIGHTNESS, MAXIMUM, MINIMUM, SATURATION
LOWER= 0.25
THRESHOLD only sorts pixels between LOWER and UPPER0..1
UPPER= 0.8
0..1
LENGTH= 50
run length for RANDOM and WAVES2..1000
RANDOMNESS= 0
percent of runs left unsorted (pixels for IMAGE)0..100
REVERSE= false
SEED= none
the same seed gives the same result; none is random0..2147483647

popart

Makes a Warhol-style pop art grid of tinted copies.

popart MEDIA_KEY GRID=2
MEDIA_KEY
the media to change
GRID= 2
2..3

quadart

Redraws the media as a quad-tree of circles or boxes.

quadart MEDIA_KEY TYPE=CIRCLE
MEDIA_KEY
the media to change
TYPE= CIRCLE
BOX, CIRCLE

sharpen

Sharpens the media (negative numbers soften it).

sharpen MEDIA_KEY SCALE=15
MEDIA_KEY
the media to change
SCALE= 15
-100..100

smile

Makes the faces in the media smile, like the smile command.

smile MEDIA_KEY LEVEL=BIG MAX_FACES=8
MEDIA_KEY
the media to change
LEVEL= BIG
from a closed mouth smile to a beaming oneSUBTLE, NORMAL, BIG, HUGE
MAX_FACES= 8
how many of the biggest faces to change1..8
  • Only the faces change, the rest of the media stays as it is.
  • Uses AI, and counts towards the 20 AI requests a script can make (shared with edit and imagine).

stereo

Stereo 3D from the media's estimated depth: anaglyph, side by side, cross-eye, wigglegram or magic eye.

stereo MEDIA_KEY TYPE=anaglyph AMOUNT=3 X=none Y=none
MEDIA_KEY
the media to change
TYPE= anaglyph
ANAGLYPH (red/cyan glasses), SIDEBYSIDE (parallel viewing, phone VR viewers), CROSSEYE (cross your eyes at it), WIGGLE (a wigglegram) or MAGICEYE (a random-dot autostereogram)
AMOUNT= 3
how strong the 3D is, a percent of the width0.5..10
X= none
the point that sits at the screen across, the subject when left out0..1
Y= none
the point that sits at the screen down0..1
{mediascript:load {iv} img
stereo img
render img}
→A red/cyan anaglyph that pops out with 3D glasses.
{mediascript:load {iv} img
stereo img magiceye
render img}
→A magic eye picture hiding the image's shape, in its own colors.
  • SIDEBYSIDE and CROSSEYE come out twice as wide, WIGGLE turns a still image into a looping GIF.
  • Anything nearer than the focus pops out of the screen, anything further sinks in.

swappixels

Shuffles every pixel around.

swappixels MEDIA_KEY
MEDIA_KEY
the media to change

trace

Finds and highlights edges (Prewitt edge detection).

trace MEDIA_KEY
MEDIA_KEY
the media to change

vaporwave

Gives the media a vaporwave aesthetic, optionally with text.

vaporwave MEDIA_KEY ...TEXT?
MEDIA_KEY
the media to change
...TEXT
optional text to add

vhs

Makes the media look like an old VHS tape.

vhs MEDIA_KEY
MEDIA_KEY
the media to change

watercolor

Makes the media look like a watercolor painting.

watercolor MEDIA_KEY CONTRAST=0.0 EDGE=2.0 MIXING=33 SMOOTHING=0
MEDIA_KEY
the media to change
CONTRAST= 0.0
0..1000
EDGE= 2.0
1..1000
MIXING= 33
0..100
SMOOTHING= 0
0..1000

xytrender

Applies a VivaVideo template loaded by loadxyt: its own shaders, then its frames.

xytrender MEDIA_KEY XYT_KEY
MEDIA_KEY
the media to change
XYT_KEY
a template from loadxyt
{mediascript:load {iv} img
loadxyt https://cdn.nsb.gg/assets/samples/funface.xyt t
xytrender img t
render img}
→The last image or video through the template.
  • Images, gifs and videos stay what they are (a video keeps its audio). The template's keyframes play over the media's time, and a template that moves turns a still image into a gif of one play of it (at most 10 seconds).
  • A frame template draws its pictures through their masks over the media, turned a quarter when they're portrait over landscape media (or the other way), fading in and out on their own cycles.
  • Shaders have to be GLSL ES 1.00 within its limits (counted loops, constant array indexes). One that isn't, or doesn't compile, errors with the reason.
  • Outside of tags, the bot has the same thing as the .xyt command (the .xyt attached or its url first, then the media) and /media-iv-filter xyt.

zoomblur

Blurs outward from the center, like zooming during a long exposure.

zoomblur MEDIA_KEY AMOUNT=1.2 EXPAND=false
MEDIA_KEY
the media to change
AMOUNT= 1.2
1..10
EXPAND= false

Distort & Animate

Warp, mirror, spin and shake.

bounce

Makes the media bounce like a bouncing webm, every frame its own size.

bounce MEDIA_KEY AXIS=HEIGHT STYLE=BOUNCE BOUNCES=2.0 MINIMUM=5 DURATION=3.0
MEDIA_KEY
the media to change
AXIS= HEIGHT
which side bouncesboth, height, width
STYLE= BOUNCE
bounce drops and snaps back up, wave is smooth, random is any size every framebounce, random, wave
BOUNCES= 2.0
bounces per second0.1..10.0
MINIMUM= 5
the smallest size, a percent of the original1..100
DURATION= 3.0
seconds, for still images0.5..30.0
  • Always a webm, the only format whose frames can each be their own size. Do it last, later actions make the frames one size again.
  • Discord only shows the bounce when the link is pasted in a message, the uploaded file plays at the first frame's size.

dance

Cuts out the subject and makes it squash and stretch to a beat over its filled-in background.

dance MEDIA_KEY AMOUNT=20 BPM=120 MODEL=ISNET_GENERAL_USE
MEDIA_KEY
the media to change
AMOUNT= 20
how far it squashes and stretches, a percent of its height1..60
BPM= 120
beats per minute, it changes pose every beat30..300
MODEL= ISNET_GENERAL_USE
the background removal model that finds the subjectBIREFNET_GENERAL, BIREFNET_GENERAL_LITE, BIREFNET_PORTRAIT, ISNET_ANIME, ISNET_GENERAL_USE, U2NET, U2NET_CLOTH_SEG, U2NET_HUMAN_SEG
  • Always makes a looping GIF of one bounce from the first frame: GIFs and videos use their first frame, so the background is only removed once.

detunnel

Unwraps a radial or spiral tunnel (the opposite of tunnel).

detunnel MEDIA_KEY SPIRAL=false
MEDIA_KEY
the media to change
SPIRAL= false

dice

Cuts the media into tiles and rotates each one randomly.

dice MEDIA_KEY GRID=10 SEED=none
MEDIA_KEY
the media to change
GRID= 10
tiles per side2..32
SEED= none
the same seed gives the same result; none is random0..2147483647

distort

Applies an ImageMagick distortion with your own numbers.

distort MEDIA_KEY METHOD ...ARGUMENTS
MEDIA_KEY
the media to change
METHOD
the distortionarc, affine, affine_projection, barrel, barrel_inverse, bilinear_forward, bilinear_reverse, cylinder_2_plane, depolar, perspective, perspective_projection, plane_2_cylinder, polar, polynomial, resize, rigidaffine, scale_rotate_translate, sentinel, shepards
...ARGUMENTS
the numbers that method expects, separated by spaces (see ImageMagick's -distort docs)
{mediascript:load {iv} img
distort img arc 360
render img}
→Bends the image into a full circle.
{mediascript:load {iv} img
distort img barrel 0.2 0 0 1
render img}
→A fisheye-style barrel bulge.
  • At most 32 numbers are used. With none the method uses its own defaults.

explode

Pushes the middle of the media outward (the opposite of implode).

explode MEDIA_KEY SCALE=1
MEDIA_KEY
the media to change
SCALE= 1
0..100

explodeanimated

An explode effect that gradually gets stronger.

explodeanimated MEDIA_KEY SCALE=1
MEDIA_KEY
the media to change
SCALE= 1
0..100
  • A still image becomes an animated GIF.

facealien

Warps the biggest face into an alien.

facealien MEDIA_KEY SKIN=true FACE=none
MEDIA_KEY
the media to change
SKIN= true
also turn skin green and everything else cold blue
FACE= none
the number drawfaces puts on a face, to use that face and follow it through the frames instead of the biggest one on every frame0..99

faceanime

Gives the biggest face big anime eyes.

faceanime MEDIA_KEY EYES=NORMAL FACE=none
MEDIA_KEY
the media to change
EYES= NORMAL
eye colorNORMAL, AQUA, BLUE, BROWN, GREEN, PURPLE, RED
FACE= none
the number drawfaces puts on a face, to use that face and follow it through the frames instead of the biggest one on every frame0..99

facebighead

bighead

Makes every head bigger as a whole, like a bobblehead.

facebighead MEDIA_KEY SIZE=1.5
MEDIA_KEY
the media to change
SIZE= 1.5
how much bigger the heads get1.1..3
  • The whole head is scaled so it keeps its proportions, a ring around it blends back into the neck and background. Heads without a face found, like anime, drawings or the back of a head, get it too, and on GIFs and videos it follows each face.

faceclown

Gives the biggest face clown makeup.

faceclown MEDIA_KEY FACE=none
MEDIA_KEY
the media to change
FACE= none
the number drawfaces puts on a face, to use that face and follow it through the frames instead of the biggest one on every frame0..99
{mediascript:load {video} clip
faceclown clip 1
render clip}
→Clowns the face drawfaces numbers 1, on every frame, even when another face is bigger.

facefat

Makes the biggest face fat.

facefat MEDIA_KEY SIZE=XXXL FACE=none
MEDIA_KEY
the media to change
SIZE= XXXL
XL, XXL, XXXL
FACE= none
the number drawfaces puts on a face, to use that face and follow it through the frames instead of the biggest one on every frame0..99

faceforehead

forehead

Makes the biggest face's forehead taller, SMOOTHBRAIN squishes it instead.

faceforehead MEDIA_KEY SIZE=FIVEHEAD FACE=none
MEDIA_KEY
the media to change
SIZE= FIVEHEAD
SMOOTHBRAIN, FIVEHEAD, SIXHEAD, SEVENHEAD
FACE= none
the number drawfaces puts on a face, to use that face and follow it through the frames instead of the biggest one on every frame0..99

fisheye

fish

Bulges the middle of the media like a fisheye lens.

fisheye MEDIA_KEY
MEDIA_KEY
the media to change

flash

Flashes between the normal and inverted media.

flash MEDIA_KEY DELAY=100
MEDIA_KEY
the media to change
DELAY= 100
milliseconds per frame20..10000

globe

Wraps the media onto a sphere, like a fisheye globe.

globe MEDIA_KEY TILED=false
MEDIA_KEY
the media to change
TILED= false
shrink and tile the media across the sphere instead of stretching one copy
{mediascript:load {avatar} pfp
globe pfp
render pfp image/png}
→The avatar as a round globe.
  • The result is cropped to a square with a transparent outside. Unlike orb, it doesn't spin.

implode

Sucks the middle of the media inward.

implode MEDIA_KEY SCALE=1
MEDIA_KEY
the media to change
SCALE= 1
0..100

implodeanimated

An implode effect that gradually gets stronger.

implodeanimated MEDIA_KEY SCALE=1
MEDIA_KEY
the media to change
SCALE= 1
0..100
  • A still image becomes an animated GIF.

inout

Zooms into the media through copies of itself, then back out.

inout MEDIA_KEY DELAY=100
MEDIA_KEY
the media to change
DELAY= 100
milliseconds per frame20..10000

layer

Tiles the media with its mirrored and flipped copies.

layer MEDIA_KEY
MEDIA_KEY
the media to change

mandalascope

Turns the media into a mandala-like kaleidoscope.

mandalascope MEDIA_KEY AMOUNT=12 SCALE=1.0 ROTATION=0 TRANSLATION=0 ZOOM=1.4
MEDIA_KEY
the media to change
AMOUNT= 12
number of mirrored slices3..16
SCALE= 1.0
0.01..10.0
ROTATION= 0
0..360
TRANSLATION= 0
0..200
ZOOM= 1.4
0.01..10.0

mirrorbottom

hooh

Mirrors the bottom half onto the top half (hooh).

mirrorbottom MEDIA_KEY PERCENTAGE=50
MEDIA_KEY
the media to change
PERCENTAGE= 50
how much of the media the reflection covers, the kept part is squeezed or stretched into it (50 is a plain half mirror)1..99

mirrorleft

haah

Mirrors the left half onto the right half (haah).

mirrorleft MEDIA_KEY PERCENTAGE=50
MEDIA_KEY
the media to change
PERCENTAGE= 50
how much of the media the reflection covers, the kept part is squeezed or stretched into it (50 is a plain half mirror)1..99

mirrorright

waaw

Mirrors the right half onto the left half (waaw).

mirrorright MEDIA_KEY PERCENTAGE=50
MEDIA_KEY
the media to change
PERCENTAGE= 50
how much of the media the reflection covers, the kept part is squeezed or stretched into it (50 is a plain half mirror)1..99

mirrortop

woow

Mirrors the top half onto the bottom half (woow).

mirrortop MEDIA_KEY PERCENTAGE=50
MEDIA_KEY
the media to change
PERCENTAGE= 50
how much of the media the reflection covers, the kept part is squeezed or stretched into it (50 is a plain half mirror)1..99

mitosis

Cell division: the media stretches into an empty half next to it, pinches in the middle and splits into two.

mitosis MEDIA_KEY DIRECTION=HORIZONTAL STYLE=SPLIT DURATION=3.0
MEDIA_KEY
the media to change
DIRECTION= HORIZONTAL
horizontal makes it twice as wide, vertical twice as tallhorizontal, vertical
STYLE= SPLIT
split ends as two copies, absorb has one swallow the other back up so it loopsabsorb, split
DURATION= 3.0
seconds the division takes0.5..30.0
  • Do it once each way for a 2x2 grid of four: mitosis m then mitosis m direction=vertical.
  • A still image (or a single-frame GIF or video) becomes DURATION seconds at 25 frames a second, a still image as a GIF. Animated GIFs and videos keep playing while they divide, a short GIF repeats until DURATION.

multiply

Repeats the media in a grid.

multiply MEDIA_KEY GRID=10 ROTATE=false SEED=none
MEDIA_KEY
the media to change
GRID= 10
copies per side2..32
ROTATE= false
rotate each copy randomly
SEED= none
the same seed gives the same result; none is random0..2147483647

orb

Wraps the media around a spinning orb or globe.

orb MEDIA_KEY DIRECTION=RIGHT
MEDIA_KEY
the media to change
DIRECTION= RIGHT
down, left, right, up
  • Turns a still image into a 30-frame GIF.

outin

Zooms out of the media through copies of itself, then back in.

outin MEDIA_KEY DELAY=100
MEDIA_KEY
the media to change
DELAY= 100
milliseconds per frame20..10000

parallax

A 3D photo: the camera moves a little so what's in front of and behind the focus slide past each other.

parallax MEDIA_KEY MOTION=circle AMOUNT=3 DURATION=3 X=none Y=none
MEDIA_KEY
the media to change
MOTION= circle
CIRCLE goes around, SWAY left and right, ZOOM dollies in and back out
AMOUNT= 3
how far the nearest things move, a percent of the shorter side0.5..10
DURATION= 3
seconds a loop takes1..10
X= none
the point that stays put across, the subject when left out0..1
Y= none
the point that stays put down0..1
{mediascript:load {iv} img
parallax img
render img}
→A looping GIF of the picture with the camera circling the subject.
{mediascript:load {iv} img
parallax img zoom 5
render img}
→The camera dollies in and back out, near things growing faster than far ones.
  • Still images become a looping GIF (at most 512px), GIFs and videos move through the loop as they play.
  • The frame is zoomed in a little so the edges a moving camera would show stay hidden.

pinchpunch

Pinches the media in or punches it out around a point, like VEGAS' Pinch/Punch.

pinchpunch MEDIA_KEY INTENSITY=0.5 X=0.5 Y=0.5 X_SCALE=1 Y_SCALE=1
MEDIA_KEY
the media to change
INTENSITY= 0.5
positive punches the middle out (up to 5 times as big), negative pinches it in-1..1
X= 0.5
the center across, as a share of the width-1..2
Y= 0.5
the center down, as a share of the height-1..2
X_SCALE= 1
how wide the affected area is, as a share of half the width0.01..4
Y_SCALE= 1
how tall the affected area is, as a share of half the height0.01..4
{mediascript:load {iv} img
pinchpunch img 1
render img}
→The middle bulges out the most it can.
{mediascript:load {iv} img
pinchpunch img -1 0.5 0.35 0.4 0.4
render img}
→A small area above the middle gets pinched in.
  • Parts pulled in from past the edge are see-through (black on videos).

prism

Wraps the media around a spinning pyramid, like the Obama prism, on a transparent background cut to the pyramid.

prism MEDIA_KEY ANGLE=30 TILT=12 CLOCKWISE=TRUE REPEAT=FALSE STILL=FALSE
MEDIA_KEY
the media to change
ANGLE= 30
how far it's turned, the media's middle on the front side: where the spin starts, or the pose with STILL-180..180
TILT= 12
how far the camera looks down at it, 0 level with it and 90 straight onto the tip0..90
CLOCKWISE= TRUE
REPEAT= FALSE
put the whole media on every side instead of wrapping it once around all four, like the original
STILL= FALSE
don't spin, keep the pose at ANGLE (an animation still plays on it)
  • Turns a still image into a 60-frame GIF (30 with REPEAT), or a single frame with STILL.

ripple

Adds water ripples spreading from the center.

ripple MEDIA_KEY AMPLITUDE=20 WIDTH=25 TYPE=DISPLACE OFFSET=0 POWER=1 RMIN=25
MEDIA_KEY
the media to change
AMPLITUDE= 20
ripple height0..1000
WIDTH= 25
distance between ripples0..1000
TYPE= DISPLACE
BLEND, DISPLACE, MODULATE
OFFSET= 0
0..1000
POWER= 1
how fast the ripples fade out0..1000
RMIN= 25
radius around the center left flat0..1000

rotate3d

Rotates the media in 3D space (pan, tilt and roll).

rotate3d MEDIA_KEY PAN=0 TILT=0 ROLL=0 ZOOM=1 CROPMODE=none ORDER=ptr
MEDIA_KEY
the media to change
PAN= 0
turn left/right-360..360
TILT= 0
tip forward/back-360..360
ROLL= 0
spin like a wheel-360..360
ZOOM= 1
-3.0..3.0
CROPMODE= none
auto, center, none, zoomcenter
ORDER= ptr
1 to 3 letters from p, t, r giving the rotation order, e.g. ptr is pan, then tilt, then roll
{mediascript:load {iv} img
rotate3d img pan=30 tilt=20
render img image/png}
→Turns the image as if seen from an angle.
{mediascript:load {avatar} pfp
setframecount pfp 36
foreachframe pfp 0 pfpfc {jsonify:
rotate3d pfpx pan=idx*10
}
render pfp image/gif}
→A full 3D turn over 36 frames.

scramble

Shuffles tiles of the media around.

scramble MEDIA_KEY GRID=10 ROTATE=true SEED=none
MEDIA_KEY
the media to change
GRID= 10
tiles per side2..32
ROTATE= true
also rotate each tile randomly
SEED= none
the same seed gives the same result; none is random0..2147483647

shake

Shakes the media around.

shake MEDIA_KEY HORIZONTAL=10 VERTICAL=10 RANDOMIZE=false
MEDIA_KEY
the media to change
HORIZONTAL= 10
-10000..10000
VERTICAL= 10
-10000..10000
RANDOMIZE= false
  • Turns a still image into a 15-frame GIF.

shaketriggered

triggered

The shaking "triggered" meme, with the label underneath.

shaketriggered MEDIA_KEY
MEDIA_KEY
the media to change
  • Turns a still image into a 4-frame GIF.

sidetoside

Flips the media back and forth horizontally.

sidetoside MEDIA_KEY DELAY=100
MEDIA_KEY
the media to change
DELAY= 100
milliseconds per frame20..10000

skew

Slants the media sideways (or up and down).

skew MEDIA_KEY AMOUNT=30 VERTICAL=false
MEDIA_KEY
the media to change
AMOUNT= 30
shear angle in degrees-80..80
VERTICAL= false

slide

Scrolls the media continuously in one direction, wrapping around.

slide MEDIA_KEY SPEED=1.0 DIRECTION=RIGHT
MEDIA_KEY
the media to change
SPEED= 1.0
0.01..10.0
DIRECTION= RIGHT
down, left, right, up

spin

Makes the media spin around.

spin MEDIA_KEY CLOCKWISE=true CIRCLE=true CROP=true
MEDIA_KEY
the media to change
CLOCKWISE= true
CIRCLE= true
crop to a circle first
CROP= true
  • Turns a still image into a 20-frame GIF.

spin3d

Spins the media around in 3D space.

spin3d MEDIA_KEY TILT=15 ZOOM=1.5 CLOCKWISE=TRUE
MEDIA_KEY
the media to change
TILT= 15
-360..360
ZOOM= 1.5
-3..3
CLOCKWISE= TRUE
  • Turns a still image into a 37-frame GIF.

swirl

Twists the media into a swirl.

swirl MEDIA_KEY DEGREES=180
MEDIA_KEY
the media to change
DEGREES= 180
how far to twist; negative goes the other way-360..360

tunnel

Wraps the media into a radial or spiral tunnel.

tunnel MEDIA_KEY SPIRAL=false
MEDIA_KEY
the media to change
SPIRAL= false

tvsimulator

An analog TV losing line sync: the picture tears and wobbles sideways, or up and down (the TV simulator from Preview 1280 effects).

tvsimulator MEDIA_KEY LINE_SYNC=0.75 DETAIL_ZOOM=1 VERTICAL=false
MEDIA_KEY
the media to change
LINE_SYNC= 0.75
how well the TV holds the picture, 1 is clean and lower tears more0..1
DETAIL_ZOOM= 1
zooms into the distortion, higher gives bigger, slower waves1..8
VERTICAL= false
tears the picture up and down instead of sideways
{mediascript:load {video} clip
tvsimulator clip
render clip}
→A mild TV wobble.
{mediascript:load {video} clip
tvsimulator clip 0.2 3
render clip}
→A badly tuned TV with big, slow tears.
{mediascript:load {video} clip
tvsimulator clip 0.5 1 true
render clip}
→The picture rolls and tears up and down instead.
  • Uses a built-in displacement video that loops for clips longer than its 60 seconds. The audio is kept as it is.
  • Works on videos, GIFs and images (a still image gets one frame of the wobble). The same effect is the .tvsimulator command (/media-iv-glitch tv-simulator).
  • For your own displacement video, load it and use displace inside ffmpeg (see Logo effects).

uptodown

Flips the media back and forth vertically.

uptodown MEDIA_KEY DELAY=100
MEDIA_KEY
the media to change
DELAY= 100
milliseconds per frame20..10000

vegaswave

Bends the media along waves across and down, like VEGAS' Wave, and can move them.

vegaswave MEDIA_KEY X_SPEED=0 X_FREQUENCY=4 X_INTENSITY=0.05 X_PHASE=0 Y_SPEED=0 Y_FREQUENCY=4 Y_INTENSITY=0.05 Y_PHASE=0
MEDIA_KEY
the media to change
X_SPEED= 0
how fast the sideways wave moves, in radians a second (6.28 is one wave a second)-100..100
X_FREQUENCY= 4
how many half waves go down the media for the sideways wave (2 is one whole wave)-100..100
X_INTENSITY= 0.05
how far the media moves sideways, as a share of the width-1..1
X_PHASE= 0
where the sideways wave starts, in radians (3.14 is half a wave)-1000..1000
Y_SPEED= 0
how fast the up and down wave moves, in radians a second-100..100
Y_FREQUENCY= 4
how many half waves go across the media for the up and down wave-100..100
Y_INTENSITY= 0.05
how far the media moves up and down, as a share of the height-1..1
Y_PHASE= 0
where the up and down wave starts, in radians-1000..1000
{mediascript:load {iv} img
vegaswave img
render img}
→A still wobble both ways.
{mediascript:load {iv} img
vegaswave img 6.28 6 0.03 0 0 4 0 0
render img}
→A sideways wave moving once a second; a still image becomes a gif.
  • A moving wave turns a still image into a looping gif of the slowest wave's cycle (at most 10 seconds), with the speeds rounded slightly so it loops smoothly. Gifs and videos keep their own frames and timing.

wall

Tiles the media onto a tilted wall.

wall MEDIA_KEY
MEDIA_KEY
the media to change

wave

Bends the media along a sine wave.

wave MEDIA_KEY AMPLITUDE=10 WAVE_LENGTH=64
MEDIA_KEY
the media to change
AMPLITUDE= 10
wave height-2048..2048
WAVE_LENGTH= 64
distance between waves1..20480

waves

Animated, moving waves.

waves MEDIA_KEY AMPLITUDE=10 WAVE_LENGTH=64 SPEED=1
MEDIA_KEY
the media to change
AMPLITUDE= 10
wave height-2048..2048
WAVE_LENGTH= 64
distance between waves1..20480
SPEED= 1
1..10

wiggle

Adds a moving wiggle.

wiggle MEDIA_KEY DIRECTION=right AMOUNT=10 WAVELENGTHS=0.5 SPEED=1 LOOP=false
MEDIA_KEY
the media to change
DIRECTION= right
down, left, right, up
AMOUNT= 10
1..100
WAVELENGTHS= 0.5
0..100
SPEED= 1
0.25..10
LOOP= false
wiggle continuously instead of restarting, for a smooth loop

wobble

Makes the media wobble like jelly: its sides pull in and its middle gets dragged around.

wobble MEDIA_KEY AMOUNT=40 WOBBLES=0.8 DURATION=3.0
MEDIA_KEY
the media to change
AMOUNT= 40
how far it wobbles, a percent of the size1..100
WOBBLES= 0.8
wobbles per second0.1..10.0
DURATION= 3.0
seconds, for still images0.5..30.0
  • A still image (or a single-frame GIF or video) becomes DURATION seconds at 25 frames a second that settle back to the original between wobbles, a still image as a looping GIF.
  • Animated GIFs and videos keep wobbling the whole way and are back to the original by the last frame.

zoom

Zooms into the center of the media.

zoom MEDIA_KEY AMOUNT=1.2
MEDIA_KEY
the media to change
AMOUNT= 1.2
0.01..10

Audio

Pitch, effects, volume and mixing audio tracks.

audioautotune

autotune

Autotunes a voice: each note is pulled onto the nearest note of a key, the timing stays the same.

audioautotune MEDIA_KEY KEY=C STRENGTH=1
MEDIA_KEY
the media to change
KEY= C
the key: a note with # or b for major (C, F#), add m or minor for minor (Am, Bb minor), or chromatic for every note
STRENGTH= 1
how far each note is pulled; 1 snaps it all the way for the robotic sound0..1
{mediascript:load {audio} clip
audioautotune clip Am
render clip}
→The voice snapped onto A minor.
  • Made for one voice. Chords and music under it come out warbly, and sounds without a pitch (s, t, breaths) are left as they are.
  • Media without audio is left as is.

audiobitcrush

Bit crushes the audio: a lower sample rate and bit depth for a crunchy, lo-fi sound.

audiobitcrush MEDIA_KEY SAMPLES=6 BITS=8 MIX=1 MODE=log
MEDIA_KEY
the media to change
SAMPLES= 6
sample rate reduction factor; 6 turns 48kHz audio into about 8kHz1..250
BITS= 8
bit depth; lower is grittier, 4 or less is harsh1..64
MIX= 1
how much of the crushed audio is used, 1 is fully crushed0..1
MODE= log
log keeps quiet parts cleaner, lin crushes everything evenlylin, log
{mediascript:load {audio} clip
audiobitcrush clip 12 4 1 lin
render clip}
→Heavily crushed, harsh lo-fi audio.
  • Media without audio is left as is.

audioboostbass

Boosts the bass.

audioboostbass MEDIA_KEY
MEDIA_KEY
the media to change

audiochannelscombine

audiomono

Mixes the audio down to mono.

audiochannelscombine MEDIA_KEY
MEDIA_KEY
the media to change
  • Media without audio is left as is.

audiochannelsinvert

Swaps the left and right audio channels.

audiochannelsinvert MEDIA_KEY
MEDIA_KEY
the media to change
  • Mono audio gets made stereo first. Media without audio is left as is.

audiochorus

Adds a chorus like VEGAS Chorus: copies of the sound singing along slightly out of time.

audiochorus MEDIA_KEY VOICES=3 DELAY=20 RATE=1 DEPTH=50 MIX=0.5
MEDIA_KEY
the media to change
VOICES= 3
how many copies sing along, every other one upside down1..3
DELAY= 20
how late the copies are, in milliseconds1..100
RATE= 1
wobbles per second0.01..20
DEPTH= 50
how far the copies wobble, a percent of the delay (100 wobbles as far as the delay)1..100
MIX= 0.5
how much of the copies are used, the rest is the original0..1
{mediascript:load {audio} clip
audiochorus clip 1 5 4 100 1
render clip}
→One fast wobbling copy and none of the original, a warbly, seasick voice.
  • Media without audio is left as is.

audiocompress

Lowers the audio quality on purpose.

audiocompress MEDIA_KEY NO_REVERT=false
MEDIA_KEY
the media to change
NO_REVERT= false
keep the low 8k sample rate instead of converting back to the original's

audiodelay

Shifts the audio later (or earlier with a negative number) compared to the video.

audiodelay MEDIA_KEY DELAY=0.5 SNIP=true
MEDIA_KEY
the media to change
DELAY= 0.5
seconds; can be negative-600..600
SNIP= true
cut audio pushed later at the media's length; false lets it run past the end

audiodestroy

Distorts the audio as much as possible (earrape).

audiodestroy MEDIA_KEY
MEDIA_KEY
the media to change

audiodistortion

Distorts the audio like VEGAS ExpressFX Distortion: boosted and hard clipped.

audiodistortion MEDIA_KEY DRIVE=50 MIX=1 LOWPASS=0
MEDIA_KEY
the media to change
DRIVE= 50
how hard the audio is pushed into clipping; 100 boosts it by 40 dB0..100
MIX= 1
how much of the distorted audio is used, the rest is the original0..1
LOWPASS= 0
cut the sound above this many Hz afterwards, 0 for off0..20000
{mediascript:load {audio} clip
audiodistortion clip 100 1 3000
render clip}
→Fully clipped audio with the fizz cut off, like a blown speaker.
  • Media without audio is left as is.

audioequalizer

Adjusts seven frequency bands, in decibels.

audioequalizer MEDIA_KEY SUBBASS=0 BASS=0 LOWMIDS=0 MIDS=0 HIGHMIDS=0 TREBLE=0 AIR=0
MEDIA_KEY
the media to change
SUBBASS= 0
-50..50
BASS= 0
-50..50
LOWMIDS= 0
-50..50
MIDS= 0
-50..50
HIGHMIDS= 0
-50..50
TREBLE= 0
-50..50
AIR= 0
-50..50

audioflanger

Adds a flanger (a sweeping, jet-plane whoosh).

audioflanger MEDIA_KEY DELAY=0 DEPTH=2 REGEN=0 WIDTH=71 SPEED=0.5 PHASE=25
MEDIA_KEY
the media to change
DELAY= 0
0..30
DEPTH= 2
0..10
REGEN= 0
-95..95
WIDTH= 71
0..100
SPEED= 0.5
0.1..10
PHASE= 25
0..100

audiogapper

Gapper/Snipper: puts gaps of silence in the audio, or cuts pieces out of it.

audiogapper MEDIA_KEY FREQUENCY=10 LENGTH=50 SNIP=false
MEDIA_KEY
the media to change
FREQUENCY= 10
gaps per second0.1..100
LENGTH= 50
how long each gap is, in milliseconds1..1000
SNIP= false
cut that much audio out instead of putting silence in
{mediascript:load {audio} clip
audiogapper clip 20 20 true
render clip}
→A choppy voice, 40% shorter.
  • Gaps make the audio longer and snips make it shorter, a video is slowed down or sped up to stay in sync.
  • A gap is at most 3 times the time between gaps, and a snip at most 95% of it.
  • Media without audio is left as is.

audionoise

Adds a noise track, mixed in with any existing audio.

audionoise MEDIA_KEY COLOR=white AMPLITUDE=1.0 SAMPLE_RATE=44100
MEDIA_KEY
the media to change
COLOR= white
the kind of noise; brown and pink are deeper, blue and violet are hissierblue, brown, pink, velvet, violet, white
AMPLITUDE= 1.0
loudness of the noise0..1
SAMPLE_RATE= 44100
samples per second8000..48000
{mediascript:load {video} clip
audionoise clip pink 0.2
render clip}
→Adds quiet pink noise to the video.
  • Images become an MP4 video with the noise; a still image becomes 10 seconds long.

audionormalize

Normalizes the loudness to a loud level with ffmpeg's loudnorm.

audionormalize MEDIA_KEY STRENGTH=1.0
MEDIA_KEY
the media to change
STRENGTH= 1.0
how loud it gets, 0 is -24 LUFS and 1 is -5 LUFS0.0..1.0
  • The same effect is the .audio normalize command (/media-av-effect normalize).

audiopaulstretch

paulstretch

Stretches the audio into a slow, smeared ambient drone, like Audacity's Paulstretch. The video is slowed down to match.

audiopaulstretch MEDIA_KEY STRETCH=2.0 RESOLUTION=1.6
MEDIA_KEY
the media to change
STRETCH= 2.0
how many times longer the media gets1..50
RESOLUTION= 1.6
seconds of sound smeared together at a time; bigger is smoother and loses more of the rhythm, small values sound choppy0.01..10
{mediascript:load {video} clip
audiopaulstretch clip
render clip}
→Twice as long, as a slow ambient wash.
{mediascript:load {audio} clip
paulstretch clip 10 0.25
render clip}
→Audacity's defaults: ten times longer.
  • Only as much of the media is used as fits in 10 minutes once stretched. Counts toward the ffmpeg limit.

audiopingpong

Cuts the audio into pieces that each play forwards, then backwards.

audiopingpong MEDIA_KEY LENGTH=250 KEEP_LENGTH=false
MEDIA_KEY
the media to change
LENGTH= 250
how long each piece is, in milliseconds10..5000
KEEP_LENGTH= false
play every other piece backwards instead, so the length stays the same
{mediascript:load {audio} clip
audiopingpong clip 100
render clip}
→A stuttering, back-and-forth voice, twice as long.
  • Without KEEP_LENGTH the audio is twice as long, a video is slowed down to match. seesaw plays the whole media forwards then backwards once.
  • Media without audio is left as is.

audiopitch

Raises or lowers the pitch.

audiopitch MEDIA_KEY SCALE=2.0
MEDIA_KEY
the media to change
SCALE= 2.0
pitch multiplier; below 1 is deeper0.17..2.0

audioputconcat

Adds another media's audio after this media's audio.

audioputconcat MEDIA_KEY MEDIA_KEY_2 LONGEST=false LOOP=true
MEDIA_KEY
the media to change
MEDIA_KEY_2
the media whose audio is added
LONGEST= false
make the result as long as the longer of the two
LOOP= true
loop the shorter one to fill the time

audioputmix

Mixes another media's audio on top of this media's audio.

audioputmix MEDIA_KEY MEDIA_KEY_2 LONGEST=false LOOP=true
MEDIA_KEY
the media to change
MEDIA_KEY_2
the media whose audio is mixed in
LONGEST= false
make the result as long as the longer of the two
LOOP= true
loop the shorter one to fill the time

audioputreplace

Replaces this media's audio with another media's audio.

audioputreplace MEDIA_KEY AUDIO_NAME LONGEST=false LOOP=true
MEDIA_KEY
the media to change
AUDIO_NAME
the media key whose audio is used
LONGEST= false
make the result as long as the longer of the two
LOOP= true
loop the shorter one to fill the time

audioreverb

Adds reverb, like singing in a hall.

audioreverb MEDIA_KEY DECAY=0.88 DELAY=60 VOLUME=0.4
MEDIA_KEY
the media to change
DECAY= 0.88
0.001..1.0
DELAY= 60
milliseconds1..20000
VOLUME= 0.4
0..1000

audioreverse

Reverses only the audio, leaving the video as is.

audioreverse MEDIA_KEY
MEDIA_KEY
the media to change

audiosentencemix

sentencemix

Sentence mixing: makes the media say a sentence by cutting together the words said in it.

audiosentencemix MEDIA_KEY ...SENTENCE SKIP_MISSING=false GAP=0 BPM=0
MEDIA_KEY
the media with the words (its video is cut along with them)
SENTENCE
what to make it say, every word left after the others
SKIP_MISSING= false
leave out words that aren't said instead of failing
GAP= 0
milliseconds of silence (and the last frame) between the pieces, not used with BPM0..1000
BPM= 0
fit every word to a beat at this tempo (0: off)30..600
{mediascript:load {video} clip
audiosentencemix clip i can do that
render clip}
→The clip saying "I can do that", cut out of its own words.
{mediascript:load {video} clip
audiosentencemix clip i want /d-ow-n-ah-t-s/
render clip}
→The clip saying "I want donuts", with "donuts" pieced together from sounds of its other words.
{mediascript:load {video} clip
audiosentencemix clip i^2 can^4 do^5 that^7*2 BPM=120
render clip}
→The same words on a 120 bpm beat, each one pitched a step higher and the last held for two beats.
  • The words are found with speech recognition. Words said one after another stay one piece, and a word that isn't said is built from two or three that are (hotdog from hot and dog), or else from their sounds (notsobot from not so and the sounds of other words). Without SKIP_MISSING it fails, listing the words it couldn't find.
  • A word can end in marks: word^3 pitches it 3 semitones up (^-2 down, up to 24 either way), word*2 makes it twice as long without changing its pitch (0.25 to 4), and both go together as word^3*2. A _ on its own is a rest of a quarter second (_*2 twice that). A marked word is cut on its own instead of as part of a phrase.
  • A word can be written as its sounds between slashes, with - between them: /d-ow-n-ah-t-s/ is "donuts". It's built from those sounds of the words that are said, like a word that isn't said, and takes marks too (/d-ow-n-ah-t-s/^3). The sounds are ARPAbet codes (aa ae ah ao aw ax ay b ch d dh eh er ey f g hh ih iy jh k l m n ng ow oy p r s sh t th uh uw v w y z zh), or IPA symbols.
  • With BPM every word takes one beat: it's stretched or sped up to fill it (stretched to twice as long at most, the rest of the beat is silence), word*2 then means two beats (0.125 to 16) and _ rests for a beat. It's the word's vowel that lands on the beat, the consonants before it (the tr of try) play just ahead of it. The video is slowed and sped up along with the words.
  • Only the first 15 minutes are listened to. The result is an mp4, or an mp3 without video, at most 10 minutes long. Counts toward the ffmpeg limit.

audiotoimage

audio2imgspectrogram

Turns audio into a picture: its spectrogram, its bytes as pixels or an SSTV signal's picture.

audiotoimage MEDIA_KEY MODE=spectrogram LOW=100 HIGH=12000 SCALE=linear INVERT=false
MEDIA_KEY
the audio or video
MODE= spectrogram
spectrogram draws its frequencies over time, raw its samples' bytes as pixels, sstv decodes an SSTV signal
LOW= 100
the frequency (hz) at the bottom of the image20..20000
HIGH= 12000
the frequency (hz) at the top of the image20..20000
SCALE= linear
log gives every octave the same height
INVERT= false
loud is dark instead of bright
{mediascript:load {audio} snd
audiotoimage snd
render snd}
→A png of the sound's spectrogram.
{mediascript:load {image} img
imagetoaudio img
audiotoimage img
render img}
→The picture again, after a trip through sound.
  • Columns are time and rows are frequencies, brightness is how loud (60 dB below the loudest spot is black). It's laid out like imagetoaudio draws, so a sound it made shows its picture again.
  • The whole sound is drawn, a long one squeezed into at most 2048 columns that each average its stretch.
  • LOW, HIGH, SCALE and INVERT only apply to the spectrogram. raw turns back into the audio with imagetoaudio or convert while it stays a png, sstv errors when there is no signal (its header has to be in the first minute).
  • Counts toward the ffmpeg limit.

audiotremolo

Adds tremolo (a pulsing volume).

audiotremolo MEDIA_KEY FREQUENCY=5 DEPTH=0.5
MEDIA_KEY
the media to change
FREQUENCY= 5
pulses per second0.1..20000.0
DEPTH= 0.5
0.0..1.0

audiovibrato

Adds vibrato (a wobbling pitch): a plain sine one, or one whose pitch follows a curve you draw, in the spirit of the VEGAS Vibrato plugin.

audiovibrato MEDIA_KEY FREQUENCY=5.0 DEPTH=0.5 SEMITONES=none POINTS=none BLEND=false
MEDIA_KEY
the media to change
FREQUENCY= 5.0
wobbles per second, or times a second the curve goes round (0.001 to 1000 then)0.1..20000.0
DEPTH= 0.5
how far the plain vibrato moves the pitch0.0..1.0
SEMITONES= none
how many semitones a depth of 1 on the curve is (12 when only POINTS or BLEND is given); setting it (or POINTS or BLEND) switches to the curve vibrato-24..24
POINTS= 0,0 0.25,1 0.75,-1 1,0
the curve, phase (0 to 1),depth (-1 to 1) pairs split by spaces (in quotes) or ;, up to 64. It goes straight between points and from the last back to the first
BLEND= false
fade over the skip back at the start of each cycle instead of jumping
{mediascript:load {video} clip
audiovibrato clip
render clip}
→The plain sine vibrato.
{mediascript:load {video} clip
audiovibrato clip semitones=2 frequency=6
render clip}
→A singer-like vibrato, 2 semitones up and down six times a second.
{mediascript:load {video} clip
audiovibrato clip semitones=24 points="0,0 1,1" frequency=3.3
render clip}
→The pitch climbs two octaves and drops back 3.3 times a second, stuttering.
{mediascript:load {video} clip
audiovibrato clip semitones=12 points=0,-1;0.5,1;1,-1 frequency=2 blend=true
render clip}
→An octave either way, a triangle, with the skips faded.
  • The curve vibrato reads the sound faster or slower to move its pitch, and starts every cycle back in step with the video. A curve that goes as far down as up plays on smoothly; one that is mostly up (or down) has to skip back (or ahead) once a cycle, the stutter Vegas vibratos are known for, and BLEND fades over it. The media keeps its length.
  • It isn't matched to a Vegas render yet, so it may not sound exactly like the plugin.

audiowahwah

audiowah

Adds a wah-wah: a band of the sound turned up, sweeping up and down.

audiowahwah MEDIA_KEY RATE=1 DEPTH=70
MEDIA_KEY
the media to change
RATE= 1
sweeps per second0.1..10
DEPTH= 70
how wide the sweep is; it starts at 350 Hz and 100 goes up 4 octaves0..100
  • Media without audio is left as is.

imagetoaudio

img2audiosonify

Turns an image into sound, drawn into its spectrogram or played as raw bytes.

imagetoaudio MEDIA_KEY MODE=spectrogram DURATION=none LOW=100 HIGH=12000 SCALE=linear INVERT=false
MEDIA_KEY
the image
MODE= spectrogram
spectrogram draws the image into the sound, raw plays its pixel bytes as samples
DURATION= none
seconds, a still is 5 and an animation its own length when none0.5..30
LOW= 100
the frequency (hz) at the bottom of the image20..20000
HIGH= 12000
the frequency (hz) at the top of the image20..20000
SCALE= linear
log gives every octave the same height
INVERT= false
dark pixels are loud instead of bright ones
{mediascript:load {image} img
imagetoaudio img
render img}
→An mp3 whose spectrogram shows the image.
{mediascript:load {image} img
imagetoaudio img raw
render img}
→The image's pixels played as raw 8-bit sound.
  • Columns are time and rows are frequencies, brightness is how loud. Transparent pixels are silent.
  • An animation's frames play one after another, each for as long as it's shown.
  • In raw mode only DURATION applies: the image is resized to last that long, or kept at its own length (up to 30 seconds).
  • Without MODE, a raw picture (audio converted to an image) plays back the audio it was made from instead of its noisy spectrogram.
  • Counts toward the ffmpeg limit.

multipitch

Pitch shifts the audio by semitones without changing its speed, or mixes several pitched copies into a chord (like the multipitch program in effect tags).

multipitch MEDIA_KEY SEMITONES=0,7,12 NORMALIZE=false ENGINE=bungee FORMANTS=false
MEDIA_KEY
the media to change
SEMITONES= 0,7,12
one number to shift, or several split by commas (or by spaces inside quotes) to mix a copy at each pitch (0 is the original). A chord name stands for its notes, and @VOLUME after a value sets that copy's volume (0 to 4, like 7@0.5)-48..48 each, up to 12
NORMALIZE= false
turn the mix down so the copies don't add up to clipping
ENGINE= bungee
bungee, rubberband, signalsmith, a17 or elastique, the pitch shifter each copy is made with (the first three are the multipitch program's --backend)
FORMANTS= false
keep a voice sounding like the same person instead of a chipmunk or a giant, elastique and rubberband only
{mediascript:load {video} clip
multipitch clip 7
render clip}
→Raises the audio a fifth, the video stays the same.
{mediascript:load {video} clip
multipitch clip 0,7,12
render clip}
→A chord: the original audio, a fifth up and an octave up, mixed together.
{mediascript:load {video} clip
multipitch clip 0,7,12 engine=rubberband
render clip}
→The same chord made with rubberband, sounding like rubberband=pitch= in an ffmpeg line.
{mediascript:load {video} clip
multipitch clip -5 engine=a17
render clip}
→Lowers the audio 5 semitones with A17's metallic, buzzy splices.
{mediascript:load {video} clip
multipitch clip "-12 -5 0 7" engine=elastique formants=true
render clip}
→A four-voice chord with élastique where every copy still sounds like the same speaker.
{mediascript:load {video} clip
multipitch clip "major 12@0.5"
render clip}
→A major chord (0, 4 and 7) plus a quieter octave on top.
  • Uses Bungee by default, the multipitch program's default backend. ENGINE=rubberband and ENGINE=signalsmith match its --backend rubberband and --backend signalsmith. ENGINE=a17 is the old "A17 Drums (minimum echo)" pitch shift: the sound is cut into 25 ms pieces that are each sped up or slowed down and joined with short fades, so the timing stays tight and held notes get a metallic buzz. ENGINE=elastique is Vegas's élastique Pro, a clean shift that keeps drum hits sharp. Every pitch is made at the same time.
  • Chord names: major, minor, power, octave, sus2, sus4, dim, aug, maj7, min7, dom7 (maj, min and octaves work too). Each note counts toward the 12 pitches, and a pitch that comes up twice is only made once.
  • Without NORMALIZE the copies add up, like --no-normalize in tags, so big chords get loud. Counts toward the ffmpeg limit.

sstv

Turns an image into a slow-scan TV signal that SSTV decoder apps can read.

sstv MEDIA_KEY MODE=martin1
MEDIA_KEY
the image
MODE= martin1
martin1, martin2, scottie1, scottie2, robot36 or pd120
{mediascript:load {image} img
sstv img robot36
render img}
→A 36 second Robot 36 signal of the image.
  • Decoders like the Robot36 app, MMSSTV and QSSTV pick the mode from the signal's header.
  • Converting the audio back to an image (convert MEDIA_KEY image/png) decodes it into the picture again.
  • Only the first frame is sent, fitted on black to the mode's size (320x256 for Martin and Scottie, 320x240 for Robot 36, 640x496 for PD 120).
  • Lengths: Martin 1 114s, Martin 2 58s, Scottie 1 110s, Scottie 2 71s, Robot 36 36s, PD 120 126s.
  • Counts toward the ffmpeg limit.

vocoder

vocode

Makes the voice in your media sing another media's music: the music plays shaped by how the voice sounds, like the "autotune" (autotune.exe) vocoder in effect tags.

vocoder MEDIA_KEY CARRIER_KEY BANDS=75
MEDIA_KEY
the media with the voice (it keeps its video)
CARRIER_KEY
the media whose sound the voice is played on, usually music. It loops to the voice's length
BANDS= 75
how many frequency bands the voice is split into: fewer sounds more robotic, more sounds clearer1..512
{mediascript:load {video} clip
load https://cdn.nsb.gg/assets/samples/music.mp3 song
vocoder clip song
render clip}
→The clip's voice singing the song, the video stays the same.
{mediascript:load {audio} voice
load https://cdn.nsb.gg/assets/samples/music.mp3 synth
vocoder voice synth 16
render voice}
→A robotic 16 band vocoder.
  • A channel vocoder like the Zerius Vocoder that autotune.exe is: about 1/15 second windows, split into BANDS bands, with the music's bands made as loud as the voice's and the result as loud as the music. It is not pitch correction.
  • The result is mono. Counts toward the ffmpeg limit. Outside of tags, the bot has the same thing as the .vocoder command (voice first, then the music) and /media-av-pitch vocoder.
  • To sing a chord without a second media, use vocoderchord.

vocoderchord

chordvocoder

Makes the voice in your media sing a chord, no music needed: the chord is made for it and shaped by how the voice sounds.

vocoderchord MEDIA_KEY CHORD=C4,E4,G4 SYNTH=choir BANDS=75
MEDIA_KEY
the media with the voice (it keeps its video)
CHORD= C4,E4,G4
up to 8 notes split by commas: a letter, # or b, then the octave (octave 4 has middle C), like A3,C#4,E4. Frequencies in Hz work too
SYNTH= choir
the sound the chord is played with: choir (soft voices with vibrato), robot (one square wave), saw (bright and wide), pad (slow and dark), organ or power (a big, buzzy lead in the spirit of Vocodex's Power carrier)
BANDS= 75
how many frequency bands the voice is split into: fewer sounds more robotic, more sounds clearer1..512
{mediascript:load {video} clip
vocoderchord clip
render clip}
→The clip's voice singing a C major chord.
{mediascript:load {audio} voice
vocoderchord voice A3,C4,E4 pad
render voice}
→A minor chord with a slow, dark pad.
{mediascript:load {audio} voice
vocoderchord voice C3,G3,C4 robot 16
render voice}
→A robotic 16 band vocoder on a plain square wave.
  • Each note is a few detuned voices of the synth sound, with a little hiss so the voice's s and t sounds still come through. Our own sounds, not a copy of any plugin's.
  • The result is mono. Counts toward the ffmpeg limit. Outside of tags, the bot has the same thing as the .vocoderchord command and /media-av-pitch vocoder-chord.

vocodermelody

melodyvocoder

Makes the voice in your media sing a melody: notes one after another, looped to the voice's length.

vocodermelody MEDIA_KEY NOTES BPM=120 SYNTH=choir BANDS=75
MEDIA_KEY
the media with the voice (it keeps its video)
NOTES
steps split by commas: a note (C4, F#3), a chord joined by + (C4+E4+G4) or r for a rest. Each is a beat long unless it ends in :BEATS (G4:2, r:0.5). At most 1024 steps
BPM= 120
beats per minute20..400
SYNTH= choir
the sound the melody is played with, as in vocoderchord
BANDS= 75
how many frequency bands the voice is split into: fewer sounds more robotic, more sounds clearer1..512
{mediascript:load {audio} voice
vocodermelody voice C4,E4,G4,C5:2,G4,E4:2 160
render voice}
→The voice singing an arpeggio up and back down.
{mediascript:load {video} clip
vocodermelody clip A3+C4+E4:4,F3+A3+C4:4 90 power
render clip}
→Two big, buzzy chords, four beats each.
  • Outside of tags, .vocodermelody and /media-av-pitch vocoder-melody also take a MIDI file (.mid) in place of the notes: every track but the drums, the highest 8 notes at a time.
  • The result is mono. Counts toward the ffmpeg limit.

volume

Sets the volume level.

volume MEDIA_KEY AMOUNT
MEDIA_KEY
the media to change
AMOUNT
volume level0..1000

waveform

Draws the audio's waveform as an image.

waveform MEDIA_KEY COLOR=none SPLIT=false
MEDIA_KEY
the audio or video
COLOR= none
the waveform's color
SPLIT= false
draw each channel on its own row
  • The result is an image with a transparent background.