Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

AVAsset.OpenFile

Opens an asset from a file.

Component Version macOS Windows Linux Server iOS SDK
AVAsset 5.2 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ✅ Yes
MBS( "AVAsset.OpenFile"; Path )   More

Parameters

Parameter Description Example
Path The native file path to the movie file. "/Test.mov"

Result

Returns asset reference number or error.

Description

Opens an asset from a file.
Please allow a second to load video in background asynchronously.
Available in OS X v10.7 and later.

Please call AVAsset.Release later to free object from memory.

You can use AVExport.ExportSession to export to a new file. With AVExport.SetTimeRange you can only export a clip and with AVExport.ExportSessionMerge you can merge multiple videos to one.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.

Examples

Opens a movie file:

MBS( "AVAsset.OpenFile"; "/Users/cs/Desktop/test.mp4" )

Close it later

MBS( "AVAsset.Release"; $asset )

See also

Example Databases

This function checks for a license.

Created 19th June 2015, last changed 2nd February 2022


AVAsset.OpenContainer - AVAsset.OpenURL