VideoProcessWithMetal icon indicating copy to clipboard operation
VideoProcessWithMetal copied to clipboard

Process video image data with Metal shading language

VideoProcessWithMetal

It's a demo project to illustrate how to process video with Metal framework. This blog talks about the details.

The second blog talks about how to imitate Metal Performance Shaders.

Features

Click titles below to watch demo video on YouTube.

  1. Filter video sample buffer from camera

  2. Play local file with AVPlayer

  3. Transcode local file with AVAssetReader

TODO

  • [ ] Compute original texture into an intermediate texture instead of computing directly with MTKView(currentDrawable.texture)
  • [ ] Switch filter progressively when touch moved
  • [ ] Chaineble filters
  • [ ] Queueable commands(filter -> present -> append to file)
  • [ ] Clean debug information
  • [ ] Remove duplicate code