Skip to content

rlaguilar/fragmented-MPEG4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To run the iOS project

  • Select the iOSWriter schema and run it.

The segment generation will start after the view controller is loaded and once it's done, it'll show you a UIActivityController to share the output folder.

Notice that the input video is 10 seconds long but the output is only 6 seconds long.

To run the macOS project

Before you run the sample code project in Xcode:

  1. Edit the shared scheme called fmp4Writer.
  2. Open the Run action.
  3. Replace the <path to movie file on disk> argument with the path to a movie file on your local hard drive.
  4. Replace the <path to output directory> argument with your desired output directory; for example ~/Desktop/fmp4writer/.

Changes for making it work in iOS

  • Use an asset from the app bundle instead of reading the asset from the file system.
  • Copy the code from main.swift file to the ViewController.swift
  • In videoCompressionSettings, change the value of the key kVTCompressionPropertyKey_ProfileLevel from kVTProfileLevel_H264_High_4_2 to kVTProfileLevel_H264_High_4_1.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages