WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

OverlayVideo [background,o]

gives the result of overlaying o onto a background video or image background.

OverlayVideo [background,{o1,o2,}]

gives the result of overlaying o1, o2, .

OverlayVideo [background,{interval1o1,}]

overlays each oi during the time interval intervali.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Time Specification  
Position Specification  
Applications  
See Also
Related Guides
History
Cite this Page

OverlayVideo [background,o]

gives the result of overlaying o onto a background video or image background.

OverlayVideo [background,{o1,o2,}]

gives the result of overlaying o1, o2, .

OverlayVideo [background,{interval1o1,}]

overlays each oi during the time interval intervali.

Details and Options

  • OverlayVideo is also known as picture in picture.
  • Video overlay is typically used to give a talking head together with a presentation, add logos and other graphics onto a video, or replace a background with another video.
  • The background can be a video or an image.
  • The overlays oi can be any of the following:
  • image an Image or Graphics placed at the bottom-right corner
    video a Video object placed at the bottom-right corner
    text a string or styled text
    expr an arbitrary expression, rasterized at its normal display size
    Placed [expr,pos] an object placed at pos
    Placed [expr,{pos,opos}] places position opos in expr at position pos
    Placed [expr,{pos,Inherited }] uses specified position pos for opos
    f an arbitrary function generating any valid overlay
  • The position pos in background or the position opos in overlay can be specified in the following ways:
  • {x,y} absolute pixel offset from the bottom-left corner
    Scaled [{sx,sy}] scaled position from 0 to 1 across the object
    posfunc an arbitrary function returning a position
    {posx,posy} named positions Top , Bottom , Left , Right or Center
  • Time intervals intervali can be any of the following:
  • {t1,t2} starting at t1, ending at t2
    t1 starting at t1, ending when overlay or background end
  • OverlayVideo always gives a video with the same pixel size as background.
  • By default, OverlayVideo places the new video under the "Video" directory in $WolframDocumentsDirectory .
  • Options to control properties of the output video are:
  • CompressionLevel Automatic compression level to use
    FrameRate Automatic the frame rate to use
    GeneratedAssetFormat Automatic the format of the result
    OverwriteTarget False whether to overwrite an existing file
    VideoEncoding Automatic video encoding to use
    VideoTransparency False whether the output video should have a transparency channel
  • Audio and subtitle tracks of all input video objects are copied over to the resulting video.

Examples

open all close all

Basic Examples  (2)

Overlay an image onto a video:

Overlay a video on another video:

Overlay the videos and display the result:

Scope  (8)

Basic Uses  (2)

Overlay a video on top of an Image :

Overlay two images on top of a video:

Time Specification  (1)

Specify the time interval at which an overlay will be displayed:

Position Specification  (5)

By default, the overlay is placed at the bottom-right corner of the background:

Specify a position for the center of the overlay:

Specify a named position for the center of the overlay:

Specify which point of the overlay aligns with the specified background position:

Specify a scaled position for the center of the overlay:

Applications  (1)

Add a logo as a watermark on every frame of a video:

Wolfram Research (2021), OverlayVideo, Wolfram Language function, https://reference.wolfram.com/language/ref/OverlayVideo.html (updated 2024).

Text

Wolfram Research (2021), OverlayVideo, Wolfram Language function, https://reference.wolfram.com/language/ref/OverlayVideo.html (updated 2024).

CMS

Wolfram Language. 2021. "OverlayVideo." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/OverlayVideo.html.

APA

Wolfram Language. (2021). OverlayVideo. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OverlayVideo.html

BibTeX

@misc{reference.wolfram_2025_overlayvideo, author="Wolfram Research", title="{OverlayVideo}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/OverlayVideo.html}", note=[Accessed: 16-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_overlayvideo, organization={Wolfram Research}, title={OverlayVideo}, year={2024}, url={https://reference.wolfram.com/language/ref/OverlayVideo.html}, note=[Accessed: 16-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /