QuickTime (.mov, .qt)
Background & Context
-
- Registered MIME type: video/quicktime
- Apple QuickTime file format.
- Multimedia container format.
- Can contain multiple video, audio and subtitle tracks.
- Commonly used for archiving and exchanging video content.
- Stores audio and video in a format suitable for synchronous playback.
- Binary format.
- Supports a variety of audio and video codecs.
- Introduced in 1991 by Apple.
Import & Export
- Import["file.mov"] imports a QuickTime file and returns a Video object.
- Import["file.mov",elem] imports the specified element.
- The import format can be specified with Import["file","QuickTime"] or Import["file",{"QuickTime",elem,…}].
- The "QuickTime" format must be explicitly specified when using certain third-party QuickTime add-ons.
- Export["file.mov",expr] exports expr to the QuickTime format.
- The following expressions can be exported to a QuickTime:
-
video an arbitrary Video object AnimatedImage[…] frames of an AnimatedImage object Manipulate[…] frames generated from a Manipulate expression {expr1,expr2,…} a list of images, graphics or rasterized expressions - When exporting a list of arbitrary expressions, each expression is rasterized and has the same raster size as its displayed form.
- The duration of the QuickTime video is determined from the number of frames and the specified frame rate.
- If bookmarks are set in the Manipulate object, Export will create a QuickTime file by interpolating between the bookmarks while preserving the speed and duration of the Manipulate.
- Export["file.mov",{elem1expr1,elem2expr2,…},"Rules"] uses rules to specify the elements to be exported.
- Supported video encoders are listed in $VideoEncoders.
- See the following reference pages for full general information:
-
Import, Export import from or export to a file CloudImport, CloudExport import from or export to a cloud object ImportString, ExportString import from or export to a string ImportByteArray, ExportByteArray import from or export to a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Video representation elements:
-
"ImageList" frames represented as a list of images "Video" video file represented as a Video object "VideoData" array of raw bitmap data for each frame "VideoStream" a handle to the video file as a VideoStream object - Import by default uses the "Video" element for the QuickTime format.
- A video file may contain multiple video, audio or subtitle tracks. Elements that return the number of tracks:
-
"AudioTrackCount" number of audio tracks "SubtitleTrackCount" number of subtitle tracks "VideoTrackCount" number of video tracks - Video metadata elements:
-
"BitDepth" bits used to represent each color channel in the file "ColorSpace" color encoding used in the file "FrameCount" number of frames in the file "FrameDurations" list of display durations given for each frame "FrameRate" number of frames to be displayed per second "RasterSize" raster dimensions "VideoEncoding" video codec used in the file - Audio-related elements:
-
"Audio" in-core Audio object "AudioChannels" number of audio channels "AudioData" array of audio samples "AudioEncoding" audio codec used in the file "AudioFile" out-of-core Audio object "BitRate" number of bits per second "SampleRate" number of audio samples per second - Subtitle-related elements:
-
"RawSubtitle" subtitle data imported as a raw string "SubtitleRules" returned as a list of styled text in the form of {int1text1,int2text2,…} "SubtitleString" returned as a single string of concatenated subtitle texts "SubtitleStringRules" returned as a list of plaintext in the form of {int1string1,int2string2,…} "SubtitleEncoding" subtitle codec used in the file - Additional metadata elements:
-
"Duration" approximate duration of the video given in seconds "ExactDurations" an association of exact durations for all video, audio and subtitle tracks "ExactTimeBoundaries" an association of exact start and end times for all video, audio and subtitle tracks "MetaInformation" metadata interpreted as quantities, locations, dates, numbers, etc. "RawMetaInformation" uninterpreted metadata as strings and numbers "Summary" summary of the file "TrackStartTimes" an association of start times for each track - $VideoDecoders and $AudioDecoders give a list of decoders available on your computer system.
Export Elements
- Export["file.mov",{elem1->expr1,…},"Rules"] uses rules to specify the elements to be exported.
- Available Export elements:
-
"Audio" an audio track "Frames" video frames provided as a list, a Manipulate or an AnimatedImage object
Options
- General Import options:
-
AudioTrackSelection 1 audio tracks of interest "ImageTopOrientation" Automatic orientation of the video as stored in the file RasterSize Automatic raster dimensions SubtitleTrackSelection 1 subtitle tracks of interest VideoTrackSelection 1 video tracks of interest - Import options for the "Audio" element:
-
"AudioChannels" Automatic number of audio channels SampleRate Automatic samples per second for each channel - Import and Export option:
-
IncludeMetaInformation All metadata types to import and export - Supported IncludeMetaInformation settings are: "M4A", "RawM4A", All and None.
- General Export options:
-
AudioEncoding Automatic audio encoding for file Background Automatic background color BitRate Automatic approximate bit rate to use CompressionLevel Automatic compression level to use FrameRate Automatic number of frames shown per second MetaInformation Automatic metadata to export RasterSize Automatic pixel dimensions SampleRate Automatic samples per second for each channel VideoEncoding Automatic video encoding for file VideoTransparency False whether to export the transparency channel - Export options for the "Video" and "VideoStream" elements:
-
AudioTrackSelection All audio tracks of interest SubtitleTrackSelection All subtitle tracks of interest VideoTrackSelection All video tracks of interest "Streamable" Automatic make a video suitable for streaming - Export options when exporting Manipulate expressions:
-
"AnimationDuration" Automatic total animation duration "ControlAppearance" Automatic how Manipulate control elements are rendered in the exported file - The following settings can be given for "ControlAppearance":
-
Automatic captures user controls exactly as seen in the notebook interface, using the style elements of the local computer system "Generic" renders graphical controls in a generic style None excludes control elements when exporting an animation - $VideoEncoders and $AudioEncoders give a list of encoders available on your computer system.
Examples
open allclose allBasic Examples (3)
Scope (7)
Export (5)
Export a list of images to QuickTime:
Get three frames from the video:
Export a Manipulate to QuickTime:
Export an AnimatedImage object:
Export a Manipulate with audio:
When exporting Graphics, frames are rasterized to the size of the first frame:
Import Elements (34)
Video Elements (3)
"Video" (1)
"VideoData" (1)
Import video data corresponding to specified frames:
Convert video data stored in a NumericArray object to an image:
"VideoStream" (1)
Number of Tracks (3)
Metadata Elements (7)
"Duration" (2)
"ExactDurations" (2)
Video Tracks (7)
"VideoEncoding" (1)
Audio Tracks (7)
"Audio" (1)
Import Audio from a QuickTime file:
"AudioData" (1)
Import audio data from a QuickTime file as a NumericArray:
Convert audio data stored to an Audio object:
"AudioEncoding" (1)
"AudioFile" (1)
Subtitle Tracks (5)
"RawSubtitle" (1)
"SubtitleEncoding" (1)
"SubtitleRules" (1)
"SubtitleString" (1)
"SubtitleStringRules" (1)
Import Options (11)
AudioTrackSelection (1)
By default, Import extracts data only from the first audio track:
Use the AudioTrackSelection option to extract data from specified audio tracks:
"ImageTopOrientation" (1)
IncludeMetaInformation (3)
RasterSize (1)
SampleRate (1)
SubtitleTrackSelection (1)
By default, Import extracts data only from the first subtitle track:
Use the SubtitleTrackSelection option to extract data from specified subtitle tracks:
VideoTrackSelection (1)
By default, Import extracts data only from the first video track:
Use the VideoTrackSelection option to extract data from specified video tracks:
Export Options (23)
"AnimationDuration" (1)
Specify the duration of exported Manipulate expressions:
AudioTrackSelection (1)
Background (1)
BitRate (4)
By default, automatic bit rate is used when exporting to video files:
Check an overall approximate bit rate:
Suggest an approximate bit rate:
Check the approximate bit rate that might slightly differ from the suggested one:
Separately specify the approximate video and audio bit rates:
Check an overall approximate bit rate:
Smaller bit rate results in smaller file size but also lowers the quality of the generated video:
CompressionLevel (2)
Use the CompressionLevel option to control the file size and the quality of generated video:
When BitRate for both video and audio is specified, the value of CompressionLevel is ignored:
"ControlAppearance" (1)
An animation exported with the default setting "ControlAppearance"Automatic will look different depending on the computer system on which it was created:
With "ControlAppearance"None, no user controls are included in the exported video:
FrameRate (1)
By default, the frame rate is preserved when exporting Video or VideoStream objects:
IncludeMetaInformation (3)
By default, all existing metainformation from Audio object is exported:
MetaInformation (1)
By default, all supported metadata from the input video file is exported:
Compare with the metadata from the original file:
Export specified metadata; only selected tags are supported for "QuickTime":
RasterSize (1)
By default, the raster size is preserved when exporting Video or VideoStream objects:
SampleRate (1)
By default, the sample rate is preserved when exporting Video, VideoStream or Audio objects:
SubtitleTrackSelection (1)
VideoTrackSelection (1)
VideoTransparency (1)
Generate a video with an alpha channel:
By default, Export removes the transparency: