Syntax
vw=Videoquickstart([fname])
Input Parameter
fname : | | optional file name; default is name of caller |
Output Parameter
Copyright 2021-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This algorithm is designed to create videos from figures using a simplified approach. It is part of the SG-Library and was introduced in SolidGeometry 5.0. The function is named Videoquickstart
and is used to start a video recording session.
Input Parameters
- fname: An optional file name for the video. If not provided, the default is the name of the caller function.
Output Results
- vw: A Video Writer object that is used to write video frames.
Algorithm Steps
- The function begins by retrieving the file name using
getfuncparams
, which checks the input arguments and assigns a default name if none is provided.
- Any colons in the file name are replaced with underscores to ensure compatibility with file systems.
- The full path for the video file is constructed. If the file name does not contain a directory separator, it is prefixed with the desktop directory path.
- A
VideoWriter
object is created with the specified file name and the 'MPEG-4' format. The video writer is then opened to start recording.
- If the function is called without output arguments, it checks if there is an existing global video writer object
Videoquick_vw
. If so, it closes the existing video writer before assigning the new one to the global variable.
- If the function is called from the command line, it opens a new figure window using
SGfigure
.
The function is part of a suite of tools for video creation, including Videoquickwritetextpage
for displaying text pages, Videoquickwritegcf
for writing the current figure to the video, and Videoquickcloseandopen
for closing and reopening the video.
Algorithm explaination created using ChatGPT on 2025-08-19 07:11. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21