Skip to content

Commit

Permalink
Initial release.
Browse files Browse the repository at this point in the history
  • Loading branch information
sturmen committed Jan 21, 2024
1 parent ec9b661 commit 78358ce
Show file tree
Hide file tree
Showing 11 changed files with 813 additions and 0 deletions.
91 changes: 91 additions & 0 deletions .gitignore
@@ -0,0 +1,91 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
Packages/
Package.pins
Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

42 changes: 42 additions & 0 deletions README.md
@@ -1,2 +1,44 @@
# mvhevcsplit

Split a MV-HEVC file into separate left and right ProRes files.

## Purpose

As of January 2024, Apple's MV-HEVC format for stereoscopic video is very new and barely supported by anything. However, there are millions of iPhones (iPhone 15 Pro/Pro Max) that can capture spatial video already. There was no FOSS tool capable of splitting the stereo pair available, especially not in formats suited for post-production.

## Features

There is only one feature: it takes an MV-HEVC file and outputs the left and right eyes as separate files in the current directory. The output format is ProRes 422 HQ, video only. The user is expected to be familiar with tools such as ffmpeg for all other needs.

## Requirements

This has been tested on an M1 Max MacBook Pro running macOS 14.2.1 with [Pro Video Formats 2.3](https://support.apple.com/kb/DL2100?viewlocale=en_US&locale=en_US). Hopefully other configurations work, but your mileage may vary.

## Installation

1. Download `mvhevcsplit` from the releases
2. Place either on your PATH or in a working directory
3. In Terminal, navigate to where you placed the binary and mark it as executable: `chmod +x mvhevcsplit`
4. See "Usage Example" section

In the future I may also try to figure out how to get this added to Homebrew.

## Usage

In Terminal: `mvhevcsplit MOV_0001.MOV`

`output_left.mov` and `output_right.mov`, if they already exist, **will be deleted** and then the new contents will be output to the current directory.

## Contributing

I literally do not know Swift (I'm an Android developer) and had to figure it out for this project, so apologies for the code organization (or lack thereof). There is also no error handling or anything. Consider this to at most a "proof of concept." All optimizations, and improvements are welcome.

## Additional Notes

This would not have been possible without this blog post from [Finn Voorhees](https://github.com/finnvoor): <https://www.finnvoorhees.com/words/reading-and-writing-spatial-video-with-avfoundation> ([archive link](https://web.archive.org/web/20240117091738/https://www.finnvoorhees.com/words/reading-and-writing-spatial-video-with-avfoundation))

## Changelog

### v0.1 (2024-01-21)

Initial release.

0 comments on commit 78358ce

Please sign in to comment.