Created
October 28, 2011 03:39
-
-
Save reidransom/1321570 to your computer and use it in GitHub Desktop.
Convert a video to DV Stream in CLI with QTKit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// compile with: | |
// $ gcc -o qt2dv -framework Foundation -framework QTKit qt2dv.m | |
#import <QTKit/QTKit.h> | |
int main (int argc, char *argv[]) | |
{ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
NSUserDefaults *args = [NSUserDefaults standardUserDefaults]; | |
QTMovie *movie = [QTMovie movieWithFile:[args stringForKey:@"i"] error:nil]; | |
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys: | |
[NSNumber numberWithBool:YES], QTMovieExport, | |
[NSNumber numberWithLong:kQTFileTypeDVC], | |
QTMovieExportType, nil]; | |
[movie writeToFile:[args stringForKey:@"o"] withAttributes:dictionary]; | |
[pool release]; | |
exit(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment