skyline B/S模式下脚本实现输出视频

//选择漫游节点
var item = SGWorld.ProjectTree.FindItem( "开始漫游");
                 var object = SGWorld.ProjectTree.GetObject(item);
                
                 var ob = new Object();
//获得当前计算机的可用编码
                 var cod = object.AviWriter.GetAvailableCodecs();
                ob = cod;
                 var codinst = new VBArray(cod);
             //js数组转vbs的数组
                 var arrr = codinst.toArray();
            
                 var codeinfo = null;
                
                 for ( var j = 0; j < arrr.length; j++) {
//一般是用Microsoft Video编码输出视频
                                             codeinfo = arrr[j];
                         if (codeinfo.GetName().indexOf( "Microsoft Video") > -1) {
                                 break;
                        }
                }
//输出视频
                object.AviWriter.CreateMovie( "D:\\a.avi", 400, 400, 5, codeinfo);
        }

你可能感兴趣的:(js,skyline,输出视频)