我做了一个iPad video
in portrait mode
ie 768*1024
。现在,当我将其转换为mp4
格式时,转换器将其转换为1024*768
ie landscape mode
。有没有办法以纵向模式显示纵向视频或任何软件以 mp4 纵向模式转换纵向视频?
或者我必须在横向模式下再次制作视频?
我正在使用MPMoviePlayerController
.
提前致谢。
我做了一个iPad video
in portrait mode
ie 768*1024
。现在,当我将其转换为mp4
格式时,转换器将其转换为1024*768
ie landscape mode
。有没有办法以纵向模式显示纵向视频或任何软件以 mp4 纵向模式转换纵向视频?
或者我必须在横向模式下再次制作视频?
我正在使用MPMoviePlayerController
.
提前致谢。
MPMoviePlayerController no longer works in landscape by default so to make it work in landscape you need to apply a transform to the view.
UIView * playerView = [moviePlayerController view];
[playerView setFrame: CGRectMake(0, 0, 480, 320)];//iPhone
CGAffineTransform landscapeTransform;
landscapeTransform = CGAffineTransformMakeRotation(90*M_PI/180.0f);
landscapeTransform = CGAffineTransformTranslate(landscapeTransform, 80, 80);
[playerView setTransform: landscapeTransform];
In addition, if you want the regular full screen controls, use the following sample.
moviePlayerController.fullscreen = TRUE;
moviePlayerController.controlStyle = MPMovieControlStyleFullscreen;
This is for your information "playing a video with MPMoviePlayerController in Portrait WITHOUT Private API-Will get rejected by Apple".Good luck and happy coding :-)