Skip to content

Instantly share code, notes, and snippets.

@bigday
bigday / MixVideoWithText
Created August 31, 2015 07:27
MixVideoWithText
#import <AVFoundation/AVFoundation.h>
-(void)MixVideoWithText
{
AVURLAsset* videoAsset = [[AVURLAsset alloc]initWithURL:url options:nil];
AVMutableComposition* mixComposition = [AVMutableComposition composition];
AVMutableCompositionTrack *compositionVideoTrack = [mixComposition addMutableTrackWithMediaType:AVMediaTypeVideo preferredTrackID:kCMPersistentTrackID_Invalid];
AVAssetTrack *clipVideoTrack = [[videoAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0];
AVMutableCompositionTrack *compositionAudioTrack = [mixComposition addMutableTrackWithMediaType:AVMediaTypeAudio preferredTrackID:kCMPersistentTrackID_Invalid];
@bigday
bigday / AVCaptureViewController.swift
Created July 5, 2018 10:27 — forked from tad-iizuka/ViewController.swift
Photo Capture Sample Swift 4 + iOS 11
//
// ViewController.swift
// PhotoCaptureSample
//
// Created by Tadashi on 2017/09/23.
// Copyright © 2017 UBUNIFU Incorporated. All rights reserved.
//
import UIKit
import AVFoundation
import Photos