![textinputstream xojo textinputstream xojo](https://lh5.googleusercontent.com/-8bzTeVcwLQ0/U5JI5r1gj_I/AAAAAAAAV1M/V-H5wJSofs4/s320/07.gif)
add the transformer layer instructions, then add to video composition and use a transform to move pixels into visible area of render size above dim trans as CGAffineTransformMBS = CGAffineTransformMBS.MakeTranslation(-r.Origin.x, -r.Origin.y) here we define area of interest dim r as CGRectMBS = CGMakeRectMBS( 15, 450, 1440, 600) Instruction.timeRange = CMTimeRangeMBS.AllTimeRangeĭim transformers() as AVMutableVideoCompositionLayerInstructionMBSįor each videoTrack as AVAssetTrackMBS in mvideotracksĭim transformer as AVMutableVideoCompositionLayerInstructionMBS = CompositionLayerInstructionWithAssetTrack(videoTrack) CHANGE 20611 DocLangRef: Updated docs to indicate that WebApplication.Icon is used as the FavIcon.
![textinputstream xojo textinputstream xojo](https://lh5.googleusercontent.com/-g0whl8h92qc/U5JHhHxel2I/AAAAAAAAV0A/Gn0iLutzczg/s320/02.gif)
CHANGE 14413 DocLangRef: Updated deprecation messages for FolderItem.MacDirID and MacVRefNum. Log "videotracks count: "+str(mvideotracks.Ubound+ 1)ĭim instruction as AVMutableVideoCompositionInstructionMBS = CompositionInstruction CHANGE 22973 DocLangRef: TextInputStream.PositionB is a read/write property. VideoComposition.renderSize = CGMakeSizeMBS( 1440, 600)ĭim Instructions() as AVMutableVideoCompositionInstructionMBSĭim mvideotracks() as AVAssetTrackMBS = m.tracksWithMediaType(AVFoundationMBS.AVMediaTypeVideo) VideoComposition = AVMutableVideoCompositionMBS.mutableVideoComposition Log "Total duration: "+str(m.duration.Seconds)+ " seconds" dim timeRange as CMTimeRangeMBS = CMTimeRangeMBS.Make(CMTimeMBS.kCMTimeZero, m.duration) If error nil then dim e as string = error.LocalizedDescription
![textinputstream xojo textinputstream xojo](https://blog.xojo.com/wp-content/uploads/2021/06/CleanShot-2021-06-11-at-10.54.11@2x-1536x1205.png)
SourceTimeRange = CMTimeRangeMBS.Make(CMTimeMBS.kCMTimeZero, t)Įnd if end if call m.insertTimeRange(sourceTimeRange, asset, m.duration, error) SourceTimeRange = CMTimeRangeMBS.Make(t, len.Subtract(t))Įnd if end if if bisZeit "" then dim t as CMTimeMBS = ParseTime(bisZeit) If abZeit "" then dim t as CMTimeMBS = ParseTime(abZeit) dim f as FolderItem = folder.Child( "list.txt")ĭim tis as TextInputStream = TextInputStream.Open(f)ĭim tab as string = ( 9)ĭim m as AVMutableCompositionMBS = positionĭim line as string = tis.ReadLine(encodings.UTF8)ĭim name as string = NthField(line, tab, 1)ĭim abZeit as string = NthField(line, tab, 2)ĭim bisZeit as string = NthField(line, tab, 3)ĭim file as FolderItem = folder.Child(name)ĭim asset as AVAssetMBS = AVAssetMBS.assetWithFile(file)ĭim sourceTimeRange as CMTimeRangeMBS = CMTimeRangeMBS.Make(CMTimeMBS.kCMTimeZero, len) we read a list.txt in folder with file names and times // Name tab StartTime tab EndTime // we merge all videos by adding the video together // than we crop videos //Create AVMutableComposition Object which will hold our multiple AVMutableCompositionTrack or we can say it will hold our video and audio files.