VideoPlay

VideoPlay[video]

returns a new VideoStream object from video and starts the playback.

VideoPlay[vstream]

starts playing a VideoStream object vstream.

Details and Options

  • VideoPlay can be used to perform programmatic video playback.
  • VideoPlay will continually change the "Position" property of vstream starting from the current position.
  • VideoPlay by default plays the entire stream until paused, stopped or finished.
  • The following option can be specified:
  • Looping Automaticwhether to loop the playback
  • VideoPlay continues to play until either MaxDuration is reached or the maximum number of loops is played.

Examples

open allclose all

Basic Examples  (1)

Create a VideoStream object linking to a local video file:

Pause the playback:

Scope  (3)

Play a VideoStream:

Create a VideoStream from a Video object and immediately play it:

Create two separate streams from a Video object:

The two streams are independent. Play one video 0.5 seconds after the beginning of the other one:

Options  (1)

Looping  (1)

By default, the stream is played only once:

Use LoopingTrue to loop the playback:

Use an integer value to loop a specific number of times:

Stop the playback:

Applications  (4)

Build a simple video GUI:

Apply a neural networksbased function to the current frame in real time:

Highlight the results of ImageCases dynamically:

Apply an image processing function dynamically to the current frame:

Compute the result of ImageSaliencyFilter:

Make a dynamic visualization of a video stream:

Display the Spectrogram of the current audio using a color function based on the dominant colors of the current frame:

Wolfram Research (2020), VideoPlay, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoPlay.html.

Text

Wolfram Research (2020), VideoPlay, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoPlay.html.

CMS

Wolfram Language. 2020. "VideoPlay." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VideoPlay.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_videoplay, organization={Wolfram Research}, title={VideoPlay}, year={2020}, url={https://reference.wolfram.com/language/ref/VideoPlay.html}, note=[Accessed: 21-November-2024 ]}