简体   繁体   English

如何在没有FFMPEG的情况下修剪flv文件

[英]How to trim flv file without FFMPEG

Hi All. 大家好。

We want to trim uploaded videos in certain time limit. 我们希望在一定的时间范围内修剪上传的视频。 like we want to trim our video to first 30 seconds on run time. 就像我们想将视频修剪到运行时间的前30秒一样。 we dont want to use FFMPEG for this purpose as it need to do certain configuration and we are not on live server. 我们不想为此目的使用FFMPEG,因为它需要进行某些配置并且我们不在实时服务器上。

so please refer some classes or codes that cam fulfill our such requirements. 因此,请参考一些可以满足我们此类要求的类或代码。

we do not have any big libraries and codes that best fits here and complete our all requirements. 我们没有最适合此处并能满足所有要求的大型库和代码。 we are not interested in FFMPEG nor we will use it. 我们对FFMPEG不感兴趣,也不会使用它。 so please refer things other than that. 因此,请参考其他内容。

we have used: 我们使用了:

trimMp3->cut_mp3('oldfile', 'newfile');

For this purpose as well but no good lucks as it is only used for mp3 triming. 出于此目的,但也没有很好的运气,因为它仅用于mp3修整。 Can anyone please help me? 谁能帮帮我吗?

Thank you. 谢谢。

FLV is an extremely simple file format. FLV是一种非常简单的文件格式。 Writing the code to do this yourself in PHP should be pretty easy. 编写代码来用PHP自己完成此操作应该很容易。

Se Annex E in this document http://download.macromedia.com/f4v/video_file_format_spec_v10_1.pdf 本文档的附件E http://download.macromedia.com/f4v/video_file_format_spec_v10_1.pdf

Simple read in each FLV tag, if the timestamp is less than 30000 write it to a new file. 简单地读取每个FLV标记,如果时间戳小于30000,则将其写入新文件。 if it is greater, throw it away. 如果更大,则将其丢弃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM