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

还有别的选择吗?

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

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

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


当前回答

从Xcode 9和以上,你可以截图或录制视频使用simctl二进制,你可以在这里找到它:

/Applications/Xcode.app/Contents/Developer/usr/bin/simctl

您可以将它与xcrun一起使用,在命令行中命令模拟器。

在命令行中运行截图: xrun simctl IO启动截图 使用命令行在模拟器上录制视频: xrun simctl io启动recordVideo文件名。g mp4 / mov)

注意:您可以在您选择的任何目录中使用此命令。该文件将保存在该目录中。

其他回答

以下是一个有效的解决方案,不需要300美元(FinalCut Pro),但它需要ScreenFlow (AppStore中的ScreenFlow应用程序)(100美元):

把你的设备连接到运行优胜美地的Mac电脑上 启动Quicktime并选择File/Newi Movie Recording 启动ScreenFlow并捕获您的视频 在ScreenFlow中编辑视频(添加文本,音乐等) 裁剪视频,使其只包含设备屏幕 导出苹果要求大小的视频(例如,1334x750)

从Xcode 9和以上,你可以截图或录制视频使用simctl二进制,你可以在这里找到它:

/Applications/Xcode.app/Contents/Developer/usr/bin/simctl

您可以将它与xcrun一起使用,在命令行中命令模拟器。

在命令行中运行截图: xrun simctl IO启动截图 使用命令行在模拟器上录制视频: xrun simctl io启动recordVideo文件名。g mp4 / mov)

注意:您可以在您选择的任何目录中使用此命令。该文件将保存在该目录中。

对于Xcode 8.2或更高版本

您可以使用xcrun simctl(一个命令行实用程序来控制模拟器)拍摄模拟器的视频和屏幕截图

在模拟器上运行应用程序 打开终端 执行命令 截图 xxrun simctl IO启动截图<filename>。<文件扩展名> 例如: xrun simctl io启动截图myScreenshot.png 拍一段视频 xrun simctl io boot recordVideo <filename>. txt<文件扩展名> 例如: xrun simctl io启动recordVideo appVideo.mov 按“ctrl + C”停止录像。

所创建文件的默认位置是当前目录。

Xcode 11.2及以后版本提供了额外的选项。

来自Xcode 11.2 Beta版本说明

simctl视频记录现在产生更小的视频文件,支持HEIC 压缩,并利用硬件编码支持的地方 可用。此外,可以在iOS 13上录制视频,tvOS 13, watchOS 6设备已恢复。

你可以使用额外的标志:

xcrun simctl io --help
Set up a device IO operation.
Usage: simctl io <device> <operation> <arguments>

...

    recordVideo [--codec=<codec>] [--display=<display>] [--mask=<policy>] [--force] <file or url>
        Records the display to a QuickTime movie at the specified file or url.
        --codec      Specifies the codec type: "h264" or "hevc". Default is "hevc".

        --display    iOS: supports "internal" or "external". Default is "internal".
                     tvOS: supports only "external"
                     watchOS: supports only "internal"

        --mask       For non-rectangular displays, handle the mask by policy:
                     ignored: The mask is ignored and the unmasked framebuffer is saved.
                     alpha: Not supported, but retained for compatibility; the mask is rendered black.
                     black: The mask is rendered black.

        --force      Force the output file to be written to, even if the file already exists.

    screenshot [--type=<type>] [--display=<display>] [--mask=<policy>] <file or url>
        Saves a screenshot as a PNG to the specified file or url(use "-" for stdout).
        --type       Can be "png", "tiff", "bmp", "gif", "jpeg". Default is png.

        --display    iOS: supports "internal" or "external". Default is "internal".
                     tvOS: supports only "external"
                     watchOS: supports only "internal"

                     You may also specify a port by UUID
        --mask       For non-rectangular displays, handle the mask by policy:
                     ignored: The mask is ignored and the unmasked framebuffer is saved.
                     alpha: The mask is used as premultiplied alpha.
                     black: The mask is rendered black.

现在你可以在jpeg中截图,带掩码(用于非矩形显示)和一些其他标志:

xrun simctl IO启动截图——type=jpeg——mask=黑色截图

这是我发现的最简单的方法,你只需要一个iPhone和iPad:

使用QuickTime播放器记录设备屏幕:

连接您的设备。 打开QuickTime播放器。 选择文件>新建电影录制(CMD + alt + N) 在出现的窗口中,选择您的iOS设备作为最大分辨率的相机。 保存视频文件(CMD + S)

开放的iMovie

选择文件->新应用预览 从你的应用程序拖一个最大分辨率的图像,例如1920 x 1080的截图到项目。(即使你用iPhone 5录制视频,它也会使视频的尺寸变成1920 x 1080) 将您录制的电影拖到项目中。 选择“文件->共享->应用预览”保存

现在对你所有的设备都这样做,或者:

下载手刹:https://handbrake.fr/downloads.php

并调整高分辨率视频的大小:

拖动您的高分辨率视频到手刹 选择“图片设置”图标 调整大小到正确的大小-关闭并按“开始”图标-保存到桌面

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

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

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