Latest 1.0.3
Homepage https://github.com/ifactorylab/IFVideoPicker
License MIT
Platforms ios 6.0
Authors

Library iOS video picker using AVCapturexxxx libraries

Features

  • 264 / AAC video and audio hardware accelerated encoding
  • return mp4 frames
  • including flv packetizer

Getting Started

Install the Prerequisites

  • OS X is requried for all iOS development
  • XCODE from the App Store.
  • GIT is required.
  • CocoaPods is required for the iOS dependency management. You should have ruby installed on your machine before install CocoaPods

Install the library

Source code for the SDK is available on GitHub

$ git clone [email protected]:ifactorylab/IFVideoPicker.git

Run CocoaPods

CocoaPods installs all dependencies for the library project

$ cd IFVideoPicker
$ pods install
$ open IFVideoPicker.xcodeproj

Add IFVideoPicker to your project

Create a Podfile if not exist, add the line below

pod 'IFVideoPicker',   '~> 1.0.2'

Demo

IFVideoPickerDemo demonstrates how the library works.

Capture video

#import "IFVideoPicker.h"
#import "MP4Reader.h"

// Create Audio AAC codec with 64kbps and samplerate 44100
IFAudioEncoder *ae = 
  [IFAudioEncoder createAACAudioWithBitRate:64000 sampleRate:44100];

// Create Video H264 codec with 500kbps and 512x288
CMVideoDimensions dimensions;
dimensions.width = 512;
dimensions.height = 288;

IFVideoEncoder *ve =
  [IFVideoEncoder createH264VideoWithDimensions:dimensions
                                        bitRate:500000
                                    maxKeyFrame:200];

[videoPicker_ startCaptureWithEncoder:ve
                                audio:ae
                         captureBlock:^(NSArray *frames, NSData *buffer) {
                        // Captured MP4 frames are coming
                        NSLog(@"buffer: %d bytes, with %d frames", [buffer length], [frames count]);
                    } metaHeaderBlock:^(MP4Reader *reader) {}
                        // MP4 moov header coming
                       } failureBlock:^(NSError *error) {
                        // Failed to capture video / audio chunk
                    }];

Contact

[email protected]

Latest podspec

{
    "name": "IFVideoPicker",
    "version": "1.0.3",
    "license": "MIT",
    "summary": "Library iOS video picker using AVCapturexxxx libraries.",
    "homepage": "https://github.com/ifactorylab/IFVideoPicker",
    "authors": {
        "Min Kim": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ifactorylab/IFVideoPicker.git",
        "tag": "1.0.3",
        "submodules": true
    },
    "requires_arc": false,
    "platforms": {
        "ios": "6.0"
    },
    "public_header_files": [
        "IFVideoPicker/IFVideoPicker.h",
        "IFVideoPicker/IFAVAssetEncoder.h",
        "IFVideoPicker/IFAudioEncoder.h",
        "IFVideoPicker/IFVideoEncoder.h",
        "IFVideoPicker/MP4Frame.h"
    ],
    "source_files": "IFVideoPicker/IF{*}.{h,m}",
    "ios": {
        "frameworks": [
            "AssetsLibrary",
            "CoreMedia",
            "AVFoundation",
            "UIKit",
            "Foundation",
            "CoreGraphics"
        ]
    },
    "subspecs": [
        {
            "name": "MP4",
            "source_files": "IFVideoPicker/MP4{*}.{h,m}"
        },
        {
            "name": "H264",
            "source_files": "IFVideoPicker/NALUnit.{h,m}"
        },
        {
            "name": "FLV",
            "source_files": "IFVideoPicker/FLV{*}.{h,m}"
        },
        {
            "name": "NSData",
            "source_files": [
                "IFVideoPicker/NSData{*}.{h,m}",
                "IFVideoPicker/NSMutableData+{*}.{h,m}",
                "IFVideoPicker/IFBytesData.{h,m}"
            ]
        }
    ]
}

Pin It on Pinterest

Share This