如何分割电影和播放部分以使其看起来像一个整体?

发布于 2024-09-02 04:07:49 字数 297 浏览 7 评论 0原文

我正在编写演示视频点播服务的软件。其中一项功能类似于 IIS Smooth Streaming - 我想根据客户端的带宽调整质量。我的想法是,将单部电影分成许多部分,比如说 - 2 秒的部分,具有不同的质量,然后将其发送给客户并播放它们。要点是,例如第一部分的质量可以非常高,而第二部分的质量非常差(如果带宽似乎很差)。问题是 - 你知道有什么软件可以让我精确地剪辑电影吗?例如,ffmpeg 以一种可见且非常烦人的方式分割电影(秒是精度的衡量标准)。如果重要的话,我使用 qt + phonon 作为播放器。或者也许您知道有什么更好的方法来提供此类功能,而无需将电影分成几部分?

I'm writing software which is demonstraiting video on demand service. One of the feature is something similiar to IIS Smooth Streaming - I want to adjust quality to the bandwith of the client. My idea is, to split single movie into many, let's say - 2 seconds parts, in different qualities and then send it to the client and play them. The point is that for example first part can be in very high quality, and second in really poor (if the bandwith seems to be poor). The question is - do you know any software that allows me to cut movies precisly? For example ffmpeg splits movies in a way that join is visible and really annoying (seconds are the measure of precision). I use qt + phonon as a player if it matters. Or maybe you know any better way to provide such feature, without splitting movie into parts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

宛菡 2024-09-09 04:07:49

您确定 ffmpeg 的精度以秒为单位吗?以下是手册页的摘录:

-t 持续时间

<块引用>

将转码/捕获的视频序列限制为指定的持续时间(以秒为单位)。还支持“hh:mm:ss[.xxx]”语法。

-ss位置

<块引用>

寻找给定的时间位置(以秒为单位)。还支持“hh:mm:ss[.xxx]”语法。

-itsoffset 偏移量

<块引用>

设置输入时间偏移(以秒为单位)。还支持“[-]hh:mm:ss[.xxx]”语法。此选项影响其后的所有输入文件。该偏移量将添加到输入文件的时间戳中。指定正偏移量意味着相应的流延迟“offset”秒。

看起来它支持高达毫秒的精度,并且由于大多数视频不是每秒 1000 帧,因此这对于准确搜索任何视频流来说已经足够了。

Are you sure ffmpeg's precision is in seconds? Here's an excerpt from the man page:

-t duration

Restrict the transcoded/captured video sequence to the duration specified in seconds. "hh:mm:ss[.xxx]" syntax is also supported.

-ss position

Seek to given time position in seconds. "hh:mm:ss[.xxx]" syntax is also supported.

-itsoffset offset

Set the input time offset in seconds. "[-]hh:mm:ss[.xxx]" syntax is also supported. This option affects all the input files that follow it. The offset is added to the timestamps of the input files. Specifying a positive offset means that the corresponding streams are delayed by 'offset' seconds.

Looks like it supports up to millisecond precision, and since most video is not +1000 frames per second, this would be more than enough precision to accurately seek through any video stream.

烂人 2024-09-09 04:07:49

你确定这是个好主意吗?每两秒检查一次带宽并切换剪辑似乎只允许您在任何给定点缓冲未来两秒,除非客户端具有某种神圣的连接,否则它会显得非常不稳定。

如果用户重播视频,那么播放又如何呢?它会在重播时重新计算质量,还是在流式传输时构建视频文件?

我在流媒体视频领域没有经验,但我最常看到的是提供商有几个不同质量版本的视频(从极低到高清),他们测试用户的带宽,然后以一定的速度进行流媒体播放。适当的质量。

(如果我误解了这个问题,我深表歉意。)

Are you sure this is a good idea? Checking the bandwidth and switching out clips every two seconds seems like it will only allow you to buffer two seconds into the future at any given point, and unless the client has some Godly connection, it will appear extremely jumpy.

And what about playback, if the user replays the video? Would it recalculate the quality as it replays, or do you build the video file while streaming?

I am not experienced in the field of streaming video, but it seems what I see most often is that the provider has several different quality versions of their video (from extremely low to HD), and they test the user's bandwidth and then stream at an appropriate quality.

(I apologize if I misunderstood the question.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文