Open scttnlsn opened 10 years ago
I'd like to be able to use the output of GPUImage filters in my AVComposition. Right now I setup the tracks from the raw AVAsset:
self.url = url; self.asset = [AVURLAsset assetWithURL:self.url]; self.composition = [AVMutableComposition composition]; self.playerItem = [AVPlayerItem playerItemWithAsset:self.composition]; self.videoTrack = [self.composition addMutableTrackWithMediaType:AVMediaTypeVideo preferredTrackID:kCMPersistentTrackID_Invalid]; self.audioTrack = [self.composition addMutableTrackWithMediaType:AVMediaTypeAudio preferredTrackID:kCMPersistentTrackID_Invalid]; self.video = [[self.asset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0]; [self.videoTrack insertTimeRange:self.video.timeRange ofTrack:self.video atTime:kCMTimeZero error:nil]; self.audio = [[self.asset tracksWithMediaType:AVMediaTypeAudio] objectAtIndex:0]; [self.audioTrack insertTimeRange:self.audio.timeRange ofTrack:self.audio atTime:kCMTimeZero error:nil];
Is it possible to construct a video track that is the output of various GPUImage filters? i.e.
GPIImageMovie *movie = [[GPUImageMovie alloc] initWithAsset:self.asset]; GPUImageFilter *filter = // some filter [movie addTarget:filter]; ... self.video = // Somehow get AVAssetTrack from filter output [self.videoTrack insertTimeRange:self.video.timeRange ofTrack:self.video atTime:kCMTimeZero error:nil];
did u find any answer to this ??
I'd like to be able to use the output of GPUImage filters in my AVComposition. Right now I setup the tracks from the raw AVAsset:
Is it possible to construct a video track that is the output of various GPUImage filters? i.e.