[英]iPad video in portrait mode
我已经以portrait mode
制作了一个iPad video
,即768*1024
。 现在,当我将其转换为mp4
格式时,转换器会将其转换为1024*768
即landscape mode
。是否有任何方法可以以纵向模式显示纵向视频,或者是否可以通过任何软件以mp4纵向模式转换纵向视频?
还是我必须再次以横向模式制作视频?
我正在使用MPMoviePlayerController
。
提前致谢。
默认情况下, MPMoviePlayerController不再在横向中运行 ,因此要使其在横向中运行,您需要对视图应用转换。
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;
这是供您参考的信息,“ 在不使用Private API的情况下在MPMoviePlayerController中播放视频,这将被Apple拒绝。 ”祝您好运,编码愉快:-)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.