我正在开发一个应用程序,用户上传视频并使用jwplayer,jplayer,flowplayer等将其播放回浏览器.有些视频立即播放,而其他视频则等到整个视频文件下载完毕.
我正在使用ffmpeg将视频转换为mp4格式.
以下是我尝试的其中一个视频文件的一些详细信息.
General
Complete name : 429183132058337290450_AutoFF.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 10.2 MiB
Duration : 24s 333ms
Overall bit rate : 3 501 Kbps
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 24s 333ms
Bit rate mode …Run Code Online (Sandbox Code Playgroud) 我有问题在codeigniter中集成h2o php模板引擎.
任何建议都会非常值得赞赏.
虽然我试图得到一个flv视频文件的长度我得到0秒,因为它只发生在一些视频,否则我的功能工作正常.
下面是我的代码.
<?php
function mbmGetFLVDuration($file){
// read file
if (file_exists($file)){
$handle = fopen($file, "r");
$contents = fread($handle, filesize($file));
fclose($handle);
//
if (strlen($contents) > 3){
if (substr($contents,0,3) == "FLV"){
$taglen = hexdec(bin2hex(substr($contents,strlen($contents)-3)));
if (strlen($contents) > $taglen){
$duration = hexdec(bin2hex(substr($contents,strlen($contents)-$taglen,3))) ;
return $duration;
}
}
}
}
}
// not working video file
$result = ceil(mbmGetFLVDuration('not_working_copy.flv')/1000);
// working video file
//$result = ceil(mbmGetFLVDuration('working_copy.flv')/1000);
echo date('H:i:s',mktime(0,0,$result))
?>
Run Code Online (Sandbox Code Playgroud)
我在下面的链接中附加了工作和不工作的flv视频:
工作视频:http: //blog.developeronhire.com/wp-content/uploads/downloads/2011/06/working_copy.flv
不工作的视频:http: //blog.developeronhire.com/wp-content/uploads/downloads/2011/06/not_working_copy.flv
任何想法将不胜感激.
谢谢
如何使用CodeIgniter打印条形码图像?
我是否必须制作自定义库或帮助程序才能生成条形码图像?有没有人知道在CodeIgniter中生成条形码图像的任何库或助手?
如何获取页面的所有锚标记并将一个类添加到mailto(例如mailto:example@example.com),将另一个类添加到web链接(例如http://example.com)?
预期产量:
<a href="mailto:example@example.com" class="class1">
<a href="http://example.com" class="class2">
Run Code Online (Sandbox Code Playgroud)