I wanted to write-up the result of a code challenge that I completed a while ago. I was asked to create a tabbed iOS app with sectioned tables, pulling video thumbnails and article titles into different sections. Clicking on a thumbnail or article title would display the corresponding video or article in a separate view. Adding to the challenge, I was asked to provide bookmarking capability for the videos and articles. The bookmarked content would be visible in a second tab.
Challenge Details and GitHub app
The full details of the challenge and resulting project can be found at:
Movies that lay on their side
Have you ever taken a Portrait oriented movie with your iPhone or iPad and sent it to your friends who were using Windows? I can understand their frustration when the video I so carefully recorded causes them to bend their neck to the side:
So what’s going on here? The problem is that the .MOV file that I send them has a 90 degree rotation set as the preferred transform. Some Windows clients (such as Windows Media Player, VLC media player, etc) do not take this transform into consideration when presenting the video.
The VideoExport Swift Project
I wanted to create a project that would allow me to address the issue with rotations and other compatibility concerns.
I published my results to scottcarter/VideoExport on Github.
Posted in iOS, Objective-C, Swift
Tagged export, mp4, objective c, SDAVAssetExportSession, Swift, video, video bitrate, video composition, video settings, videoComposition, Xcode
Video Export Project
I am working on a project that will process videos taken with the camera or pulled from the Photo Library and export them to MP4 format, reducing the dimensions and bit rate.
As part of this process I am using the code for SDAVAssetExportSession that is a AVAssetExportSession drop-in replacement with customizable audio and video settings.
I make use of an instance of AVAssetReaderVideoCompositionOutput that is added to AVAssetReader in SDAVAssetExportSession.m. I set the videoComposition property of the former instance to a composition that allows me to set the render size and some appropriate transforms for scaling, etc. (CGAffineTransform).
Posted in iOS
Tagged CGAffineTransform, copyNextSampleBuffer, debugging, error, export, mp4, objective c, SDAVAssetExportSession, video, video composition, video settings, videoComposition, Xcode