Video
Video[file]
represents video stored in the given file.
Video[url]
represents video stored in the given URL.
Details and Options
- Video is an object that can be input and output to functions, displayed as a video player.
- The video file can be in any of the supported video formats including MP4, Matroska, QuickTime and Ogg.
- On most platforms, popular video codecs such as H264 and HEVC are supported. See $VideoDecoders for a complete list of containers and decoders.
- The video may contain multiple video, audio and subtitle tracks.
- The Video object respects the camera rotations and assumes the top of the image to be aligned with the top of the camera.
- The Video object can be created from any of the following sources:
-
File["file"] or "file"file name, searched for on $Path URL["url"] or "url"HTTP, HTTPS or FTP URL CloudObject[…]a cloud object LocalObject[…]a local object ResourceObject[…]a resource object - Video[anim] can be used to generate a Video object by exporting frames from the following expressions:
-
AnimatedImage[…]an animated image Manipulate[…]a Manipulate, Animate or ListAnimate object - Video is treated as a raw object by functions like AtomQ and for purposes of pattern matching.
- The following options can be specified:
-
Appearance Automaticappearance of the generated player AudioOutputDevice$DefaultAudioOutputDeviceaudio output device to use for playback AudioTrackSelection Automaticaudio tracks selection ImageSize Automaticdisplay size of the video frames PlaybackSettingsAutomaticvideo playback settings RasterSize Automaticdimensions of video frames SoundVolume1sound volume SubtitleTrackSelection Automaticsubtitles tracks selection VideoTrackSelection Automaticvideo tracks selection - Possible settings for Appearance are "Thumbnail", "Minimal" and "Basic".
- Information for Video may include the following properties:
-
"Duration"duration of the longest track "FrameRate"frame rate for each video track "RasterSize"image dimensions to use for video tracks "ResourcePath"path to the audio file "SampleRate"sampling rate for each audio track
Examples
open allclose allBasic Examples (1)
Create a Video object linking to a local file:
Check that the created video is valid:
Get general information about the video:
Scope (6)
Create a Video object from a file:
Create a video from a CloudObject:
Create a video from a ResourceObject:
Create a video from a Manipulate:
Create a video from a Manipulate with some audio:
Options (8)
Appearance (3)
By default, the "Basic" appearance provides some controls for playback position, track selection and more:
Use the "Minimal" appearance that plays the video in the notebook:
Use the "Thumbnail" appearance to open the video in an external player:
AudioTrackSelection (1)
By default, the video will contain all the audio tracks present in the file:
ImageSize (1)
By default, an automatic display size is used:
RasterSize (1)
By default, the video is at its full resolution:
Compare to the original frame dimensions:
Specify the pixel dimensions of each frame to be returned from the created video:
Video functions such as VideoExtractFrames respect the RasterSize setting:
SubtitleTrackSelection (1)
By default, the video will contain all the subtitle tracks present in the file:
Select only one subtitle track:
VideoTrackSelection (1)
Create a video file with multiple video tracks:
By default, the video will contain all the video tracks present in the file:
Applications (2)
Create a collage of video frames to show a summary of a video:
Analyze a video to find transitions from one scene to another:
Plot the result, showing times with significant scene change:
Properties & Relations (3)
A valid Video expression is considered a raw object for pattern-matching purposes:
This does not apply to invalid expressions:
The video content is not actually stored in the Video expression:
By default, Import uses the "Video" element, which makes a Video object from a video file:
Possible Issues (1)
Constructing a Video object from a URL may take a longer time:
Download the file and create a video from the local file instead: