Home > APIs > AppServer API > Examples > Asset Management > Active Format Description (AFD)
Active Format Description (AFD)
The sample code below shows how to get and set a clip's Active Format Description.
// clip to edit
string clipname = "V:/default/Clip";
string fullclipname = "edl/cmf//local/" + clipname;
// create an AppServer
bool newConnection = false;
IAppServer iappServer = appServerMgrProxy.CreateAppServer(suiteName,
appName, out newConnection);
// get an editor for clip
IMediaMgr mediaMgr = iappServer.CreateMediaMgr(appName);
IEventEditor eventEditor = (IEventEditor) mediaMgr.CreateEditor(fullclipname);
// Set asset's aspect ratio conversion - possible values:
// For SD clips "0000", "1010w", "1001", "1010", "1011" .
// “0000” = Undefined (Standard 4:3).
// “1010w” = 16x9 Full screen. (Wide screen 16:9)
// “1001” = 4x3 Full screen (Standard 4:3).
// “1010” = 16:9 Letterbox (Standard 4:3).
// “1011” = 14:9 Letterbox (Standard 4:3).
// Set asset's aspect ratio conversion - possible values:
// For HD clips "0000w", "1001w", "1010w", "1011w", "1111w"
// “0000w” = Undefined. (Wide screen 16x9).
// “1001w” = 4x3 Pillarbox. (Wide screen 16x9).
// “1010w” = 16x9 Full screen. (Wide screen 16x9).
// “1011w” = 14x9 Pillarbox. (Wide screen 16x9).
// “1111w” = 16x9 Full screen with 4x3 center. (Wide screen 16x9).
// get AFD
string currentAfdType = (string) eventEditor.GetEventProperty("","afd");
// set AFD
string newAfdType = "1001"; // 4x3 Full screen (Standard 4:3)
eventEditor.SetEventProperty("","afd", newAfdType);
// be sure to cleanup or you will leak these objects!
eventEditor.Detach();
eventEditor.Dispose();
mediaMgr.Dispose();
iappServer.CloseConnection();
