如何仅播放网页中视频的特定部分?

发布于 2024-08-30 09:54:44 字数 192 浏览 6 评论 0原文

有没有什么方法可以在网站上显示视频,让我只显示视频剪辑,而无需将文件物理切片为实际剪辑?

编辑:具体来说,我想使用开源 Flash 播放器来播放剪辑。我可以制作特定的剪辑,但这既耗时又是维护的噩梦。

第二次编辑:youtube 将无法工作,因为我们能够控制谁观看这些视频非常重要。此外,该 Web 应用程序在经典的 LAMP 堆栈上运行。

It there any way of displaying videos on a website that would allow me to show just a clip of a video without physically slicing the file into actual clips?

EDIT: Specifically, I'd like to play the clips using an open source flash player. I could make specific clips, but that is time consuming and a maintenance nightmare.

Second EDIT: youtube won't work because it is very important we be able to control who views these videos. Also, this web application is running off of a classic LAMP stack.

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

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

发布评论

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

评论(6

难理解 2024-09-06 09:54:44

免费的 Flow 视频播放器将播放视频文件,它包含源代码和 api 函数来更改搜索位置:

http://flowplayer。组织/

The free Flow Video Player will play video files and it includes source code and api functions to change the seek position:

http://flowplayer.org/

以为你会在 2024-09-06 09:54:44

您将视频编辑到另一个文件中,然后将该文件作为视频嵌入到您的页面上;-)

You edit the video into another file, and embed that file as the video on your page ;-)

木格 2024-09-06 09:54:44

你可以尝试从 php 执行 ffmpeg 或类似的东西来动态生成剪辑部分 - 但这是作弊,不是吗? - 我相信在许多视频播放器中一定有一种晦涩的方式来选择视频的起点和终点,这就是为什么用户可以在观看时切换到视频中的某个点...

you could try to execute ffmpeg or similar from php to generate a clip section on the fly- but that would be cheating, wouldn't it? - i believe that there must be an obscure way to select the starting and ending point of a video in many video players, that's why the user can switch to a point in the video while watching...

夏末染殇 2024-09-06 09:54:44

这很大程度上取决于您使用的视频技术。例如,Quicktime 剪辑在媒体(数据)和“电影”(元数据)之间有清晰且易于操作的区别。

很久以前,您可以在“simplemovie”(相当于记事本的视频:-))中打开一个剪辑,选择您想要的部分,复制,新(空)文件,粘贴,保存,然后选择“带参考”。结果是一个非常小的文件,不包含任何媒体,但只要“大”文件仍然存在,它对于任何目的都是绝对有效的电影文件。

我确信 SMIL 也有类似的功能;但谁来实施呢?至于其他容器,我不知道。

我想您最好的选择是检查您嵌入网页中的播放器的 API。它可能有一些参数来指定新的“开始”和“结束”点。如果运气好的话,它甚至可以让它看起来就像子剪辑就是全部一样。

it depends a lot on the video technology you use. Quicktime clips, for example, have a clear and easily manipulable distinction between media (data) and 'movie' (metadata).

Long ago, you could open a clip in 'simplemovie' (the video equivalent of notepad :-) ), select the part you want, copy, new (empty) file, paste, save, and pick "with references". The result was a very small file that contained no media but was absolutely valid movie file for every purpose, as long as the 'big' file was still around.

I'm sure SMIL has a similar capability; but who implements that? As for other containers, i have no idea.

I guess your best bet is to check the API of the player you're embedding in your webpage. It probably has some parameters to specify new 'beginning' and 'end' points. With some luck, it could even make it seem as the sub-clip is all there is.

智商已欠费 2024-09-06 09:54:44

根据您的评论,您似乎仍在考虑切片文件/只要它是自动化的。

问题是你没有提到你正在使用什么平台/语言。如果它恰好是 .net,则对其进行修改对我们来说效果很好: http://jasonjano.wordpress.com/2010/02/09/a-simple-c-wrapper-for-ffmpeg/。该示例用于转换,但可以进行修改以使用 ffmpeg 所需的功能,即仅抓取视频的一部分。

Based on your comments, it seems you are still considering slicing the files / as long as its automated.

The issue, is you didn't mention what platform / languages you are using. If it happens to be .net, a modification of this is working well for us: http://jasonjano.wordpress.com/2010/02/09/a-simple-c-wrapper-for-ffmpeg/. The sample is for conversion, but can be adapted to use the features you need from ffmpeg i.e. to just grab a piece of the video.

和影子一齐双人舞 2024-09-06 09:54:44

我不认为这是最好的方法,但您可以使用一些 AS3 将电影作为影片剪辑加载,然后使用 .addFrameScript()、gotoAndPlay() 和 .Stop() 手动控制剪辑。

I don't think its the best way, but you could use some AS3 to load the movies as movieclips then use .addFrameScript(), gotoAndPlay() and .Stop() to manually control the clips.

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