VideoRecord
VideoRecord[source]
creates a VideoStream object and records from source.
VideoRecord[vstream]
starts recording a VideoStream object vstream that is connected to an imaging device, a screen or a notebook.
Details and Options
- VideoRecord can be used to perform programmatic screen recording or a video recording from a connected camera, a screen or a livestream.
- The source can be any of the following:
-
"camera" recording from a camera in $ImagingDevices {"Screen",n} recording from the n connected screen {"Screen",n,bbox} recording from the region bbox of the n screen NotebookObject[…] recording from a notebook displayed on screen "livestream" recording from an HTTP or HTTPS livestream - Use VideoPause or VideoStop to pause or stop the recording.
- Video[vstream] returns a Video object including all the captured data available in vstream.
- By default, VideoRecord places the new video under the "Video" directory in $WolframDocumentsDirectory.
- The following options can be given:
-
AudioEncoding Automatic audio encoding to use AudioInputDevice Automatic audio device from which to record CompressionLevel Automatic compression level to use FrameRate Automatic the frame rate to use GeneratedAssetFormat Automatic the format of the result GeneratedAssetLocation $GeneratedAssetLocation the location of the result MaxDuration ∞ maximum duration of recording OverwriteTarget False whether to overwrite an existing file RasterSize Automatic the raster size used to rasterize expressions SampleRate Automatic the audio sample rate to use VideoEncoding Automatic video encoding to use
Examples
open allclose allScope (5)
Record a video from a part of the first screen:
Record a video from a notebook:
Record a video from a livestream:
Record a video from an existing VideoStream:
Options (20)
AudioEncoding (2)
Specify the audio encoder to be used in the recording:
Retrieve the result and inspect the audio encoding:
When recording an existing stream, using the AudioEncoding option will permanently change its "AudioEncoding" property:
AudioInputDevice (3)
Specify the audio input device to be used in the recording:
Plot the audio track of the result:
Use AudioInputDeviceNone to avoid recording an audio track:
Plot the audio track of the result:
When recording an existing stream, using the AudioInputDevice option will permanently change its "AudioInputDevice" property:
CompressionLevel (1)
FrameRate (2)
Specify the frame rate to be used in the recording:
Retrieve the result and inspect the frame rate:
When recording an existing stream, using the FrameRate option will permanently change its "FrameRate" property:
GeneratedAssetFormat (1)
GeneratedAssetLocation (2)
Specify the asset location to be used in the recording:
Retrieve the resulting file name:
When recording an existing stream, using the GeneratedAssetLocation option will permanently change its "GeneratedAssetLocation" property:
MaxDuration (2)
Specify the duration of the recording:
Retrieve the resulting duration:
If recording an existing stream, using the MaxDuration option will permanently change its "MaxDuration" property:
OverwriteTarget (1)
By default, if a file with the specified name already exists, the recording fails:
Use the OverwriteTarget to overwrite the existing file:
RasterSize (2)
Specify the raster size of the recording:
Retrieve the resulting raster size:
When recording an existing stream, using the RasterSize option will permanently change its "OriginalRasterSize" property:
SampleRate (2)
Specify the sample rate of the recording:
Retrieve the resulting raster size:
When recording an existing stream, using the SampleRate option will permanently change its "SampleRate" property:
VideoEncoding (2)
Specify the video encoder to be used in the recording:
Retrieve the result and inspect the audio encoding:
When recording an existing stream, using the VideoEncoding option will permanently change its "VideoEncoding" property:
Text
Wolfram Research (2021), VideoRecord, Wolfram Language function, https://reference.wolfram.com/language/ref/VideoRecord.html.
CMS
Wolfram Language. 2021. "VideoRecord." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VideoRecord.html.
APA
Wolfram Language. (2021). VideoRecord. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VideoRecord.html