Code Monkey home page Code Monkey logo

videotoolboxh265encoder's Introduction

VideoToolbox HEVC Encoder Sample Code

Sample code that capture and encode video into HEVC (or H.264) with AVFoundation and VideoToolbox. The code is in Swift 4 and tested on XCode 9.2 / iOS 11.2.1 / iPhone X.

Based on tomisacat's VideoToolboxCompression project.

Brief instructions:

  1. Build and run on iPhone 7/7 Plus or up. Touch Click Me to begin recording. Touch again to finish.
  2. Download the result to Mac: XCode -> Window -> Devices and Simulators -> Select app and click the "gear" icon below -> Download Container.
  3. Among the container files, tmp/temp.h265 is the raw HEVC data file.
  4. Add a container around the file: mp4box -add temp.h265 temp.h265.mp4
  5. Use QuickTime or VLC to play the mp4 file.
  6. For comparison, you could change H265 to false in ViewController.swift to do H.264 instead of HEVC encoding.

videotoolboxh265encoder's People

Contributors

tomisacat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.