现在我们可以向App Store提交应用的视频预览。根据苹果公司的说法,我们应该在iOS8设备和OSX 10.10设备上这样做。问题是你必须拥有所有不同的设备(4英寸、4.7英寸、5.5英寸和iPad)。

还有别的选择吗?

我想拍一段模拟器的视频。问题是,当以100%分辨率显示时,设备屏幕比我的全高清显示器还大。任何解决方案,可以捕捉视频从模拟器的全分辨率?

编辑: 因为很多人都在回答我没有问的问题让我说 记录一个设备大小并缩放它不是我要求的 我问的不是如何录制应用预览 -我问的不是你怎么做预告片;

我想问的是,如果模拟器无法在屏幕上显示,你能否以100%分辨率录制视频?


当前回答

在Xcode 12中,只需在模拟器中按cmd + R来记录屏幕。cmd + S进行截图。

其他回答

你可以用内置的截图工具记录屏幕的一部分:

按Shift-Command-5显示控制面板。 选择。 选择要记录的屏幕的一部分。这就是iPhone模拟器。 单击,停止录制。 一个缩略图将出现在屏幕的右下角。您可以在保存之前编辑它。

如果您希望可视化鼠标单击,请在步骤1之后选择“选项”控件并启用“显示鼠标单击”。

在Xcode 12中,只需在模拟器中按cmd + R来记录屏幕。cmd + S进行截图。

在我的MBP的设置>显示>显示,我看到一个设置为“分辨率:默认显示/缩放”。我将其设置为“更大的空间”,然后尝试各种模拟器,所有模拟器似乎都能100%地适应放大屏幕。但我怀疑这在你的全高清屏幕上行不通……

另一种选择可能是尝试在模拟器上安装某种VNC服务器解决方案,如https://github.com/wingify/vnc,并使用VNC记录器进行记录-我相信有一个Python VNC记录器。

你应该在优胜美地使用QuickTime连接并记录你的iOS设备的屏幕。

iPhone的肖像

录制完成后,可以使用iMovie编辑视频。当你在制作iPhone人像应用预览时,分辨率必须是1080x1920,但iMovie只能在16:9 (1920x1080)导出。

一种解决方案是导入分辨率为1080x1920的录制视频,并将其旋转90度。然后以1920x1080的尺寸导出电影,并使用ffmpeg和以下命令将导出的视频向后旋转90度

ffmpeg -i Landscape.mp4 -vf "transpose=1" Portrait.mp4

iPad

iPad稍微复杂一点,因为它需要1200x900(4:3)的分辨率,但iMovie只能导出16:9的分辨率。

这是我所做的。

在iPad Air上录制电影(1200x900, 4:3) 导入到iMovie,导出为1920x1080,16:9 (iPadLandscape16_9-1920x1080.mp4) 将左右黑条移至1440x1080的视频。一杆的宽度为240 ffmpeg -i ipad庭园16_9-1920x1080.mp4 -filter:v "crop=1440:1080:240:0" -c:一个拷贝ipad庭园4_3-1440x1080.mp4 缩小电影到1220x900 ffmpeg -i ipad庭园4_3-1440x1080.mp4 -filter:v scale=1200:-1: -c:a copy ipad庭园4_3-1200x900.mp4

摘自我在苹果开发者论坛上的回答

Taking a Screenshot or Recording a Video Using the Command Line You can take a screenshot or record a video of the simulator window using the xcrun command-line utility. Launch your app in Simulator. Launch Terminal (located in /Applications/Utilities), and enter the appropriate command: To take a screenshot, use the screenshot operation: xcrun simctl io booted screenshot You can specify an optional filename at the end of the command. To record a video, use the recordVideo operation: xcrun simctl io booted recordVideo <filename>.<extension> To stop recording, press Control-C in Terminal. Note: You must specify a filename for recordVideo. The default location for the created file is the current directory. For more information on simctl, run this command in Terminal: xcrun simctl help For more information on the io subcommand of simctl, run this command: xcrun simctl io help

来自Apple文档。