2012-08-31 172 views
0

我有要求將5秒視頻分割爲來自iPhone的圖像/幀。將視頻分割成幀/圖像

是否有可能使用客觀的C.Any庫可用於此?

幫助非常明顯。

謝謝,

回答

1

有很多方法可以從視頻中獲取圖像。其中一些是: -

NSURL *videoURL = [NSURL fileURLWithPath:url]; 

MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:videoURL]; 

UIImage *thumbnail = [player thumbnailImageAtTime:1.0 timeOption:MPMovieTimeOptionNearestKeyFrame]; 

//Player autoplays audio on init 
[player stop]; 
[player release]; 

您還可以檢查這些鏈接: -

Is there any way other than thumbnail method to take a screenshot of an video in Iphone?

How to take a screenshot from an video playing through MPMediaPlayerController in iPhone?

它可以幫助你:)

謝謝:)