2014-10-31 73 views
0

我需要創建一個應用程序,在該應用程序中我必須將視頻/ mp4文件轉換爲圖像幀。請爲我提供任何解決方案從iOS中的視頻文件創建不同的圖像幀應用程序。使用目標c在ios中將mp4 /視頻文件轉換爲幀

+0

有很多解決方案availble的嘗試搜索看到這個http://stackoverflow.com/questions/4199879/iphone-read-uiimage -frames-從視頻與 - avfoundation – iphonic 2014-10-31 10:59:54

回答

2
MPMoviePlayerController *movie = [[MPMoviePlayerController alloc]initWithContentURL:[NSURL URLWithString:@"yourvideofilename.mp4"]];//replace your video file name 

UIImage *singleFrameImage = [movie thumbnailImageAtTime:10 timeOption:MPMovieTimeOptionExact]; 

試試這個上面的代碼行,我希望你得到的結果

相關問題