Wowza 服务器端 Stream.play() 按帧

Wowza server-side Stream.play() by frame

您可以将媒体源添加到 Stream 的当前播放列表并使用以下方法完整播放:

stream1.play("mp4:sample.mp4", 0, -1, true);

并且您可以使用偏移量和持续时间在剪辑中开始 5 秒,然后像这样播放该剪辑的 7 秒:

stream1.play("mp4:sample.mp4", 5, 7, true);

但是有没有一种方法可以通过帧而不是秒来控制播放?从第 320 帧开始播放 210 帧。有什么方法可以达到这种粒度级别?

不,Stream class 的 documentation 没有提到设置 startlength 参数的方法 play 使用框架的函数。

但是,您可以使用 Stream.setTimesInMilliseconds(true):

将分辨率从秒更改为毫秒

public void setTimesInMilliseconds(boolean timesInMilliseconds)

If true start time and duration and are milliseconds. If false startTime and duration are in seconds.

您可以根据帧速率和帧偏移计算起始和长度。

我建议您也询问 Wowza forum,因为并非所有新功能都已正确记录。