如何分割电影和播放部分以使其看起来像一个整体?
我正在编写演示视频点播服务的软件。其中一项功能类似于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您确定 ffmpeg 的精度以秒为单位吗?以下是手册页的摘录:
看起来它支持高达毫秒的精度,并且由于大多数视频不是每秒 1000 帧,因此这对于准确搜索任何视频流来说已经足够了。
Are you sure ffmpeg's precision is in seconds? Here's an excerpt from the man page:
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.
你确定这是个好主意吗?每两秒检查一次带宽并切换剪辑似乎只允许您在任何给定点缓冲未来两秒,除非客户端具有某种神圣的连接,否则它会显得非常不稳定。
如果用户重播视频,那么播放又如何呢?它会在重播时重新计算质量,还是在流式传输时构建视频文件?
我在流媒体视频领域没有经验,但我最常看到的是提供商有几个不同质量版本的视频(从极低到高清),他们测试用户的带宽,然后以一定的速度进行流媒体播放。适当的质量。
(如果我误解了这个问题,我深表歉意。)
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.)